summaryrefslogtreecommitdiff
path: root/pjlib/include/pj/sock.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-03-22 11:48:33 +0000
committerBenny Prijono <bennylp@teluu.com>2006-03-22 11:48:33 +0000
commitac843019cc56478c4423e0181e2ec1452d84e75b (patch)
treea51552315240cb84c53b008e7d4cf6acc663ca29 /pjlib/include/pj/sock.h
parent1ac65f3b18e59cd2206dfb8c237ca1007e1d873e (diff)
Added pj_inet_addr2()
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@348 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/sock.h')
-rw-r--r--pjlib/include/pj/sock.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/pjlib/include/pj/sock.h b/pjlib/include/pj/sock.h
index 3e3307ab..05d1ef5e 100644
--- a/pjlib/include/pj/sock.h
+++ b/pjlib/include/pj/sock.h
@@ -327,6 +327,19 @@ PJ_DECL(int) pj_inet_aton(const pj_str_t *cp, struct pj_in_addr *inp);
*/
PJ_DECL(pj_in_addr) pj_inet_addr(const pj_str_t *cp);
+/**
+ * Convert address string with numbers and dots to binary IP address.
+ *
+ * @param cp The IP address in numbers and dots notation.
+ * @return If success, the IP address is returned in network
+ * byte order. If failed, PJ_INADDR_NONE will be
+ * returned.
+ * @remark
+ * This is an obsolete interface to #pj_inet_aton(); it is obsolete
+ * because -1 is a valid address (255.255.255.255), and #pj_inet_aton()
+ * provides a cleaner way to indicate error return.
+ */
+PJ_DECL(pj_in_addr) pj_inet_addr2(const char *cp);
/**
* Get the transport layer port number of an Internet socket address.