📄 base_comm.h
字号:
IANS_IND_COMMA /* Dummy to satisfy last ifdef'ed commma */ } IANS_INDICATION, *PIANS_INDICATION;typedef struct _IANS_BD_ANS_SET_CB { IANS_BD_PARAM_HEADER Header; void *notify;} IANS_BD_ANS_SET_CB, *PIANS_BD_ANS_SET_CB;/*--------------------------------------------------------------------* | Identify yourself struct | ======================== | This struct is sent with the IANS_BD_IDENTIFY request. | iANS fills its signature string and version number, and sends it to | the base driver. The base driver fills its own signature string and | version adn returns it. *--------------------------------------------------------------------*/typedef struct _IANS_BD_PARAM_IDENTIFY{ IANS_BD_PARAM_HEADER Header; /* Common to all commands */ u8 iANSSignature[IANS_SIGNATURE_LENGTH]; /* iANS fills copyright string*/ u8 BDSignature[IANS_SIGNATURE_LENGTH]; /* BD fills copyright string*/ u32 iANSCommVersion; /* iANS supported comm. version */ /* Upper word = major version number */ /* lower word = minor version number */ u32 BDCommVersion; /* Base driver supported comm. version */} IANS_BD_PARAM_IDENTIFY, *PIANS_BD_PARAM_IDENTIFY;/*--------------------------------------------------------------------* | Get Extended capabilities parameters struct | =========================================== | This struct is sent with IANS_OP_EXT_GET_CAPABILITY - to be filled | by the base driver and sent to iANS *--------------------------------------------------------------------*/ #define IANS_BD_FLAG1 0x0001#define IANS_BD_FLAG2 0x0002#define IANS_BD_FLAG3 0x0004#define IANS_BD_FLAG4 0x0008#define IANS_BD_FLAG5 0x0010#define IANS_BD_FLAG6 0x0020#define IANS_BD_FLAG7 0x0040#define IANS_BD_FLAG8 0x0080typedef struct _IANS_BD_PARAM_EXT_CAP{ IANS_BD_PARAM_HEADER Header; /* Common to all commands */ u32 BDCanSetMacAddress; /* MAC Address setting - cast from IANS_BD_SUPPORT*/ u32 BDIansStatusVersion; /* Status indication with iANS struct - which version is supported */ u32 BDAllAvailableRouting; /* Bitmask of all available Rx/Event * routings. IANS_BD_ROUTING */ u32 BDFlags; /* The adapter's flags */ u32 BDAllAvailableSpeeds; /* A bit mask of all available speeds */} IANS_BD_PARAM_EXT_CAP, *PIANS_BD_PARAM_EXT_CAP;/*--------------------------------------------------------------------* | Set Extended mode parameters struct | ======================================== | This struct is sent with IANS_OP_EXT_SET_MODE - to be filled | by iANS and sent to the base driver | | iANS tells the base driver whether to report its status through | the extended struct or not. *--------------------------------------------------------------------*/ typedef struct _IANS_BD_PARAM_EXT_SET_MODE{ IANS_BD_PARAM_HEADER Header; /* Common to all commands */ u32 BDIansStatusReport; /* Ask the base driver to report status through * status struct. * Cast from IANS_BD_REQUEST. */ u32 BDIansAttributedMode; /* Ask the base driver to send and receive * packets accompanied by a per-frame data structure * Cast from IANS_BD_REQUEST. */ u32 BDIansRoutingMode; /* Bitmask of one Rx and one IANS_BD_ROUTING */} IANS_BD_PARAM_EXT_SET_MODE, *PIANS_BD_PARAM_EXT_SET_MODE;#ifdef IANS_BASE_VLAN_TAGGING/*--------------------------------------------------------------------* | Get Vlan tagging capabilities | ============================= | This struct is sent with the IANS_OP_ITAG_GET_CAPABILITY ioctl, to be filled | by the base driver. *--------------------------------------------------------------------*/typedef struct _IANS_BD_PARAM_ITAG_CAP{ IANS_BD_PARAM_HEADER Header; /* Common to all commands */ u32 ISLTagMode; /* cast from IANS_BD_SUPPORT */ u32 IEEE802_3acTagMode; /* cast from IANS_BD_SUPPORT */} IANS_BD_PARAM_ITAG_CAP, *PIANS_BD_PARAM_ITAG_CAP;/*--------------------------------------------------------------------* | Set Vlan tagging mode | ===================== | This struct is sent with the IANS_OP_ITAG_SET_MODE ioctl, to be filled | by iANS. *--------------------------------------------------------------------*/typedef enum _IANS_BD_TAGGING_MODE { IANS_BD_TAGGING_NONE =0, IANS_BD_TAGGING_802_3AC, IANS_BD_TAGGING_UNDEFINED}IANS_BD_TAGGING_MODE , *PIANS_BD_TAGGING_MODE ;typedef struct _IANS_BD_PARAM_ITAG_SET_MODE{ IANS_BD_PARAM_HEADER Header; /* Common to all commands */ u32 SetTagMode; /* cast from IANS_BD_TAGGING_MODE */} IANS_BD_PARAM_ITAG_SET_MODE, *PIANS_BD_PARAM_ITAG_SET_MODE;#endif /* IANS_BASE_VLAN_TAGGING */#ifdef IANS_BASE_VLAN_ID/*--------------------------------------------------------------------* | Get Vlan ID capabilities | ======================== | This struct is sent with the IANS_OP_IVLAN_ID_GET_CAPABILITY ioctl, | to be filled by the base driver *--------------------------------------------------------------------*/typedef struct _IANS_BD_PARAM_IVLAN_CAP{ IANS_BD_PARAM_HEADER Header; /* Common to all commands */ u32 VlanIDCapable; /* Cast from IANS_BD_SUPPORT */ u32 VlanIDFilteringAble; /* Cast from IANS_BD_SUPPORT */ u16 MaxVlanIDSupported; /* Max. VLan ID supported by BD */ u32 MaxVlanTableSize; /* Max. number of VLan IDs in a table */} IANS_BD_PARAM_IVLAN_CAP, *PIANS_BD_PARAM_IVLAN_CAP;/*--------------------------------------------------------------------* | Set Vlan ID mode | ================ | This struct is sent with the IANS_OP_IVLAN_ID_SET_MODE ioctl, filled | by the iANS *--------------------------------------------------------------------*/ typedef struct _IANS_BD_PARAM_IVLAN_SET_MODE{ IANS_BD_PARAM_HEADER Header; /* Common to all commands */ u32 VlanIDRequest; /* Cast from IANS_BD_REQUEST */ u32 VlanIDFilteringRequest; /* Cast from IANS_BD_REQUEST */} IANS_BD_PARAM_IVLAN_SET_MODE, *PIANS_BD_PARAM_IVLAN_SET_MODE;/*--------------------------------------------------------------------* | Set Vlan ID filtering table | =========================== | This struct is sent with the IANS_OP_IVLAN_ID_SET_TABLE request *--------------------------------------------------------------------*/typedef struct _IANS_BD_PARAM_IVLAN_TABLE{ IANS_BD_PARAM_HEADER Header; /* Common to all commands */ u32 VLanIDNum; /* Number of VLan IDs defined in this table */ u16 *VLanIDTable; /* Beginning of ID list. * iANS will allocate enough space * for the whole table, and it will * start from this field - we don't * want to force this struct to be * as big as the maximum number of * VLan IDs. */} IANS_BD_PARAM_IVLAN_TABLE, *PIANS_BD_PARAM_IVLAN_TABLE;#endif /* IANS_BASE_VLAN_ID *//*--------------------------------------------------------------------* | PER_FRAME_ATTRIBUE_HEADER | ************************* | This header will be included in every TLV *--------------------------------------------------------------------*/typedef struct _Per_Frame_Attribute_Header{ u32 AttributeID; /* Indicates which kind of data is contained in this field */ u32 AttributeLength; /* Length of this attribute */} Per_Frame_Attribute_Header, *pPer_Frame_Attribute_Header;/* ================================================================= * * * * Per-Message Attributes * * * * ================================================================= */typedef struct _IANS_ATTR_HEADER{ pPer_Frame_Attribute_Header pFirstTLV; /* NULL if not attributed */ u32 OriginalProtocol;} IANS_ATTR_HEADER, *PIANS_ATTR_HEADER;/* Turn into a legal pointer */#if defined(__i386__)#define CelingAlignPtr(p) ( p )#else#define CelingAlignPtr(p) ( p )#endif/* The attribute header is kept at the beginning of the allocated buffer */#define iANSGetReceiveAttributeHeader(skb) \ ( (IANS_ATTR_HEADER*) CelingAlignPtr ( (char*)((skb)->head) ) ) #define iANSGetTransmitAttributeHeader(skb) \ ( (IANS_ATTR_HEADER*) CelingAlignPtr ( (char*)((skb)->cb) ) ) /*--------------------------------------------------------------------* | Attribute IDs | ************* | These values indicate which type of attribute is contained in a | certain TLV. *--------------------------------------------------------------------*/typedef enum _iANS_Attribute_ID{ IANS_ATTR_LAST_ATTR=0, /* Marks the last attribute in a list */ IANS_ATTR_DUMMY, /* Non-initiating side should ignore this attribute */#ifdef IANS_BASE_VLAN_ID IANS_ATTR_VLAN_FIRST = 0x100, /* skip over reserved area */ IANS_ATTR_VLAN_ID, /* This attribute contains the VLan ID */#endif /* IANS_BASE_VLAN_ID */ #ifdef IANS_BASE_VLAN_TAGGING IANS_ATTR_TAGGING_FIRST = 0x200, /* skip over reserved area */ IANS_ATTR_TAGGING_UNTAGGED, /* This determines that frame is untagged */#endif /* IANS_BASE_VLAN_TAGGING */ IANS_ATTR_COMMA} iANS_Attribute_ID, *piANS_Attribute_ID; #ifdef IANS_BASE_VLAN_ID/*-------------------------------------------------------------------| VLAN_ID_PER_FRAME_INFO| **********************| This structure contains only the VLanID per-frame information. -------------------------------------------------------------------*/typedef struct _VLAN_ID_Per_Frame_Info { Per_Frame_Attribute_Header AttrHeader; u16 VLanID; u8 Padding[2];} VLAN_ID_Per_Frame_Info , *pVLAN_ID_Per_Frame_Info ;#endif /* IANS_BASE_VLAN_ID */#ifdef IANS_BASE_VLAN_TAGGING/*-------------------------------------------------------------------| Untagged_Attribute| ******************| This structure is for the "untagged" attribute (used to indicate| that frame is untagged). -------------------------------------------------------------------*/typedef struct _Untagged_Attribute{ Per_Frame_Attribute_Header AttrHeader;} Untagged_Attribute , *pUntagged_Attribute ;#endif /* IANS_BASE_VLAN_TAGGING *//*-------------------------------------------------------------------| LAST_ATTRIBUTE| **************| This structure is for the last attribute in the TLV list. -------------------------------------------------------------------*/typedef struct _Last_Attribute{ Per_Frame_Attribute_Header LastHeader;} Last_Attribute, *pLast_Attribute ;/* ================================================================= * * * * Rx Routing * * * * ================================================================= */// temp debug#define IANS_FRAME_TYPE 0x6D88 /* Network order is 0x886D *//* Restore packing mode. */#pragma pack()#endif /* _IANS_BASE_COMM_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -