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

📄 dot11lib.h

📁 PNE 3.3 wlan source code, running at more than vxworks6.x version
💻 H
📖 第 1 页 / 共 5 页
字号:
            BOOL  associated;            /* Assoc success sent */            /* The shared key buffer stores the last challenge text that was             sent to the STA */            UINT8 skaBuffer[DOT11_AUTH_CHAL_MAX];            int   skaLength;               BOOL ratesUpdated;          /* Do we have rates for this device */            BOOL powerManaged;          /* Whether this station is in PM */            M_BLK_ID pmQueueHead;       /* Removal point */            M_BLK_ID pmQueueTail;       /* Insertion point */            } sta;        struct /* KSL_ENTRY is a STA in IBSS mode */            {            int channel;                 /* Last channel it was heard on */            int mode;                    /* PHY mode last heard in */            int ssi;                                      UINT16 atimWindow;            UINT16 beaconInterval;       /* BI used by this sta */            UINT8 bssid[DOT11_ADDR_LEN]; /* BSSID it's connected to */                        DOT11_TIMESTAMP  lastBeaconTsf;  /* Their TSF */            DOT11_TIMESTAMP  ourTsf;    /* When we received it */                        BOOL ratesUpdated;          /* Do we have rates for this device */                        /* 802.11d information */            UINT32   countryCode;            } ibss;        } type;       } DOT11_KSL_ENTRY;/***************************************************************************  DOT11_FRAGMENT - Reassembly space for ingress fragment***************************************************************************/typedef struct    {    BOOL          used;         /* Determines if this slot is used */    UINT8         addr2[DOT11_ADDR_LEN];    UINT8         addr1[DOT11_ADDR_LEN];    UINT16        sequence;     /* seq out of seqCtl field */    INT32         lastFrag;     /* The last fragment that was received */        int           timerId;      /* Identifies timer */    M_BLK_ID      pHead;        /* The head of the reassembled packet*/    M_BLK_ID      pLast;        /* Pointer to last MBlk for convenience */    } DOT11_FRAGMENT;#define DOT11_MAX_REASSEMBLY    16/***************************************************************************  DOT11_REASSEMBLY - Structure used to store packet statistics ***************************************************************************/typedef struct    {    DOT11_FRAGMENT packet[DOT11_MAX_REASSEMBLY];    } DOT11_REASSEMBLY;#define DOT11_FRAGMENT_LAST     _BIT(15)#define DOT11_FRAGMENT_MASK     0x000f#define DOT11_FRAGMENT_MIN_SIZE 256#define DOT11_FRAGMENT_MAX_NUM  16typedef struct    {    int a;    } DOT11_SW_KEY_TABLE;typedef struct    {    int a;    } DOT11_TX_POWER_RANGE;#define DOT11_MAX_DEFAULT_KEY        4#define DOT11_MAX_KEYS              64/* This is a magic number passed to pDot11->hdd->hwEncryptionKeySet() to signal it to look for the first available unicast key slot */#define DOT11_KEYINDEX_SEARCH      65536/* This is a parameter passed to hdd->rawSend() that specifies no encryption*/#define DOT11_KEYINDEX_NONE          -1/***************************************************************************  DOT11_KEYTAB_ENTRY - An entry in the soft key table ***************************************************************************/typedef struct    {    BOOL used;    DOT11_KSL_ENTRY * pKsl;    } DOT11_KEYTAB_ENTRY;/****************************************************************************** DOT11_RX_FUNC - A type representing a function pointer to a receive function*                 as used by the rxMap in the Hdd.*****************************************************************************/typedef STATUS (* DOT11_RX_FUNC)(DOT11_FW * pDot11, M_BLK_ID pMblk,                                  UINT32 rate, UINT8 ssi);/****************************************************************************** DOT11_RX_FILTER - Filter describing which packets will be received by the*                   hardware*****************************************************************************/#define DOT11_RX_FILTER_NONE         0/* DOT11_RX_FILTER_UNI - Unicast packets, with the stations addr in addr1 */#define DOT11_RX_FILTER_UNI          _BIT(0)/* DOT11_RX_FILTER_MULTI - Multicast packets matching filter */#define DOT11_RX_FILTER_MULTI        _BIT(1)/* DOT11_RX_FILTER_BROAD - Broadcast (non-matching BSSID)packets */#define DOT11_RX_FILTER_BROAD        _BIT(1)/* DOT11_RX_FILTER_BEACON - Beacons */#define DOT11_RX_FILTER_BEACON       _BIT(2)/* DOT11_RX_FILTER_PROBE_REQ - Broadcast management packets */#define DOT11_RX_FILTER_PROBE_REQ    _BIT(3)/* DOT11_RX_FILTER_CONTROL - All 802.11 Control frames */#define DOT11_RX_FILTER_CONTROL      _BIT(4)/* DOT11_RX_FILTER_PROMISC - All frames */#define DOT11_RX_FILTER_PROMISC      _BIT(5)IMPORT const char * dot11StateNames[];#define DOT11_DEFAULT_AUTH_TIMEOUT  (sysClkRateGet() / 20)#define DOT11_DEFAULT_ASSOC_TIMEOUT (sysClkRateGet() / 20)/****************************************************************************** DPE_OBJ - Object representing the Data Path Entity          *****************************************************************************/typedef struct /* DPE_OBJ */    {    STATUS (*free)(DOT11_FW * pDot11);    STATUS (*endSend)(END_OBJ * pEnd, M_BLK_ID pMblk);    STATUS (*endReceive)(DOT11_FW * pDot11, M_BLK_ID pMblk,                          UINT32 rate, UINT8 SSI);    STATUS (*fragThresholdSet)(DOT11_FW * pDot11, UINT32 fragThresh);    STATUS (*fragThresholdGet)(DOT11_FW *  pDot11,                               UINT32 * fragThresh);    STATUS (*endPollSend)(END_OBJ* pEnd, M_BLK_ID pMblk);    STATUS (*endPollRcv)(END_OBJ* pEnd, M_BLK_ID pMblk);    STATUS (*transmitQueueFlush)(DOT11_FW * pDot11);        /* The reassembly buffer stores packet fragments awaiting reassembly */    DOT11_REASSEMBLY     reassemblyBuff;    /* Packets above this size will be fragmented */    UINT32               fragThreshold;    DOT11_EX_POLICY      exclusionPolicy;    /* Timer for group re-keying */    INT32                groupRekeyTimer;    UINT32               groupRekeyTime;    /* This specifies the last initialization vector used on an egress packet*/    UINT32               currentIV;        /* Protects the order of the transmission path */    SEM_ID               transmitSem;    /* This queues up packets that attempted transmission while the link was    not up. Upon resumption of the link, these packets will be sent before any     fresh packets. Use a head and tail for quick insertion and removal.*/    M_BLK_ID             transmitQueueHead;        M_BLK_ID             transmitQueueTail;    } DPE_OBJ;/****************************************************************************** DOT11_KSL_OBJ - the Known Station List object*****************************************************************************/typedef struct /* DOT11_KSL_OBJ */    {    /* The init routine, dot11KslInit() is called directly from the SME to     create this structure */    STATUS (*free)(DOT11_FW * pDot11);    STATUS (*show)(int unitNum);    STATUS (*lock)(DOT11_FW * pDot11);    STATUS (*unlock)(DOT11_FW * pDot11);    STATUS (*flush)(DOT11_FW * pDot11);    DOT11_KSL_ENTRY * (*lookup)(DOT11_FW * pDot11, UINT8 * macAddr);    DOT11_KSL_ENTRY * (*ssidLookup)(DOT11_FW * pDot11, char * ssid,                                    int dot11Mode);    DOT11_KSL_ENTRY * (*rxUpdate)(DOT11_FW * pDot11, UINT8 * macAddr,                                   int rate, int ssi);    DOT11_KSL_ENTRY * (*txUpdate)(DOT11_FW * pDot11, UINT8 * macAddr,                                   BOOL success, UINT32 nRetries,                                   UINT32 ackSSI);    DOT11_KSL_ENTRY * (*add)(DOT11_FW * pDot11, UINT8 * macAddr);    STATUS (*delete)(DOT11_FW * pDot11, DOT11_KSL_ENTRY * pKsl);    STATUS (*lastAttemptReset)(DOT11_FW * pDot11);        /* Private data members */    /* This is the pointer to the head of the free pool of KSL entries and the    semaphore to guard the LL */    DOT11_KSL_ENTRY * pPool;    DOT11_KSL_ENTRY * pFreeEntry;    int poolUsed;    int poolMaxUsed;    SEM_ID poolSem;    DOT11_KSL_ENTRY * list[DOT11_KSL_MAX_HASH];    SEM_ID            lockSem;          /* Table protection */    int               cleanupTimer;        } DOT11_KSL_OBJ;/****************************************************************************** DOT11_RSN_OBJ - Specialized SME OBJ for RSN use.  Only used in SME_OBJ*****************************************************************************/typedef struct /* DOT11_RSN_OBJ */    {    STATUS      (*free)(DOT11_FW * pDot11);    INT32       (*rsnIeCreate)(DOT11_FW * pDot11, DOT11_KSL_ENTRY * pKsl,                          DOT11_BSS * pBss, UINT8 * buffer, int type);    STATUS      (*ieProcess)(DOT11_FW * pDot11, DOT11_KSL_ENTRY * pKsl,                             UINT8 * buffer);    UINT32      (*groupPolicyRecalc)(DOT11_FW * pDot11,                                      DOT11_KSL_ENTRY * pKsl,                                     DOT11_BSS * pBss);    STATUS      (*eapolPktReceive)(DOT11_FW * pDot11, M_BLK_ID pMblk);    STATUS      (*pskSet)(DOT11_FW * pDot11, const UINT8 * pKey);    STATUS      (*pmkSet)(DOT11_FW * pDot11, const UINT8 * pKey);    STATUS      (*passphraseSet)(DOT11_FW * pDot11, const char * passphrase);    STATUS      (*fourwayStart)(DOT11_FW * pDot11, DOT11_KSL_ENTRY * pKsl);    STATUS      (*fourwayTimeout)(DOT11_FW * pDot11, DOT11_KSL_ENTRY * pKsl);    STATUS      (*gtkRecalc)(DOT11_FW * pDot11);    STATUS      (*micFailureProcess)(DOT11_FW * pDot11, UINT8 * srcAddr);    UINT8       globalKeyCounter[DOT11_GKC_LEN];        /* Keeps track of the tickGet() of the last MIC failure.  Used by     dot11RsnMicFailureProcess() to enforce TKIP countermeasures.  */    INT32       lastMicFailure;    /* TRUE if TKIP countermeasures are active.  Prevents association to and    from stations with TKIP cipher */    BOOL        micLockout;        /* timerId for the dot11RsnMicReenable() */    UINT32      micLockoutTimer;    /* The source address of the packet that had the MIC error */    UINT8       micLockoutAddr[DOT11_ADDR_LEN];    } DOT11_RSN_OBJ;/****************************************************************************** DOT11_ESS_OBJ - Specialized SME OBJ for ESS use.  Only used in SME_OBJ*****************************************************************************/typedef struct /* DOT11_ESS_OBJ */    {    /* PRIVATE */        DOT11_ESS_SM       sm;                  /* State machine object */    MSG_Q_ID           scanMsgQ;            /* Message queue for scan task */    int                scanTaskId;          /* TID for deleting scan task */    int                probationTimer;      /* Timer to recove from link p */    int                authTimer;           /* Timer for auth and assoc */    /* This is a pointer to the KSL_ENTRY of the currently connected BSS */    DOT11_KSL_ENTRY *  pKslAp;    } DOT11_ESS_OBJ;/****************************************************************************** DOT11_IBSS_OBJ - Specialized SME OBJ for IBSS use.  Only used in SME_OBJ*****************************************************************************/typedef struct /* DOT11_IBSS_OBJ */    {    M_BLK_ID           pMblkBeacon;     /* Cluster allocated for beacons */    BOOL               beaconing;       /* Tue if beacons are being sent */    BOOL               syncBeacon;      /* Are we sync'd to the IBSS's bcns */    int                stateTid;        /* Task ID of state task; for del */    MSG_Q_ID           stateMsgQ;       /* Message queue for state task */    int                state;           /* Current state of SM */    int                atimWindow;      /* Window after beacon for ATIM */    /* This is the pointer to the KSL_ENTRY that we used to create the     IBSS.  This is just one station in the IBSS, but it should be sufficient    to get the IBSS parameters from.  If we get a beacon with a later timestamp    than this one, then we can shift to using that one */    DOT11_KSL_ENTRY *       pKslIbss;    } DOT11_IBSS_OBJ;/****************************************************************************** DOT11_AP_OBJ - Specialized SME OBJ for AP use.  Only used in SME_OBJ*****************************************************************************//* The timeout for the TIVB is small so that we don't break beacons waitingfor it */#define DOT11_TIVB_SEM_TIMEOUT          (30)typedef struct /* DOT11_AP_OBJ */    {    int channel;        UINT32             cfpDuration;     /* Length of CFP, in tu */        int                beaconTid;       /* Beacon task-ID */    SEM_ID        

⌨️ 快捷键说明

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