jabberd2
2.5.0
|
Go to the source code of this file.
Functions | |
access_t | access_new (int order) |
void | access_free (access_t access) |
static int | _access_calc_netsize (const char *mask, int defaultsize) |
static void | _access_unmap_v4 (struct sockaddr_in6 *src, struct sockaddr_in *dst) |
convert a IPv6 mapped IPv4 address to a real IPv4 address More... | |
static int | _access_check_match (struct sockaddr_storage *ip_1, struct sockaddr_storage *ip_2, int netsize) |
check if two ip addresses are within the same subnet More... | |
int | access_allow (access_t access, const char *ip, const char *mask) |
int | access_deny (access_t access, const char *ip, const char *mask) |
int | access_check (access_t access, const char *ip) |
access_t access_new | ( | int | order | ) |
Definition at line 26 of file access.c.
References access_st::order.
Referenced by _c2s_config_expand(), and _router_config_expand().
void access_free | ( | access_t | access | ) |
Definition at line 35 of file access.c.
References access_st::allow, and access_st::deny.
Referenced by JABBER_MAIN().
|
static |
Definition at line 42 of file access.c.
References j_atoi().
Referenced by access_allow(), and access_deny().
|
static |
convert a IPv6 mapped IPv4 address to a real IPv4 address
Definition at line 71 of file access.c.
References in6_addr::s6_addr, and sockaddr_in6::sin6_addr.
Referenced by _access_check_match().
|
static |
check if two ip addresses are within the same subnet
Definition at line 79 of file access.c.
References _access_unmap_v4(), AF_INET6, IN6_IS_ADDR_V4MAPPED, in6_addr::s6_addr, sockaddr_in6::sin6_addr, and sockaddr_storage::ss_family.
Referenced by access_check().
int access_allow | ( | access_t | access, |
const char * | ip, | ||
const char * | mask | ||
) |
Definition at line 164 of file access.c.
References _access_calc_netsize(), access_st::allow, access_rule_st::ip, j_inet_pton(), access_rule_st::mask, access_st::nallow, and sockaddr_storage::ss_family.
Referenced by _c2s_config_expand(), and _router_config_expand().
int access_deny | ( | access_t | access, |
const char * | ip, | ||
const char * | mask | ||
) |
Definition at line 184 of file access.c.
References _access_calc_netsize(), access_st::deny, access_rule_st::ip, j_inet_pton(), access_rule_st::mask, access_st::ndeny, and sockaddr_storage::ss_family.
Referenced by _c2s_config_expand(), and _router_config_expand().
int access_check | ( | access_t | access, |
const char * | ip | ||
) |
Definition at line 204 of file access.c.
References _access_check_match(), access_st::allow, access_st::deny, j_inet_pton(), access_st::nallow, access_st::ndeny, and access_st::order.
Referenced by _c2s_client_accept_check(), and _router_accept_check().