⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 netcfg.h

📁 开发TIC6000DSP经典重要资料,NDK(Network Development Kit) for TI C6000 DSP,本人费尽心血才搞到的,是开发DSP网络通讯的基础.
💻 H
📖 第 1 页 / 共 2 页
字号:
typedef struct _ci_route {
        IPN     IPDestAddr;             // Destination Network Address
        IPN     IPDestMask;             // Subnet Mask of Destination
        IPN     IPGateAddr;             // Gateway IP Address
        HANDLE  hRoute;                 // Route handle (resets to NULL)
        } CI_ROUTE;

//---------------------------------------------------------------------------
//
// Config Tag: CFGTAG_CLIENT
//   List of DHCPS clients by manual entry or allocation from pool
//     Item     = Physical Interface Idx (1 to n)
//     Instance = Client Address Instance (1 to n)
//
//   Used by DHCPS and DNS server for local name resolution
//

// Client Instance

// Max Client Hostname Length - Change requires NETTOOLS rebuild
#define CFG_HOSTNAME_MAX     64

typedef struct _ci_client {
        uint    ClientType;             // Entry Status
        uint    Status;                 // DHCPS Status (init to ZERO)
        IPN     IPAddr;                 // Client IP Address
        char    MacAddr[6];             // Client Physical Address
        char    Hostname[CFG_HOSTNAME_MAX]; // Client Hostname
        UINT32  TimeStatus;             // Time of last status msg (REQ/DEC/INF)
        UINT32  TimeExpire;             // Expiration Time from TimeStatus
        } CI_CLIENT;

// ClientType and ClientStatus are values and can be one of the following...
#define CFG_CLIENTTYPE_DYNAMIC     1    // Entry created via DHCPS
#define CFG_CLIENTTYPE_STATIC      2    // Create manually

#define CFG_CLIENTSTATUS_PENDING   1    // Supplied by OFFER
#define CFG_CLIENTSTATUS_VALID     2    // Validated by REQUEST
#define CFG_CLIENTSTATUS_STATIC    3    // Given by a INFORM
#define CFG_CLIENTSTATUS_INVALID   4    // Invalidated by DECLINE

//---------------------------------------------------------------------------
//
// Config Tag: CFGTAG_ACCT
//   List of user accounts for PPP or similar login
//     Item     = 1 for PPP
//     Instance = Client Address Instance (1 to n)
//
//   Used by PPP in server mode for authentication
//

// Account Item Types
#define CFGITEM_ACCT_PPP        1

#define CFG_ACCTSTR_MAX         32

// Account Instance
typedef struct _ci_acct {
        uint    Flags;                     // Account Flags
        char    Username[CFG_ACCTSTR_MAX]; // Username
        char    Password[CFG_ACCTSTR_MAX]; // Password
        } CI_ACCT;

// Authority consists of flags. One or more of the following can be set...
#define CFG_ACCTFLG_CH1         0x1000
#define CFG_ACCTFLG_CH2         0x2000
#define CFG_ACCTFLG_CH3         0x4000
#define CFG_ACCTFLG_CH4         0x8000
#define CFG_ACCTFLG_CHALL       0xF000

//---------------------------------------------------------------------------
//
// Config Tag: CFGTAG_SYSINFO
//   System information
//
//   This tag is for system information that is common for all system
//   tasks (DNS server, hostname, domainname, etc.).
//
//   Tag values less than 256 are reserved for DHCP
//
//   ( Item < 256 )
//     (DHCP Info: Item numbers are reserved to match DHCP info tags)
//     Item     = DHCP Compatible Tag
//     Instance = Data Item Instance (1-n)
//
//   ( Item >= 256 )
//     Item     = System Info Tag
//     Instance = Data Item Instance (1-n)
//
// *** USERS CAN ADD THEIR OWN ITEM VALUES ***
//
// For information, there is no structure - purely data
//

//
// Currently Used DHCP Compatible Items
//
// Multiple instances are always to be stored as multiple
// config entries, not a concatinated byte string in a
// single config entry.
//
#define CFGITEM_DHCP_DOMAINNAMESERVER   6       // Stack's DNS servers
#define CFGITEM_DHCP_HOSTNAME           12      // Stack's host name
#define CFGITEM_DHCP_NBNS               44      // Stack's NBNS servers

//---------------------------------------------------------------------------
//
// Config Tag: CFGTAG_IP, CFGTAG_OS
//   IP Stack Configuration / OS Configuration
//
//   The CFGTAG_IP tag is for setting configuration values in the
//   TCP/IP stack.
//
//   The CFGTAG_OS tag is for setting configuration values in the
//   system OS (or OS shell).
//
//   Write to either tag results in writes the the internal configuration
//   structure of the stack or OS, but being part of the configuration, the
//   entry can be stored off in as part of the CfgSave() functionality.
//
//   Removing an entry restores the default value to the configuration.
//
//   Entries that are not present can not be read, but an error on
//   read implies the entry is in its default state.
//
//   All items are of type "int" or "uint".
//

// When Tag = CFGTAG_IP, Item values are
#define CFGITEM_IP_ICMPDOREDIRECT  1   // Add route on ICMP redirect (1=Yes)
#define CFGITEM_IP_ICMPTTL         2   // TTL for ICMP msgs (RFC1700 says 64)
#define CFGITEM_IP_ICMPTTLECHO     3   // TTL for ICMP echo (RFC1700 says 64)
#define CFGITEM_IP_IPINDEXSTART    4   // IP Protocol Start Index
#define CFGITEM_IP_IPFORWARDING    5   // IP Forwarding Enable (1=Yes)
#define CFGITEM_IP_IPNATENABLE     6   // IP NAT Translation Enable (1=Yes)
#define CFGITEM_IP_IPFILTERENABLE  7   // IP Filtering Enable (1=Yes)
#define CFGITEM_IP_IPREASMMAXTIME  8   // Max IP reassembly time in seconds
#define CFGITEM_IP_IPREASMMAXSIZE  9   // Max IP reassembly packet size
#define CFGITEM_IP_DIRECTEDBCAST   10  // Directed BCast IP addresses (1=Yes)
#define CFGITEM_IP_TCPREASMMAXPKT  11  // Out of order pkts held by TCP socket
#define CFGITEM_IP_RTCENABLEDEBUG  12  // Route control dbg messages (1=Yes)
#define CFGITEM_IP_RTCADVTIME      13  // Seconds to send Router Adv. (0=don't)
#define CFGITEM_IP_RTCADVLIFE      14  // Lifetime of route in RtAdv if active
#define CFGITEM_IP_RTCADVPREF      15  // Preference of route in RvAdv if active
#define CFGITEM_IP_RTARPDOWNTIME   16  // Time 5 failed ARPs keeps route down
#define CFGITEM_IP_RTKEEPALIVETIME 17  // Timeout of validated route in seconds
#define CFGITEM_IP_RTCLONETIMEOUT  18  // Timeout of new cloned route in seconds
#define CFGITEM_IP_RTDEFAULTMTU    19  // MTU for internal routes
#define CFGITEM_IP_SOCKTTLDEFAULT  20  // Default IP TTL for Sockets
#define CFGITEM_IP_SOCKTOSDEFAULT  21  // Default IP TOS for Sockets
#define CFGITEM_IP_SOCKMAXCONNECT  22  // Max connections on listening socket
#define CFGITEM_IP_SOCKTIMECONNECT 23  // Max time for connect socket
#define CFGITEM_IP_SOCKTIMEIO      24  // Default Max time for socket send/rcv
#define CFGITEM_IP_SOCKBUFMAX      25  // Absolute max socket buffer size
#define CFGITEM_IP_SOCKMINTX       26  // Default min space for "able to write"
#define CFGITEM_IP_SOCKMINRX       27  // Default min data for "able to read"
#define CFGITEM_IP_PIPETIMEIO      28  // Max time for pipe send/rcv call
#define CFGITEM_IP_PIPEBUFMAX      29  // Pipe internal buffer size
#define CFGITEM_IP_PIPEMINTX       30  // Pipe min tx space for "able to write"
#define CFGITEM_IP_PIPEMINRX       31  // Pipe min rx data for "able to read"
#define CFGITEM_IP_MAX             31  // Max CFGTAG_IP item

// When Tag = CFGTAG_OS, Item values are
#define CFGITEM_OS_DBGPRINTLEVEL   1   // Debug msg print threshhold
#define CFGITEM_OS_DBGABORTLEVEL   2   // Debug msg sys abort theshhold
#define CFGITEM_OS_TASKPRILOW      3   // Lowest priority for stack task
#define CFGITEM_OS_TASKPRINORM     4   // Normal priority for stack task
#define CFGITEM_OS_TASKPRIHIGH     5   // High priority for stack task
#define CFGITEM_OS_TASKPRIKERN     6   // Kernel-level priority (highest)
#define CFGITEM_OS_TASKSTKLOW      7   // Minimum stack size
#define CFGITEM_OS_TASKSTKNORM     8   // Normal stack size
#define CFGITEM_OS_TASKSTKHIGH     9   // Stack size for high volume tasks
#define CFGITEM_OS_MAX             9   // Max CFGTAG_OS item

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -