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
8 Package fib_types contains generated code for VPP API file fib_types.api (2.0.0).
29 api "git.fd.io/govpp.git/api"
30 codec "git.fd.io/govpp.git/codec"
31 struc "github.com/lunixbochs/struc"
33 ip_types "git.fd.io/govpp.git/examples/binapi/ip_types"
36 // This is a compile-time assertion to ensure that this generated file
37 // is compatible with the GoVPP api package it is being compiled against.
38 // A compilation error at this line likely means your copy of the
39 // GoVPP api package needs to be updated.
40 const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
43 // ModuleName is the name of this module.
44 ModuleName = "fib_types"
45 // APIVersion is the API version of this module.
47 // VersionCrc is the CRC of this module.
48 VersionCrc = 0xd6a5938
51 type AddressFamily = ip_types.AddressFamily
53 // FibPathFlags represents VPP binary API enum 'fib_path_flags'.
54 type FibPathFlags uint32
57 FIB_API_PATH_FLAG_NONE FibPathFlags = 0
58 FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED FibPathFlags = 1
59 FIB_API_PATH_FLAG_RESOLVE_VIA_HOST FibPathFlags = 2
60 FIB_API_PATH_FLAG_POP_PW_CW FibPathFlags = 4
64 FibPathFlags_name = map[uint32]string{
65 0: "FIB_API_PATH_FLAG_NONE",
66 1: "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
67 2: "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
68 4: "FIB_API_PATH_FLAG_POP_PW_CW",
70 FibPathFlags_value = map[string]uint32{
71 "FIB_API_PATH_FLAG_NONE": 0,
72 "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED": 1,
73 "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST": 2,
74 "FIB_API_PATH_FLAG_POP_PW_CW": 4,
78 func (x FibPathFlags) String() string {
79 s, ok := FibPathFlags_name[uint32(x)]
83 return "FibPathFlags(" + strconv.Itoa(int(x)) + ")"
86 // FibPathNhProto represents VPP binary API 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 represents VPP binary API 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 type IPDscp = ip_types.IPDscp
178 type IPEcn = ip_types.IPEcn
180 type IPProto = ip_types.IPProto
182 type AddressWithPrefix = ip_types.AddressWithPrefix
184 type IP4Address = ip_types.IP4Address
186 type IP4AddressWithPrefix = ip_types.IP4AddressWithPrefix
188 type IP6Address = ip_types.IP6Address
190 type IP6AddressWithPrefix = ip_types.IP6AddressWithPrefix
192 type Address = ip_types.Address
194 // FibMplsLabel represents VPP binary API type 'fib_mpls_label'.
195 type FibMplsLabel struct {
196 IsUniform uint8 `binapi:"u8,name=is_uniform" json:"is_uniform,omitempty"`
197 Label uint32 `binapi:"u32,name=label" json:"label,omitempty"`
198 TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
199 Exp uint8 `binapi:"u8,name=exp" json:"exp,omitempty"`
202 func (*FibMplsLabel) GetTypeName() string { return "fib_mpls_label" }
204 // FibPath represents VPP binary API type 'fib_path'.
205 type FibPath struct {
206 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
207 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
208 RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
209 Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
210 Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
211 Type FibPathType `binapi:"fib_path_type,name=type" json:"type,omitempty"`
212 Flags FibPathFlags `binapi:"fib_path_flags,name=flags" json:"flags,omitempty"`
213 Proto FibPathNhProto `binapi:"fib_path_nh_proto,name=proto" json:"proto,omitempty"`
214 Nh FibPathNh `binapi:"fib_path_nh,name=nh" json:"nh,omitempty"`
215 NLabels uint8 `binapi:"u8,name=n_labels" json:"n_labels,omitempty"`
216 LabelStack [16]FibMplsLabel `binapi:"fib_mpls_label[16],name=label_stack" json:"label_stack,omitempty" struc:"[16]FibMplsLabel"`
219 func (*FibPath) GetTypeName() string { return "fib_path" }
221 // FibPathNh represents VPP binary API type 'fib_path_nh'.
222 type FibPathNh struct {
223 Address ip_types.AddressUnion `binapi:"address_union,name=address" json:"address,omitempty"`
224 ViaLabel uint32 `binapi:"u32,name=via_label" json:"via_label,omitempty"`
225 ObjID uint32 `binapi:"u32,name=obj_id" json:"obj_id,omitempty"`
226 ClassifyTableIndex uint32 `binapi:"u32,name=classify_table_index" json:"classify_table_index,omitempty"`
229 func (*FibPathNh) GetTypeName() string { return "fib_path_nh" }
231 type IP4Prefix = ip_types.IP4Prefix
233 type IP6Prefix = ip_types.IP6Prefix
235 type Mprefix = ip_types.Mprefix
237 type Prefix = ip_types.Prefix
239 type PrefixMatcher = ip_types.PrefixMatcher
241 type AddressUnion = ip_types.AddressUnion
243 // Reference imports to suppress errors if they are not otherwise used.
244 var _ = api.RegisterMessage
245 var _ = codec.DecodeString
246 var _ = bytes.NewBuffer
247 var _ = context.Background
250 var _ = strings.Contains
252 var _ = binary.BigEndian
253 var _ = math.Float32bits