Ignore:
Timestamp:
Aug 12, 2009 10:56:06 AM (15 years ago)
Author:
bennylp
Message:

Ticket #935: new pj_sockaddr_parse2() API

File:
1 edited

Legend:

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

    r2743 r2863  
    980980 * @param af        Optionally specify the address family to be used. If the 
    981981 *                  address family is to be deducted from the input, specify 
    982  *                  pj_AF_UNSPEC() here. 
     982 *                  pj_AF_UNSPEC() here. Other supported values are 
     983 *                  #pj_AF_INET() and #pj_AF_INET6() 
    983984 * @param options   Additional options to assist the parsing, must be zero 
    984985 *                  for now. 
     
    987988 * 
    988989 * @return          PJ_SUCCESS if the parsing is successful. 
     990 * 
     991 * @see pj_sockaddr_parse2() 
    989992 */ 
    990993PJ_DECL(pj_status_t) pj_sockaddr_parse(int af, unsigned options, 
    991994                                       const pj_str_t *str, 
    992995                                       pj_sockaddr *addr); 
     996 
     997/** 
     998 * This function is similar to #pj_sockaddr_parse(), except that it will not 
     999 * convert the hostpart into IP address (thus possibly resolving the hostname 
     1000 * into a #pj_sockaddr.  
     1001 * 
     1002 * Unlike #pj_sockaddr_parse(), this function has a limitation that if port  
     1003 * number is specified in an IPv6 input string, the IP part of the IPv6 socket 
     1004 * address MUST be enclosed in square brackets, otherwise the port number will 
     1005 * be considered as part of the IPv6 IP address. 
     1006 * 
     1007 * @param af        Optionally specify the address family to be used. If the 
     1008 *                  address family is to be deducted from the input, specify 
     1009 *                  #pj_AF_UNSPEC() here. Other supported values are 
     1010 *                  #pj_AF_INET() and #pj_AF_INET6() 
     1011 * @param options   Additional options to assist the parsing, must be zero 
     1012 *                  for now. 
     1013 * @param str       The input string to be parsed. 
     1014 * @param hostpart  Optional pointer to store the host part of the socket  
     1015 *                  address, with any brackets removed. 
     1016 * @param port      Optional pointer to store the port number. If port number 
     1017 *                  is not found, this will be set to zero upon return. 
     1018 * @param raf       Optional pointer to store the detected address family of 
     1019 *                  the input address. 
     1020 * 
     1021 * @return          PJ_SUCCESS if the parsing is successful. 
     1022 * 
     1023 * @see pj_sockaddr_parse() 
     1024 */ 
     1025PJ_DECL(pj_status_t) pj_sockaddr_parse2(int af, unsigned options, 
     1026                                        const pj_str_t *str, 
     1027                                        pj_str_t *hostpart, 
     1028                                        pj_uint16_t *port, 
     1029                                        int *raf); 
    9931030 
    9941031/***************************************************************************** 
Note: See TracChangeset for help on using the changeset viewer.