Home | History | Annotate | Download | only in tc_ematch
      1 #ifndef __LINUX_TC_EM_META_H
      2 #define __LINUX_TC_EM_META_H
      3 
      4 enum {
      5 	TCA_EM_META_UNSPEC,
      6 	TCA_EM_META_HDR,
      7 	TCA_EM_META_LVALUE,
      8 	TCA_EM_META_RVALUE,
      9 	__TCA_EM_META_MAX
     10 };
     11 #define TCA_EM_META_MAX (__TCA_EM_META_MAX - 1)
     12 
     13 struct tcf_meta_val {
     14 	__u16			kind;
     15 	__u8			shift;
     16 	__u8			op;
     17 };
     18 
     19 #define TCF_META_TYPE_MASK	(0xf << 12)
     20 #define TCF_META_TYPE(kind)	(((kind) & TCF_META_TYPE_MASK) >> 12)
     21 #define TCF_META_ID_MASK	0x7ff
     22 #define TCF_META_ID(kind)	((kind) & TCF_META_ID_MASK)
     23 
     24 enum {
     25 	TCF_META_TYPE_VAR,
     26 	TCF_META_TYPE_INT,
     27 	__TCF_META_TYPE_MAX
     28 };
     29 #define TCF_META_TYPE_MAX (__TCF_META_TYPE_MAX - 1)
     30 
     31 enum {
     32 	TCF_META_ID_VALUE,
     33 	TCF_META_ID_RANDOM,
     34 	TCF_META_ID_LOADAVG_0,
     35 	TCF_META_ID_LOADAVG_1,
     36 	TCF_META_ID_LOADAVG_2,
     37 	TCF_META_ID_DEV,
     38 	TCF_META_ID_PRIORITY,
     39 	TCF_META_ID_PROTOCOL,
     40 	TCF_META_ID_PKTTYPE,
     41 	TCF_META_ID_PKTLEN,
     42 	TCF_META_ID_DATALEN,
     43 	TCF_META_ID_MACLEN,
     44 	TCF_META_ID_NFMARK,
     45 	TCF_META_ID_TCINDEX,
     46 	TCF_META_ID_RTCLASSID,
     47 	TCF_META_ID_RTIIF,
     48 	TCF_META_ID_SK_FAMILY,
     49 	TCF_META_ID_SK_STATE,
     50 	TCF_META_ID_SK_REUSE,
     51 	TCF_META_ID_SK_BOUND_IF,
     52 	TCF_META_ID_SK_REFCNT,
     53 	TCF_META_ID_SK_SHUTDOWN,
     54 	TCF_META_ID_SK_PROTO,
     55 	TCF_META_ID_SK_TYPE,
     56 	TCF_META_ID_SK_RCVBUF,
     57 	TCF_META_ID_SK_RMEM_ALLOC,
     58 	TCF_META_ID_SK_WMEM_ALLOC,
     59 	TCF_META_ID_SK_OMEM_ALLOC,
     60 	TCF_META_ID_SK_WMEM_QUEUED,
     61 	TCF_META_ID_SK_RCV_QLEN,
     62 	TCF_META_ID_SK_SND_QLEN,
     63  	TCF_META_ID_SK_ERR_QLEN,
     64 	TCF_META_ID_SK_FORWARD_ALLOCS,
     65 	TCF_META_ID_SK_SNDBUF,
     66  	TCF_META_ID_SK_ALLOCS,
     67  	TCF_META_ID_SK_ROUTE_CAPS,
     68  	TCF_META_ID_SK_HASH,
     69  	TCF_META_ID_SK_LINGERTIME,
     70  	TCF_META_ID_SK_ACK_BACKLOG,
     71  	TCF_META_ID_SK_MAX_ACK_BACKLOG,
     72  	TCF_META_ID_SK_PRIO,
     73  	TCF_META_ID_SK_RCVLOWAT,
     74  	TCF_META_ID_SK_RCVTIMEO,
     75  	TCF_META_ID_SK_SNDTIMEO,
     76  	TCF_META_ID_SK_SENDMSG_OFF,
     77  	TCF_META_ID_SK_WRITE_PENDING,
     78 	TCF_META_ID_VLAN_TAG,
     79 	TCF_META_ID_RXHASH,
     80 	__TCF_META_ID_MAX
     81 };
     82 #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1)
     83 
     84 struct tcf_meta_hdr {
     85 	struct tcf_meta_val	left;
     86 	struct tcf_meta_val	right;
     87 };
     88 
     89 #endif
     90