Files
m241Neelima/components/ip_net2-6.9/iplite2/config/iplite_config.h
T
2026-07-30 11:19:44 +05:30

397 lines
13 KiB
C

/*
******************************************************************************
* IPLITE_CONFIG.H
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: iplite_config.h,v $ $Revision: 1.49.14.1 $
* $Source: /home/interpeak/CVSRoot/iplite2/config/iplite_config.h,v $
* $Author: svc-cmnet $ $Date: 2013-03-13 07:45:28 $
* $State: Exp $ $Locker: $
*
* INTERPEAK_COPYRIGHT_STRING
* Design and implementation by Kenneth Jonsson <kenneth@interpeak.se>
******************************************************************************
*/
#ifndef IPLITE_CONFIG_H
#define IPLITE_CONFIG_H
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
* Build Configuration for IPLITE.
*/
/*
****************************************************************************
* 2 INCLUDE FILES
****************************************************************************
*/
#include <ipcom_config.h>
#include <ipcom_type.h>
#include <ipcom_cstyle.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
****************************************************************************
* 3 TYPES
****************************************************************************
*/
/*
*===========================================================================
* Iplite_conf_pkt_pool
*===========================================================================
* Packet pool entry.
*/
typedef struct Iplite_conf_pkt_pool_struct
{
Ip_u16 count; /* Number of packet of this size */
Ip_u16 mtu; /* The size of the packets in this pool */
}
Iplite_conf_pkt_pool;
/*
*===========================================================================
* Iplite_conf_ifdata
*===========================================================================
*/
typedef struct Iplite_conf_ifdata_struct
{
char *ifname; /* Name of the interface to configure */
#ifdef IP_PORT_VXWORKS
char *devname; /* MUX device to bind interface to */
#endif
char *ip4addr_mask; /* IPv4 "address/network" or "dhcp" or "driver") */
char *ip6addr_mask;
}
Iplite_conf_ifdata;
/*
*===========================================================================
* Iplite_conf_gwdata
*===========================================================================
*/
typedef struct Iplite_conf_gwdata_struct
{
char *gw4;
char *gw6;
}
Iplite_conf_gwdata;
/*
****************************************************************************
* 4 CONFIGURATION
****************************************************************************
*/
/*
*===========================================================================
* IPCOM_SYSLOG_PRIORITY
*===========================================================================
* Default syslog priority.
*/
#ifdef IP_DEBUG
#define IPLITE_SYSLOG_PRIORITY IPCOM_LOG_DEBUG
#else
#define IPLITE_SYSLOG_PRIORITY IPCOM_LOG_WARNING
#endif
/*
****************************************************************************
* GENERAL CONFIGURATION
****************************************************************************
*/
/*
*===========================================================================
* IPLITE_CONF_INQ_MAX
*===========================================================================
* Maximum number of buffers in input queue processed by the input daemon.
*/
#define IPLITE_CONF_INQ_MAX 32
/*
*===========================================================================
* IPLITE_CONF_MEM_MAX
*===========================================================================
* Maximum number of bytes that IPLITE can alloc using iplite_malloc().
*/
#define IPLITE_CONF_MEM_MAX 320000
/*
*===========================================================================
* IPLITE_MEM_OPT
*===========================================================================
* IPLITE is by default optimized for maximum performance. Set this define
* if you want to optmize on size instead.
* Note: Currently the difference is minimal.
* Note2: Edit iplite_config.c for trimming number of network buffers.
* #define IPLITE_MEM_OPT
*/
/*
*===========================================================================
* IPLITE_COMPAT_OLDSOCK
*===========================================================================
* Makes IPLITE able to run old socket code using the 16-bit sin_family from
* struct sockaddr_in instead of the newer 8-bit version + length mapping
* directly against the struct sockaddr.
*/
#define IPLITE_COMPAT_OLDSOCK
/*
*===========================================================================
* IPLITE_CONF_TICKS_PER_SEC
*===========================================================================
* Number of ticks per second. 5 (or more) should be used if TCP is enabled.
* Too many ticks per second degrade preformance. Down to 1 tick per second
* can be used if the stack is only configured for UDP.
*/
#define IPLITE_CONF_TICKS_PER_SEC 5
/*
*===========================================================================
* IPLITE_CONF_REASSEMBLY_TIMEOUT
*===========================================================================
* Number of seconds IPLITE will keep incomplete datagram fragments in the
* reassembly list before discarding them. RFC2460 states default 60 seconds.
*
*/
#define IPLITE_CONF_REASSEMBLY_TIMEOUT 15
/*
****************************************************************************
* INTERFACE CONFIGURATION
****************************************************************************
*/
/*
*===========================================================================
* IPLITE_CONF_MAX_NETIF
*===========================================================================
* Maximum number of interfaces that can be used at any time (the actual number
* of available external interfaces will be 2 less since slot 0 is reserved
* and one slot is used for the loopback interface.
*/
#define IPLITE_CONF_MAX_NETIF 8
/*
*===========================================================================
* IPLITE_CONF_NETIF_OUTQ_MAX
*===========================================================================
* Maximum number of output packets the link layer will queue before
* discarding output packets sent from the IPLITE input or tick daemon.
*/
#define IPLITE_CONF_NETIF_OUTQ_MAX 4
/*
*===========================================================================
* IPLITE_CONF_MIN_MTU
*===========================================================================
* The smallest MTU that IPLITE expects. Should be 576 in most cases.
*/
#define IPLITE_CONF_MIN_MTU 576
/*
*===========================================================================
* IPLITE_CONF_LOOPBACK_MTU
*===========================================================================
* Define the MTU for the loopback interface.
*/
#define IPLITE_CONF_LOOPBACK_MTU 1500
/*
****************************************************************************
* SOCKET CONFIGURATION
****************************************************************************
*/
/* Maximum number of sockets that can be used at any time (the actual
* number of available sockets will be 3 less since 0-2 are reserved).
*/
#ifdef IP_PORT_OSECK
#define IPLITE_CONF_MAX_SOCKETS 32
#else
#define IPLITE_CONF_MAX_SOCKETS 256
#endif
/* Random port number range. */
#define IPLITE_CONF_SOCK_ANONPORTMIN 49152
#define IPLITE_CONF_SOCK_ANONPORTMAX 65535
/* The default hop limit for IPv4 and IPv6 packets */
#define IPLITE_CONF_SOCK_BASE_HOP_LIMIT 64
/* Default socket buffer sizes. */
#define IPLITE_CONF_SOCK_DEFAULT_SEND_BUF_SIZE 8192
#define IPLITE_CONF_SOCK_DEFAULT_RECV_BUF_SIZE 8192
/*
****************************************************************************
* INET6 CONFIGURATION
****************************************************************************
*/
/* Number of neighbor discovery messages should be resent before giving up. */
#define IPLITE_CONF_INET6_MAX_UNICAST_SOLICIT 3
/* Number of times the node should test the address for uniqueness before
* assigning it to the interface (set to 0 to turn of Duplicate Address Detection)
*/
#define IPLITE_CONF_INET6_DUP_ADDR_DETECT_TRANSMITS 1
/* Number of seconds that a entry in the NDP cache is in reachable state */
#define IPLITE_CONF_INET6_BASE_REACHABLE_TIME 30
/* Number of seconds to wait between retransmits. */
#define IPLITE_CONF_INET6_BASE_RETRANSMIT_TIME 5
/* Number of seconds to wait for a stale ND entry to become reachable
* before forcing a probe, packets will be sent using the stale entry
* during this time.
*/
#define IPLITE_CONF_INET6_DELAY_FIRST_PROBE_TIME 5
/* Number of seconds that can pass before an stale entry in the
* neighbor cache is deleted.
*/
#define IPLITE_CONF_INET6_NEIGHBOR_CACHE_TO_LIVE 1200
/* Number of seconds that can pass before an unused entry in the
* destination cache is deleted.
*/
#define IPLITE_CONF_INET6_DST_CACHE_TO_LIVE 300
/*
****************************************************************************
* TCP CONFIGURATION
****************************************************************************
*/
/* Maximum number of pending TCP sessions a listen socket will get by
default, i.e. when passing zero as 2:nd argument to ipcom_listen() */
#define IPLITE_CONF_TCP_DEFAULT_BACKLOG_LEN 2
/*
****************************************************************************
* FEATURE CONFIGURATION
****************************************************************************
* This section defines support for various optional features and should
* generally be left untouched unless you know what features you do not
* need and want to save memory.
*/
/* support ARP ioctls (IP_SIOCSARP, IP_SIOCGARP, IP_SIOCDARP) */
#define IPLITE_USE_IOCTL_ARP
/* support IP_SIOCGIFCONF */
#define IPLITE_USE_IOCTL_IFCONF
/* Define for IPLITE WLAN support */
#ifdef IPPRISM
#define IPLITE_USE_WLAN
#endif
#ifdef IPMARVELL
#define IPLITE_USE_WLAN
#endif
/*
****************************************************************************
* ADVANCED CONFIGURATION
****************************************************************************
* CAUTION: This section automatically configures specific features in IPLITE
* automatically and should be be left unmodified unless you are an expert
* IPLITE user.
*/
#if !defined(IPCOM_USE_INET) && !defined(IPCOM_USE_INET6)
#error Must_define__IPCOM_USE_INET__andor__IPCOM_USE_INET6
#endif
/* Define if there should be possible to add empty packet header
* to support the zero-copy API and targets that use their own
* data buffers.
*/
#ifdef IP_PORT_VXWORKS
#define IPLITE_USE_EXTERNAL_PKT_BUF
#endif
/* Define the number of packet headers that should be added.
*/
#ifdef IPLITE_USE_EXTERNAL_PKT_BUF
#define IPLITE_NUM_PKT_HDR 40
#endif
/* Maximum number of packet pools. */
#define IPLITE_CONF_MAX_PKTPOOL 8
/* Trailing Ipcom_pkt cache buffer to protect dynamic buffer end marks
* from DMA snooping.
*/
#if defined(IP_PORT_ATI)
#define IPLITE_CONF_CACHE_BUFSIZ 0
#else
#define IPLITE_CONF_CACHE_BUFSIZ 64
#endif
/* Build IPLITE debug code. */
#ifdef IP_DEBUG
#define IPLITE_DEBUG
#endif
/* IPSSL use old socket structures. */
#if defined(IPSSL) && !defined(IPLITE_COMPAT_OLDSOCK)
#define IPLITE_COMPAT_OLDSOCK
#endif
/*
*===========================================================================
* IPLITE_USE_RFC3927
*===========================================================================
* Define to include support for RFC 3927
* "Dynamic Configuration of IPv4 Link-Local Addresses"
* The link local IPv4 addresses is the 169.254/16 network.
* The feature is currently only supported on Ethernet and IEEE 802.11
* interfaces.
*/
#if defined(IPCOM_USE_ETHERNET) && !defined(IPCOM_FORWARDER_NAE)
#define IPLITE_USE_RFC3927
#endif
#ifdef __cplusplus
}
#endif
#endif
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/