summaryrefslogtreecommitdiff
path: root/pjlib/include/pj/addr_resolv.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2005-11-01 16:42:51 +0000
committerBenny Prijono <bennylp@teluu.com>2005-11-01 16:42:51 +0000
commit81ecc233996dcddfbef707bd9a5099f5d9e5eb13 (patch)
treec735c382ff2dac0179b96505c4192ee70185372d /pjlib/include/pj/addr_resolv.h
parentb5a1af6f999820564ead4867b1e5d5574778ee56 (diff)
Added suppor /and fix things for SunOS port
git-svn-id: http://svn.pjsip.org/repos/pjproject/main@2 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/addr_resolv.h')
-rw-r--r--pjlib/include/pj/addr_resolv.h152
1 files changed, 76 insertions, 76 deletions
diff --git a/pjlib/include/pj/addr_resolv.h b/pjlib/include/pj/addr_resolv.h
index 2daf0733..9b466918 100644
--- a/pjlib/include/pj/addr_resolv.h
+++ b/pjlib/include/pj/addr_resolv.h
@@ -1,76 +1,76 @@
-/* $Header: /pjproject-0.3/pjlib/include/pj/addr_resolv.h 2 10/14/05 12:25a Bennylp $ */
-
-#ifndef __PJ_ADDR_RESOLV_H__
-#define __PJ_ADDR_RESOLV_H__
-
-/**
- * @file addr_resolv.h
- * @brief Address resolve (pj_gethostbyname()).
- */
-
-#include <pj/types.h>
-
-PJ_BEGIN_DECL
-
-/**
- * @defgroup pj_addr_resolve Address Resolution
- * @ingroup PJ_IO
- * @{
- *
- * This module provides function to resolve Internet address of the
- * specified host name. To resolve a particular host name, application
- * can just call #pj_gethostbyname().
- *
- * Example:
- * <pre>
- * ...
- * pj_hostent he;
- * pj_status_t rc;
- * pj_str_t host = pj_str("host.example.com");
- *
- * rc = pj_gethostbyname( &host, &he);
- * if (rc != PJ_SUCCESS) {
- * char errbuf[80];
- * pj_strerror( rc, errbuf, sizeof(errbuf));
- * PJ_LOG(2,("sample", "Unable to resolve host, error=%s", errbuf));
- * return rc;
- * }
- *
- * // process address...
- * addr.sin_addr.s_addr = *(pj_uint32_t*)he.h_addr;
- * ...
- * </pre>
- *
- * It's pretty simple really...
- */
-
-/** This structure describes an Internet host address. */
-typedef struct pj_hostent
-{
- char *h_name; /**< The official name of the host. */
- char **h_aliases; /**< Aliases list. */
- int h_addrtype; /**< Host address type. */
- int h_length; /**< Length of address. */
- char **h_addr_list; /**< List of addresses. */
-} pj_hostent;
-
-/** Shortcut to h_addr_list[0] */
-#define h_addr h_addr_list[0]
-
-/**
- * This function fills the structure of type pj_hostent for a given host name.
- *
- * @param name Host name, or IPv4 or IPv6 address in standard dot notation.
- * @param he The pj_hostent structure to be filled.
- *
- * @return PJ_SUCCESS, or the appropriate error codes.
- */
-PJ_DECL(pj_status_t) pj_gethostbyname(const pj_str_t *name, pj_hostent *he);
-
-
-/** @} */
-
-PJ_END_DECL
-
-#endif /* __PJ_ADDR_RESOLV_H__ */
-
+/* $Header: /pjproject-0.3/pjlib/include/pj/addr_resolv.h 2 10/14/05 12:25a Bennylp $ */
+
+#ifndef __PJ_ADDR_RESOLV_H__
+#define __PJ_ADDR_RESOLV_H__
+
+/**
+ * @file addr_resolv.h
+ * @brief Address resolve (pj_gethostbyname()).
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup pj_addr_resolve Address Resolution
+ * @ingroup PJ_IO
+ * @{
+ *
+ * This module provides function to resolve Internet address of the
+ * specified host name. To resolve a particular host name, application
+ * can just call #pj_gethostbyname().
+ *
+ * Example:
+ * <pre>
+ * ...
+ * pj_hostent he;
+ * pj_status_t rc;
+ * pj_str_t host = pj_str("host.example.com");
+ *
+ * rc = pj_gethostbyname( &host, &he);
+ * if (rc != PJ_SUCCESS) {
+ * char errbuf[80];
+ * pj_strerror( rc, errbuf, sizeof(errbuf));
+ * PJ_LOG(2,("sample", "Unable to resolve host, error=%s", errbuf));
+ * return rc;
+ * }
+ *
+ * // process address...
+ * addr.sin_addr.s_addr = *(pj_uint32_t*)he.h_addr;
+ * ...
+ * </pre>
+ *
+ * It's pretty simple really...
+ */
+
+/** This structure describes an Internet host address. */
+typedef struct pj_hostent
+{
+ char *h_name; /**< The official name of the host. */
+ char **h_aliases; /**< Aliases list. */
+ int h_addrtype; /**< Host address type. */
+ int h_length; /**< Length of address. */
+ char **h_addr_list; /**< List of addresses. */
+} pj_hostent;
+
+/** Shortcut to h_addr_list[0] */
+#define h_addr h_addr_list[0]
+
+/**
+ * This function fills the structure of type pj_hostent for a given host name.
+ *
+ * @param name Host name, or IPv4 or IPv6 address in standard dot notation.
+ * @param he The pj_hostent structure to be filled.
+ *
+ * @return PJ_SUCCESS, or the appropriate error codes.
+ */
+PJ_DECL(pj_status_t) pj_gethostbyname(const pj_str_t *name, pj_hostent *he);
+
+
+/** @} */
+
+PJ_END_DECL
+
+#endif /* __PJ_ADDR_RESOLV_H__ */
+