tport 1.12.11devel
Loading...
Searching...
No Matches
tport_tag.h
Go to the documentation of this file.
1/*
2 * This file is part of the Sofia-SIP package
3 *
4 * Copyright (C) 2005 Nokia Corporation.
5 *
6 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 *
23 */
24
25#ifndef TPORT_TAG_H
27#define TPORT_TAG_H
28
37#ifndef SU_TAG_H
38#include <sofia-sip/su_tag.h>
39#endif
40
41SOFIA_BEGIN_DECLS
42
44TPORT_DLL extern tagi_t tport_tag_list[];
45
47TPORT_DLL extern tagi_t tport_tags[];
48
50#define TPTAG_ANY() tptag_any, ((tag_value_t)0)
51TPORT_DLL extern tag_typedef_t tptag_any;
52
53TPORT_DLL extern tag_typedef_t tptag_ident;
54#define TPTAG_IDENT(x) tptag_ident, tag_str_v((x))
55
56TPORT_DLL extern tag_typedef_t tptag_ident_ref;
57#define TPTAG_IDENT_REF(x) tptag_ident_ref, tag_str_vr(&(x))
58
59TPORT_DLL extern tag_typedef_t tptag_reuse;
60#define TPTAG_REUSE(x) tptag_reuse, tag_bool_v((x))
61
62TPORT_DLL extern tag_typedef_t tptag_reuse_ref;
63#define TPTAG_REUSE_REF(x) tptag_reuse_ref, tag_bool_vr(&(x))
64
65TPORT_DLL extern tag_typedef_t tptag_fresh;
66#define TPTAG_FRESH(x) tptag_fresh, tag_bool_v((x))
67
68TPORT_DLL extern tag_typedef_t tptag_fresh_ref;
69#define TPTAG_FRESH_REF(x) tptag_fresh_ref, tag_bool_vr(&(x))
70
71TPORT_DLL extern tag_typedef_t tptag_server;
72#define TPTAG_SERVER(x) tptag_server, tag_bool_v((x))
73
74TPORT_DLL extern tag_typedef_t tptag_server_ref;
75#define TPTAG_SERVER_REF(x) tptag_server_ref, tag_bool_vr(&(x))
76
81typedef enum tport_via {
82 tport_type_local = 0,
83 tport_type_server = 0,
84 tport_type_client = 1,
85 tport_type_stun = 2,
86 tport_type_upnp = 3,
87 tport_type_connect = 4,
88 tport_type_socks = 5,
90
91TPORT_DLL extern tag_typedef_t tptag_public;
92#define TPTAG_PUBLIC(x) tptag_public, tag_int_v((x))
93
94TPORT_DLL extern tag_typedef_t tptag_public_ref;
95#define TPTAG_PUBLIC_REF(x) tptag_public_ref, tag_int_vr(&(x))
96
97TPORT_DLL extern tag_typedef_t tptag_mtu;
98#define TPTAG_MTU(x) tptag_mtu, tag_usize_v((x))
99
100TPORT_DLL extern tag_typedef_t tptag_mtu_ref;
101#define TPTAG_MTU_REF(x) tptag_mtu_ref, tag_usize_vr(&(x))
102
103TPORT_DLL extern tag_typedef_t tptag_connect;
104#define TPTAG_CONNECT(x) tptag_connect, tag_bool_v((x))
105
106TPORT_DLL extern tag_typedef_t tptag_connect_ref;
107#define TPTAG_CONNECT_REF(x) tptag_connect_ref, tag_bool_vr(&(x))
108
109TPORT_DLL extern tag_typedef_t tptag_queuesize;
110#define TPTAG_QUEUESIZE(x) tptag_queuesize, tag_uint_v((x))
111
112TPORT_DLL extern tag_typedef_t tptag_queuesize_ref;
113#define TPTAG_QUEUESIZE_REF(x) tptag_queuesize_ref, tag_uint_vr(&(x))
114
115TPORT_DLL extern tag_typedef_t tptag_sdwn_error;
116#define TPTAG_SDWN_ERROR(x) tptag_sdwn_error, tag_bool_v((x))
117
118TPORT_DLL extern tag_typedef_t tptag_sdwn_error_ref;
119#define TPTAG_SDWN_ERROR_REF(x) tptag_sdwn_error_ref, tag_bool_vr(&(x))
120
121TPORT_DLL extern tag_typedef_t tptag_sdwn_after;
122#define TPTAG_SDWN_AFTER(x) tptag_sdwn_after, tag_bool_v((x))
123
124TPORT_DLL extern tag_typedef_t tptag_sdwn_after_ref;
125#define TPTAG_SDWN_AFTER_REF(x) tptag_sdwn_after_ref, tag_bool_vr(&(x))
126
127TPORT_DLL extern tag_typedef_t tptag_close_after;
128#define TPTAG_CLOSE_AFTER(x) tptag_close_after, tag_bool_v((x))
129
130TPORT_DLL extern tag_typedef_t tptag_close_after_ref;
131#define TPTAG_CLOSE_AFTER_REF(x) tptag_close_after_ref, tag_bool_vr(&(x))
132
133TPORT_DLL extern tag_typedef_t tptag_idle;
134#define TPTAG_IDLE(x) tptag_idle, tag_uint_v((x))
135
136TPORT_DLL extern tag_typedef_t tptag_idle_ref;
137#define TPTAG_IDLE_REF(x) tptag_idle_ref, tag_uint_vr(&(x))
138
139TPORT_DLL extern tag_typedef_t tptag_timeout;
140#define TPTAG_TIMEOUT(x) tptag_timeout, tag_uint_v((x))
141
142TPORT_DLL extern tag_typedef_t tptag_timeout_ref;
143#define TPTAG_TIMEOUT_REF(x) tptag_timeout_ref, tag_uint_vr(&(x))
144
145TPORT_DLL extern tag_typedef_t tptag_keepalive;
146#define TPTAG_KEEPALIVE(x) tptag_keepalive, tag_uint_v((x))
147
148TPORT_DLL extern tag_typedef_t tptag_keepalive_ref;
149#define TPTAG_KEEPALIVE_REF(x) tptag_keepalive_ref, tag_uint_vr(&(x))
150
151TPORT_DLL extern tag_typedef_t tptag_pingpong;
152#define TPTAG_PINGPONG(x) tptag_pingpong, tag_uint_v((x))
153
154TPORT_DLL extern tag_typedef_t tptag_pingpong_ref;
155#define TPTAG_PINGPONG_REF(x) tptag_pingpong_ref, tag_uint_vr(&(x))
156
157TPORT_DLL extern tag_typedef_t tptag_pong2ping;
158#define TPTAG_PONG2PING(x) tptag_pong2ping, tag_bool_v((x))
159
160TPORT_DLL extern tag_typedef_t tptag_pong2ping_ref;
161#define TPTAG_PONG2PING_REF(x) tptag_pong2ping_ref, tag_bool_vr(&(x))
162
163TPORT_DLL extern tag_typedef_t tptag_sigcomp_lifetime;
164#define TPTAG_SIGCOMP_LIFETIME(x) tptag_sigcomp_lifetime, tag_uint_v((x))
165
166TPORT_DLL extern tag_typedef_t tptag_sigcomp_lifetime_ref;
167#define TPTAG_SIGCOMP_LIFETIME_REF(x) \
168tptag_sigcomp_lifetime_ref, tag_uint_vr(&(x))
169
170TPORT_DLL extern tag_typedef_t tptag_compartment;
171#define TPTAG_COMPARTMENT(x) tptag_compartment, tag_ptr_v((x))
172
173TPORT_DLL extern tag_typedef_t tptag_compartment_ref;
174#define TPTAG_COMPARTMENT_REF(x) \
175 tptag_compartment_ref, tag_ptr_vr(&(x), x)
176
177TPORT_DLL extern tag_typedef_t tptag_certificate;
178#define TPTAG_CERTIFICATE(x) tptag_certificate, tag_str_v((x))
179
180TPORT_DLL extern tag_typedef_t tptag_certificate_ref;
181#define TPTAG_CERTIFICATE_REF(x) tptag_certificate_ref, tag_str_vr(&(x))
182
183TPORT_DLL extern tag_typedef_t tptag_tls_version;
184#define TPTAG_TLS_VERSION(x) tptag_tls_version, tag_uint_v((x))
185
186TPORT_DLL extern tag_typedef_t tptag_tls_version_ref;
187#define TPTAG_TLS_VERSION_REF(x) tptag_tls_version_ref, tag_uint_vr(&(x))
188
189enum tport_tls_verify_policy {
190 TPTLS_VERIFY_NONE = 0x0,
191 TPTLS_VERIFY_INCOMING = 0x1,
192 TPTLS_VERIFY_IN = 0x1,
193 TPTLS_VERIFY_OUTGOING = 0x2,
194 TPTLS_VERIFY_OUT = 0x2,
195 TPTLS_VERIFY_ALL = 0x3,
196 TPTLS_VERIFY_SUBJECTS_IN = 0x5, /* 0x4 | TPTLS_VERIFY_INCOMING */
197 TPTLS_VERIFY_SUBJECTS_OUT = 0xA, /* 0x8 | TPTLS_VERIFY_OUTGOING */
198 TPTLS_VERIFY_SUBJECTS_ALL = 0xF,
199};
200
201TPORT_DLL extern tag_typedef_t tptag_tls_passphrase;
202#define TPTAG_TLS_PASSPHRASE(x) tptag_tls_passphrase, tag_str_v(x)
203
204TPORT_DLL extern tag_typedef_t tptag_tls_passphrase_ref;
205#define TPTAG_TLS_PASSPHRASE_REF(x) tptag_tls_passphrase_ref, tag_str_vr(&(x))
206
207TPORT_DLL extern tag_typedef_t tptag_tls_verify_policy;
208#define TPTAG_TLS_VERIFY_POLICY(x) tptag_tls_verify_policy, tag_uint_v((x))
209
210TPORT_DLL extern tag_typedef_t tptag_tls_verify_policy_ref;
211#define TPTAG_TLS_VERIFY_POLICY_REF(x) tptag_tls_verify_policy_ref, tag_uint_vr(&(x))
212
213TPORT_DLL extern tag_typedef_t tptag_tls_verify_depth;
214#define TPTAG_TLS_VERIFY_DEPTH(x) tptag_tls_verify_depth, tag_uint_v((x))
215
216TPORT_DLL extern tag_typedef_t tptag_tls_verify_depth_ref;
217#define TPTAG_TLS_VERIFY_DEPTH_REF(x) \
218 tptag_tls_verify_depth_ref, tag_uint_vr(&(x))
219
220TPORT_DLL extern tag_typedef_t tptag_tls_verify_date;
221#define TPTAG_TLS_VERIFY_DATE(x) tptag_tls_verify_date, tag_uint_v((x))
222
223TPORT_DLL extern tag_typedef_t tptag_tls_verify_date_ref;
224#define TPTAG_TLS_VERIFY_DATE_REF(x) \
225 tptag_tls_verify_date_ref, tag_uint_vr(&(x))
226
227TPORT_DLL extern tag_typedef_t tptag_tls_verify_subjects;
228#define TPTAG_TLS_VERIFY_SUBJECTS(x) tptag_tls_verify_subjects, tag_cptr_v((x))
229
230TPORT_DLL extern tag_typedef_t tptag_tls_verify_subjects_ref;
231#define TPTAG_TLS_VERIFY_SUBJECTS_REF(x) \
232 tptag_tls_verify_subjects_ref, tag_cptr_vr(&(x), (x))
233
234/* TPTAG_TLS_VERIFY_PEER is depreciated - Use TPTAG_TLS_VERIFY_POLICY */
235TPORT_DLL extern tag_typedef_t tptag_tls_verify_peer;
236#define TPTAG_TLS_VERIFY_PEER(x) TPTAG_TLS_VERIFY_POLICY( (x) ? \
237 TPTLS_VERIFY_ALL : TPTLS_VERIFY_NONE)
238
239TPORT_DLL extern tag_typedef_t tptag_tls_verify_peer_ref;
240#define TPTAG_TLS_VERIFY_PEER_REF(x) tptag_tls_verify_peer_ref, tag_uint_vr(&(x))
241
242#if 0
243TPORT_DLL extern tag_typedef_t tport_x509_subject;
244#define TPTAG_X509_SUBJECT(x) tptag_x509_subject, tag_str_v((x))
245
246TPORT_DLL extern tag_typedef_t tptag_x509_subject_ref;
247#define TPTAG_X509_SUBJECT_REF(x) tptag_x509_subject_ref, tag_str_vr(&(x))
248#endif
249
250TPORT_DLL extern tag_typedef_t tptag_debug_drop;
251#define TPTAG_DEBUG_DROP(x) tptag_debug_drop, tag_uint_v((x))
252
253TPORT_DLL extern tag_typedef_t tptag_debug_drop_ref;
254#define TPTAG_DEBUG_DROP_REF(x) tptag_debug_drop_ref, tag_uint_vr(&(x))
255
256TPORT_DLL extern tag_typedef_t tptag_udp_rmem;
257#define TPTAG_UDP_RMEM(x) tptag_udp_rmem, tag_uint_v((x))
258
259TPORT_DLL extern tag_typedef_t tptag_udp_rmem_ref;
260#define TPTAG_UDP_RMEM_REF(x) tptag_udp_rmem_ref, tag_uint_vr(&(x))
261
262TPORT_DLL extern tag_typedef_t tptag_udp_wmem;
263#define TPTAG_UDP_WMEM(x) tptag_udp_wmem, tag_uint_v((x))
264
265TPORT_DLL extern tag_typedef_t tptag_udp_wmem_ref;
266#define TPTAG_UDP_WMEM_REF(x) tptag_udp_wmem_ref, tag_uint_vr(&(x))
267
268TPORT_DLL extern tag_typedef_t tptag_thrpsize;
269#define TPTAG_THRPSIZE(x) tptag_thrpsize, tag_uint_v((x))
270
271TPORT_DLL extern tag_typedef_t tptag_thrpsize_ref;
272#define TPTAG_THRPSIZE_REF(x) tptag_thrpsize_ref, tag_uint_vr(&(x))
273
274TPORT_DLL extern tag_typedef_t tptag_thrprqsize;
275#define TPTAG_THRPRQSIZE(x) tptag_thrprqsize, tag_uint_v((x))
276
277TPORT_DLL extern tag_typedef_t tptag_thrprqsize_ref;
278#define TPTAG_THRPRQSIZE_REF(x) tptag_thrprqsize_ref, tag_uint_vr(&(x))
279
280TPORT_DLL extern tag_typedef_t tptag_http_connect;
281#define TPTAG_HTTP_CONNECT(x) tptag_http_connect, tag_str_v((x))
282
283TPORT_DLL extern tag_typedef_t tptag_http_connect_ref;
284#define TPTAG_HTTP_CONNECT_REF(x) tptag_http_connect_ref, tag_str_vr(&(x))
285
286TPORT_DLL extern tag_typedef_t tptag_stun_server;
287#define TPTAG_STUN_SERVER(x) tptag_stun_server, tag_bool_v((x))
288
289TPORT_DLL extern tag_typedef_t tptag_stun_server_ref;
290#define TPTAG_STUN_SERVER_REF(x) tptag_stun_server_ref, tag_bool_vr(&(x))
291
292TPORT_DLL extern tag_typedef_t tptag_tos;
293#define TPTAG_TOS(x) tptag_tos, tag_int_v((x))
294
295TPORT_DLL extern tag_typedef_t tptag_tos_ref;
296#define TPTAG_TOS_REF(x) tptag_tos_ref, tag_int_vr(&(x))
297
298TPORT_DLL extern tag_typedef_t tptag_log;
299#define TPTAG_LOG(x) tptag_log, tag_bool_v((x))
300
301TPORT_DLL extern tag_typedef_t tptag_log_ref;
302#define TPTAG_LOG_REF(x) tptag_log_ref, tag_bool_vr(&(x))
303
304TPORT_DLL extern tag_typedef_t tptag_dump;
305#define TPTAG_DUMP(x) tptag_dump, tag_str_v((x))
306
307TPORT_DLL extern tag_typedef_t tptag_dump_ref;
308#define TPTAG_DUMP_REF(x) tptag_dump_ref, tag_str_vr(&(x))
309
310SOFIA_END_DECLS
311
312#endif /* !defined TPORT_TAG_H */
struct tag_type_s const tag_typedef_t[1]
TPORT_DLL tagi_t tport_tag_list[]
List of all tport tags.
enum tport_via tport_pri_type_t
Define how the public transport connects to Internet.
tport_via
Define how the public transport connects to Internet.
Definition tport_tag.h:81
TPORT_DLL tagi_t tport_tags[]
Filter list matching any tport tag.
Definition tport_tag.c:51

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.