Ignore:
Timestamp:
Mar 20, 2006 12:39:24 PM (18 years ago)
Author:
bennylp
Message:

Ported pjlib to PowerPC/MacOS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/sock.h

    r122 r338  
    157157/** 
    158158 * Structure describing a generic socket address. 
     159 * If PJ_SOCKADDR_HAS_LEN is not zero, then sa_zero_len member is added 
     160 * to this struct. As far the application is concerned, the value of 
     161 * this member will always be zero. Internally, PJLIB may modify the value 
     162 * before calling OS socket API, and reset the value back to zero before 
     163 * returning the struct to application. 
    159164 */ 
    160165typedef struct pj_sockaddr 
    161166{ 
     167#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0 
     168    pj_uint8_t  sa_zero_len; 
     169    pj_uint8_t  sa_family; 
     170#else 
    162171    pj_uint16_t sa_family;      /**< Common data: address family.   */ 
     172#endif 
    163173    char        sa_data[14];    /**< Address data.                  */ 
    164174} pj_sockaddr; 
     
    176186/** 
    177187 * This structure describes Internet socket address. 
     188 * If PJ_SOCKADDR_HAS_LEN is not zero, then sin_zero_len member is added 
     189 * to this struct. As far the application is concerned, the value of 
     190 * this member will always be zero. Internally, PJLIB may modify the value 
     191 * before calling OS socket API, and reset the value back to zero before 
     192 * returning the struct to application. 
    178193 */ 
    179194struct pj_sockaddr_in 
    180195{ 
     196#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0 
     197    pj_uint8_t  sin_zero_len;   /**< Just ignore this.              */ 
     198    pj_uint8_t  sin_family;     /**< Address family.                */ 
     199#else 
    181200    pj_uint16_t sin_family;     /**< Address family.                */ 
     201#endif 
    182202    pj_uint16_t sin_port;       /**< Transport layer port number.   */ 
    183203    pj_in_addr  sin_addr;       /**< IP address.                    */ 
     
    213233/** 
    214234 * This structure describes IPv6 socket address. 
     235 * If PJ_SOCKADDR_HAS_LEN is not zero, then sin_zero_len member is added 
     236 * to this struct. As far the application is concerned, the value of 
     237 * this member will always be zero. Internally, PJLIB may modify the value 
     238 * before calling OS socket API, and reset the value back to zero before 
     239 * returning the struct to application. 
    215240 */ 
    216241typedef struct pj_sockaddr_in6 
    217242{ 
     243#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0 
     244    pj_uint8_t  sin_zero_len;       /**< Just ignore this.         */ 
     245    pj_uint8_t  sin_family;         /**< Address family.           */ 
     246#else 
    218247    pj_uint16_t sin6_family;        /**< Address family             */ 
     248#endif 
    219249    pj_uint16_t sin6_port;          /**< Transport layer port number. */ 
    220250    pj_uint32_t sin6_flowinfo;      /**< IPv6 flow information      */ 
Note: See TracChangeset for help on using the changeset viewer.