diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-03-20 12:39:24 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-03-20 12:39:24 +0000 |
commit | 4c8c2a65ead2089c30c431ef34c31d4e0c7b9cb3 (patch) | |
tree | 6962fbb65104c67247593d23ba204a4570533924 /pjlib/include/pj/sock.h | |
parent | b54b2fc579bb9d1faa95f01d6e211b7cfed0e1bb (diff) |
Ported pjlib to PowerPC/MacOS
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@338 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/sock.h')
-rw-r--r-- | pjlib/include/pj/sock.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pjlib/include/pj/sock.h b/pjlib/include/pj/sock.h index cd15913a..3e3307ab 100644 --- a/pjlib/include/pj/sock.h +++ b/pjlib/include/pj/sock.h @@ -156,10 +156,20 @@ typedef enum pj_socket_sd_type /** * Structure describing a generic socket address. + * If PJ_SOCKADDR_HAS_LEN is not zero, then sa_zero_len member is added + * to this struct. As far the application is concerned, the value of + * this member will always be zero. Internally, PJLIB may modify the value + * before calling OS socket API, and reset the value back to zero before + * returning the struct to application. */ typedef struct pj_sockaddr { +#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0 + pj_uint8_t sa_zero_len; + pj_uint8_t sa_family; +#else pj_uint16_t sa_family; /**< Common data: address family. */ +#endif char sa_data[14]; /**< Address data. */ } pj_sockaddr; @@ -175,10 +185,20 @@ typedef struct pj_in_addr /** * This structure describes Internet socket address. + * If PJ_SOCKADDR_HAS_LEN is not zero, then sin_zero_len member is added + * to this struct. As far the application is concerned, the value of + * this member will always be zero. Internally, PJLIB may modify the value + * before calling OS socket API, and reset the value back to zero before + * returning the struct to application. */ struct pj_sockaddr_in { +#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0 + pj_uint8_t sin_zero_len; /**< Just ignore this. */ + pj_uint8_t sin_family; /**< Address family. */ +#else pj_uint16_t sin_family; /**< Address family. */ +#endif pj_uint16_t sin_port; /**< Transport layer port number. */ pj_in_addr sin_addr; /**< IP address. */ char sin_zero[8]; /**< Padding. */ @@ -212,10 +232,20 @@ typedef struct pj_in6_addr /** * This structure describes IPv6 socket address. + * If PJ_SOCKADDR_HAS_LEN is not zero, then sin_zero_len member is added + * to this struct. As far the application is concerned, the value of + * this member will always be zero. Internally, PJLIB may modify the value + * before calling OS socket API, and reset the value back to zero before + * returning the struct to application. */ typedef struct pj_sockaddr_in6 { +#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0 + pj_uint8_t sin_zero_len; /**< Just ignore this. */ + pj_uint8_t sin_family; /**< Address family. */ +#else pj_uint16_t sin6_family; /**< Address family */ +#endif pj_uint16_t sin6_port; /**< Transport layer port number. */ pj_uint32_t sin6_flowinfo; /**< IPv6 flow information */ pj_in6_addr sin6_addr; /**< IPv6 address. */ |