?? mn_stackconst.h
字號(hào):
//-----------------------------------------------------------------------------
// mn_stackconst.h
//-----------------------------------------------------------------------------
// Copyright 2006 Silicon Laboratories, Inc.
//
// Description:
// This file contains stack-defined constants used by the TCP/IP Stack.
// These constants should not be modified by the user.
//
// Generated by TCP/IP Configuration Wizard Version 3.1.
//
#ifndef MN_STACKCONST_H
#define MN_STACKCONST_H
#define IP_ADDR_LEN 4 // number of bytes in IP address
#define ETH_ADDR_LEN 6 // number of bytes in MAC address
#define VF_NAME_LEN 20
#define FUNC_NAME_LEN 20
// Duplex Modes
#define HALF_DUPLEX 0x00
#define FULL_DUPLEX 0x01
#define AUTO_NEG 0x02
// Virtual File Page Types
#define VF_PTYPE_DYNAMIC 0x01 // Page Type Dynamic allocated memory
#define VF_PTYPE_STATIC 0x02 // Page Type Static allocated memory
#define VF_PTYPE_FLASH 0x04 // Page Type Type FLASH memory
#define VF_PTYPE_RAM 0x08 // Page Type Type RAM memory
#define VF_PTYPE_CP2200_FLASH 0x10 // Page Type Type CP2200 FLASH memory
#define VF_PTYPE_HTML 0x80 // Web page is an HTML page
#define PCONST_BYTE byte cmx_const *
#define TEMP_CGI_BUFF_LEN (FUNC_NAME_LEN+18)
#define DHCP_MAC_LEN 16
#define DHCP_SNAME_LEN 64 // length of server name in DHCP structure
#define DHCP_FILE_LEN 128 // length of filename in DHCP structure
#define DHCP_SERVER_ID_LEN 4
#define DHCP_OPT_LEN 312 // length of options in DHCP structure
#define DHCP_DEAD 0
#define DHCP_OVERRIDE 1
#define DHCP_OK 9
#define DHCP_RENEWING 10
#define DHCP_REBINDING 11
#define MK_SOCKET_PTR(s) &sock_info[(s)]
#define SOCKET_ACTIVATE(s) sock_info[(s)].socket_state |= 0x01
#define SOCKET_DEACTIVATE(s) sock_info[(s)].socket_state = 0
#define SOCKET_ACTIVE(s) (sock_info[(s)].socket_state & 0x01)
#define CLEAR_SOCKET(s) { SOCKET_DEACTIVATE(s); }
// Ports
#define DEFAULT_PORT 1500
#define ECHO_PORT 7
#define HTTP_PORT 80
#define SMTP_PORT 25
#define FTP_DATA_PORT 20
#define FTP_CONTROL_PORT 21
#define BOOTP_SERVER_PORT 67
#define BOOTP_CLIENT_PORT 68
#define DHCP_SERVER_PORT 67
#define DHCP_CLIENT_PORT 68
#define TFTP_SERVER_PORT 69
#define DNS_SERVER_PORT 53
#define DNS_CLIENT_PORT 1027
// ARP doesn't use ports but we need a port number to get a socket
#define ARP_PORT 0xFFFF
// PING doesn't use ports but we need a port number to get a socket
#define PING_PORT 0
// socket types
#define STD_TYPE 0x00
#define HTTP_TYPE 0x01
#define FTP_TYPE 0x02
#define SMTP_TYPE 0x04
#define TFTP_TYPE 0x08
#define MULTICAST_TYPE 0x10
#define S_ARP_TYPE 0x20
#define AUTO_TYPE 0x40 // for automatically created sockets
#define INACTIVITY_TIMER 0x80
// open types
#define PASSIVE_OPEN 0
#define ACTIVE_OPEN 1
#define NO_OPEN 2
#define ANSWER_MODE 0
#define DIAL_MODE 1
// Proto Types
#define PROTO_ICMP 1
#define PROTO_IGMP 2
#define PROTO_IP 4
#define PROTO_TCP 6
#define PROTO_UDP 17
// TCP states
#define TCP_CLOSED 0
#define TCP_LISTEN 1
#define TCP_SYN_SENT 2
#define TCP_SYN_RECEIVED 3
#define TCP_ESTABLISHED 4
#define TCP_FIN_WAIT_1 5
#define TCP_FIN_WAIT_2 6
#define TCP_CLOSE_WAIT 7
#define TCP_CLOSING 8
#define TCP_LAST_ACK 9
#define TCP_TIME_WAIT 10
#define ONE_SECOND 100
#define THREE_SECONDS (3*(ONE_SECOND))
#define THIRTY_SECONDS (30*(ONE_SECOND))
#if ((60*(ONE_SECOND)) < 65536)
#define SIXTY_SECONDS (60*(ONE_SECOND))
#else
#define SIXTY_SECONDS (0xFFFF)
#endif
#ifndef PTR_NULL
#define PTR_NULL (0x00)
#endif
// Supported Devices
#define C8051F020 0x03
#define C8051F120 0x07
#define C8051F340 0x0F
#endif // MN_STACKCONST_H
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -