]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/include/sys/socket.h
Throughout, update copyrights to reflect dates which correspond to main-branch
[newlib-cygwin.git] / winsup / cygwin / include / sys / socket.h
CommitLineData
a887211b
CV
1/* sys/socket.h
2
bc837d22
CF
3 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2005, 2006, 2009, 2010
4 Red Hat, Inc.
a887211b
CV
5
6This file is part of Cygwin.
7
8This software is a copyrighted work licensed under the terms of the
9Cygwin license. Please consult the file "CYGWIN_LICENSE" for
10details. */
11
1fd5e000
CF
12#ifndef _SYS_SOCKET_H
13#define _SYS_SOCKET_H
14
15#include <features.h>
16#include <cygwin/socket.h>
17#include <sys/time.h>
18
19#ifdef __cplusplus
20extern "C"
21{
22#endif
23
94741136
CV
24/* SUS symbolic values for the second parm to shutdown(2) */
25#define SHUT_RD 0 /* == Win32 SD_RECEIVE */
26#define SHUT_WR 1 /* == Win32 SD_SEND */
27#define SHUT_RDWR 2 /* == Win32 SD_BOTH */
28
1fd5e000 29#ifndef __INSIDE_CYGWIN_NET__
78db7dff 30 int accept (int, struct sockaddr *__peer, socklen_t *);
0d653155 31 int accept4 (int, struct sockaddr *__peer, socklen_t *, int flags);
78db7dff
CV
32 int bind (int, const struct sockaddr *__my_addr, socklen_t __addrlen);
33 int connect (int, const struct sockaddr *, socklen_t);
34 int getpeername (int, struct sockaddr *__peer, socklen_t *);
35 int getsockname (int, struct sockaddr *__addr, socklen_t *);
1fd5e000 36 int listen (int, int __n);
70e476d2
CV
37 ssize_t recv (int, void *__buff, size_t __len, int __flags);
38 ssize_t recvfrom (int, void *__buff, size_t __len, int __flags,
39 struct sockaddr *__from, socklen_t *__fromlen);
40 ssize_t recvmsg(int s, struct msghdr *msg, int flags);
41 ssize_t send (int, const void *__buff, size_t __len, int __flags);
42 ssize_t sendmsg(int s, const struct msghdr *msg, int flags);
43 ssize_t sendto (int, const void *, size_t __len, int __flags,
44 const struct sockaddr *__to, socklen_t __tolen);
78db7dff
CV
45 int setsockopt (int __s, int __level, int __optname, const void *optval,
46 socklen_t __optlen);
47 int getsockopt (int __s, int __level, int __optname, void *__optval,
48 socklen_t *__optlen);
1fd5e000
CF
49 int shutdown (int, int);
50 int socket (int __family, int __type, int __protocol);
51 int socketpair (int __domain, int __type, int __protocol, int *__socket_vec);
52
53 struct servent *getservbyname (const char *__name, const char *__proto);
54#endif
55
56#ifdef __cplusplus
57};
58#endif
59
60#endif /* _SYS_SOCKET_H */
This page took 0.417921 seconds and 5 git commands to generate.