2001-03-06 05:29:24 +08:00
|
|
|
/* sys/socket.h
|
|
|
|
|
|
|
|
Copyright 1996-2001 Red Hat, Inc.
|
|
|
|
|
|
|
|
This file is part of Cygwin.
|
|
|
|
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
|
|
details. */
|
|
|
|
|
2000-02-18 03:38:33 +08:00
|
|
|
#ifndef _SYS_SOCKET_H
|
|
|
|
#define _SYS_SOCKET_H
|
|
|
|
|
|
|
|
#include <features.h>
|
|
|
|
#include <cygwin/socket.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2000-12-12 03:45:54 +08:00
|
|
|
/* SUS symbolic values for the second parm to shutdown(2) */
|
|
|
|
#define SHUT_RD 0 /* == Win32 SD_RECEIVE */
|
|
|
|
#define SHUT_WR 1 /* == Win32 SD_SEND */
|
|
|
|
#define SHUT_RDWR 2 /* == Win32 SD_BOTH */
|
|
|
|
|
2000-02-18 03:38:33 +08:00
|
|
|
#ifndef __INSIDE_CYGWIN_NET__
|
|
|
|
int accept (int, struct sockaddr *__peer, int *);
|
2001-01-10 00:00:58 +08:00
|
|
|
int bind (int, const struct sockaddr *__my_addr, int __addrlen);
|
2000-02-18 03:38:33 +08:00
|
|
|
int connect (int, const struct sockaddr *, int);
|
|
|
|
int getpeername (int, struct sockaddr *__peer, int *);
|
|
|
|
int getsockname (int, struct sockaddr *__addr, int *);
|
|
|
|
int listen (int, int __n);
|
2002-08-26 17:57:27 +08:00
|
|
|
int recv (int, void *__buff, int __len, int __flags);
|
|
|
|
int recvfrom (int, void *__buff, int __len, int __flags,
|
|
|
|
struct sockaddr *__from, int *__fromlen);
|
2002-01-20 00:11:00 +08:00
|
|
|
int recvmsg(int s, struct msghdr *msg, int flags);
|
2002-08-26 17:57:27 +08:00
|
|
|
int send (int, const void *__buff, int __len, int __flags);
|
2002-01-20 00:11:00 +08:00
|
|
|
int sendmsg(int s, const struct msghdr *msg, int flags);
|
2002-08-26 17:57:27 +08:00
|
|
|
int sendto (int, const void *, int __len, int __flags,
|
|
|
|
const struct sockaddr *__to, int __tolen);
|
2000-02-18 03:38:33 +08:00
|
|
|
int setsockopt (int __s, int __level, int __optname, const void *optval, int __optlen);
|
|
|
|
int getsockopt (int __s, int __level, int __optname, void *__optval, int *__optlen);
|
|
|
|
int shutdown (int, int);
|
|
|
|
int socket (int __family, int __type, int __protocol);
|
|
|
|
int socketpair (int __domain, int __type, int __protocol, int *__socket_vec);
|
|
|
|
|
|
|
|
struct servent *getservbyname (const char *__name, const char *__proto);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _SYS_SOCKET_H */
|