jabberd2
2.2.17
|
Go to the source code of this file.
Macros | |
#define | JABBERD2_API extern |
Functions | |
JABBERD2_API int | j_inet_pton (char *src, struct sockaddr_storage *dst) |
set the address of a struct sockaddr_storage (modeled after the stdlib function inet_pton) | |
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 function inet_ntop) | |
JABBERD2_API int | j_inet_getport (struct sockaddr_storage *sa) |
get the port number out of a struct sockaddr_storage | |
JABBERD2_API int | j_inet_setport (struct sockaddr_storage *sa, in_port_t port) |
set the port number in a struct sockaddr_storage | |
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 want to get the size of the address structure that is contained in the struct sockaddr_storage, not the size of struct sockaddr_storage itself) |
JABBERD2_API int j_inet_pton | ( | char * | src, |
struct sockaddr_storage * | dst | ||
) |
set the address of a struct sockaddr_storage (modeled after the stdlib function inet_pton)
src | the address that should be assigned to the struct sockaddr_storage (either a dotted quad for IPv4 or a compressed IPv6 address) |
dst | the struct sockaddr_storage that should get the new address |
Definition at line 46 of file inaddr.c.
References AF_INET6, sockaddr_in6::sin6_addr, and sockaddr_storage::ss_family.
Referenced by _mio_connect(), _mio_listen(), access_allow(), access_check(), and access_deny().
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 function inet_ntop)
src | the struct sockaddr_storage where the address should be read |
dst | where to write the result |
size | the size of the result buffer |
Definition at line 97 of file inaddr.c.
References AF_INET6, sockaddr_in6::sin6_addr, and sockaddr_storage::ss_family.
Referenced by _mio_accept().
JABBERD2_API int j_inet_getport | ( | struct sockaddr_storage * | sa | ) |
get the port number out of a struct sockaddr_storage
sa | the struct sockaddr_storage where we want to read the port |
Definition at line 148 of file inaddr.c.
References AF_INET6, sockaddr_in6::sin6_port, and sockaddr_storage::ss_family.
Referenced by _c2s_client_mio_callback(), _mio_accept(), in_mio_callback(), and router_mio_callback().
JABBERD2_API int j_inet_setport | ( | struct sockaddr_storage * | sa, |
in_port_t | port | ||
) |
set the port number in a struct sockaddr_storage
sa | the struct sockaddr_storage where the port should be set |
port | the port number that should be set (in host byte order) |
Definition at line 173 of file inaddr.c.
References AF_INET6, sockaddr_in6::sin6_port, and sockaddr_storage::ss_family.
Referenced by _mio_connect(), and _mio_listen().
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 want to get the size of the address structure that is contained in the struct sockaddr_storage, not the size of struct sockaddr_storage itself)
sa | the struct sockaddr_storage for which we want to get the size of the contained address structure |
Definition at line 203 of file inaddr.c.
References AF_INET6, and sockaddr_storage::ss_family.
Referenced by _mio_connect(), and _mio_listen().