tport_tag.c 17.5 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1 2 3 4 5 6 7
/*
 * This file is part of the Sofia-SIP package
 *
 * Copyright (C) 2005 Nokia Corporation.
 *
 * Contact: Pekka Pessi <pekka.pessi@nokia.com>
 *
8
 * This library is free software; you can redistribute it and/or
Pekka Pessi's avatar
Pekka Pessi committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *
 */

/**@CFILE tport_tag.c
 * @brief Tags for transport module
 *
28
 * @note This file is used to automatically generate
Pekka Pessi's avatar
Pekka Pessi committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
 * tport_tag_ref.c and tport_tag_dll.c
 *
 * Copyright (c) 2002 Nokia Research Center.  All rights reserved.
 *
 * @author Pekka Pessi <Pekka.Pessi@nokia.com>
 *
 * @date Created: Thu Jun  6 00:38:07 2002 ppessi
 */

#include "config.h"

#include <string.h>
#include <assert.h>

#define TAG_NAMESPACE "tp"

45 46
#include "sofia-sip/tport.h"
#include <sofia-sip/su_tag_class.h>
Pekka Pessi's avatar
Pekka Pessi committed
47 48 49

/* ==== Globals ========================================================== */

50 51
/** Filter for tport tags. */
tagi_t tport_tags[] = { { tptag_any, 0 }, { TAG_END() } };
Pekka Pessi's avatar
Pekka Pessi committed
52

53
tag_typedef_t tptag_any = NSTAG_TYPEDEF(*);
Pekka Pessi's avatar
Pekka Pessi committed
54

55 56
/**@def TPTAG_IDENT(cstr)
 *
57
 * Identify a transport interface.
58 59 60 61 62
 *
 * Use with tport_tbind(), tport_tsend(), nua_create(), nta_agent_create(),
 * nta_agent_add_tport(), nta_outgoing_tcreate(), nta_outgoing_mcreate(),
 * nth_engine_create(), nth_client_tcreate(), or initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
63
tag_typedef_t tptag_ident = CSTRTAG_TYPEDEF(ident);
64 65 66 67 68 69 70 71 72 73

/**@def TPTAG_REUSE(boolean)
 *
 * Allow reusing transport connection (true by default).
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(),
 * tport_tsend(), nua_create(), nta_agent_create(), nta_agent_add_tport(),
 * nta_outgoing_tcreate(), nta_outgoing_mcreate(), nth_engine_create(),
 * nth_client_tcreate(), or initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
74
tag_typedef_t tptag_reuse = BOOLTAG_TYPEDEF(reuse);
75 76 77

/**@def TPTAG_FRESH(boolean)
 *
78
 * Create new connection (but allow other messages to reuse the new one).
79 80 81 82
 *
 * Use with tport_tsend(), nta_outgoing_tcreate(), nta_outgoing_mcreate(),
 * or nth_client_tcreate().
 */
83
tag_typedef_t tptag_fresh = BOOLTAG_TYPEDEF(fresh);
84 85 86 87 88 89 90

/**@def TPTAG_SERVER(boolean)
 *
 * Bind server sockets (true by default, disable with TPTAG_SERVER(0)).
 *
 * Use with tport_tbind().
 */
Pekka Pessi's avatar
Pekka Pessi committed
91
tag_typedef_t tptag_server = BOOLTAG_TYPEDEF(server);
92 93 94

/**@def TPTAG_PUBLIC(tport_via)
 *
95
 * Define how the public transport connects to Internet.
96 97 98 99 100 101
 *
 * Use with tport_tbind(), nua_create(), nta_agent_create(),
 * nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().
 *
 * @sa TPTAG_PUBLIC(), tport_is_public().
 */
102
tag_typedef_t tptag_public = INTTAG_TYPEDEF(public);
103 104 105 106 107 108 109 110 111 112

/**@def TPTAG_MTU(usize_t)
 *
 * Specify MTU.
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(),
 * tport_tsend(), nua_create(), nta_agent_create(), nta_agent_add_tport(),
 * nta_outgoing_tcreate(), nta_outgoing_mcreate(), nth_engine_create(),
 * nth_client_tcreate(), or initial nth_site_create().
 */
113
tag_typedef_t tptag_mtu = USIZETAG_TYPEDEF(mtu);
114 115 116 117 118 119 120 121 122 123 124

/**@def TPTAG_CONNECT(x)
 *
 * Specify that tport must always use connections (even with UDP).
 *
 * @note Unimplemented (?).
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
125
tag_typedef_t tptag_connect = BOOLTAG_TYPEDEF(connect);
126 127 128 129 130 131 132 133 134

/**@def TPTAG_SDWN_ERROR(x)
 *
 * If true, half close of a connection by remote is considered as an error.
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
135
tag_typedef_t tptag_sdwn_error = BOOLTAG_TYPEDEF(sdwn_error);
136 137 138 139 140 141 142 143

/**@def TPTAG_SDWN_AFTER(x)
 *
 * Half-close (shutdown(c, 1)) after sending the message.
 *
 * Use with tport_tsend(), nta_outgoing_tcreate(), nta_outgoing_mcreate(),
 * or nth_client_tcreate().
 */
Pekka Pessi's avatar
Pekka Pessi committed
144
tag_typedef_t tptag_sdwn_after = BOOLTAG_TYPEDEF(sdwn_after);
145 146 147 148

/**@def TPTAG_CLOSE_AFTER(x)
 *
 * Close of a connection after sending the message.
149
 *
150 151 152
 * Use with tport_tsend(), nta_outgoing_tcreate(), nta_outgoing_mcreate(),
 * or nth_client_tcreate().
 */
Pekka Pessi's avatar
Pekka Pessi committed
153
tag_typedef_t tptag_close_after = BOOLTAG_TYPEDEF(sdwn_after);
154 155 156 157 158

/**@def TPTAG_IDLE(x)
 *
 * How long transports may be idle (value in milliseconds).
 *
159
 * If 0, zap immediately,
160 161 162 163 164 165 166
 * if UINT_MAX, leave them there (default value for now).
 *
 * @par Use With
 * tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
167
tag_typedef_t tptag_idle = UINTTAG_TYPEDEF(idle);
168 169 170 171 172 173 174 175 176 177 178 179

/**@def TPTAG_TIMEOUT(x)
 *
 * Timeout for incomplete incoming message  (value in milliseconds).
 *
 * If UINT_MAX, leave the incomplete messages there for ever.
 * Default value for now is UINT_MAX.
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
180
tag_typedef_t tptag_timeout = UINTTAG_TYPEDEF(timeout);
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197

/**@def TPTAG_KEEPALIVE(x)
 *
 * Keepalive interval in milliseconds.
 *
 * If 0 or UINT_MAX, do not use keepalives. Default value is 0.
 *
 * On TCP, the keepalive if a CR-LF-CR-LF sequence.
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 *
 * @sa TPTAG_PINGPONG(), TPTAG_PONG2PING(), TPTAG_TIMEOUT(), TPTAG_IDLE()
 *
 * @NEW_1_12_7.
 */
198
tag_typedef_t tptag_keepalive = UINTTAG_TYPEDEF(keepalive);
199 200 201 202 203

/**@def TPTAG_PINGPONG(x)
 *
 * Ping-pong interval in milliseconds.
 *
204
 * If 0 or UINT_MAX, do not check for PONGs. Default value is 0.
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
 *
 * If set, the ping-pong protocol is used on TCP connections. If pinger
 * sends a ping and receives no data in the specified ping-pong interval, it
 * considers the connection failed and closes it. The value recommended in
 * draft-ietf-sip-outbound-10 is 10 seconds (10000 milliseconds).
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 *
 * @sa TPTAG_PONG2PING(), TPTAG_KEEPALIVE(), TPTAG_TIMEOUT(), TPTAG_IDLE(),
 * draft-ietf-sip-outbound-10.txt
 *
 * @NEW_1_12_7.
 */
220
tag_typedef_t tptag_pingpong = UINTTAG_TYPEDEF(pingpong);
221 222 223 224 225 226 227 228

/**@def TPTAG_PONG2PING(x)
 *
 * Respond PING with PONG.
 *
 * If true, respond with PONG to PING. Default value is 0 (false).
 *
 * If set, the ping-pong protocol is used on TCP connections. If a ping (at
229
 * least 4 whitespace characters) is received between messages, a pong
230 231 232 233 234 235 236 237 238 239
 * (CR-LF) is sent in response.
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 *
 * @sa TPTAG_PINGPONG(), TPTAG_KEEPALIVE(), TPTAG_TIMEOUT(), TPTAG_IDLE()
 *
 * @NEW_1_12_7.
 */
240
tag_typedef_t tptag_pong2ping = BOOLTAG_TYPEDEF(pong2ping);
241 242 243 244 245 246 247 248 249 250 251 252 253

/**@def TPTAG_SIGCOMP_LIFETIME(x)
 *
 * Default SigComp lifetime in seconds.
 *
 * If value is UINT_MAX, keep SigComp compartments around for ever.
 *
 * @note Experimental.
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
254
tag_typedef_t tptag_sigcomp_lifetime = UINTTAG_TYPEDEF(sigcomp_lifetime);
255 256 257 258 259

/**@def TPTAG_CERTIFICATE(x)
 *
 * Path to the public key certificate directory.
 *
260
 * Use with tport_tbind(), nua_create(), nta_agent_create(),
261 262
 * nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
263
tag_typedef_t tptag_certificate = STRTAG_TYPEDEF(certificate);
264 265 266 267 268 269 270

/**@def TPTAG_COMPARTMENT(x)
 *
 * Pointer to SigComp compartment.
 *
 * @note Not used.
 */
271
tag_typedef_t tptag_compartment = PTRTAG_TYPEDEF(compartment);
Pekka Pessi's avatar
Pekka Pessi committed
272

273 274 275 276 277

/**@def TPTAG_TLS_VERSION(x)
 *
 * Sets the TLS version (version 0 implies SSL2/SSL3).
 *
278
 * Use with tport_tbind(), nua_create(), nta_agent_create(),
279 280
 * nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
281
tag_typedef_t tptag_tls_version = UINTTAG_TYPEDEF(tls_version);
282

283
/**@def TPTAG_TLS_VERIFY_PEER(x)
284 285 286 287 288 289 290
 * @par Depreciated:
 *    Alias for TPTAG_TLS_VERIFY_POLICY(TPTLS_VERIFY_IN|TPTLS_VERIFY_OUT)
 *
 * @NEW_1_12_10.
 */
tag_typedef_t tptag_tls_verify_peer = UINTTAG_TYPEDEF(tls_verify_peer);

291 292 293 294 295 296 297 298 299 300
/**@def TPTAG_TLS_PASSPHRASE(x)
 *
 * Sets the passphrase password to be used by openSSL to encrypt/decrypt
 * private key files.
 *
 * @NEW_1_12_11.
 */
tag_typedef_t tptag_tls_passphrase = STRTAG_TYPEDEF(tls_passphrase);


301
/**@def TPTAG_TLS_VERIFY_POLICY(x)
302 303
 *
 * The verification of certificates can be controlled:
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
 * @par Values:
 *    - #TPTLS_VERIFY_NONE: 
 *          Do not verify Peer Certificates.
 *    - #TPTLS_VERIFY_IN: 
 *          Drop incoming connections which fail signature verification 
 *          against trusted certificate authorities. Peers must provide a 
 *          certificate during the initial TLS Handshake.
 *    - #TPTLS_VERIFY_OUT: 
 *          Drop outgoing connections which fail signature verification 
 *          against trusted certificate authorities.
 *    - #TPTLS_VERIFY_ALL: 
 *          Alias for (TPTLS_VERIFY_IN|TPTLS_VERIFY_OUT)
 *    - #TPTLS_VERIFY_SUBJECTS_IN: 
 *          Match the certificate subject on incoming connections against 
 *          a provided list.  If no match is found, the connection is 
 *          rejected. If no list is provided, subject checking is bypassed.
 *          Note: Implies #TPTLS_VERIFY_IN.
 *    - #TPTLS_VERIFY_SUBJECTS_OUT: 
 *          Match the certificate subject on outgoing connections against 
 *          a provided list.  If no match is found, the connection is 
 *          rejected.
 *          Note: Implies #TPTLS_VERIFY_OUT.
 *    - #TPTLS_VERIFY_SUBJECTS_ALL:
 *          Alias for (TPTLS_VERIFY_SUBJECTS_IN|TPTLS_VERIFY_SUBJECTS_OUT)
 *
 * @par Used with
 *   tport_tbind(), nua_create(), nta_agent_create(), nta_agent_add_tport(),
 *   nth_engine_create(), initial nth_site_create(),
 *   TPTAG_TLS_VERIFY_SUBJECTS(), TPTAG_TLS_VERIFY_DEPTH().
 *
 * @NEW_1_12_11.
 */
tag_typedef_t tptag_tls_verify_policy = UINTTAG_TYPEDEF(tls_verify_policy);

/**@def TPTAG_TLS_VERIFY_DEPTH(x)
339
 *
340 341 342 343
 * Define the maximum length of a valid certificate chain.
 * 
 * @par Default
 *   2
344
 *
345 346 347 348 349 350 351 352
 * @par Used with
 *   tport_tbind(), nua_create(), nta_agent_create(), nta_agent_add_tport(), 
 *   nth_engine_create(), or initial nth_site_create().
 *
 * @par Parameter Type:
 *   unsigned int
 *
 * @NEW_1_12_11.
353
 */
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
tag_typedef_t tptag_tls_verify_depth = UINTTAG_TYPEDEF(tls_verify_depth);

/**@def TPTAG_TLS_VERIFY_DATE(x)
 *
 * Enable/Disable verification of notBefore and notAfter parameters of
 * X.509 Certificates.
 *
 * @par Default
 *   Enabled
 *
 * @par Values
 *   - 0 - Disable date verification.
 *   - Non-Zero - Enable date verification.
 *
 * @par Used with
 *   tport_tbind(), nua_create(), nta_agent_create(), nta_agent_add_tport(), 
 *   nth_engine_create(), or initial nth_site_create().
 *
 * @par Parameter Type:
 *   unsigned int
 *
 * @par Note
 *   This tag should be only used on devices which lack accurate timekeeping.
 *
 * @NEW_1_12_11.
 */
tag_typedef_t tptag_tls_verify_date = UINTTAG_TYPEDEF(tls_verify_date);

/**@def TPTAG_TLS_VERIFY_SUBJECTS(x)
 *
 * Incoming TLS connections must provide a trusted X.509 certificate.
 * The character strings provided with this tag are matched against
 * the subjects from the trusted certificate.  If a match is not found,
 * the connection is automatically rejected.
 *
 * @par Used with
 *   tport_tbind(), nua_create(), nta_agent_create(), nta_agent_add_tport(), 
 *   nth_engine_create(), initial nth_site_create(),
 *   TPTLS_VERIFY_SUBJECTS_IN
 *
 * @par Parameter Type:
 *   void const * (actually su_strlst_t const *)
 *
 * @par Values
 *   - SIP Identity - sip:example.com or sip:username@example.com
 *   - DNS - sip.example.com
 *   - IP Address - Both IPv4 and IPv6 Supported
 *
 * @NEW_1_12_11.
 */
tag_typedef_t tptag_tls_verify_subjects = PTRTAG_TYPEDEF(tls_verify_subjects);

#if 0
/**@def TPTAG_X509_SUBJECT(x)
 *
 * Requires that a message be sent over a TLS transport with trusted X.509
 * certificate.  The character string provided must match against a subject 
 * from the trusted certificate.
 *
 * @par Used with
 *   tport_tsend(), TPTLS_VERIFY_SUBJECTS_OUT
 *
 * @par Parameter Type:
 *   char const *
 *
 * @par Values
 *   - Refer to TPTAG_TLS_VERIFY_SUBJECTS()
 *
 * @note Not Implemented.
 */
#endif
425

426 427 428 429 430 431 432 433
/**@def TPTAG_QUEUESIZE(x)
 *
 * Specify the number of messages that can be queued per connection.
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
434
tag_typedef_t tptag_queuesize = UINTTAG_TYPEDEF(queuesize);
435 436 437 438 439 440 441 442 443 444 445 446 447 448

/**@def TPTAG_DEBUG_DROP(x)
 *
 * Sets the drop propability for incoming/outgoing packets.
 *
 * The incoming/outgoing packets are dropped with the given probablity
 * (in the range 0..1000) on unreliable transports.
 *
 * This is a parameter suitable for debugging only.
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
449
tag_typedef_t tptag_debug_drop = UINTTAG_TYPEDEF(debug_drop);
450 451 452 453 454 455 456

/**@def TPTAG_UDP_RMEM(x)
 *
 * Sets the maximum receive buffer in bytes for primary UDP socket.
 *
 * This is a parameter suitable for tuning.
 *
457 458 459 460
 * On Linux systems, the default value for receive buffer is set with
 * the sysctl "net.core.rmem_default", and the maximum value is set with
 * the sysctl "net.core.rmem_max".
 *
461 462 463
 * Use with tport_tbind(), nua_create(), nta_agent_create(),
 * nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
464
tag_typedef_t tptag_udp_rmem = UINTTAG_TYPEDEF(udp_rmem);
465 466 467 468 469 470 471

/**@def TPTAG_UDP_WMEM(x)
 *
 * Sets the maximum send buffer in bytes for primary UDP socket.
 *
 * This is a parameter suitable for tuning.
 *
472 473 474 475
 * On Linux systems, the default value for receive buffer is set with
 * the sysctl "net.core.wmem_default", and the maximum value is set with
 * the sysctl "net.core.wmem_max".
 *
476 477 478
 * Use with tport_tbind(), nua_create(), nta_agent_create(),
 * nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
479
tag_typedef_t tptag_udp_wmem = UINTTAG_TYPEDEF(udp_wmem);
480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495

/**@def TPTAG_THRPSIZE(x)
 *
 * Determines the number of threads in the pool.
 *
 * The thread pools can have multiple threads receiving, uncompressing,
 * parsing, compressing, and sending messages.
 *
 * This is a parameter suitable for tuning.
 *
 * @note Thread pools are currently broken.
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
496
tag_typedef_t tptag_thrpsize = UINTTAG_TYPEDEF(thrpsize);
497 498 499 500 501 502 503 504 505 506 507

/**@def TPTAG_THRPRQSIZE(x)
 *
 * Length of per-thread receive queue (as messages).
 *
 * This is a parameter suitable for tuning.
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 */
Pekka Pessi's avatar
Pekka Pessi committed
508
tag_typedef_t tptag_thrprqsize = UINTTAG_TYPEDEF(thrprqsize);
509 510 511 512 513 514 515 516

/**@def TPTAG_HTTP_CONNECT(x)
 *
 * Specify that tport can use HTTP connect method.
 *
 * Use with tport_tbind(), nua_create(), nta_agent_create(),
 * nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().
 */
517
tag_typedef_t tptag_http_connect = STRTAG_TYPEDEF(http_connect);
518 519 520 521 522 523 524 525 526

/**@def TPTAG_STUN_SERVER(x)
 *
 * Enable STUN server.
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 */
527
tag_typedef_t tptag_stun_server = BOOLTAG_TYPEDEF(stun_server);
528 529 530 531 532 533 534 535 536 537 538

/**@def TPTAG_TOS(x)
 *
 * Sets the IP TOS for the socket.
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 *
 * @NEW_1_12_5.
 */
539
tag_typedef_t tptag_tos = INTTAG_TYPEDEF(tos);
540 541 542 543 544

/**@def TPTAG_LOG(x)
 *
 * If set, print out parsed or sent messages at transport layer.
 *
545
 * Use with tport_tcreate(), nua_create(), nta_agent_create(),
546 547 548 549 550 551
 * nth_engine_create(), or initial nth_site_create().
 *
 * @sa #TPORT_LOG environment variable, TPTAG_DUMP()
 *
 * @NEW_1_12_5.
 */
552
tag_typedef_t tptag_log = INTTAG_TYPEDEF(log);
553 554 555

/**@def TPTAG_DUMP(x)
 *
556
 * Filename for dumping unparsed messages from transport.
557 558 559 560 561 562 563 564
 *
 * Use with tport_tcreate(), nta_agent_create(), nua_create(),
 * nth_engine_create(), or initial nth_site_create().
 *
 * @sa #TPORT_DUMP environment variable, TPTAG_LOG().
 *
 * @NEW_1_12_5.
 */
565 566
tag_typedef_t tptag_dump = STRTAG_TYPEDEF(dump);

567
/** Mark transport as trusted.
568
 *
569
 * @note Not implemented by tport module.
570 571 572 573 574 575
 *
 * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),
 * nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or
 * initial nth_site_create().
 */
tag_typedef_t tptag_trusted = BOOLTAG_TYPEDEF(trusted);