📄 rayctl.h
字号:
#define OBJID_scan_dwell_time 16#define OBJID_max_scan_dwell_time 17#define OBJID_assoc_resp_timeout 18#define OBJID_adhoc_scan_cycle_max 19#define OBJID_infra_scan_cycle_max 20#define OBJID_infra_super_cycle_max 21#define OBJID_promiscuous_mode 22#define OBJID_unique_word 23#define OBJID_slot_time 24#define OBJID_roaming_low_snr 25#define OBJID_low_snr_count_thresh 26#define OBJID_infra_missed_bcn 27#define OBJID_adhoc_missed_bcn 28#define OBJID_curr_country_code 29#define OBJID_hop_pattern 30#define OBJID_reserved 31#define OBJID_cw_max_msb 32#define OBJID_cw_min_msb 33#define OBJID_noise_filter_gain 34#define OBJID_noise_limit_offset 35#define OBJID_det_rssi_thresh_offset 36#define OBJID_med_busy_thresh_offset 37#define OBJID_det_sync_thresh 38#define OBJID_test_mode 39#define OBJID_test_min_chan_num 40#define OBJID_test_max_chan_num 41#define OBJID_allow_bcast_ID_prbrsp 42#define OBJID_privacy_must_start 43#define OBJID_privacy_can_join 44#define OBJID_basic_rate_set 45/**** Configuration/Status/Control Area ***************************//* System Control Block (SCB) Area * Located at Shared RAM offset 0 */struct scb { UCHAR ccs_index; UCHAR rcs_index;};/****** Status area at Shared RAM offset 0x0100 ******************************/struct status { UCHAR mrx_overflow_for_host; /* 0=ECF may write, 1=host may write*/ UCHAR mrx_checksum_error_for_host; /* 0=ECF may write, 1=host may write*/ UCHAR rx_hec_error_for_host; /* 0=ECF may write, 1=host may write*/ UCHAR reserved1; short mrx_overflow; /* ECF increments on rx overflow */ short mrx_checksum_error; /* ECF increments on rx CRC error */ short rx_hec_error; /* ECF incs on mac header CRC error */ UCHAR rxnoise; /* Average RSL measurement */};/****** Host-to-ECF Data Area at Shared RAM offset 0x200 *********************/struct host_to_ecf_area { };/****** ECF-to-Host Data Area at Shared RAM offset 0x0300 ********************/struct startup_res_518 { UCHAR startup_word; UCHAR station_addr[ADDRLEN]; UCHAR calc_prog_chksum; UCHAR calc_cis_chksum; UCHAR ecf_spare[7]; UCHAR japan_call_sign[12];};struct startup_res_6 { UCHAR startup_word; UCHAR station_addr[ADDRLEN]; UCHAR reserved; UCHAR supp_rates[8]; UCHAR japan_call_sign[12]; UCHAR calc_prog_chksum; UCHAR calc_cis_chksum; UCHAR firmware_version[3]; UCHAR asic_version; UCHAR tib_length;};struct start_join_net_params { UCHAR net_type; UCHAR ssid[ESSID_SIZE]; UCHAR reserved; UCHAR privacy_can_join;};/****** Command Control Structure area at Shared ram offset 0x0400 ***********//* Structures for command specific parameters (ccs.var) */struct update_param_cmd { UCHAR object_id; UCHAR number_objects; UCHAR failure_cause;};struct report_param_cmd { UCHAR object_id; UCHAR number_objects; UCHAR failure_cause; UCHAR length;};struct start_network_cmd { UCHAR update_param; UCHAR bssid[ADDRLEN]; UCHAR net_initiated; UCHAR net_default_tx_rate; UCHAR encryption;};struct join_network_cmd { UCHAR update_param; UCHAR bssid[ADDRLEN]; UCHAR net_initiated; UCHAR net_default_tx_rate; UCHAR encryption;};struct tx_requested_cmd { UCHAR tx_data_ptr[2]; UCHAR tx_data_length[2]; UCHAR host_reserved[2]; UCHAR reserved[3]; UCHAR tx_rate; UCHAR pow_sav_mode; UCHAR retries; UCHAR antenna;};struct tx_requested_cmd_4 { UCHAR tx_data_ptr[2]; UCHAR tx_data_length[2]; UCHAR dest_addr[ADDRLEN]; UCHAR pow_sav_mode; UCHAR retries; UCHAR station_id;};struct memory_dump_cmd { UCHAR memory_type; UCHAR memory_ptr[2]; UCHAR length;};struct update_association_cmd { UCHAR status; UCHAR aid[2];};struct start_timer_cmd { UCHAR duration[2];};struct ccs { UCHAR buffer_status; /* 0 = buffer free, 1 = buffer busy */ /* 2 = command complete, 3 = failed */ UCHAR cmd; /* command to ECF */ UCHAR link; /* link to next CCS, FF=end of list */ /* command specific parameters */ union { char reserved[13]; struct update_param_cmd update_param; struct report_param_cmd report_param; UCHAR nummulticast; UCHAR mode; struct start_network_cmd start_network; struct join_network_cmd join_network; struct tx_requested_cmd tx_request; struct memory_dump_cmd memory_dump; struct update_association_cmd update_assoc; struct start_timer_cmd start_timer; } var;};/*****************************************************************************//* Transmit buffer structures */struct tib_structure { UCHAR ccs_index; UCHAR psm; UCHAR pass_fail; UCHAR retry_count; UCHAR max_retries; UCHAR frags_remaining; UCHAR no_rb; UCHAR rts_reqd; UCHAR csma_tx_cntrl_2; UCHAR sifs_tx_cntrl_2; UCHAR tx_dma_addr_1[2]; UCHAR tx_dma_addr_2[2]; UCHAR var_dur_2mhz[2]; UCHAR var_dur_1mhz[2]; UCHAR max_dur_2mhz[2]; UCHAR max_dur_1mhz[2]; UCHAR hdr_len; UCHAR max_frag_len[2]; UCHAR var_len[2]; UCHAR phy_hdr_4; UCHAR mac_hdr_1; UCHAR mac_hdr_2; UCHAR sid[2];};struct phy_header { UCHAR sfd[2]; UCHAR hdr_3; UCHAR hdr_4;};struct rx_msg { struct mac_header mac; UCHAR var[1];};struct tx_msg { struct tib_structure tib; struct phy_header phy; struct mac_header mac; UCHAR var[1];};/****** ECF Receive Control Stucture (RCS) Area at Shared RAM offset 0x0800 *//* Structures for command specific parameters (rcs.var) */struct rx_packet_cmd { UCHAR rx_data_ptr[2]; UCHAR rx_data_length[2]; UCHAR rx_sig_lev; UCHAR next_frag_rcs_index; UCHAR totalpacketlength[2];};struct rejoin_net_cmplt_cmd { UCHAR reserved; UCHAR bssid[ADDRLEN];};struct japan_call_sign_rxd { UCHAR rxd_call_sign[8]; UCHAR reserved[5];};struct rcs { UCHAR buffer_status; UCHAR interrupt_id; UCHAR link_field; /* command specific parameters */ union { UCHAR reserved[13]; struct rx_packet_cmd rx_packet; struct rejoin_net_cmplt_cmd rejoin_net_complete; struct japan_call_sign_rxd japan_call_sign; } var;};/****** Startup parameter structures for both versions of firmware ***********/struct b4_startup_params { UCHAR a_network_type; /* C_ADHOC, C_INFRA */ UCHAR a_acting_as_ap_status; /* C_TYPE_STA, C_TYPE_AP */ UCHAR a_current_ess_id[ESSID_SIZE]; /* Null terminated unless 32 long */ UCHAR a_scanning_mode; /* passive 0, active 1 */ UCHAR a_power_mgt_state; /* CAM 0, */ UCHAR a_mac_addr[ADDRLEN]; /* */ UCHAR a_frag_threshold[2]; /* 512 */ UCHAR a_hop_time[2]; /* 16k * 2**n, n=0-4 in Kus */ UCHAR a_beacon_period[2]; /* n * a_hop_time in Kus */ UCHAR a_dtim_period; /* in beacons */ UCHAR a_retry_max; /* */ UCHAR a_ack_timeout; /* */ UCHAR a_sifs; /* */ UCHAR a_difs; /* */ UCHAR a_pifs; /* */ UCHAR a_rts_threshold[2]; /* */ UCHAR a_scan_dwell_time[2]; /* */ UCHAR a_max_scan_dwell_time[2]; /* */ UCHAR a_assoc_resp_timeout_thresh; /* */ UCHAR a_adhoc_scan_cycle_max; /* */ UCHAR a_infra_scan_cycle_max; /* */ UCHAR a_infra_super_scan_cycle_max; /* */ UCHAR a_promiscuous_mode; /* */ UCHAR a_unique_word[2]; /* */ UCHAR a_slot_time; /* */ UCHAR a_roaming_low_snr_thresh; /* */ UCHAR a_low_snr_count_thresh; /* */ UCHAR a_infra_missed_bcn_thresh; /* */ UCHAR a_adhoc_missed_bcn_thresh; /* */ UCHAR a_curr_country_code; /* C_USA */ UCHAR a_hop_pattern; /* */ UCHAR a_hop_pattern_length; /* *//* b4 - b5 differences start here */ UCHAR a_cw_max; /* */ UCHAR a_cw_min; /* */ UCHAR a_noise_filter_gain; /* */ UCHAR a_noise_limit_offset; /* */ UCHAR a_det_rssi_thresh_offset; /* */ UCHAR a_med_busy_thresh_offset; /* */ UCHAR a_det_sync_thresh; /* */ UCHAR a_test_mode; /* */ UCHAR a_test_min_chan_num; /* */ UCHAR a_test_max_chan_num; /* */ UCHAR a_rx_tx_delay; /* */ UCHAR a_current_bss_id[ADDRLEN]; /* */ UCHAR a_hop_set; /* */};struct b5_startup_params { UCHAR a_network_type; /* C_ADHOC, C_INFRA */ UCHAR a_acting_as_ap_status; /* C_TYPE_STA, C_TYPE_AP */ UCHAR a_current_ess_id[ESSID_SIZE]; /* Null terminated unless 32 long */ UCHAR a_scanning_mode; /* passive 0, active 1 */ UCHAR a_power_mgt_state; /* CAM 0, */ UCHAR a_mac_addr[ADDRLEN]; /* */ UCHAR a_frag_threshold[2]; /* 512 */ UCHAR a_hop_time[2]; /* 16k * 2**n, n=0-4 in Kus */ UCHAR a_beacon_period[2]; /* n * a_hop_time in Kus */ UCHAR a_dtim_period; /* in beacons */ UCHAR a_retry_max; /* 4 */ UCHAR a_ack_timeout; /* */ UCHAR a_sifs; /* */ UCHAR a_difs; /* */ UCHAR a_pifs; /* */ UCHAR a_rts_threshold[2]; /* */ UCHAR a_scan_dwell_time[2]; /* */ UCHAR a_max_scan_dwell_time[2]; /* */ UCHAR a_assoc_resp_timeout_thresh; /* */ UCHAR a_adhoc_scan_cycle_max; /* */ UCHAR a_infra_scan_cycle_max; /* */ UCHAR a_infra_super_scan_cycle_max; /* */ UCHAR a_promiscuous_mode; /* */ UCHAR a_unique_word[2]; /* */ UCHAR a_slot_time; /* */ UCHAR a_roaming_low_snr_thresh; /* */ UCHAR a_low_snr_count_thresh; /* */ UCHAR a_infra_missed_bcn_thresh; /* */ UCHAR a_adhoc_missed_bcn_thresh; /* */ UCHAR a_curr_country_code; /* C_USA */ UCHAR a_hop_pattern; /* */ UCHAR a_hop_pattern_length; /* *//* b4 - b5 differences start here */ UCHAR a_cw_max[2]; /* */ UCHAR a_cw_min[2]; /* */ UCHAR a_noise_filter_gain; /* */ UCHAR a_noise_limit_offset; /* */ UCHAR a_det_rssi_thresh_offset; /* */ UCHAR a_med_busy_thresh_offset; /* */ UCHAR a_det_sync_thresh; /* */ UCHAR a_test_mode; /* */ UCHAR a_test_min_chan_num; /* */ UCHAR a_test_max_chan_num; /* */ UCHAR a_allow_bcast_SSID_probe_rsp; UCHAR a_privacy_must_start; UCHAR a_privacy_can_join; UCHAR a_basic_rate_set[8];};/*****************************************************************************/#define RAY_IOCG_PARMS (SIOCDEVPRIVATE)#define RAY_IOCS_PARMS (SIOCDEVPRIVATE + 1)#define RAY_DO_CMD (SIOCDEVPRIVATE + 2)/****** ethernet <-> 802.11 translation **************************************/typedef struct snaphdr_t{ UCHAR dsap; UCHAR ssap; UCHAR ctrl; UCHAR org[3]; UCHAR ethertype[2];} snaphdr_t;#define BRIDGE_ENCAP 0x0000f800#define RFC1042_ENCAP 0#define SNAP_ID 0xaaaa0300#define RAY_IPX_TYPE 0x3781#define APPLEARP_TYPE 0xf380#define APPLETALK_TYPE 0x9b80#define APPLETALK_ORG 0x08000700/*****************************************************************************/#endif /* #ifndef RAYLINK_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -