Home --> Documentations --> PJNATH Reference

nat_detect.h
1 /* $Id: nat_detect.h 5359 2016-06-28 06:33:20Z ming $ */
2 /*
3  * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 #ifndef __PJNATH_NAT_DETECT_H__
21 #define __PJNATH_NAT_DETECT_H__
22 
27 #include <pjnath/stun_session.h>
28 
29 
31 
32 
49 typedef enum pj_stun_nat_type
50 {
55 
61 
68 
74 
81 
89 
100 
109 
118 
120 
121 
126 {
133 
137  const char *status_text;
138 
144 
148  const char *nat_type_name;
149 
151 
152 
157 typedef void pj_stun_nat_detect_cb(void *user_data,
158  const pj_stun_nat_detect_result *res);
159 
160 
168 PJ_DECL(const char*) pj_stun_get_nat_name(pj_stun_nat_type type);
169 
170 
195 PJ_DECL(pj_status_t) pj_stun_detect_nat_type(const pj_sockaddr_in *server,
196  pj_stun_config *stun_cfg,
197  void *user_data,
199 
200 
219 PJ_DECL(pj_status_t) pj_stun_detect_nat_type2(const pj_sockaddr *server,
220  pj_stun_config *stun_cfg,
221  void *user_data,
223 
224 
230 PJ_END_DECL
231 
232 
233 #endif /* __PJNATH_NAT_DETECT_H__ */
234 
pj_stun_nat_type
Definition: nat_detect.h:49
pj_stun_nat_type nat_type
Definition: nat_detect.h:143
void * user_data
pj_status_t pj_stun_detect_nat_type2(const pj_sockaddr *server, pj_stun_config *stun_cfg, void *user_data, pj_stun_nat_detect_cb *cb)
int pj_status_t
pj_status_t status
Definition: nat_detect.h:132
pj_status_t pj_stun_detect_nat_type(const pj_sockaddr_in *server, pj_stun_config *stun_cfg, void *user_data, pj_stun_nat_detect_cb *cb)
Definition: stun_config.h:48
const char * status_text
Definition: nat_detect.h:137
Definition: nat_detect.h:54
Definition: nat_detect.h:67
Definition: nat_detect.h:108
const char * nat_type_name
Definition: nat_detect.h:148
void pj_stun_nat_detect_cb(void *user_data, const pj_stun_nat_detect_result *res)
Definition: nat_detect.h:157
STUN session management for client/server.
Definition: nat_detect.h:99
#define PJ_BEGIN_DECL
Definition: nat_detect.h:88
Definition: nat_detect.h:117
Definition: nat_detect.h:60
Definition: nat_detect.h:80
Definition: nat_detect.h:125
const char * pj_stun_get_nat_name(pj_stun_nat_type type)
Definition: nat_detect.h:73

 


PJNATH - Open Source NAT traversal helper library supporting STUN, TURN, and ICE
Copyright (C) 2006-2009 Teluu Inc.