WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJNATH Reference

upnp.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 Teluu Inc. (http://www.teluu.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18#ifndef __PJ_UPNP_H__
19#define __PJ_UPNP_H__
20
26#include <pj/sock.h>
27
28
30
45typedef struct pj_upnp_init_param
46{
51
57 const char *if_name;
58
64 unsigned port;
65
72
79 void (*upnp_cb)(pj_status_t status);
80
82
83
84
95
96
104
105
123PJ_DECL(pj_status_t)pj_upnp_add_port_mapping(unsigned sock_cnt,
124 const pj_sock_t sock[],
125 unsigned ext_port[],
126 pj_sockaddr mapped_addr[]);
127
128
139
140
142
147#endif /* __PJ_UPNP_H__ */
pj_status_t pj_upnp_del_port_mapping(const pj_sockaddr *mapped_addr)
pj_status_t pj_upnp_add_port_mapping(unsigned sock_cnt, const pj_sock_t sock[], unsigned ext_port[], pj_sockaddr mapped_addr[])
pj_status_t pj_upnp_deinit(void)
pj_status_t pj_upnp_init(const pj_upnp_init_param *param)
long pj_sock_t
int pj_status_t
#define PJ_BEGIN_DECL
#define PJ_END_DECL
Definition: upnp.h:46
int search_time
Definition: upnp.h:71
void(* upnp_cb)(pj_status_t status)
Definition: upnp.h:79
unsigned port
Definition: upnp.h:64
const char * if_name
Definition: upnp.h:57
pj_pool_factory * factory
Definition: upnp.h:50

 


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