Adlink_acl_qualifier_info_t, Adlink_acl_action_info_t – ADLINK aTCA-N700 User Manual

Page 35

Advertising
background image

Switch Manager API Programming Guide

35

UINT16 data16;

//data16 use, such as l4port

UINT8 data8;

//data8 use, such as ip protocol

} adlink_acl_data_t;

For different qualifiers and actions, there are different data lengths. For example, an IP address

is 32 bits long, a MAC address is 48 bits long, and an L4 port ID is 16 bits long. This data

structure was defined in order to accommodate these different situations. Careful attention must

be paid to refer to the appropriate member according to the actual situation. The appropriate

members for existing qualifiers and actions are listed in the Tables 6-3 and 6-4.

adlink_acl_qualifier_info_t

typedef struct adlink_acl_qualifier_info

{

adlink_qualifier_type_t type;//qualifier type

adlink_acl_data_t data;//union, use the correct member for different types

adlink_acl_data_t mask;//union, use the correct member for different types

} adlink_acl_qualifier_info_t;

Table 6- 3, Data Descriptions For Different Qualifier Types

Qualifier Type

Data

mask

INPORTS

data32 (port bit maps,cpu0 is

bit 0,xe0 is bit 1,…)

None

SRCIP data32 data32

DSTIP data32 data32

IPPROTOCOL Data8

Data8

L4SRCPORT Data16

Data16

L4DSTPORT Data16

Data16

SRCMAC Data48

Data48

DSTMAC Data48

Data48

SRCTRUNK Data16

Data16

ETHERTYPE Data16

Data16

INNERVLAN Data16

Data16

OUTERVLAN Data16

Data16

adlink_acl_action_info_t

typedef struct adlink_acl_action_info

{

adlink_action_type_t type;

adlink_acl_data_t param0;//union,use the correct member for different types

adlink_acl_data_t param1;//union,use the correct member for different types

} adlink_acl_action_info_t;

Advertising