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

📄 wlan_lib.h

📁 Driver for IPN2220 for Linux
💻 H
📖 第 1 页 / 共 2 页
字号:
/*-------------------------------*//* Functions to Setting Basic AP *//*-------------------------------*/extern int param_set_ssid(void *dev, param_ssid_t *data);/* Beacon interval is between 20 and 1000 kus */extern int param_set_bcnPeriod(void *dev, int data);/* dtim period is between 1 and 5 */extern int param_set_dtimPeriod(void *dev, int data);/* New channel is between 1 and 14, depending on regulation domain */extern int param_set_setChannel(void *dev, int new_channel);/* rts_threshold is between 1 and 2347 */extern int param_set_rts(void *dev, int rts_threshold);/* frag_threshold is between 256 and 2346 */extern int param_set_frag(void *dev, int frag_threshold);/* basic_rates is a bit-or of param_basicRate_t. * For example, if you want to set 1M and 2M as basic rate, * then basic_rates= BasicRate_1M | BasicRate_2M. */extern int param_set_basicRateSet(void *dev, int basic_rates);/* MIXED mode: rate_mode = 0. Pure G mode: rate_mode = 1. * Pure B mode: rate_mode = 2. */extern int param_set_rateMode(void *dev, int rate_mode);/*-----------------*//* Extra functions *//*-----------------*//***  whichSsid is allowed to be between 0 ~ 7 */extern int param_set_ssid_id(void* dev, int whichSsid);/***  set SSID information */extern int param_set_m_ssid(void* dev, param_ssid_t *data);extern int param_set_m_vlanid(void* dev, int vlanid);extern int param_set_m_vlantag_enable(void* dev, int enable);extern int param_set_m_enable(void *dev, int enable);/* Allow = 1 means allow broadcasting with SSID and accept *           probe request with empty SSID * Allow = 0 means broadcasting with empty SSID and no response to *           probe request with empty SSID */extern int param_set_bcastSSID(void *dev, int allow);/* cts_enble = 2 means never use * cts_enble = 1 means always use * cts_enble = 0 means auto. Only use cts when B AP or station is present. */extern int param_set_ctsProtect(void *dev, int cts_enble);/* mode = 2 means short preamble only * mode = 1 means long preamble only * mode = 0 means auto */extern int param_set_preambleMode(void *dev, int mode);/* Autorate: datarate = 0 * Fixed rate: for example, if you want set fixed 54M bit rate. *             use fix_data_rate = 54000000 */extern int param_set_dataRate(void *dev, int fix_data_rate);/* When use_burst = 1, AP utilize 802.11e CFB to transmit packets. * When not, normal AP (CSMA/CA for each packet). */extern int param_set_burstMode(void *dev, int use_burst);/***        RelayMode_SWITCH: Driver takes care WLAN to WLAN, and only indicate unknow destination and brocasting to OS.**        RelayMode_SWITCH_NO_FORWARD: Driver drops WLAN to WLAN, and only indicate unknow destination and brocasting to OS.**        RelayMode_DATA_PIPE = 2:Driver indicates all data frames to OS. OS should do WLAN to WLAN forwarding by sending indicated frame to driver again.*/extern int param_set_noRelay(void *dev, param_relayMode_t relay_mode);/* Use this function to kill a station record. Beware, this function * is obselete. Use cmd_deauth_sta instead. */extern int param_set_killmac(void *dev, unsigned char *station_mac);/* When stop_accepting_sta = 1, AP stop sending beacons, probe response, * auth response, associate response. But WDS function is still working. */extern int param_set_noStation(void *dev, int stop_accepting_sta);/* rxAntenna= 0: auto, 1: primary antenna, 2: secondary antenna */extern int param_set_rxAntenna(void *dev, int rxAntenna);/*-------------------------------*//* 802.11 Security excluding WPA *//*-------------------------------*//* Set 802.11 Authenticate mode,ie. open, shared-key, switch. * AuthMode_OPEN_1X, AuthMode_WPA and AuthMode_WPAPSK are supported only * when IPNRSN is enabled. */extern int param_set_authmode(void *dev, param_authMode_t data);/* Set 802.11 Cipher Algorithm. Please use CipherMode_NONE, CipherMode_WEP40, * CipherMode_WEP104 , CipherMode_WEP128. CipherMode_TKIP and CipherMode_CCMP * are supported in this funtion only when IPNRSN is enabled. */extern int param_set_cipherMode(void *dev, param_cipherMode_t data);/* Set 802.11 WepDefaultkey between 0 to 3 */extern int param_set_wepDefaultKeyId(void *dev, int data);/* Following two functions are a pair. You need set wep key ID first, * then set wep key */extern int param_set_wepKeyId(void *dev, int data);extern int param_set_wepKey(void *dev, param_cipher_key_t *data);/*-----------------------*//* WDS related functions *//*-----------------------*//* Rate_mode = 1, then remote AP is assume to be 11G-capable. * Rate_mode = 0, remote AP is assumed to be 11B only. * Please note dev must the one representing remote Access Point, which means * you can set one remote AP as 11B AP, while set another one as 11G AP. */extern int param_set_wds_rateMode(void *dev, int rate_mode);/* Please note dev must be the one representing remote Access Point.*/extern int param_set_wds_cipherKey(void *dev, param_cipher_key_t *data);extern int param_set_wds_cipherMode(void *dev, param_cipherMode_t data);/* main_dev is the one representing WLAN Adaptor. * remote_addr = remote AP's MAC Address * Return value is the net device pointer representing remote AP. */extern void*param_del_wdslink2(void *main_dev,        unsigned char *remote_addr);/* main_dev is the one representing WLAN Adaptor. * remote_addr = remote AP's MAC Address * new_dev is the device represents remote AP * mode, auth, and remote bssid is no use for this release, all should be 0. */extern int param_add_wdslink2(void *main_dev,        unsigned char *remote_addr, void *new_dev, int mode,        int auth, char *remote_bssid);/* num_of_failed_packets means after how many packets tx fails, * this remote AP can be treated as down. */extern int param_set_wds_tx_failure_limit(void *main_dev,                        int num_of_failed_packets);/* How long(in seconds) will the treated-as-down AP have a chance to * transmit a packet again. */extern int param_set_wds_disable_limit(void *main_dev,                        int seconds_of_disabled_duration);/*--------------------*//* Regulation and EMI *//*--------------------*//* Please refer to the MIB_REG_DOMAIN_XXXX */extern int param_set_regDomain(void *dev, int domain);/* Please refer to the RFTEST_MODE_XXX */extern int param_set_rftestMode(void *dev, int test_mode);/* Because tx_power has connection with PHY, you must consulte this value * with Inprocomm, Inc. */extern int param_set_rftestPower(void *dev, int tx_power);/*--------------------------------*//* Functions to Getting Parameter *//*--------------------------------*//* Return pointer to a string, which presents the driver version */extern char *param_get_version(void *dev);/* Get current channel */extern int param_get_curChannel(void *dev, int *cur_channel_p);/* You must provide buffer for param_get_Statistic to return result in out_stat */extern int param_get_Statistic(void *dev, struct net_stat *out_stat);/* You must provide buffer for param_get_Statistic to return result in staS. * size_of_buffer indicates size of buffer( in unit of byte). */extern int param_get_StaList(void *dev, int size_of_buffer,        sta_status_t *staS);/***  Inprocomm WLAN chip provides time stamp information in unit of micro second since initialization. */extern int param_get_curTimeStamp(void *dev, unsigned long *timeStamp);/* When payload length is bigger than level's value, driver uses HW MIC generation. Otherwise,    it uses SW to generate. Default value is 0.*/extern int param_set_hwMICthreshold(void *dev, unsigned short level);/*------------------------------------*//* Commands from upper layer  for WPA *//*------------------------------------*//* Accept = 1 means to put macAddr in white list. * Accept = 0 means to put macAddr in black list. */extern int cmd_do_acl(void *dev, unsigned char *macAddr, int accept);/* Deauthenticate station. bcast mac address means deauth all associated STAs */extern int cmd_deauth_sta(void *dev, unsigned char *macAddr);/* Deauthenticate station. bcast mac address means deauth all associated STAs.    Reason code should follow IEEE 802.11 Spec.*/extern int cmd_deauth_sta_with_reason(void *dev, unsigned char *macAddr,int reason_code);/* block =1 means close 1X port. Block =0 means open 1X port. */extern int cmd_macPort_ctl(void *dev, unsigned char *macAddr, int block);/* Set Access Point's WPA IE (Beacon and probe response) */extern int cmd_set_RsnIE(void *dev, unsigned char *ie, int size);extern int cmd_set_macKey(void *dev,                                unsigned char *macAddr, cmd_key_t *key);/*---------------------*//* WLAN information pages *//*---------------------*//*Read Adaper's Memory Control Register.  Output str should have 4K buffer. ** Return: number of character in output string */extern int wlan_read_mcr(void* dev, char *output_str);/*Read Adaper's Baseband Control Register Output str should have 4K buffer.** Return: number of character in output string */extern int wlan_read_bcr(void* dev, char *output_str);/*Read Adaper's configuration information Output str should have 4K buffer.** Return: number of character in output string */extern int wlan_read_config(void* dev, char *output_str);/*Read Adaper's status information Output str should have 4K buffer.** Return: number of character in output string */extern int wlan_read_info(void* dev, char *output_str);/*Read Adaper's Statistics Output str should have 4K buffer.** Return: number of character in output string */extern int wlan_read_stat(void* dev, char *output_str);/*Read Adaper's EEPROM's content Output str should have 4K buffer.** Return: number of character in output string */extern int wlan_read_eeprom(void* dev, char *output_str);/*************************************************************************           I N L I N E   F U N C T I O N   D E F I N I T I O N S**************************************************************************/#endif  /* __WLAN_LIB_H */

⌨️ 快捷键说明

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