Ignore:
Timestamp:
Dec 1, 2007 8:52:57 AM (16 years ago)
Author:
bennylp
Message:

More ticket #415: more IPv6 and some reorganization of the source codes

File:
1 edited

Legend:

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

    r1599 r1601  
    8686/** 
    8787 * This function fills the structure of type pj_hostent for a given host name. 
     88 * For host resolution function that also works with IPv6, please see 
     89 * #pj_getaddrinfo(). 
    8890 * 
    89  * @param name      Host name, or IPv4 or IPv6 address in standard dot notation. 
    90  * @param he        The pj_hostent structure to be filled. 
     91 * @param name      Host name, or IPv4 address in standard dot notation. 
     92 * @param he        The pj_hostent structure to be filled. Note that 
     93 *                  the pointers in this structure points to temporary 
     94 *                  variables which value will be reset upon subsequent 
     95 *                  invocation. 
    9196 * 
    9297 * @return          PJ_SUCCESS, or the appropriate error codes. 
     
    98103 * Resolve the primary IP address of local host.  
    99104 * 
    100  * @param ip_addr   On successful resolution, this will be filled up with 
    101  *                  the host IP address, in network byte order. 
     105 * @param af        The desired address family to query. Valid values 
     106 *                  are pj_AF_INET() or pj_AF_INET6(). 
     107 * @param addr      On successful resolution, the address family and address 
     108 *                  part of this socket address will be filled up with the host 
     109 *                  IP address, in network byte order. Other parts of the socket 
     110 *                  address are untouched. 
    102111 * 
    103112 * @return          PJ_SUCCESS on success, or the appropriate error code. 
    104113 */ 
    105 PJ_DECL(pj_status_t) pj_gethostip(pj_in_addr *ip_addr); 
     114PJ_DECL(pj_status_t) pj_gethostip(int af, pj_sockaddr *addr); 
    106115 
    107116 
     
    110119 * interface of the default route. 
    111120 * 
    112  * @param ip_addr   On successful resolution, this will be filled up with 
    113  *                  the IP address, in network byte order. 
     121 * @param af        The desired address family to query. Valid values 
     122 *                  are pj_AF_INET() or pj_AF_INET6(). 
     123 * @param addr      On successful resolution, the address family and address 
     124 *                  part of this socket address will be filled up with the host 
     125 *                  IP address, in network byte order. Other parts of the socket 
     126 *                  address are untouched. 
    114127 * 
    115128 * @return          PJ_SUCCESS on success, or the appropriate error code. 
    116129 */ 
    117 PJ_DECL(pj_status_t) pj_getdefaultipinterface(pj_in_addr *ip_addr); 
     130PJ_DECL(pj_status_t) pj_getdefaultipinterface(int af, 
     131                                              pj_sockaddr *addr); 
    118132 
    119133 
     
    124138 * service. 
    125139 * 
     140 * @param af        The desired address family to query. Valid values 
     141 *                  are pj_AF_INET(), pj_AF_INET6(), or pj_AF_UNSPEC(). 
    126142 * @param name      Descriptive name or an address string, such as host 
    127143 *                  name. 
    128  * @param af        The desired address family to query. 
    129144 * @param count     On input, it specifies the number of elements in 
    130145 *                  \a ai array. On output, this will be set with the 
    131146 *                  number of address informations found for the 
    132147 *                  specified name. 
     148 * @param ai        Array of address info to be filled with the information 
     149 *                  about the host. 
    133150 * 
    134151 * @return          PJ_SUCCESS on success, or the appropriate error code. 
    135152 */ 
    136 PJ_DECL(pj_status_t) pj_getaddrinfo(const pj_str_t *nodename, int af, 
     153PJ_DECL(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *name, 
    137154                                    unsigned *count, pj_addrinfo ai[]); 
    138155 
Note: See TracChangeset for help on using the changeset viewer.