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 --> PJLIB-UTIL Reference

Configuration

Macros

#define PJ_DNS_MAX_IP_IN_A_REC   8
 
#define PJ_DNS_SRV_MAX_ADDR   8
 
#define PJ_DNS_MAX_NAMES_IN_NAMETABLE   16
 
#define PJ_DNS_RESOLVER_MAX_NS   16
 
#define PJ_DNS_RESOLVER_QUERY_RETRANSMIT_DELAY   2000
 
#define PJ_DNS_RESOLVER_QUERY_RETRANSMIT_COUNT   5
 
#define PJ_DNS_RESOLVER_MAX_TTL   (5*60)
 
#define PJ_DNS_RESOLVER_INVALID_TTL   60
 
#define PJ_DNS_RESOLVER_GOOD_NS_TTL   (10*60)
 
#define PJ_DNS_RESOLVER_BAD_NS_TTL   (1*60)
 
#define PJ_DNS_RESOLVER_MAX_UDP_SIZE   512
 
#define PJ_DNS_RESOLVER_RES_BUF_SIZE   512
 
#define PJ_DNS_RESOLVER_TMP_BUF_SIZE   4000
 
#define PJ_SCANNER_USE_BITWISE   1
 
#define PJSTUN_MAX_ATTR   16
 
#define PJ_STUN_MAX_ATTR   16
 
#define PJ_CRC32_HAS_TABLES   1
 
#define PJ_HTTP_DEFAULT_TIMEOUT   (60000)
 
#define PJ_CLI_POOL_SIZE   1024
 
#define PJ_CLI_POOL_INC   512
 
#define PJ_CLI_MAX_CMDBUF   512
 
#define PJ_CLI_MAX_ARGS   8
 
#define PJ_CLI_MAX_HINTS   32
 
#define PJ_CLI_MAX_SHORTCUTS   4
 
#define PJ_CLI_CONSOLE_POOL_SIZE   256
 
#define PJ_CLI_CONSOLE_POOL_INC   256
 
#define PJ_CLI_TELNET_POOL_SIZE   1024
 
#define PJ_CLI_TELNET_POOL_INC   512
 
#define PJ_CLI_MAX_CHOICE_VAL   64
 
#define PJ_CLI_MAX_CMD_HISTORY   16
 

Detailed Description

Macro Definition Documentation

◆ PJ_CLI_CONSOLE_POOL_INC

#define PJ_CLI_CONSOLE_POOL_INC   256

Pool increment size for console CLI. Default: 256 bytes

◆ PJ_CLI_CONSOLE_POOL_SIZE

#define PJ_CLI_CONSOLE_POOL_SIZE   256

Initial pool size for console CLI. Default: 256 bytes

◆ PJ_CLI_MAX_ARGS

#define PJ_CLI_MAX_ARGS   8

Maximum command arguments. Default: 8

◆ PJ_CLI_MAX_CHOICE_VAL

#define PJ_CLI_MAX_CHOICE_VAL   64

Maximum number of argument values of choice type. Default: 64

◆ PJ_CLI_MAX_CMD_HISTORY

#define PJ_CLI_MAX_CMD_HISTORY   16

Maximum number of command history. Default: 16

◆ PJ_CLI_MAX_CMDBUF

#define PJ_CLI_MAX_CMDBUF   512

Maximum length of command buffer. Default: 512

◆ PJ_CLI_MAX_HINTS

#define PJ_CLI_MAX_HINTS   32

Maximum number of hints. Default: 32

◆ PJ_CLI_MAX_SHORTCUTS

#define PJ_CLI_MAX_SHORTCUTS   4

Maximum short name version (shortcuts) for a command. Default: 4

◆ PJ_CLI_POOL_INC

#define PJ_CLI_POOL_INC   512

Pool increment size for CLI. Default: 512 bytes

◆ PJ_CLI_POOL_SIZE

#define PJ_CLI_POOL_SIZE   1024

Initial pool size for CLI. Default: 1024 bytes

◆ PJ_CLI_TELNET_POOL_INC

#define PJ_CLI_TELNET_POOL_INC   512

Pool increment size for telnet CLI. Default: 512 bytes

◆ PJ_CLI_TELNET_POOL_SIZE

#define PJ_CLI_TELNET_POOL_SIZE   1024

Initial pool size for telnet CLI. Default: 1024 bytes

◆ PJ_CRC32_HAS_TABLES

#define PJ_CRC32_HAS_TABLES   1

Specifies whether CRC32 algorithm should use the table based lookup table for faster calculation, at the expense of about 1KB table size on the executable. If zero, the CRC32 will use non-table based which is more than an order of magnitude slower.

Default: 1

◆ PJ_DNS_MAX_IP_IN_A_REC

#define PJ_DNS_MAX_IP_IN_A_REC   8

Maximum number of IP addresses in DNS A response.

◆ PJ_DNS_MAX_NAMES_IN_NAMETABLE

#define PJ_DNS_MAX_NAMES_IN_NAMETABLE   16

This constant specifies the maximum names to keep in the temporary name table when performing name compression scheme when duplicating DNS packet (the pj_dns_packet_dup() function).

Generally name compression is desired, since it saves some memory (see PJ_DNS_RESOLVER_RES_BUF_SIZE setting). However it comes at the expense of a little processing overhead to perform name scanning and also a little bit more stack usage (8 bytes per entry on 32bit platform).

Default: 16

◆ PJ_DNS_RESOLVER_BAD_NS_TTL

#define PJ_DNS_RESOLVER_BAD_NS_TTL   (1*60)

The interval on which nameservers which known to be bad to be probed again to determine whether it is still bad.

Default: 60 (one minute)

See also
PJ_DNS_RESOLVER_GOOD_NS_TTL

◆ PJ_DNS_RESOLVER_GOOD_NS_TTL

#define PJ_DNS_RESOLVER_GOOD_NS_TTL   (10*60)

The interval on which nameservers which are known to be good to be probed again to determine whether they are still good. Note that this applies to both active nameserver (the one currently being used) and idle nameservers (good nameservers that are not currently selected). The probing to query the "goodness" of nameservers involves sending the same query to multiple servers, so it's probably not a good idea to send this probing too often.

Default: 600 (ten minutes)

See also
PJ_DNS_RESOLVER_BAD_NS_TTL

◆ PJ_DNS_RESOLVER_INVALID_TTL

#define PJ_DNS_RESOLVER_INVALID_TTL   60

The life-time of invalid DNS response in the resolver response cache. An invalid DNS response is a response which RCODE is non-zero and response without any answer section. These responses can be put in the cache too to minimize message round-trip.

Default: 60 (one minute).

See also
PJ_DNS_RESOLVER_MAX_TTL

◆ PJ_DNS_RESOLVER_MAX_NS

#define PJ_DNS_RESOLVER_MAX_NS   16

Maximum numbers of DNS nameservers that can be configured in resolver.

◆ PJ_DNS_RESOLVER_MAX_TTL

#define PJ_DNS_RESOLVER_MAX_TTL   (5*60)

Maximum life-time of DNS response in the resolver response cache, in seconds. If the value is zero, then DNS response caching will be disabled.

Default is 300 seconds (5 minutes).

See also
PJ_DNS_RESOLVER_INVALID_TTL

◆ PJ_DNS_RESOLVER_MAX_UDP_SIZE

#define PJ_DNS_RESOLVER_MAX_UDP_SIZE   512

Maximum size of UDP packet. RFC 1035 states that maximum size of DNS packet carried over UDP is 512 bytes.

Default: 512 byes

◆ PJ_DNS_RESOLVER_QUERY_RETRANSMIT_COUNT

#define PJ_DNS_RESOLVER_QUERY_RETRANSMIT_COUNT   5

Maximum number of transmissions before timeout is declared for the query.

Default: 5

◆ PJ_DNS_RESOLVER_QUERY_RETRANSMIT_DELAY

#define PJ_DNS_RESOLVER_QUERY_RETRANSMIT_DELAY   2000

Default retransmission delay, in miliseconds. The combination of retransmission delay and count determines the query timeout.

Default: 2000 (2 seconds, according to RFC 1035)

◆ PJ_DNS_RESOLVER_RES_BUF_SIZE

#define PJ_DNS_RESOLVER_RES_BUF_SIZE   512

Size of memory pool allocated for each individual DNS response cache. This value here should be more or less the same as maximum UDP packet size (PJ_DNS_RESOLVER_MAX_UDP_SIZE), since the DNS replicator function (pj_dns_packet_dup()) is also capable of performing name compressions.

Default: 512

◆ PJ_DNS_RESOLVER_TMP_BUF_SIZE

#define PJ_DNS_RESOLVER_TMP_BUF_SIZE   4000

Size of temporary pool buffer for parsing DNS packets in resolver.

default: 4000

◆ PJ_DNS_SRV_MAX_ADDR

#define PJ_DNS_SRV_MAX_ADDR   8

Maximum server address entries per one SRV record

◆ PJ_HTTP_DEFAULT_TIMEOUT

#define PJ_HTTP_DEFAULT_TIMEOUT   (60000)

Timeout value for HTTP request operation. The value is in ms. Default: 60000ms

◆ PJ_SCANNER_USE_BITWISE

#define PJ_SCANNER_USE_BITWISE   1

Macro PJ_SCANNER_USE_BITWISE is defined and non-zero (by default yes) will enable the use of bitwise for character input specification (cis). This would save several kilobytes of .bss memory in the SIP parser.

◆ PJ_STUN_MAX_ATTR

#define PJ_STUN_MAX_ATTR   16

Maximum number of attributes in the STUN packet (for the new STUN library).

Default: 16

◆ PJSTUN_MAX_ATTR

#define PJSTUN_MAX_ATTR   16

Maximum number of attributes in the STUN packet (for the old STUN library).

Default: 16

 


PJLIB-UTIL Open Source, small footprint, and portable asynchronous/caching DNS resolver, text scanner, STUN client, and XML library
Copyright (C) 2006-2009 Teluu Inc.