jabberd2  2.6.1
Data Structures | Macros | Typedefs
util_compat.h File Reference

define the structures that could be missing in old libc implementations More...

Go to the source code of this file.

Data Structures

struct  in6_addr
 structure that contains a plain IPv6 address (only defined if not contained in the libc More...
 
struct  sockaddr_in6
 structure that contains an IPv6 including some additional attributes (only defined if not contained in the libc) More...
 
struct  sockaddr_storage
 

Macros

#define INCL_UTIL_COMPAT_H
 
#define PF_INET6   10
 protcol family for IPv6 More...
 
#define AF_INET6   PF_INET6
 address family for IPv6 More...
 
#define INET6_ADDRSTRLEN   46
 maximum length of the string representation of an IPv6 address More...
 
#define IN6_IS_ADDR_V4MAPPED(a)
 check if an IPv6 is just a mapped IPv4 address More...
 
#define _SS_PADSIZE   (128-sizeof(sa_family_t))
 container for sockaddr_in and sockaddr_in6 structures, handled like an object in jabberd2 code (this definition is not fully compatible with RFC 2553, but it is enough for us) More...
 
#define SSL_OP_NO_TICKET   0x00004000L
 

Typedefs

typedef unsigned short sa_family_t
 

Detailed Description

define the structures that could be missing in old libc implementations

Definition in file util_compat.h.

Macro Definition Documentation

◆ INCL_UTIL_COMPAT_H

#define INCL_UTIL_COMPAT_H

Definition at line 26 of file util_compat.h.

◆ PF_INET6

#define PF_INET6   10

protcol family for IPv6

Definition at line 38 of file util_compat.h.

◆ AF_INET6

#define AF_INET6   PF_INET6

address family for IPv6

Definition at line 42 of file util_compat.h.

Referenced by _access_check_match(), _dns_result_aaaa(), j_inet_addrlen(), j_inet_getport(), j_inet_ntop(), j_inet_pton(), and j_inet_setport().

◆ INET6_ADDRSTRLEN

#define INET6_ADDRSTRLEN   46

maximum length of the string representation of an IPv6 address

Definition at line 46 of file util_compat.h.

Referenced by _dns_result_aaaa(), _in_sx_callback(), _mio_accept(), _out_mio_callback(), in_mio_callback(), out_route(), and router_mio_callback().

◆ IN6_IS_ADDR_V4MAPPED

#define IN6_IS_ADDR_V4MAPPED (   a)
Value:
((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
(*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
(*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))

check if an IPv6 is just a mapped IPv4 address

Definition at line 54 of file util_compat.h.

Referenced by _access_check_match().

◆ _SS_PADSIZE

#define _SS_PADSIZE   (128-sizeof(sa_family_t))

container for sockaddr_in and sockaddr_in6 structures, handled like an object in jabberd2 code (this definition is not fully compatible with RFC 2553, but it is enough for us)

Definition at line 97 of file util_compat.h.

◆ SSL_OP_NO_TICKET

#define SSL_OP_NO_TICKET   0x00004000L

Definition at line 105 of file util_compat.h.

Referenced by _sx_ssl_client().

Typedef Documentation

◆ sa_family_t

typedef unsigned short sa_family_t

Definition at line 61 of file util_compat.h.