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

📄 if_wireg.h

📁 一个学习SNMP项目:tmoerlan.
💻 H
📖 第 1 页 / 共 2 页
字号:
#define WI_COR_VALUE	0x41/* * One form of communication with the Hermes is with what Lucent calls * LTV records, where LTV stands for Length, Type and Value. The length * and type are 16 bits and are in native byte order. The value is in * multiples of 16 bits and is in little endian byte order. */struct wi_ltv_gen {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_val;};struct wi_ltv_str {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_str[17];};#define WI_SETVAL(recno, val)			\	do {					\		struct wi_ltv_gen	g;	\						\		g.wi_len = 2;			\		g.wi_type = recno;		\		g.wi_val = htole16(val);	\		wi_write_record(sc, &g);	\	} while (0)#define WI_SETSTR(recno, str)					\	do {							\		struct wi_ltv_str	s;			\		int			l;			\								\		l = (strlen(str) + 1) & ~0x1;			\		bzero((char *)&s, sizeof(s));			\		s.wi_len = (l / 2) + 2;				\		s.wi_type = recno;				\		s.wi_str[0] = htole16(strlen(str));		\		bcopy(str, (char *)&s.wi_str[1], strlen(str));	\		wi_write_record(sc, (struct wi_ltv_gen *)&s);	\	} while (0)/* * Download buffer location and length (0xFD01). */struct wi_ltv_dnld_buf {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_buf_pg; /* page addr of intermediate dl buf*/	u_int16_t		wi_buf_off; /* offset of idb */	u_int16_t		wi_buf_len; /* len of idb */};/* * Mem sizes (0xFD02). */struct wi_ltv_memsz {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_mem_ram;	u_int16_t		wi_mem_nvram;};/* * NIC Identification (0xFD0B, 0xFD20) */struct wi_ltv_ver {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_ver[4];};/* define card ident */#define	WI_NIC_LUCENT_ID	0x0001#define	WI_NIC_LUCENT_STR	"Lucent Technologies, WaveLAN/IEEE"#define	WI_NIC_SONY_ID		0x0002#define	WI_NIC_SONY_STR		"Sony WaveLAN/IEEE"#define	WI_NIC_LUCENT_EMB_ID	0x0005#define	WI_NIC_LUCENT_EMB_STR	"Lucent Embedded WaveLAN/IEEE"#define	WI_NIC_EVB2_ID		0x8000#define	WI_NIC_EVB2_STR		"RF:PRISM2 MAC:HFA3841"#define	WI_NIC_HWB3763_ID	0x8001#define	WI_NIC_HWB3763_STR	"RF:PRISM2 MAC:HFA3841 CARD:HWB3763 rev.B"#define	WI_NIC_HWB3163_ID	0x8002#define	WI_NIC_HWB3163_STR	"RF:PRISM2 MAC:HFA3841 CARD:HWB3163 rev.A"#define	WI_NIC_HWB3163B_ID	0x8003#define	WI_NIC_HWB3163B_STR	"RF:PRISM2 MAC:HFA3841 CARD:HWB3163 rev.B"#define	WI_NIC_EVB3_ID		0x8004#define	WI_NIC_EVB3_STR		"RF:PRISM2 MAC:HFA3842 CARD:HFA3842 EVAL"#define	WI_NIC_HWB1153_ID	0x8007#define	WI_NIC_HWB1153_STR	"RF:PRISM1 MAC:HFA3841 CARD:HWB1153"#define	WI_NIC_P2_SST_ID	0x8008	/* Prism2 with SST flush */#define	WI_NIC_P2_SST_STR	"RF:PRISM2 MAC:HFA3841 CARD:HWB3163-SST-flash"#define	WI_NIC_EVB2_SST_ID	0x8009#define	WI_NIC_EVB2_SST_STR	"RF:PRISM2 MAC:HFA3841 CARD:HWB3163-SST-flash"#define	WI_NIC_3842_EVA_ID	0x800A	/* 3842 Evaluation Board */#define	WI_NIC_3842_EVA_STR	"RF:PRISM2 MAC:HFA3842 CARD:HFA3842 EVAL"#define	WI_NIC_3842_PCMCIA_AMD_ID	0x800B	/* Prism2.5 PCMCIA */#define	WI_NIC_3842_PCMCIA_SST_ID	0x800C#define	WI_NIC_3842_PCMCIA_ATL_ID	0x800D#define	WI_NIC_3842_PCMCIA_ATS_ID	0x800E#define	WI_NIC_3842_PCMCIA_STR		"RF:PRISM2.5 MAC:ISL3873"#define	WI_NIC_3842_MINI_AMD_ID		0x8012	/* Prism2.5 Mini-PCI */#define	WI_NIC_3842_MINI_SST_ID		0x8013#define	WI_NIC_3842_MINI_ATL_ID		0x8014#define	WI_NIC_3842_MINI_ATS_ID		0x8015#define	WI_NIC_3842_MINI_STR		"RF:PRISM2.5 MAC:ISL3874A(Mini-PCI)"#define	WI_NIC_3842_PCI_AMD_ID		0x8016	/* Prism2.5 PCI-bridge */#define	WI_NIC_3842_PCI_SST_ID		0x8017#define	WI_NIC_3842_PCI_ATL_ID		0x8018#define	WI_NIC_3842_PCI_ATS_ID		0x8019#define	WI_NIC_3842_PCI_STR		"RF:PRISM2.5 MAC:ISL3874A(PCI-bridge)"#define	WI_NIC_P3_PCMCIA_AMD_ID		0x801A	/* Prism3 PCMCIA */#define	WI_NIC_P3_PCMCIA_SST_ID		0x801B#define	WI_NIC_P3_PCMCIA_ATL_ID		0x801C#define	WI_NIC_P3_PCMCIA_ATS_ID		0x801D#define	WI_NIC_P3_PCMCIA_STR		"RF:PRISM3(PCMCIA)"#define	WI_NIC_P3_MINI_AMD_ID		0x8021	/* Prism3 Mini-PCI */#define	WI_NIC_P3_MINI_SST_ID		0x8022#define	WI_NIC_P3_MINI_ATL_ID		0x8023#define	WI_NIC_P3_MINI_ATS_ID		0x8024#define	WI_NIC_P3_MINI_STR		"RF:PRISM3(Mini-PCI)"/* * List of intended regulatory domains (0xFD11). */struct wi_ltv_domains {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_num_dom;	u_int8_t		wi_domains[10];};/* * CIS struct (0xFD13). */struct wi_ltv_cis {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_cis[240];};/* * Communications quality (0xFD43). */struct wi_ltv_commqual {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_coms_qual;	u_int16_t		wi_sig_lvl;	u_int16_t		wi_noise_lvl;};/* * Actual system scale thresholds (0xFC06, 0xFD46). */struct wi_ltv_scalethresh {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_energy_detect;	u_int16_t		wi_carrier_detect;	u_int16_t		wi_defer;	u_int16_t		wi_cell_search;	u_int16_t		wi_out_of_range;	u_int16_t		wi_delta_snr;};/* * PCF info struct (0xFD87). */struct wi_ltv_pcf {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_energy_detect;	u_int16_t		wi_carrier_detect;	u_int16_t		wi_defer;	u_int16_t		wi_cell_search;	u_int16_t		wi_range;};/* * Connection control characteristics. (0xFC00) * 0 == IBSS (802.11 compliant mode) (Only PRISM2) * 1 == Basic Service Set (BSS) * 2 == Wireless Distribudion System (WDS) * 3 == Pseudo IBSS  *	(Only PRISM2; not 802.11 compliant mode, testing use only) * 6 == HOST AP (Only PRISM2) */#define WI_PORTTYPE_BSS		0x1#define WI_PORTTYPE_WDS		0x2#define WI_PORTTYPE_ADHOC	0x3#define WI_PORTTYPE_IBSS	0x4#define WI_PORTTYPE_HOSTAP	0x6/* * Mac addresses. (0xFC01, 0xFC08) */struct wi_ltv_macaddr {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_mac_addr[3];};/* * Station set identification (SSID). (0xFC02, 0xFC04) */struct wi_ltv_ssid {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_id[17];};/* * Set our station name. (0xFC0E) */struct wi_ltv_nodename {	u_int16_t		wi_len;	u_int16_t		wi_type;	u_int16_t		wi_nodename[17];};/* * Multicast addresses to be put in filter. We're * allowed up to 16 addresses in the filter. (0xFC80) */struct wi_ltv_mcast {	u_int16_t		wi_len;	u_int16_t		wi_type;	struct ether_addr	wi_mcast[16];};/* * supported rates. (0xFCB4) */#define WI_SUPPRATES_1M		0x0001#define WI_SUPPRATES_2M		0x0002#define WI_SUPPRATES_5M		0x0004#define WI_SUPPRATES_11M	0x0008#define	WI_RATES_BITS	"\20\0011M\0022M\0035.5M\00411M"/* * Information frame types. */#define WI_INFO_NOTIFY		0xF000	/* Handover address */#define WI_INFO_COUNTERS	0xF100	/* Statistics counters */#define WI_INFO_SCAN_RESULTS	0xF101	/* Scan results */#define WI_INFO_LINK_STAT	0xF200	/* Link status */#define WI_INFO_ASSOC_STAT	0xF201	/* Association status *//* * Hermes transmit/receive frame structure */struct wi_frame {	u_int16_t		wi_status;	/* 0x00 */	u_int16_t		wi_rsvd0;	/* 0x02 */	u_int16_t		wi_rsvd1;	/* 0x04 */	u_int16_t		wi_q_info;	/* 0x06 */	u_int16_t		wi_rsvd2;	/* 0x08 */	u_int8_t		wi_tx_rtry;	/* 0x0A */	u_int8_t		wi_tx_rate;	/* 0x0B */	u_int16_t		wi_tx_ctl;	/* 0x0C */	u_int16_t		wi_frame_ctl;	/* 0x0E */	u_int16_t		wi_id;		/* 0x10 */	u_int8_t		wi_addr1[6];	/* 0x12 */	u_int8_t		wi_addr2[6];	/* 0x18 */	u_int8_t		wi_addr3[6];	/* 0x1E */	u_int16_t		wi_seq_ctl;	/* 0x24 */	u_int8_t		wi_addr4[6];	/* 0x26 */	u_int16_t		wi_dat_len;	/* 0x2C */	u_int8_t		wi_dst_addr[6];	/* 0x2E */	u_int8_t		wi_src_addr[6];	/* 0x34 */	u_int16_t		wi_len;		/* 0x3A */	u_int16_t		wi_dat[3];	/* 0x3C */ /* SNAP header */	u_int16_t		wi_type;	/* 0x42 */};#define WI_802_3_OFFSET		0x2E#define WI_802_11_OFFSET	0x44#define WI_802_11_OFFSET_RAW	0x3C#define WI_802_11_OFFSET_HDR    0x0E#define WI_STAT_BADCRC		0x0001#define WI_STAT_UNDECRYPTABLE	0x0002#define WI_STAT_ERRSTAT		0x0003#define WI_STAT_MAC_PORT	0x0700#define WI_STAT_1042		0x2000	/* RFC1042 encoded */#define WI_STAT_TUNNEL		0x4000	/* Bridge-tunnel encoded */#define WI_STAT_WMP_MSG		0x6000	/* WaveLAN-II management protocol */#define WI_STAT_MGMT		0x8000	/* 802.11b management frames */#define WI_RXSTAT_MSG_TYPE	0xE000#define WI_ENC_TX_802_3		0x00#define WI_ENC_TX_802_11	0x11#define WI_ENC_TX_MGMT		0x08#define WI_ENC_TX_E_II		0x0E#define WI_ENC_TX_1042		0x00#define WI_ENC_TX_TUNNEL	0xF8#define WI_TXCNTL_MACPORT	0x00FF#define WI_TXCNTL_STRUCTTYPE	0xFF00#define WI_TXCNTL_TX_EX		0x0004#define WI_TXCNTL_TX_OK		0x0002#define WI_TXCNTL_NOCRYPT	0x0080/* * SNAP (sub-network access protocol) constants for transmission * of IP datagrams over IEEE 802 networks, taken from RFC1042. * We need these for the LLC/SNAP header fields in the TX/RX frame * structure. */#define WI_SNAP_K1		0xaa	/* assigned global SAP for SNAP */#define WI_SNAP_K2		0x00#define WI_SNAP_CONTROL		0x03	/* unnumbered information format */#define WI_SNAP_WORD0		(WI_SNAP_K1 | (WI_SNAP_K1 << 8))#define WI_SNAP_WORD1		(WI_SNAP_K2 | (WI_SNAP_CONTROL << 8))#define WI_SNAPHDR_LEN		0x6#define WI_FCS_LEN		0x4/* * HFA3861/3863 (BBP) Control Registers */#define WI_HFA386X_CR_A_D_TEST_MODES2 0x1A#define WI_HFA386X_CR_MANUAL_TX_POWER 0x3E

⌨️ 快捷键说明

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