diff options
Diffstat (limited to 'pjnath/include')
-rw-r--r-- | pjnath/include/pjnath/errno.h | 5 | ||||
-rw-r--r-- | pjnath/include/pjnath/nat_detect.h | 18 |
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 |