tport 1.13.17
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_socket_keepalive;
146#define TPTAG_SOCKET_KEEPALIVE(x) tptag_socket_keepalive, tag_uint_v((x))
147
148TPORT_DLL extern tag_typedef_t tptag_socket_keepalive_ref;
149#define TPTAG_SOCKET_KEEPALIVE_REF(x) tptag_socket_keepalive_ref, tag_uint_vr(&(x))
150
151TPORT_DLL extern tag_typedef_t tptag_keepalive;
152#define TPTAG_KEEPALIVE(x) tptag_keepalive, tag_uint_v((x))
153
154TPORT_DLL extern tag_typedef_t tptag_keepalive_ref;
155#define TPTAG_KEEPALIVE_REF(x) tptag_keepalive_ref, tag_uint_vr(&(x))
156
157TPORT_DLL extern tag_typedef_t tptag_pingpong;
158#define TPTAG_PINGPONG(x) tptag_pingpong, tag_uint_v((x))
159
160TPORT_DLL extern tag_typedef_t tptag_pingpong_ref;
161#define TPTAG_PINGPONG_REF(x) tptag_pingpong_ref, tag_uint_vr(&(x))
162
163TPORT_DLL extern tag_typedef_t tptag_pong2ping;
164#define TPTAG_PONG2PING(x) tptag_pong2ping, tag_bool_v((x))
165
166TPORT_DLL extern tag_typedef_t tptag_pong2ping_ref;
167#define TPTAG_PONG2PING_REF(x) tptag_pong2ping_ref, tag_bool_vr(&(x))
168
169TPORT_DLL extern tag_typedef_t tptag_sigcomp_lifetime;
170#define TPTAG_SIGCOMP_LIFETIME(x) tptag_sigcomp_lifetime, tag_uint_v((x))
171
172TPORT_DLL extern tag_typedef_t tptag_sigcomp_lifetime_ref;
173#define TPTAG_SIGCOMP_LIFETIME_REF(x) \
174tptag_sigcomp_lifetime_ref, tag_uint_vr(&(x))
175
176TPORT_DLL extern tag_typedef_t tptag_compartment;
177#define TPTAG_COMPARTMENT(x) tptag_compartment, tag_ptr_v((x))
178
179TPORT_DLL extern tag_typedef_t tptag_compartment_ref;
180#define TPTAG_COMPARTMENT_REF(x) \
181 tptag_compartment_ref, tag_ptr_vr(&(x), x)
182
183TPORT_DLL extern tag_typedef_t tptag_certificate;
184#define TPTAG_CERTIFICATE(x) tptag_certificate, tag_str_v((x))
185
186TPORT_DLL extern tag_typedef_t tptag_certificate_ref;
187#define TPTAG_CERTIFICATE_REF(x) tptag_certificate_ref, tag_str_vr(&(x))
188
189TPORT_DLL extern tag_typedef_t tptag_tls_ciphers;
190#define TPTAG_TLS_CIPHERS(x) tptag_tls_ciphers, tag_str_v((x))
191
192TPORT_DLL extern tag_typedef_t tptag_tls_ciphers_ref;
193#define TPTAG_TLS_CIPHERS_REF(x) tptag_tls_ciphers_ref, tag_str_vr(&(x))
194
195enum tport_tls_version {
196 TPTLS_VERSION_SSLv2 = (1 << 0),
197 TPTLS_VERSION_SSLv3 = (1 << 1),
198 TPTLS_VERSION_TLSv1 = (1 << 2),
199 TPTLS_VERSION_TLSv1_1 = (1 << 3),
200 TPTLS_VERSION_TLSv1_2 = (1 << 4),
201};
202
203TPORT_DLL extern tag_typedef_t tptag_tls_version;
204#define TPTAG_TLS_VERSION(x) tptag_tls_version, tag_uint_v((x))
205
206TPORT_DLL extern tag_typedef_t tptag_tls_version_ref;
207#define TPTAG_TLS_VERSION_REF(x) tptag_tls_version_ref, tag_uint_vr(&(x))
208
209enum tport_tls_verify_policy {
210 TPTLS_VERIFY_NONE = 0x0,
211 TPTLS_VERIFY_INCOMING = 0x1,
212 TPTLS_VERIFY_IN = 0x1,
213 TPTLS_VERIFY_OUTGOING = 0x2,
214 TPTLS_VERIFY_OUT = 0x2,
215 TPTLS_VERIFY_ALL = 0x3,
216 TPTLS_VERIFY_SUBJECTS_IN = 0x5, /* 0x4 | TPTLS_VERIFY_INCOMING */
217 TPTLS_VERIFY_SUBJECTS_OUT = 0xA, /* 0x8 | TPTLS_VERIFY_OUTGOING */
218 TPTLS_VERIFY_SUBJECTS_ALL = 0xF,
219};
220
221TPORT_DLL extern tag_typedef_t tptag_tls_timeout;
222#define TPTAG_TLS_TIMEOUT(x) tptag_tls_timeout, tag_uint_v((x))
223
224TPORT_DLL extern tag_typedef_t tptag_tls_timeout_ref;
225#define TPTAG_TLS_TIMEOUT_REF(x) tptag_tls_timeout_ref, tag_uint_vr(&(x))
226
227TPORT_DLL extern tag_typedef_t tptag_tls_passphrase;
228#define TPTAG_TLS_PASSPHRASE(x) tptag_tls_passphrase, tag_str_v(x)
229
230TPORT_DLL extern tag_typedef_t tptag_tls_passphrase_ref;
231#define TPTAG_TLS_PASSPHRASE_REF(x) tptag_tls_passphrase_ref, tag_str_vr(&(x))
232
233TPORT_DLL extern tag_typedef_t tptag_tls_verify_policy;
234#define TPTAG_TLS_VERIFY_POLICY(x) tptag_tls_verify_policy, tag_uint_v((x))
235
236TPORT_DLL extern tag_typedef_t tptag_tls_verify_policy_ref;
237#define TPTAG_TLS_VERIFY_POLICY_REF(x) tptag_tls_verify_policy_ref, tag_uint_vr(&(x))
238
239TPORT_DLL extern tag_typedef_t tptag_tls_verify_depth;
240#define TPTAG_TLS_VERIFY_DEPTH(x) tptag_tls_verify_depth, tag_uint_v((x))
241
242TPORT_DLL extern tag_typedef_t tptag_tls_verify_depth_ref;
243#define TPTAG_TLS_VERIFY_DEPTH_REF(x) \
244 tptag_tls_verify_depth_ref, tag_uint_vr(&(x))
245
246TPORT_DLL extern tag_typedef_t tptag_tls_verify_date;
247#define TPTAG_TLS_VERIFY_DATE(x) tptag_tls_verify_date, tag_uint_v((x))
248
249TPORT_DLL extern tag_typedef_t tptag_tls_verify_date_ref;
250#define TPTAG_TLS_VERIFY_DATE_REF(x) \
251 tptag_tls_verify_date_ref, tag_uint_vr(&(x))
252
253TPORT_DLL extern tag_typedef_t tptag_tls_verify_subjects;
254#define TPTAG_TLS_VERIFY_SUBJECTS(x) tptag_tls_verify_subjects, tag_cptr_v((x))
255
256TPORT_DLL extern tag_typedef_t tptag_tls_verify_subjects_ref;
257#define TPTAG_TLS_VERIFY_SUBJECTS_REF(x) \
258 tptag_tls_verify_subjects_ref, tag_cptr_vr(&(x), (x))
259
260/* TPTAG_TLS_VERIFY_PEER is depreciated - Use TPTAG_TLS_VERIFY_POLICY */
261TPORT_DLL extern tag_typedef_t tptag_tls_verify_peer;
262#define TPTAG_TLS_VERIFY_PEER(x) TPTAG_TLS_VERIFY_POLICY( (x) ? \
263 TPTLS_VERIFY_ALL : TPTLS_VERIFY_NONE)
264
265TPORT_DLL extern tag_typedef_t tptag_tls_verify_peer_ref;
266#define TPTAG_TLS_VERIFY_PEER_REF(x) tptag_tls_verify_peer_ref, tag_uint_vr(&(x))
267
268#if 0
269TPORT_DLL extern tag_typedef_t tport_x509_subject;
270#define TPTAG_X509_SUBJECT(x) tptag_x509_subject, tag_str_v((x))
271
272TPORT_DLL extern tag_typedef_t tptag_x509_subject_ref;
273#define TPTAG_X509_SUBJECT_REF(x) tptag_x509_subject_ref, tag_str_vr(&(x))
274#endif
275
276TPORT_DLL extern tag_typedef_t tptag_debug_drop;
277#define TPTAG_DEBUG_DROP(x) tptag_debug_drop, tag_uint_v((x))
278
279TPORT_DLL extern tag_typedef_t tptag_debug_drop_ref;
280#define TPTAG_DEBUG_DROP_REF(x) tptag_debug_drop_ref, tag_uint_vr(&(x))
281
282TPORT_DLL extern tag_typedef_t tptag_udp_rmem;
283#define TPTAG_UDP_RMEM(x) tptag_udp_rmem, tag_uint_v((x))
284
285TPORT_DLL extern tag_typedef_t tptag_udp_rmem_ref;
286#define TPTAG_UDP_RMEM_REF(x) tptag_udp_rmem_ref, tag_uint_vr(&(x))
287
288TPORT_DLL extern tag_typedef_t tptag_udp_wmem;
289#define TPTAG_UDP_WMEM(x) tptag_udp_wmem, tag_uint_v((x))
290
291TPORT_DLL extern tag_typedef_t tptag_udp_wmem_ref;
292#define TPTAG_UDP_WMEM_REF(x) tptag_udp_wmem_ref, tag_uint_vr(&(x))
293
294TPORT_DLL extern tag_typedef_t tptag_thrpsize;
295#define TPTAG_THRPSIZE(x) tptag_thrpsize, tag_uint_v((x))
296
297TPORT_DLL extern tag_typedef_t tptag_thrpsize_ref;
298#define TPTAG_THRPSIZE_REF(x) tptag_thrpsize_ref, tag_uint_vr(&(x))
299
300TPORT_DLL extern tag_typedef_t tptag_thrprqsize;
301#define TPTAG_THRPRQSIZE(x) tptag_thrprqsize, tag_uint_v((x))
302
303TPORT_DLL extern tag_typedef_t tptag_thrprqsize_ref;
304#define TPTAG_THRPRQSIZE_REF(x) tptag_thrprqsize_ref, tag_uint_vr(&(x))
305
306TPORT_DLL extern tag_typedef_t tptag_http_connect;
307#define TPTAG_HTTP_CONNECT(x) tptag_http_connect, tag_str_v((x))
308
309TPORT_DLL extern tag_typedef_t tptag_http_connect_ref;
310#define TPTAG_HTTP_CONNECT_REF(x) tptag_http_connect_ref, tag_str_vr(&(x))
311
312TPORT_DLL extern tag_typedef_t tptag_stun_server;
313#define TPTAG_STUN_SERVER(x) tptag_stun_server, tag_bool_v((x))
314
315TPORT_DLL extern tag_typedef_t tptag_stun_server_ref;
316#define TPTAG_STUN_SERVER_REF(x) tptag_stun_server_ref, tag_bool_vr(&(x))
317
318TPORT_DLL extern tag_typedef_t tptag_tos;
319#define TPTAG_TOS(x) tptag_tos, tag_int_v((x))
320
321TPORT_DLL extern tag_typedef_t tptag_tos_ref;
322#define TPTAG_TOS_REF(x) tptag_tos_ref, tag_int_vr(&(x))
323
324TPORT_DLL extern tag_typedef_t tptag_log;
325#define TPTAG_LOG(x) tptag_log, tag_bool_v((x))
326
327TPORT_DLL extern tag_typedef_t tptag_log_ref;
328#define TPTAG_LOG_REF(x) tptag_log_ref, tag_bool_vr(&(x))
329
330TPORT_DLL extern tag_typedef_t tptag_dump;
331#define TPTAG_DUMP(x) tptag_dump, tag_str_v((x))
332
333TPORT_DLL extern tag_typedef_t tptag_dump_ref;
334#define TPTAG_DUMP_REF(x) tptag_dump_ref, tag_str_vr(&(x))
335
336TPORT_DLL extern tag_typedef_t tptag_capt;
337#define TPTAG_CAPT(x) tptag_capt, tag_str_v((x))
338
339TPORT_DLL extern tag_typedef_t tptag_capt_ref;
340#define TPTAG_CAPT_REF(x) tptag_capt_ref, tag_str_vr(&(x))
341
342TPORT_DLL extern tag_typedef_t tptag_capt_src;
343#define TPTAG_CAPT_SRC(x) tptag_capt_src, tag_str_v((x))
344
345TPORT_DLL extern tag_typedef_t tptag_capt_src_ref;
346#define TPTAG_CAPT_SRC_REF(x) tptag_capt_src_ref, tag_str_vr(&(x))
347
348SOFIA_END_DECLS
349
350#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.13.17 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.