📄 mib.h.svn-base
字号:
/* * Header file of MIB * Authors: David Hsu <davidhsu@realtek.com.tw> * Authors: Dick Tam <dicktam@realtek.com.tw> * History: * 06/26/2007 SH Modified CONFIG_RE8305 to CONFIG_EXTPHY */#ifndef INCLUDE_MIB_H#define INCLUDE_MIB_H//#ifdef __mips__//#include <linux/config.h>//#else//#include "../../../uClibc-0.9.15/include/linux/autoconf.h"//#endif#ifndef WIN32#define __PACK__ __attribute__ ((packed))#else#define __PACK__#endif#ifdef WIN32#pragma pack()#endif/* * Flash File System */typedef enum { UNKNOWN_SETTING=0, RUNNING_SETTING=1, HW_SETTING=2, DEFAULT_SETTING=4, CURRENT_SETTING=8 } CONFIG_DATA_T;#define SIGNATURE_LEN 8#define HS_CONF_SETTING_SIGNATURE_TAG ((char *)"ADSL-HS-")#define DS_CONF_SETTING_SIGNATURE_TAG ((char *)"ADSL-DS-")#define CS_CONF_SETTING_SIGNATURE_TAG ((char *)"ADSL-CS-")#define WEB_SIGNATURE_TAG ((char *)"ADSL-WEB")#define FLASH_FILE_SYSTEM_VERSION 1/* File header */typedef struct param_header { unsigned char signature[SIGNATURE_LEN] __PACK__; unsigned char version __PACK__; unsigned char checksum __PACK__; unsigned int len __PACK__;} PARAM_HEADER_T, *PARAM_HEADER_Tp;/* Firmware image header */typedef struct _header_ { // Kao unsigned long signature; unsigned long startAddr; unsigned long len;} IMG_HEADER_T, *IMG_HEADER_Tp;#define FIRMWARE_MAGIC_NUMBER 0xa3d275e9#define FIRMWARE_PARAM_SIZE 0x10#define DST_IMAGE_ADDR 0x80000000/* scramble saved configuration data */#define ENCODE_DATA(data,len)#define DECODE_DATA(data,len)/*#define ENCODE_DATA(data,len) { \ int i; \ for (i=0; i<len; i++) \ data[i] = ~ ( data[i] + 0x38); \}#define DECODE_DATA(data,len) { \ int i; \ for (i=0; i<len; i++) \ data[i] = ~data[i] - 0x38; \}*//* Do checksum and verification for configuration data */#ifndef WIN32static inline unsigned char CHECKSUM(unsigned char *data, unsigned int len)#else__inline unsigned char CHECKSUM(unsigned char *data, unsigned int len)#endif{ unsigned int i; unsigned char sum=0; for (i=0; i<len; i++) { sum += data[i]; } sum = ~sum + 1; return sum;}/* * Webpage gzip/unzip */#define GZIP_MAX_NAME_LEN 60typedef struct file_entry { char name[GZIP_MAX_NAME_LEN]; unsigned long size;} FILE_ENTRY_T, *FILE_ENTRY_Tp;#define DWORD_SWAP(v) ( (((v&0xff)<<24)&0xff000000) | \ ((((v>>8)&0xff)<<16)&0xff0000) | \ ((((v>>16)&0xff)<<8)&0xff00) | \ (((v>>24)&0xff)&0xff) )#define WORD_SWAP(v) ((unsigned short)(((v>>8)&0xff) | ((v<<8)&0xff00)))/* * ADSL Router MIB ID */#define CS_ENTRY_ID 0 #define MIB_ADSL_LAN_IP CS_ENTRY_ID + 1#define MIB_ADSL_LAN_SUBNET CS_ENTRY_ID + 2#define MIB_ADSL_LAN_GATEWAY CS_ENTRY_ID + 3#define MIB_ADSL_LAN_MAC_ADDR CS_ENTRY_ID + 4#define MIB_ADSL_LAN_DHCP CS_ENTRY_ID + 5#define MIB_ADSL_LAN_CLIENT_START CS_ENTRY_ID + 6#define MIB_ADSL_LAN_CLIENT_END CS_ENTRY_ID + 7#define MIB_ADSL_LAN_DHCP_LEASE CS_ENTRY_ID + 8#define MIB_ADSL_LAN_DHCP_DOMAIN CS_ENTRY_ID + 9#define MIB_ADSL_LAN_RIP CS_ENTRY_ID + 10#define MIB_ADSL_LAN_AUTOSEARCH CS_ENTRY_ID + 11#define MIB_ADSL_WAN_DNS_MODE CS_ENTRY_ID + 19#define MIB_ADSL_WAN_DNS1 CS_ENTRY_ID + 20#define MIB_ADSL_WAN_DNS2 CS_ENTRY_ID + 21#define MIB_ADSL_WAN_DNS3 CS_ENTRY_ID + 22#define MIB_ADSL_CONNECTION_MODE CS_ENTRY_ID + 24#define MIB_ADSL_ENCAP_MODE CS_ENTRY_ID + 25#define MIB_ADSL_MODE CS_ENTRY_ID + 26#define MIB_ADSL_OLR CS_ENTRY_ID + 27#define MIB_RIP_ENABLE CS_ENTRY_ID + 28#define MIB_RIP_INTERFACE CS_ENTRY_ID + 29#define MIB_RIP_VERSION CS_ENTRY_ID + 30#define MIB_IPF_OUT_ACTION CS_ENTRY_ID + 32#define MIB_IPF_IN_ACTION CS_ENTRY_ID + 33#define MIB_MACF_OUT_ACTION CS_ENTRY_ID + 34#define MIB_MACF_IN_ACTION CS_ENTRY_ID + 35#define MIB_PORT_FW_ENABLE CS_ENTRY_ID + 36#define MIB_DMZ_ENABLE CS_ENTRY_ID + 37#define MIB_DMZ_IP CS_ENTRY_ID + 38 #define MIB_USER_NAME CS_ENTRY_ID + 41#define MIB_USER_PASSWORD CS_ENTRY_ID + 42#define MIB_DEVICE_TYPE CS_ENTRY_ID + 43#define MIB_INIT_LINE CS_ENTRY_ID + 44#define MIB_INIT_SCRIPT CS_ENTRY_ID + 45#define MIB_SNMP_SYS_DESCR CS_ENTRY_ID + 51#define MIB_SNMP_SYS_OID CS_ENTRY_ID + 52#define MIB_SNMP_SYS_CONTACT CS_ENTRY_ID + 53#define MIB_SNMP_SYS_NAME CS_ENTRY_ID + 54#define MIB_SNMP_SYS_LOCATION CS_ENTRY_ID + 55#define MIB_SNMP_TRAP_IP CS_ENTRY_ID + 56#define MIB_SNMP_COMM_RO CS_ENTRY_ID + 57#define MIB_SNMP_COMM_RW CS_ENTRY_ID + 58#define MIB_ATM_LOOPBACK CS_ENTRY_ID + 59#define MIB_ATM_MODE CS_ENTRY_ID + 60#define MIB_ATM_VC_SWITCH CS_ENTRY_ID + 61#define MIB_ATM_MAC1 CS_ENTRY_ID + 62#define MIB_ATM_MAC2 CS_ENTRY_ID + 63#define MIB_ATM_VC_AUTOSEARCH CS_ENTRY_ID + 64// Kao#define MIB_BRCTL_AGEINGTIME CS_ENTRY_ID + 71#define MIB_BRCTL_STP CS_ENTRY_ID + 72#ifdef CONFIG_EXTPHY#define MIB_MPMODE CS_ENTRY_ID + 73#endif#define MIB_IGMP_PROXY CS_ENTRY_ID + 77#define MIB_IGMP_PROXY_ITF CS_ENTRY_ID + 78#define MIB_IPPT_ITF CS_ENTRY_ID + 79#define MIB_IPPT_LEASE CS_ENTRY_ID + 80#define MIB_IPPT_LANACC CS_ENTRY_ID + 81#define MIB_SPC_ENABLE CS_ENTRY_ID + 82#define MIB_SPC_IPTYPE CS_ENTRY_ID + 83#define MIB_ACL_CAPABILITY CS_ENTRY_ID + 84#define MIB_ADSL_WAN_DHCPS CS_ENTRY_ID + 85#define MIB_DHCP_MODE CS_ENTRY_ID + 86#ifdef WLAN_SUPPORT// WLAN MIB id#define MIB_WLAN_SSID CS_ENTRY_ID + 101#define MIB_WLAN_CHAN_NUM CS_ENTRY_ID + 102#define MIB_WLAN_WEP CS_ENTRY_ID + 103#define MIB_WLAN_WEP64_KEY1 CS_ENTRY_ID + 104#define MIB_WLAN_WEP64_KEY2 CS_ENTRY_ID + 105#define MIB_WLAN_WEP64_KEY3 CS_ENTRY_ID + 106#define MIB_WLAN_WEP64_KEY4 CS_ENTRY_ID + 107#define MIB_WLAN_WEP128_KEY1 CS_ENTRY_ID + 108#define MIB_WLAN_WEP128_KEY2 CS_ENTRY_ID + 109#define MIB_WLAN_WEP128_KEY3 CS_ENTRY_ID + 110#define MIB_WLAN_WEP128_KEY4 CS_ENTRY_ID + 111#define MIB_WLAN_WEP_KEY_TYPE CS_ENTRY_ID + 112#define MIB_WLAN_WEP_DEFAULT_KEY CS_ENTRY_ID + 113#define MIB_WLAN_FRAG_THRESHOLD CS_ENTRY_ID + 114#define MIB_WLAN_SUPPORTED_RATE CS_ENTRY_ID + 115#define MIB_WLAN_BEACON_INTERVAL CS_ENTRY_ID + 116#define MIB_WLAN_PREAMBLE_TYPE CS_ENTRY_ID + 117#define MIB_WLAN_BASIC_RATE CS_ENTRY_ID + 118#define MIB_WLAN_RTS_THRESHOLD CS_ENTRY_ID + 119#define MIB_WLAN_AUTH_TYPE CS_ENTRY_ID + 120#define MIB_WLAN_HIDDEN_SSID CS_ENTRY_ID + 121#define MIB_WLAN_DISABLED CS_ENTRY_ID + 122#define MIB_ALIAS_NAME CS_ENTRY_ID + 123// Added by Mason Yu for TxPower#define MIB_TX_POWER CS_ENTRY_ID + 124 #ifdef WLAN_WPA#define MIB_WLAN_ENCRYPT CS_ENTRY_ID + 126#define MIB_WLAN_ENABLE_SUPP_NONWPA CS_ENTRY_ID + 127#define MIB_WLAN_SUPP_NONWPA CS_ENTRY_ID + 128#define MIB_WLAN_WPA_AUTH CS_ENTRY_ID + 129#define MIB_WLAN_WPA_CIPHER_SUITE CS_ENTRY_ID + 130#define MIB_WLAN_WPA_PSK CS_ENTRY_ID + 131#define MIB_WLAN_WPA_GROUP_REKEY_TIME CS_ENTRY_ID + 132#define MIB_WLAN_RS_IP CS_ENTRY_ID + 133#define MIB_WLAN_RS_PORT CS_ENTRY_ID + 134#define MIB_WLAN_RS_PASSWORD CS_ENTRY_ID + 135#define MIB_WLAN_ENABLE_1X CS_ENTRY_ID + 136#define MIB_WLAN_WPA_PSK_FORMAT CS_ENTRY_ID + 137#define MIB_WLAN_WPA2_PRE_AUTH CS_ENTRY_ID + 138#define MIB_WLAN_WPA2_CIPHER_SUITE CS_ENTRY_ID + 139#endif #define MIB_WLAN_INACTIVITY_TIME CS_ENTRY_ID + 140#define MIB_WLAN_RATE_ADAPTIVE_ENABLED CS_ENTRY_ID + 141 #ifdef WLAN_ACL// access control MIB id#define MIB_WLAN_AC_ENABLED CS_ENTRY_ID + 142#define MIB_WLAN_AC_NUM CS_ENTRY_ID + 143#define MIB_WLAN_AC_ADDR CS_ENTRY_ID + 144#define MIB_WLAN_AC_ADDR_ADD CS_ENTRY_ID + 145#define MIB_WLAN_AC_ADDR_DEL CS_ENTRY_ID + 146#define MIB_WLAN_AC_ADDR_DELALL CS_ENTRY_ID + 147#endif#define MIB_WLAN_DTIM_PERIOD CS_ENTRY_ID + 150#define MIB_WLAN_MODE CS_ENTRY_ID + 151#define MIB_WLAN_NETWORK_TYPE CS_ENTRY_ID + 152#define MIB_WLAN_DEFAULT_SSID CS_ENTRY_ID + 153 // used while configured as Ad-hoc and no any other Ad-hoc could be joined // it will use this default SSID to start BSS#ifdef WLAN_WPA#define MIB_WLAN_ACCOUNT_RS_ENABLED CS_ENTRY_ID + 160#define MIB_WLAN_ACCOUNT_RS_IP CS_ENTRY_ID + 161#define MIB_WLAN_ACCOUNT_RS_PORT CS_ENTRY_ID + 162#define MIB_WLAN_ACCOUNT_RS_PASSWORD CS_ENTRY_ID + 163#define MIB_WLAN_ACCOUNT_UPDATE_ENABLED CS_ENTRY_ID + 164#define MIB_WLAN_ACCOUNT_UPDATE_DELAY CS_ENTRY_ID + 165#define MIB_WLAN_ENABLE_MAC_AUTH CS_ENTRY_ID + 166#define MIB_WLAN_RS_RETRY CS_ENTRY_ID + 167#define MIB_WLAN_RS_INTERVAL_TIME CS_ENTRY_ID + 168#define MIB_WLAN_ACCOUNT_RS_RETRY CS_ENTRY_ID + 169#define MIB_WLAN_ACCOUNT_RS_INTERVAL_TIME CS_ENTRY_ID + 170#endif#ifdef WLAN_IAPP#define MIB_WLAN_IAPP_DISABLED CS_ENTRY_ID + 180#endif #ifdef WLAN_WDS#define MIB_WLAN_WDS_ENABLED CS_ENTRY_ID + 181#define MIB_WLAN_WDS_NUM CS_ENTRY_ID + 182#define MIB_WLAN_WDS CS_ENTRY_ID + 183#define MIB_WLAN_WDS_ADD CS_ENTRY_ID + 184#define MIB_WLAN_WDS_DEL CS_ENTRY_ID + 185#define MIB_WLAN_WDS_DELALL CS_ENTRY_ID + 186#define MIB_WLAN_WDS_WEP CS_ENTRY_ID + 187#define MIB_WLAN_WDS_WEP64_KEY1 CS_ENTRY_ID + 188#define MIB_WLAN_WDS_WEP64_KEY2 CS_ENTRY_ID + 189#define MIB_WLAN_WDS_WEP64_KEY3 CS_ENTRY_ID + 190#define MIB_WLAN_WDS_WEP64_KEY4 CS_ENTRY_ID + 191#define MIB_WLAN_WDS_WEP128_KEY1 CS_ENTRY_ID + 192#define MIB_WLAN_WDS_WEP128_KEY2 CS_ENTRY_ID + 193#define MIB_WLAN_WDS_WEP128_KEY3 CS_ENTRY_ID + 194#define MIB_WLAN_WDS_WEP128_KEY4 CS_ENTRY_ID + 195#define MIB_WLAN_WDS_WEP_KEY_TYPE CS_ENTRY_ID + 196#define MIB_WLAN_WDS_WEP_DEFAULT_KEY CS_ENTRY_ID + 197#endif#ifdef WLAN_8185AG#define MIB_WLAN_BAND CS_ENTRY_ID + 198#define MIB_WLAN_FIX_RATE CS_ENTRY_ID + 199#endif#define MIB_WLAN_PRIVACY_CHECK CS_ENTRY_ID + 200#define MIB_WLAN_BLOCK_RELAY CS_ENTRY_ID + 201#define MIB_NAT25_MAC_CLONE CS_ENTRY_ID + 202
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -