socket.h

00001 #ifndef NET__SOCKET__H__
00002 #define NET__SOCKET__H__
00003 
00004 #include "ipv4.h"
00005 #include "ipv6.h"
00006 
00022 int socket_tcp4(void);
00023 int socket_tcp6(void);
00024 int socket_tcp(void);
00025 int socket_udp4(void);
00026 int socket_udp6(void);
00027 int socket_udp(void);
00028 int socket_connect4(int sock, const ipv4addr* ip, ipv4port port);
00029 int socket_connect4_timeout(int sock, const ipv4addr* ip, ipv4port port,
00030                             int timeout);
00031 int socket_connect6(int sock, const ipv6addr* ip, ipv6port port);
00032 int socket_connect6_timeout(int sock, const ipv6addr* ip, ipv6port port,
00033                             int timeout);
00034 int socket_bind4(int sock, const ipv4addr* ip, ipv4port port);
00035 int socket_bind6(int sock, const ipv6addr* ip, ipv6port port);
00036 int socket_accept4(int sock, ipv4addr* ip, ipv4port* port);
00037 int socket_accept6(int sock, ipv6addr* ip, ipv6port* port);
00038 int socket_recv4(int sock, char* buffer, unsigned buflen,
00039                  ipv4addr* ip, ipv4port* port);
00040 int socket_recv6(int sock, char* buffer, unsigned buflen,
00041                  ipv6addr* ip, ipv6port* port);
00042 int socket_send4(int sock, const char* buffer, unsigned buflen,
00043                  const ipv4addr* ip, ipv4port port);
00044 int socket_send6(int sock, const char* buffer, unsigned buflen,
00045                  const ipv6addr* ip, ipv6port port);
00046 int socket_getaddr4(int sock, ipv4addr* ip, ipv4port* port);
00047 int socket_getaddr6(int sock, ipv6addr* ip, ipv6port* port);
00048 int socket_cork(int sock);
00049 int socket_uncork(int sock);
00050 int socket_notcpdelay(int sock, int enable);
00055 int socket_unixdgm(void);
00056 int socket_unixstr(void);
00057 int socket_connectu(int sock, const char* path);
00058 int socket_connectu_timeout(int sock, const char* path, int timeout);
00059 int socket_bindu(int sock, const char* path);
00060 int socket_acceptu(int sock);
00061 int socket_recvu(int sock, char* buffer, unsigned buflen);
00062 int socket_sendu(int sock, const char* buffer, unsigned buflen);
00063 
00064 int socket_pairstr(int fd[2]);
00065 int socket_pairdgm(int fd[2]);
00070 int socket_broadcast(int sock);
00071 int socket_connected(int sock);
00072 int socket_linger(int fd, int onoff, int seconds);
00073 int socket_listen(int sock, int backlog);
00074 int socket_reuse(int sock);
00075 int socket_shutdown(int sock, int shut_rd, int shut_wr);
00076 
00077 int socket_sendfd(int sock, int fd);
00078 int socket_recvfd(int sock);
00083 #endif

Generated on Thu Feb 19 11:11:50 2009 for bglibs by  doxygen 1.5.4