1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
|
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
// source: /usr/share/vpp/api/core/fib_types.api.json
/*
Package fib_types contains generated code for VPP API file fib_types.api (2.0.0).
It consists of:
5 aliases
7 enums
9 types
1 union
*/
package fib_types
import (
"bytes"
"context"
"encoding/binary"
"io"
"math"
"strconv"
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
struc "github.com/lunixbochs/struc"
ip_types "git.fd.io/govpp.git/examples/binapi/ip_types"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the GoVPP api package it is being compiled against.
// A compilation error at this line likely means your copy of the
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
const (
// ModuleName is the name of this module.
ModuleName = "fib_types"
// APIVersion is the API version of this module.
APIVersion = "2.0.0"
// VersionCrc is the CRC of this module.
VersionCrc = 0xd6a5938
)
type AddressFamily = ip_types.AddressFamily
// FibPathFlags represents VPP binary API enum 'fib_path_flags'.
type FibPathFlags uint32
const (
FIB_API_PATH_FLAG_NONE FibPathFlags = 0
FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED FibPathFlags = 1
FIB_API_PATH_FLAG_RESOLVE_VIA_HOST FibPathFlags = 2
FIB_API_PATH_FLAG_POP_PW_CW FibPathFlags = 4
)
var (
FibPathFlags_name = map[uint32]string{
0: "FIB_API_PATH_FLAG_NONE",
1: "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
2: "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
4: "FIB_API_PATH_FLAG_POP_PW_CW",
}
FibPathFlags_value = map[string]uint32{
"FIB_API_PATH_FLAG_NONE": 0,
"FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED": 1,
"FIB_API_PATH_FLAG_RESOLVE_VIA_HOST": 2,
"FIB_API_PATH_FLAG_POP_PW_CW": 4,
}
)
func (x FibPathFlags) String() string {
s, ok := FibPathFlags_name[uint32(x)]
if ok {
return s
}
return "FibPathFlags(" + strconv.Itoa(int(x)) + ")"
}
// FibPathNhProto represents VPP binary API enum 'fib_path_nh_proto'.
type FibPathNhProto uint32
const (
FIB_API_PATH_NH_PROTO_IP4 FibPathNhProto = 0
FIB_API_PATH_NH_PROTO_IP6 FibPathNhProto = 1
FIB_API_PATH_NH_PROTO_MPLS FibPathNhProto = 2
FIB_API_PATH_NH_PROTO_ETHERNET FibPathNhProto = 3
FIB_API_PATH_NH_PROTO_BIER FibPathNhProto = 4
)
var (
FibPathNhProto_name = map[uint32]string{
0: "FIB_API_PATH_NH_PROTO_IP4",
1: "FIB_API_PATH_NH_PROTO_IP6",
2: "FIB_API_PATH_NH_PROTO_MPLS",
3: "FIB_API_PATH_NH_PROTO_ETHERNET",
4: "FIB_API_PATH_NH_PROTO_BIER",
}
FibPathNhProto_value = map[string]uint32{
"FIB_API_PATH_NH_PROTO_IP4": 0,
"FIB_API_PATH_NH_PROTO_IP6": 1,
"FIB_API_PATH_NH_PROTO_MPLS": 2,
"FIB_API_PATH_NH_PROTO_ETHERNET": 3,
"FIB_API_PATH_NH_PROTO_BIER": 4,
}
)
func (x FibPathNhProto) String() string {
s, ok := FibPathNhProto_name[uint32(x)]
if ok {
return s
}
return "FibPathNhProto(" + strconv.Itoa(int(x)) + ")"
}
// FibPathType represents VPP binary API enum 'fib_path_type'.
type FibPathType uint32
const (
FIB_API_PATH_TYPE_NORMAL FibPathType = 0
FIB_API_PATH_TYPE_LOCAL FibPathType = 1
FIB_API_PATH_TYPE_DROP FibPathType = 2
FIB_API_PATH_TYPE_UDP_ENCAP FibPathType = 3
FIB_API_PATH_TYPE_BIER_IMP FibPathType = 4
FIB_API_PATH_TYPE_ICMP_UNREACH FibPathType = 5
FIB_API_PATH_TYPE_ICMP_PROHIBIT FibPathType = 6
FIB_API_PATH_TYPE_SOURCE_LOOKUP FibPathType = 7
FIB_API_PATH_TYPE_DVR FibPathType = 8
FIB_API_PATH_TYPE_INTERFACE_RX FibPathType = 9
FIB_API_PATH_TYPE_CLASSIFY FibPathType = 10
)
var (
FibPathType_name = map[uint32]string{
0: "FIB_API_PATH_TYPE_NORMAL",
1: "FIB_API_PATH_TYPE_LOCAL",
2: "FIB_API_PATH_TYPE_DROP",
3: "FIB_API_PATH_TYPE_UDP_ENCAP",
4: "FIB_API_PATH_TYPE_BIER_IMP",
5: "FIB_API_PATH_TYPE_ICMP_UNREACH",
6: "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
7: "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
8: "FIB_API_PATH_TYPE_DVR",
9: "FIB_API_PATH_TYPE_INTERFACE_RX",
10: "FIB_API_PATH_TYPE_CLASSIFY",
}
FibPathType_value = map[string]uint32{
"FIB_API_PATH_TYPE_NORMAL": 0,
"FIB_API_PATH_TYPE_LOCAL": 1,
"FIB_API_PATH_TYPE_DROP": 2,
"FIB_API_PATH_TYPE_UDP_ENCAP": 3,
"FIB_API_PATH_TYPE_BIER_IMP": 4,
"FIB_API_PATH_TYPE_ICMP_UNREACH": 5,
"FIB_API_PATH_TYPE_ICMP_PROHIBIT": 6,
"FIB_API_PATH_TYPE_SOURCE_LOOKUP": 7,
"FIB_API_PATH_TYPE_DVR": 8,
"FIB_API_PATH_TYPE_INTERFACE_RX": 9,
"FIB_API_PATH_TYPE_CLASSIFY": 10,
}
)
func (x FibPathType) String() string {
s, ok := FibPathType_name[uint32(x)]
if ok {
return s
}
return "FibPathType(" + strconv.Itoa(int(x)) + ")"
}
type IPDscp = ip_types.IPDscp
type IPEcn = ip_types.IPEcn
type IPProto = ip_types.IPProto
type AddressWithPrefix = ip_types.AddressWithPrefix
type IP4Address = ip_types.IP4Address
type IP4AddressWithPrefix = ip_types.IP4AddressWithPrefix
type IP6Address = ip_types.IP6Address
type IP6AddressWithPrefix = ip_types.IP6AddressWithPrefix
type Address = ip_types.Address
// FibMplsLabel represents VPP binary API type 'fib_mpls_label'.
type FibMplsLabel struct {
IsUniform uint8 `binapi:"u8,name=is_uniform" json:"is_uniform,omitempty"`
Label uint32 `binapi:"u32,name=label" json:"label,omitempty"`
TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
Exp uint8 `binapi:"u8,name=exp" json:"exp,omitempty"`
}
func (*FibMplsLabel) GetTypeName() string { return "fib_mpls_label" }
// FibPath represents VPP binary API type 'fib_path'.
type FibPath struct {
SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
Type FibPathType `binapi:"fib_path_type,name=type" json:"type,omitempty"`
Flags FibPathFlags `binapi:"fib_path_flags,name=flags" json:"flags,omitempty"`
Proto FibPathNhProto `binapi:"fib_path_nh_proto,name=proto" json:"proto,omitempty"`
Nh FibPathNh `binapi:"fib_path_nh,name=nh" json:"nh,omitempty"`
NLabels uint8 `binapi:"u8,name=n_labels" json:"n_labels,omitempty"`
LabelStack [16]FibMplsLabel `binapi:"fib_mpls_label[16],name=label_stack" json:"label_stack,omitempty" struc:"[16]FibMplsLabel"`
}
func (*FibPath) GetTypeName() string { return "fib_path" }
// FibPathNh represents VPP binary API type 'fib_path_nh'.
type FibPathNh struct {
Address AddressUnion `binapi:"address_union,name=address" json:"address,omitempty"`
ViaLabel uint32 `binapi:"u32,name=via_label" json:"via_label,omitempty"`
ObjID uint32 `binapi:"u32,name=obj_id" json:"obj_id,omitempty"`
ClassifyTableIndex uint32 `binapi:"u32,name=classify_table_index" json:"classify_table_index,omitempty"`
}
func (*FibPathNh) GetTypeName() string { return "fib_path_nh" }
type IP4Prefix = ip_types.IP4Prefix
type IP6Prefix = ip_types.IP6Prefix
type Mprefix = ip_types.Mprefix
type Prefix = ip_types.Prefix
type PrefixMatcher = ip_types.PrefixMatcher
type AddressUnion = ip_types.AddressUnion
// Reference imports to suppress errors if they are not otherwise used.
var _ = api.RegisterMessage
var _ = codec.DecodeString
var _ = bytes.NewBuffer
var _ = context.Background
var _ = io.Copy
var _ = strconv.Itoa
var _ = struc.Pack
var _ = binary.BigEndian
var _ = math.Float32bits
|