28 #include "ac-stdint.h" 34 #ifdef HAVE_NETINET_IN_H 35 #include <netinet/in.h> 38 #ifdef HAVE_ARPA_INET_H 39 #include <arpa/inet.h> 42 #ifdef HAVE_SYS_SOCKET_H 43 #include <sys/socket.h> 47 #include "subst/subst.h" 53 # ifdef JABBERD2_EXPORTS 54 # define JABBERD2_API __declspec(dllexport) 56 # define JABBERD2_API __declspec(dllimport) 59 # define JABBERD2_API extern
JABBERD2_API socklen_t j_inet_addrlen(struct sockaddr_storage *sa)
calculate the size of an address structure (on some unices the stdlibc functions for socket handling ...
JABBERD2_API int j_inet_getport(struct sockaddr_storage *sa)
get the port number out of a struct sockaddr_storage
JABBERD2_API const char * j_inet_ntop(struct sockaddr_storage *src, char *dst, size_t size)
get the string representation of an address in struct sockaddr_storage (modeled after the stdlib func...
JABBERD2_API int j_inet_pton(const char *src, struct sockaddr_storage *dst)
set the address of a struct sockaddr_storage (modeled after the stdlib function inet_pton) ...
define the structures that could be missing in old libc implementations
JABBERD2_API int j_inet_setport(struct sockaddr_storage *sa, in_port_t port)
set the port number in a struct sockaddr_storage