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

stun_transaction.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
3 * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef __PJNATH_STUN_TRANSACTION_H__
20#define __PJNATH_STUN_TRANSACTION_H__
21
27#include <pjnath/stun_msg.h>
28#include <pjnath/stun_config.h>
29#include <pj/lock.h>
30
31
33
34
35/* **************************************************************************/
59
63typedef struct pj_stun_tsx_cb
64{
79 pj_status_t status,
80 const pj_stun_msg *response,
81 const pj_sockaddr_t *src_addr,
82 unsigned src_addr_len);
83
98 const void *stun_pkt,
99 pj_size_t pkt_size);
100
113
115
116
117
136 pj_pool_t *pool,
137 pj_grp_lock_t *grp_lock,
138 const pj_stun_tsx_cb *cb,
139 pj_stun_client_tsx **p_tsx);
140
158PJ_DECL(pj_status_t)
160 const pj_time_val *delay);
161
162
172
173
183
184
193
194
207 void *data);
208
209
219
220
239 pj_bool_t retransmit,
240 void *pkt,
241 unsigned pkt_len);
242
258 pj_bool_t mod_count);
259
260
277 const pj_stun_msg *msg,
278 const pj_sockaddr_t*src_addr,
279 unsigned src_addr_len);
280
281
287PJ_END_DECL
288
289
290#endif /* __PJNATH_STUN_TRANSACTION_H__ */
291
pj_status_t pj_stun_client_tsx_set_data(pj_stun_client_tsx *tsx, void *data)
struct pj_stun_client_tsx pj_stun_client_tsx
Definition: stun_transaction.h:58
pj_status_t pj_stun_client_tsx_on_rx_msg(pj_stun_client_tsx *tsx, const pj_stun_msg *msg, const pj_sockaddr_t *src_addr, unsigned src_addr_len)
pj_status_t pj_stun_client_tsx_stop(pj_stun_client_tsx *tsx)
pj_status_t pj_stun_client_tsx_create(pj_stun_config *cfg, pj_pool_t *pool, pj_grp_lock_t *grp_lock, const pj_stun_tsx_cb *cb, pj_stun_client_tsx **p_tsx)
void * pj_stun_client_tsx_get_data(pj_stun_client_tsx *tsx)
pj_status_t pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx, pj_bool_t mod_count)
pj_status_t pj_stun_client_tsx_send_msg(pj_stun_client_tsx *tsx, pj_bool_t retransmit, void *pkt, unsigned pkt_len)
pj_status_t pj_stun_client_tsx_schedule_destroy(pj_stun_client_tsx *tsx, const pj_time_val *delay)
pj_bool_t pj_stun_client_tsx_is_complete(pj_stun_client_tsx *tsx)
pj_status_t pj_stun_client_tsx_destroy(pj_stun_client_tsx *tsx)
int pj_bool_t
size_t pj_size_t
void pj_sockaddr_t
int pj_status_t
struct pj_grp_lock_t pj_grp_lock_t
#define PJ_BEGIN_DECL
Definition: stun_config.h:48
Definition: stun_msg.h:1172
Definition: stun_transaction.h:64
void(* on_destroy)(pj_stun_client_tsx *tsx)
Definition: stun_transaction.h:112
void(* on_complete)(pj_stun_client_tsx *tsx, pj_status_t status, const pj_stun_msg *response, const pj_sockaddr_t *src_addr, unsigned src_addr_len)
Definition: stun_transaction.h:78
pj_status_t(* on_send_msg)(pj_stun_client_tsx *tsx, const void *stun_pkt, pj_size_t pkt_size)
Definition: stun_transaction.h:97
STUN endpoint.
STUN message components.

 


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