?? netcfg.h
字號:
* *** NOTE: changing this value requires a rebuild of NETTOOLS! ***
*
* NOTE: The client hostname size is actually governed by 2 definitions:
* 1) CFG_HOSTNAME_MAX (defined in netcfg.h)
* 2) HOSTNAME_LENGTH (defined in dhcp.h)
* These two values must be consistent! If one is changed, both must be
* changed.
*
* RFC 2131 and 2132 do not clearly specify what the maximum size for this
* value should be. 255 was determined based on MSDN "Host Name Resolution for
* IPv4" on Microsoft's website (the size is 255 + 1 to make room for "\0").
* See notes for fix of CQ15114 for more details.
*
*/
#define CFG_HOSTNAME_MAX 256
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 or REALM
// Instance = Client Address Instance (1 to n)
//
// Used by PPP in server mode for authentication
// Used by file system for REALM authentication
//
// * Note all NDK accounts use the the same "item" value *
//
// Account Item Types
#define CFGITEM_ACCT_SYSTEM 1
#define CFGITEM_ACCT_PPP 1
#define CFGITEM_ACCT_REALM 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 concatenated 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
#define CFGITEM_DHCP_CLIENT_OPTION 61 // Stack DHCP Client Identifier
#define CFGITEM_SYSINFO_REALM1 256 // Realm Name 1 (max 31 chars)
#define CFGITEM_SYSINFO_REALM2 257 // Realm Name 2 (max 31 chars)
#define CFGITEM_SYSINFO_REALM3 258 // Realm Name 3 (max 31 chars)
#define CFGITEM_SYSINFO_REALM4 259 // Realm Name 4 (max 31 chars)
#define CFGITEM_SYSINFO_REALMPPP 260 // Realm Name PPP (max 31 chars)
#define CFGITEM_SYSINFO_EVALCALLBACK 261 // Callback function to notify
// application 5 min before
// end of stack evaluation period
//---------------------------------------------------------------------------
//
// 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_SOCKTCPTXBUF 25 // TCP Transmit buffer size
#define CFGITEM_IP_SOCKTCPRXBUF 26 // TCP Receive buffer size (copy mode)
#define CFGITEM_IP_SOCKTCPRXLIMIT 27 // TCP Receive limit (non-copy mode)
#define CFGITEM_IP_SOCKUDPRXLIMIT 28 // UDP Receive limit
#define CFGITEM_IP_SOCKMINTX 29 // Default min space for "able to write"
#define CFGITEM_IP_SOCKMINRX 30 // Default min data for "able to read"
#define CFGITEM_IP_PIPETIMEIO 31 // Max time for pipe send/rcv call
#define CFGITEM_IP_PIPEBUFMAX 32 // Pipe internal buffer size
#define CFGITEM_IP_PIPEMINTX 33 // Pipe min tx space for "able to write"
#define CFGITEM_IP_PIPEMINRX 34 // Pipe min rx data for "able to read"
#define CFGITEM_IP_TCPKEEPIDLE 35 // Idle time before 1st TCP keep probe
#define CFGITEM_IP_TCPKEEPINTVL 36 // TCP keep probe interval
#define CFGITEM_IP_TCPKEEPMAXIDLE 37 // Max TCP keep probing time before drop
#define CFGITEM_IP_ICMPDONTREPLYBCAST 38 // Dont Reply To ICMP ECHO REQ
// packets sent to BCast/Directed BCast
#define CFGITEM_IP_ICMPDONTREPLYMCAST 39 // Dont Reply To ICMP ECHO REQ
// packets sent to Multi-Cast
#define CFGITEM_IP_RTGARP 40 // How to handle received gratuitous ARP
// 0 : discard them. (Default)
// 1 : update MAC address of HOST, if it
// is already in the routing table.
// 2 : add HOST to routing table, if it
// does NOT exist. If exists, update
// MAC address.
#define CFGITEM_IP_ICMPDONTREPLYECHO 41 // Don't Reply To ICMP ECHO REQ
#define CFGITEM_IP_UDPSENDICMPPORTUNREACH 42 // Send ICMP Port Unreachable
// packet if UDP port is opened or not
#define CFGITEM_IP_TCPSENDRST 43 // Send RST if TCP port is not
// opened or not.
#define CFGITEM_IP_MAX 43 // 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 + -