Loading...
Searching...
No Matches
tport_tag.h File Reference

Tags for tport module. More...

`#include <sofia-sip/su_tag.h>`
Include dependency graph for tport_tag.h:

Go to the source code of this file.

## Macros

#define | TPORT_TAG_H
| Defined when <sofia-sip/tport_tag.h> has been included.
#define | TPTAG_ANY()
| Filter tag matching any tport tag.
#define | TPTAG_IDENT(x)
| Identify a transport interface.
#define | TPTAG_REUSE(x)
| Allow reusing transport connection (true by default).
#define | TPTAG_FRESH(x)
| Create new connection (but allow other messages to reuse the new one).
#define | TPTAG_SERVER(x)
| Bind server sockets (true by default, disable with TPTAG_SERVER(0)).
#define | TPTAG_PUBLIC(x)
| Define how the public transport connects to Internet.
#define | TPTAG_MTU(x)
| Specify MTU.
#define | TPTAG_CONNECT(x)
| Specify that tport must always use connections (even with UDP).
#define | TPTAG_QUEUESIZE(x)
| Specify the number of messages that can be queued per connection.
#define | TPTAG_SDWN_ERROR(x)
| If true, half close of a connection by remote is considered as an error.
#define | TPTAG_SDWN_AFTER(x)
| Half-close (shutdown(c, 1)) after sending the message.
#define | TPTAG_CLOSE_AFTER(x)
| Close of a connection after sending the message.
#define | TPTAG_IDLE(x)
| How long transports may be idle (value in milliseconds).
#define | TPTAG_TIMEOUT(x)
| Timeout for incomplete incoming message (value in milliseconds).
#define | TPTAG_KEEPALIVE(x)
| Keepalive interval in milliseconds.
#define | TPTAG_PINGPONG(x)
| Ping-pong interval in milliseconds.
#define | TPTAG_PONG2PING(x)
| Respond PING with PONG.
#define | TPTAG_SIGCOMP_LIFETIME(x)
| Default SigComp lifetime in seconds.
#define | TPTAG_COMPARTMENT(x)
| Pointer to SigComp compartment.
#define | TPTAG_CERTIFICATE(x)
| Path to the public key certificate directory.
#define | TPTAG_TLS_VERSION(x)
| Sets the TLS version (version 0 implies SSL2/SSL3).
#define | TPTAG_TLS_PASSPHRASE(x)
| Sets the passphrase password to be used by openSSL to encrypt/decrypt private key files.
#define | TPTAG_TLS_VERIFY_POLICY(x)
| The verification of certificates can be controlled:
#define | TPTAG_TLS_VERIFY_DEPTH(x)
| Define the maximum length of a valid certificate chain.
#define | TPTAG_TLS_VERIFY_DATE(x)
| Enable/Disable verification of notBefore and notAfter parameters of X.509 Certificates.
#define | TPTAG_TLS_VERIFY_SUBJECTS(x)
| Incoming TLS connections must provide a trusted X.509 certificate.
#define | TPTAG_TLS_VERIFY_PEER(x)
#define | TPTAG_DEBUG_DROP(x)
| Sets the drop propability for incoming/outgoing packets.
#define | TPTAG_UDP_RMEM(x)
| Sets the maximum receive buffer in bytes for primary UDP socket.
#define | TPTAG_UDP_WMEM(x)
| Sets the maximum send buffer in bytes for primary UDP socket.
#define | TPTAG_THRPSIZE(x)
| Determines the number of threads in the pool.
#define | TPTAG_THRPRQSIZE(x)
| Length of per-thread receive queue (as messages).
#define | TPTAG_HTTP_CONNECT(x)
| Specify that tport can use HTTP connect method.
#define | TPTAG_STUN_SERVER(x)
| Enable STUN server.
#define | TPTAG_TOS(x)
| Sets the IP TOS for the socket.
#define | TPTAG_LOG(x)
| If set, print out parsed or sent messages at transport layer.
#define | TPTAG_DUMP(x)
| Filename for dumping unparsed messages from transport.

## Typedefs

typedef enum tport_via | tport_pri_type_t
| Define how the public transport connects to Internet.

## Enumerations

enum | tport_via
| Define how the public transport connects to Internet. More...

## Variables

TPORT_DLL tagi_t | tport_tag_list []
| List of all tport tags.
TPORT_DLL tagi_t | tport_tags []
| Filter list matching any tport tag.

## Detailed Description

Tags for tport module.

Author
  Pekka Pessi Pekka.nosp@m..Pes.nosp@m.si@no.nosp@m.kia..nosp@m.com

Date
  Created: Sat Oct 12 18:39:48 2002 ppessi

## Macro Definition Documentation

## TPTAG_CERTIFICATE

#define TPTAG_CERTIFICATE | ( |  | x | ) |

Path to the public key certificate directory.

Use with tport_tbind(), nua_create(), nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().

## TPTAG_CLOSE_AFTER

#define TPTAG_CLOSE_AFTER | ( |  | x | ) |

Close of a connection after sending the message.

Use with tport_tsend(), nta_outgoing_tcreate(), nta_outgoing_mcreate(), or nth_client_tcreate().

## TPTAG_COMPARTMENT

#define TPTAG_COMPARTMENT | ( |  | x | ) |

Pointer to SigComp compartment.

Note
  Not used.

## TPTAG_CONNECT

#define 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().

## TPTAG_DEBUG_DROP

#define 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().

## TPTAG_DUMP

#define TPTAG_DUMP | ( |  | x | ) |

Filename for dumping unparsed messages from transport.

Use with tport_tcreate(), nta_agent_create(), nua_create(), nth_engine_create(), or initial nth_site_create().

See also
  #TPORT_DUMP environment variable, TPTAG_LOG().

Since
  New in 1.12.5.

## TPTAG_FRESH

#define TPTAG_FRESH | ( |  | x | ) |

Create new connection (but allow other messages to reuse the new one).

Use with tport_tsend(), nta_outgoing_tcreate(), nta_outgoing_mcreate(), or nth_client_tcreate().

## TPTAG_HTTP_CONNECT

#define 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().

## TPTAG_IDENT

#define TPTAG_IDENT | ( |  | x | ) |

Identify a transport interface.

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().

## TPTAG_IDLE

#define TPTAG_IDLE | ( |  | x | ) |

How long transports may be idle (value in milliseconds).

If 0, zap immediately, if UINT_MAX, leave them there (default value for now).

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().

## TPTAG_KEEPALIVE

#define 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().

See also
  TPTAG_PINGPONG(), TPTAG_PONG2PING(), TPTAG_TIMEOUT(), TPTAG_IDLE()

Since
  New in 1.12.7.

## TPTAG_LOG

#define TPTAG_LOG | ( |  | x | ) |

If set, print out parsed or sent messages at transport layer.

Use with tport_tcreate(), nua_create(), nta_agent_create(), nth_engine_create(), or initial nth_site_create().

See also
  #TPORT_LOG environment variable, TPTAG_DUMP()

Since
  New in 1.12.5.

## TPTAG_MTU

#define TPTAG_MTU | ( |  | x | ) |

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().

## TPTAG_PINGPONG

#define TPTAG_PINGPONG | ( |  | x | ) |

Ping-pong interval in milliseconds.

If 0 or UINT_MAX, do not check for PONGs. Default value is 0.

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().

See also
  TPTAG_PONG2PING(), TPTAG_KEEPALIVE(), TPTAG_TIMEOUT(), TPTAG_IDLE(), draft-ietf-sip-outbound-10.txt

Since
  New in 1.12.7.

## TPTAG_PONG2PING

#define 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 least 4 whitespace characters) is received between messages, a pong (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().

See also
  TPTAG_PINGPONG(), TPTAG_KEEPALIVE(), TPTAG_TIMEOUT(), TPTAG_IDLE()

Since
  New in 1.12.7.

## TPTAG_PUBLIC

#define TPTAG_PUBLIC | ( |  | x | ) |

Define how the public transport connects to Internet.

Use with tport_tbind(), nua_create(), nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().

See also
  TPTAG_PUBLIC(), tport_is_public().

## TPTAG_QUEUESIZE

#define 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().

## TPTAG_REUSE

#define TPTAG_REUSE | ( |  | x | ) |

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().

## TPTAG_SDWN_AFTER

#define 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().

## TPTAG_SDWN_ERROR

#define 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().

## TPTAG_SERVER

#define TPTAG_SERVER | ( |  | x | ) |

Bind server sockets (true by default, disable with TPTAG_SERVER(0)).

Use with tport_tbind().

## TPTAG_SIGCOMP_LIFETIME

#define 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().

## TPTAG_STUN_SERVER

#define 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().

## TPTAG_THRPRQSIZE

#define 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().

## TPTAG_THRPSIZE

#define 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().

## TPTAG_TIMEOUT

#define 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().

## TPTAG_TLS_PASSPHRASE

#define TPTAG_TLS_PASSPHRASE | ( |  | x | ) |

Sets the passphrase password to be used by openSSL to encrypt/decrypt private key files.

Since
  New in 1.12.11.

## TPTAG_TLS_VERIFY_DATE

#define TPTAG_TLS_VERIFY_DATE | ( |  | x | ) |

Enable/Disable verification of notBefore and notAfter parameters of X.509 Certificates.

Default
  Enabled

Values
  - 0 - Disable date verification.
  - Non-Zero - Enable date verification.

Used with
  tport_tbind(), nua_create(), nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().

Parameter Type:
  unsigned int

Note
  This tag should be only used on devices which lack accurate timekeeping.

Since
  New in 1.12.11.

## TPTAG_TLS_VERIFY_DEPTH

#define TPTAG_TLS_VERIFY_DEPTH | ( |  | x | ) |

Define the maximum length of a valid certificate chain.

Default
  2

Used with
  tport_tbind(), nua_create(), nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().

Parameter Type:
  unsigned int

Since
  New in 1.12.11.

## TPTAG_TLS_VERIFY_PEER

#define TPTAG_TLS_VERIFY_PEER | ( |  | x | ) |

Depreciated:
  Alias for TPTAG_TLS_VERIFY_POLICY(TPTLS_VERIFY_IN|TPTLS_VERIFY_OUT)

Since
  New in 1.12.10.

## TPTAG_TLS_VERIFY_POLICY

#define TPTAG_TLS_VERIFY_POLICY | ( |  | x | ) |

The verification of certificates can be controlled:

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)

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().

Since
  New in 1.12.11.

## TPTAG_TLS_VERIFY_SUBJECTS

#define 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.

Used with
  tport_tbind(), nua_create(), nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), initial nth_site_create(), TPTLS_VERIFY_SUBJECTS_IN

Parameter Type:
  void const * (actually su_strlst_t const *)

Values
  - SIP Identity - sip:example.com or sip:usern.nosp@m.ame@.nosp@m.examp.nosp@m.le.c.nosp@m.om
  - DNS - sip.example.com
  - IP Address - Both IPv4 and IPv6 Supported

Since
  New in 1.12.11.

## TPTAG_TLS_VERSION

#define TPTAG_TLS_VERSION | ( |  | x | ) |

Sets the TLS version (version 0 implies SSL2/SSL3).

Use with tport_tbind(), nua_create(), nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().

## TPTAG_TOS

#define 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().

Since
  New in 1.12.5.

## TPTAG_UDP_RMEM

#define TPTAG_UDP_RMEM | ( |  | x | ) |

Sets the maximum receive buffer in bytes for primary UDP socket.

This is a parameter suitable for tuning.

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".

Use with tport_tbind(), nua_create(), nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().

## TPTAG_UDP_WMEM

#define TPTAG_UDP_WMEM | ( |  | x | ) |

Sets the maximum send buffer in bytes for primary UDP socket.

This is a parameter suitable for tuning.

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".

Use with tport_tbind(), nua_create(), nta_agent_create(), nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().

## Typedef Documentation

## tport_pri_type_t

typedef enum tport_via tport_pri_type_t

Define how the public transport connects to Internet.

See also
  TPTAG_PUBLIC(), tport_is_public().

## Enumeration Type Documentation

## tport_via

enum tport_via

Define how the public transport connects to Internet.

See also
  TPTAG_PUBLIC(), tport_is_public().

## Variable Documentation

## tport_tags

TPORT_DLL tagi_t tport_tags[]

extern

Filter list matching any tport tag.

Filter list matching any tport tag.

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