1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/fib_types.api.json
7 // Package fib_types contains generated bindings for API file fib_types.api.
18 api "git.fd.io/govpp.git/api"
19 ip_types "git.fd.io/govpp.git/binapi/ip_types"
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
28 // FibPathFlags defines enum 'fib_path_flags'.
29 type FibPathFlags uint32
32 FIB_API_PATH_FLAG_NONE FibPathFlags = 0
33 FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED FibPathFlags = 1
34 FIB_API_PATH_FLAG_RESOLVE_VIA_HOST FibPathFlags = 2
35 FIB_API_PATH_FLAG_POP_PW_CW FibPathFlags = 4
39 FibPathFlags_name = map[uint32]string{
40 0: "FIB_API_PATH_FLAG_NONE",
41 1: "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
42 2: "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
43 4: "FIB_API_PATH_FLAG_POP_PW_CW",
45 FibPathFlags_value = map[string]uint32{
46 "FIB_API_PATH_FLAG_NONE": 0,
47 "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED": 1,
48 "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST": 2,
49 "FIB_API_PATH_FLAG_POP_PW_CW": 4,
53 func (x FibPathFlags) String() string {
54 s, ok := FibPathFlags_name[uint32(x)]
58 str := func(n uint32) string {
59 s, ok := FibPathFlags_name[uint32(n)]
63 return "FibPathFlags(" + strconv.Itoa(int(n)) + ")"
65 for i := uint32(0); i <= 32; i++ {
80 // FibPathNhProto defines enum 'fib_path_nh_proto'.
81 type FibPathNhProto uint32
84 FIB_API_PATH_NH_PROTO_IP4 FibPathNhProto = 0
85 FIB_API_PATH_NH_PROTO_IP6 FibPathNhProto = 1
86 FIB_API_PATH_NH_PROTO_MPLS FibPathNhProto = 2
87 FIB_API_PATH_NH_PROTO_ETHERNET FibPathNhProto = 3
88 FIB_API_PATH_NH_PROTO_BIER FibPathNhProto = 4
92 FibPathNhProto_name = map[uint32]string{
93 0: "FIB_API_PATH_NH_PROTO_IP4",
94 1: "FIB_API_PATH_NH_PROTO_IP6",
95 2: "FIB_API_PATH_NH_PROTO_MPLS",
96 3: "FIB_API_PATH_NH_PROTO_ETHERNET",
97 4: "FIB_API_PATH_NH_PROTO_BIER",
99 FibPathNhProto_value = map[string]uint32{
100 "FIB_API_PATH_NH_PROTO_IP4": 0,
101 "FIB_API_PATH_NH_PROTO_IP6": 1,
102 "FIB_API_PATH_NH_PROTO_MPLS": 2,
103 "FIB_API_PATH_NH_PROTO_ETHERNET": 3,
104 "FIB_API_PATH_NH_PROTO_BIER": 4,
108 func (x FibPathNhProto) String() string {
109 s, ok := FibPathNhProto_name[uint32(x)]
113 return "FibPathNhProto(" + strconv.Itoa(int(x)) + ")"
116 // FibPathType defines enum 'fib_path_type'.
117 type FibPathType uint32
120 FIB_API_PATH_TYPE_NORMAL FibPathType = 0
121 FIB_API_PATH_TYPE_LOCAL FibPathType = 1
122 FIB_API_PATH_TYPE_DROP FibPathType = 2
123 FIB_API_PATH_TYPE_UDP_ENCAP FibPathType = 3
124 FIB_API_PATH_TYPE_BIER_IMP FibPathType = 4
125 FIB_API_PATH_TYPE_ICMP_UNREACH FibPathType = 5
126 FIB_API_PATH_TYPE_ICMP_PROHIBIT FibPathType = 6
127 FIB_API_PATH_TYPE_SOURCE_LOOKUP FibPathType = 7
128 FIB_API_PATH_TYPE_DVR FibPathType = 8
129 FIB_API_PATH_TYPE_INTERFACE_RX FibPathType = 9
130 FIB_API_PATH_TYPE_CLASSIFY FibPathType = 10
134 FibPathType_name = map[uint32]string{
135 0: "FIB_API_PATH_TYPE_NORMAL",
136 1: "FIB_API_PATH_TYPE_LOCAL",
137 2: "FIB_API_PATH_TYPE_DROP",
138 3: "FIB_API_PATH_TYPE_UDP_ENCAP",
139 4: "FIB_API_PATH_TYPE_BIER_IMP",
140 5: "FIB_API_PATH_TYPE_ICMP_UNREACH",
141 6: "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
142 7: "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
143 8: "FIB_API_PATH_TYPE_DVR",
144 9: "FIB_API_PATH_TYPE_INTERFACE_RX",
145 10: "FIB_API_PATH_TYPE_CLASSIFY",
147 FibPathType_value = map[string]uint32{
148 "FIB_API_PATH_TYPE_NORMAL": 0,
149 "FIB_API_PATH_TYPE_LOCAL": 1,
150 "FIB_API_PATH_TYPE_DROP": 2,
151 "FIB_API_PATH_TYPE_UDP_ENCAP": 3,
152 "FIB_API_PATH_TYPE_BIER_IMP": 4,
153 "FIB_API_PATH_TYPE_ICMP_UNREACH": 5,
154 "FIB_API_PATH_TYPE_ICMP_PROHIBIT": 6,
155 "FIB_API_PATH_TYPE_SOURCE_LOOKUP": 7,
156 "FIB_API_PATH_TYPE_DVR": 8,
157 "FIB_API_PATH_TYPE_INTERFACE_RX": 9,
158 "FIB_API_PATH_TYPE_CLASSIFY": 10,
162 func (x FibPathType) String() string {
163 s, ok := FibPathType_name[uint32(x)]
167 return "FibPathType(" + strconv.Itoa(int(x)) + ")"
170 // FibMplsLabel defines type 'fib_mpls_label'.
171 type FibMplsLabel struct {
172 IsUniform uint8 `binapi:"u8,name=is_uniform" json:"is_uniform,omitempty"`
173 Label uint32 `binapi:"u32,name=label" json:"label,omitempty"`
174 TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
175 Exp uint8 `binapi:"u8,name=exp" json:"exp,omitempty"`
178 // FibPath defines type 'fib_path'.
179 type FibPath struct {
180 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
181 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
182 RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
183 Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
184 Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
185 Type FibPathType `binapi:"fib_path_type,name=type" json:"type,omitempty"`
186 Flags FibPathFlags `binapi:"fib_path_flags,name=flags" json:"flags,omitempty"`
187 Proto FibPathNhProto `binapi:"fib_path_nh_proto,name=proto" json:"proto,omitempty"`
188 Nh FibPathNh `binapi:"fib_path_nh,name=nh" json:"nh,omitempty"`
189 NLabels uint8 `binapi:"u8,name=n_labels" json:"n_labels,omitempty"`
190 LabelStack [16]FibMplsLabel `binapi:"fib_mpls_label[16],name=label_stack" json:"label_stack,omitempty"`
193 // FibPathNh defines type 'fib_path_nh'.
194 type FibPathNh struct {
195 Address ip_types.AddressUnion `binapi:"address_union,name=address" json:"address,omitempty"`
196 ViaLabel uint32 `binapi:"u32,name=via_label" json:"via_label,omitempty"`
197 ObjID uint32 `binapi:"u32,name=obj_id" json:"obj_id,omitempty"`
198 ClassifyTableIndex uint32 `binapi:"u32,name=classify_table_index" json:"classify_table_index,omitempty"`