Changeset 1080 for pjproject/trunk/pjlib/include/pj/sock.h
- Timestamp:
- Mar 18, 2007 5:39:27 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/sock.h
r974 r1080 175 175 */ 176 176 #define PJ_INVALID_SOCKET (-1) 177 178 /**179 * Structure describing a generic socket address.180 * If PJ_SOCKADDR_HAS_LEN is not zero, then sa_zero_len member is added181 * to this struct. As far the application is concerned, the value of182 * this member will always be zero. Internally, PJLIB may modify the value183 * before calling OS socket API, and reset the value back to zero before184 * returning the struct to application.185 */186 typedef struct pj_sockaddr187 {188 #if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0189 pj_uint8_t sa_zero_len;190 pj_uint8_t sa_family;191 #else192 pj_uint16_t sa_family; /**< Common data: address family. */193 #endif194 char sa_data[14]; /**< Address data. */195 } pj_sockaddr;196 197 177 198 178 #undef s_addr … … 277 257 278 258 259 /** 260 * This structure describes common attributes found in transport addresses. 261 * If PJ_SOCKADDR_HAS_LEN is not zero, then sa_zero_len member is added 262 * to this struct. As far the application is concerned, the value of 263 * this member will always be zero. Internally, PJLIB may modify the value 264 * before calling OS socket API, and reset the value back to zero before 265 * returning the struct to application. 266 */ 267 typedef struct pj_addr_hdr 268 { 269 #if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0 270 pj_uint8_t sa_zero_len; 271 pj_uint8_t sa_family; 272 #else 273 pj_uint16_t sa_family; /**< Common data: address family. */ 274 #endif 275 } pj_addr_hdr; 276 277 278 /** 279 * This union describes a generic socket address. 280 */ 281 typedef union pj_sockaddr 282 { 283 pj_addr_hdr addr; /**< Generic transport address. */ 284 pj_sockaddr_in ipv4; /**< IPv4 transport address. */ 285 pj_sockaddr_in6 ipv6; /**< IPv6 transport address. */ 286 } pj_sockaddr; 287 288 279 289 /***************************************************************************** 280 290 *
Note: See TracChangeset
for help on using the changeset viewer.