X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Usermode%2FLibraries%2Flibpsocket.so_src%2Finclude_exp%2Fsys%2Fsocket.h;h=9c3e3bda39657495c285a4e6d093d2db400ce476;hb=f8cde3fab5eb27ebacf9d76a7ac478a68a36a38b;hp=deb1f51e7e3de3f63fc43c9faa5a2f7e9ccc9bc0;hpb=cee190b0244cf8c1389f82237f0c1457eb2c0e7f;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/libpsocket.so_src/include_exp/sys/socket.h b/Usermode/Libraries/libpsocket.so_src/include_exp/sys/socket.h index deb1f51e..9c3e3bda 100644 --- a/Usermode/Libraries/libpsocket.so_src/include_exp/sys/socket.h +++ b/Usermode/Libraries/libpsocket.so_src/include_exp/sys/socket.h @@ -14,17 +14,22 @@ #endif #include // uint32_t +#ifdef __cplusplus +extern "C" { +#endif + typedef uint32_t socklen_t; -typedef enum +enum { AF_UNSPEC = 0, AF_PACKET = 1, AF_LOCAL = 2, AF_INET = 4, AF_INET6 = 6, -} sa_family_t; +}; #define AF_UNIX AF_LOCAL +typedef uint8_t sa_family_t; // I would use an enum, but cast issues struct sockaddr { @@ -141,6 +146,8 @@ extern int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen); */ extern int listen(int sockfd, int backlog); +#define SOMAXCONN 128 // Maximum size of backlog (actually far higher) + /** * \brief Accept an incoming connection */ @@ -164,5 +171,9 @@ extern void herror(const char *s); extern const char *hstrerror(int err); extern struct hostent *gethostent(void); +#ifdef __cplusplus +} +#endif + #endif