summaryrefslogtreecommitdiff
path: root/pjnath/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-10-16 01:34:14 +0000
committerBenny Prijono <bennylp@teluu.com>2007-10-16 01:34:14 +0000
commit5aea96f9de3908f2fc85c16001adc6c3f82d4705 (patch)
treee838b8a6077af937b2e834822540839c4e2515b2 /pjnath/include
parent4b289329774686a3e261fac70fbd902942cb9b1f (diff)
More ticket #399: added callback to report NAT detection result, and sends NAT type in SDP
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1501 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjnath/include')
-rw-r--r--pjnath/include/pjnath/errno.h5
-rw-r--r--pjnath/include/pjnath/nat_detect.h18
2 files changed, 22 insertions, 1 deletions
diff --git a/pjnath/include/pjnath/errno.h b/pjnath/include/pjnath/errno.h
index 403f191d..1f763fc1 100644
--- a/pjnath/include/pjnath/errno.h
+++ b/pjnath/include/pjnath/errno.h
@@ -110,6 +110,11 @@
*/
#define PJNATH_ESTUNIPV6NOTSUPP (PJNATH_ERRNO_START+41) /* 370041 */
+/**
+ * @hideinitializer
+ * Invalid STUN server or server not configured.
+ */
+#define PJNATH_ESTUNINSERVER (PJNATH_ERRNO_START+42) /* 370042 */
diff --git a/pjnath/include/pjnath/nat_detect.h b/pjnath/include/pjnath/nat_detect.h
index e79ffb14..a4bc5fec 100644
--- a/pjnath/include/pjnath/nat_detect.h
+++ b/pjnath/include/pjnath/nat_detect.h
@@ -48,11 +48,17 @@ PJ_BEGIN_DECL
typedef enum pj_stun_nat_type
{
/**
- * NAT type is unknown, because the detection has failed.
+ * NAT type is unknown because the detection has not been performed.
*/
PJ_STUN_NAT_TYPE_UNKNOWN,
/**
+ * NAT type is unknown because there is failure in the detection
+ * process, possibly because server does not support RFC 3489.
+ */
+ PJ_STUN_NAT_TYPE_ERR_UNKNOWN,
+
+ /**
* This specifies that the client has open access to Internet (or
* at least, its behind a firewall that behaves like a full-cone NAT,
* but without the translation)
@@ -152,6 +158,16 @@ typedef void pj_stun_nat_detect_cb(void *user_data,
/**
+ * Get the NAT name from the specified NAT type.
+ *
+ * @param type NAT type.
+ *
+ * @return NAT name.
+ */
+PJ_DECL(const char*) pj_stun_get_nat_name(pj_stun_nat_type type);
+
+
+/**
* Perform NAT classification function according to the procedures
* specified in RFC 3489. Once this function returns successfully,
* the procedure will run in the "background" and will complete