1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.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
31 VersionCrc = 0x21fd785b
34 // FibPathFlags defines enum 'fib_path_flags'.
35 type FibPathFlags uint32
38 FIB_API_PATH_FLAG_NONE FibPathFlags = 0
39 FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED FibPathFlags = 1
40 FIB_API_PATH_FLAG_RESOLVE_VIA_HOST FibPathFlags = 2
41 FIB_API_PATH_FLAG_POP_PW_CW FibPathFlags = 4
45 FibPathFlags_name = map[uint32]string{
46 0: "FIB_API_PATH_FLAG_NONE",
47 1: "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
48 2: "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
49 4: "FIB_API_PATH_FLAG_POP_PW_CW",
51 FibPathFlags_value = map[string]uint32{
52 "FIB_API_PATH_FLAG_NONE": 0,
53 "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED": 1,
54 "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST": 2,
55 "FIB_API_PATH_FLAG_POP_PW_CW": 4,
59 func (x FibPathFlags) String() string {
60 s, ok := FibPathFlags_name[uint32(x)]
64 str := func(n uint32) string {
65 s, ok := FibPathFlags_name[uint32(n)]
69 return "FibPathFlags(" + strconv.Itoa(int(n)) + ")"
71 for i := uint32(0); i <= 32; i++ {
86 // FibPathNhProto defines enum 'fib_path_nh_proto'.
87 type FibPathNhProto uint32
90 FIB_API_PATH_NH_PROTO_IP4 FibPathNhProto = 0
91 FIB_API_PATH_NH_PROTO_IP6 FibPathNhProto = 1
92 FIB_API_PATH_NH_PROTO_MPLS FibPathNhProto = 2
93 FIB_API_PATH_NH_PROTO_ETHERNET FibPathNhProto = 3
94 FIB_API_PATH_NH_PROTO_BIER FibPathNhProto = 4
98 FibPathNhProto_name = map[uint32]string{
99 0: "FIB_API_PATH_NH_PROTO_IP4",
100 1: "FIB_API_PATH_NH_PROTO_IP6",
101 2: "FIB_API_PATH_NH_PROTO_MPLS",
102 3: "FIB_API_PATH_NH_PROTO_ETHERNET",
103 4: "FIB_API_PATH_NH_PROTO_BIER",
105 FibPathNhProto_value = map[string]uint32{
106 "FIB_API_PATH_NH_PROTO_IP4": 0,
107 "FIB_API_PATH_NH_PROTO_IP6": 1,
108 "FIB_API_PATH_NH_PROTO_MPLS": 2,
109 "FIB_API_PATH_NH_PROTO_ETHERNET": 3,
110 "FIB_API_PATH_NH_PROTO_BIER": 4,
114 func (x FibPathNhProto) String() string {
115 s, ok := FibPathNhProto_name[uint32(x)]
119 return "FibPathNhProto(" + strconv.Itoa(int(x)) + ")"
122 // FibPathType defines enum 'fib_path_type'.
123 type FibPathType uint32
126 FIB_API_PATH_TYPE_NORMAL FibPathType = 0
127 FIB_API_PATH_TYPE_LOCAL FibPathType = 1
128 FIB_API_PATH_TYPE_DROP FibPathType = 2
129 FIB_API_PATH_TYPE_UDP_ENCAP FibPathType = 3
130 FIB_API_PATH_TYPE_BIER_IMP FibPathType = 4
131 FIB_API_PATH_TYPE_ICMP_UNREACH FibPathType = 5
132 FIB_API_PATH_TYPE_ICMP_PROHIBIT FibPathType = 6
133 FIB_API_PATH_TYPE_SOURCE_LOOKUP FibPathType = 7
134 FIB_API_PATH_TYPE_DVR FibPathType = 8
135 FIB_API_PATH_TYPE_INTERFACE_RX FibPathType = 9
136 FIB_API_PATH_TYPE_CLASSIFY FibPathType = 10
140 FibPathType_name = map[uint32]string{
141 0: "FIB_API_PATH_TYPE_NORMAL",
142 1: "FIB_API_PATH_TYPE_LOCAL",
143 2: "FIB_API_PATH_TYPE_DROP",
144 3: "FIB_API_PATH_TYPE_UDP_ENCAP",
145 4: "FIB_API_PATH_TYPE_BIER_IMP",
146 5: "FIB_API_PATH_TYPE_ICMP_UNREACH",
147 6: "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
148 7: "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
149 8: "FIB_API_PATH_TYPE_DVR",
150 9: "FIB_API_PATH_TYPE_INTERFACE_RX",
151 10: "FIB_API_PATH_TYPE_CLASSIFY",
153 FibPathType_value = map[string]uint32{
154 "FIB_API_PATH_TYPE_NORMAL": 0,
155 "FIB_API_PATH_TYPE_LOCAL": 1,
156 "FIB_API_PATH_TYPE_DROP": 2,
157 "FIB_API_PATH_TYPE_UDP_ENCAP": 3,
158 "FIB_API_PATH_TYPE_BIER_IMP": 4,
159 "FIB_API_PATH_TYPE_ICMP_UNREACH": 5,
160 "FIB_API_PATH_TYPE_ICMP_PROHIBIT": 6,
161 "FIB_API_PATH_TYPE_SOURCE_LOOKUP": 7,
162 "FIB_API_PATH_TYPE_DVR": 8,
163 "FIB_API_PATH_TYPE_INTERFACE_RX": 9,
164 "FIB_API_PATH_TYPE_CLASSIFY": 10,
168 func (x FibPathType) String() string {
169 s, ok := FibPathType_name[uint32(x)]
173 return "FibPathType(" + strconv.Itoa(int(x)) + ")"
176 // FibMplsLabel defines type 'fib_mpls_label'.
177 type FibMplsLabel struct {
178 IsUniform uint8 `binapi:"u8,name=is_uniform" json:"is_uniform,omitempty"`
179 Label uint32 `binapi:"u32,name=label" json:"label,omitempty"`
180 TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
181 Exp uint8 `binapi:"u8,name=exp" json:"exp,omitempty"`
184 // FibPath defines type 'fib_path'.
185 type FibPath struct {
186 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
187 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
188 RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
189 Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
190 Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
191 Type FibPathType `binapi:"fib_path_type,name=type" json:"type,omitempty"`
192 Flags FibPathFlags `binapi:"fib_path_flags,name=flags" json:"flags,omitempty"`
193 Proto FibPathNhProto `binapi:"fib_path_nh_proto,name=proto" json:"proto,omitempty"`
194 Nh FibPathNh `binapi:"fib_path_nh,name=nh" json:"nh,omitempty"`
195 NLabels uint8 `binapi:"u8,name=n_labels" json:"n_labels,omitempty"`
196 LabelStack [16]FibMplsLabel `binapi:"fib_mpls_label[16],name=label_stack" json:"label_stack,omitempty"`
199 // FibPathNh defines type 'fib_path_nh'.
200 type FibPathNh struct {
201 Address ip_types.AddressUnion `binapi:"address_union,name=address" json:"address,omitempty"`
202 ViaLabel uint32 `binapi:"u32,name=via_label" json:"via_label,omitempty"`
203 ObjID uint32 `binapi:"u32,name=obj_id" json:"obj_id,omitempty"`
204 ClassifyTableIndex uint32 `binapi:"u32,name=classify_table_index" json:"classify_table_index,omitempty"`