753701aa2f7059693e33e73e1d8bf4edc5acfd9e
[govpp.git] / binapi / acl_types / acl_types.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5
6 // Package acl_types contains generated bindings for API file acl_types.api.
7 //
8 // Contents:
9 //   1 enum
10 //   2 structs
11 //
12 package acl_types
13
14 import (
15         "strconv"
16
17         api "git.fd.io/govpp.git/api"
18         ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
19         ip_types "git.fd.io/govpp.git/binapi/ip_types"
20 )
21
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
27
28 // ACLAction defines enum 'acl_action'.
29 type ACLAction uint8
30
31 const (
32         ACL_ACTION_API_DENY           ACLAction = 0
33         ACL_ACTION_API_PERMIT         ACLAction = 1
34         ACL_ACTION_API_PERMIT_REFLECT ACLAction = 2
35 )
36
37 var (
38         ACLAction_name = map[uint8]string{
39                 0: "ACL_ACTION_API_DENY",
40                 1: "ACL_ACTION_API_PERMIT",
41                 2: "ACL_ACTION_API_PERMIT_REFLECT",
42         }
43         ACLAction_value = map[string]uint8{
44                 "ACL_ACTION_API_DENY":           0,
45                 "ACL_ACTION_API_PERMIT":         1,
46                 "ACL_ACTION_API_PERMIT_REFLECT": 2,
47         }
48 )
49
50 func (x ACLAction) String() string {
51         s, ok := ACLAction_name[uint8(x)]
52         if ok {
53                 return s
54         }
55         return "ACLAction(" + strconv.Itoa(int(x)) + ")"
56 }
57
58 // ACLRule defines type 'acl_rule'.
59 type ACLRule struct {
60         IsPermit               ACLAction        `binapi:"acl_action,name=is_permit" json:"is_permit,omitempty"`
61         SrcPrefix              ip_types.Prefix  `binapi:"prefix,name=src_prefix" json:"src_prefix,omitempty"`
62         DstPrefix              ip_types.Prefix  `binapi:"prefix,name=dst_prefix" json:"dst_prefix,omitempty"`
63         Proto                  ip_types.IPProto `binapi:"ip_proto,name=proto" json:"proto,omitempty"`
64         SrcportOrIcmptypeFirst uint16           `binapi:"u16,name=srcport_or_icmptype_first" json:"srcport_or_icmptype_first,omitempty"`
65         SrcportOrIcmptypeLast  uint16           `binapi:"u16,name=srcport_or_icmptype_last" json:"srcport_or_icmptype_last,omitempty"`
66         DstportOrIcmpcodeFirst uint16           `binapi:"u16,name=dstport_or_icmpcode_first" json:"dstport_or_icmpcode_first,omitempty"`
67         DstportOrIcmpcodeLast  uint16           `binapi:"u16,name=dstport_or_icmpcode_last" json:"dstport_or_icmpcode_last,omitempty"`
68         TCPFlagsMask           uint8            `binapi:"u8,name=tcp_flags_mask" json:"tcp_flags_mask,omitempty"`
69         TCPFlagsValue          uint8            `binapi:"u8,name=tcp_flags_value" json:"tcp_flags_value,omitempty"`
70 }
71
72 // MacipACLRule defines type 'macip_acl_rule'.
73 type MacipACLRule struct {
74         IsPermit   ACLAction                 `binapi:"acl_action,name=is_permit" json:"is_permit,omitempty"`
75         SrcMac     ethernet_types.MacAddress `binapi:"mac_address,name=src_mac" json:"src_mac,omitempty"`
76         SrcMacMask ethernet_types.MacAddress `binapi:"mac_address,name=src_mac_mask" json:"src_mac_mask,omitempty"`
77         SrcPrefix  ip_types.Prefix           `binapi:"prefix,name=src_prefix" json:"src_prefix,omitempty"`
78 }