This repository has been archived by the owner on Aug 3, 2020. It is now read-only.
forked from ligato/vpp-agent
/
punt.pb.go
454 lines (408 loc) · 13.9 KB
/
punt.pb.go
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: models/linux/punt/punt.proto
package linux_punt
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type PortBased_L4Protocol int32
const (
PortBased_UNDEFINED_L4 PortBased_L4Protocol = 0
PortBased_TCP PortBased_L4Protocol = 6
PortBased_UDP PortBased_L4Protocol = 17
)
var PortBased_L4Protocol_name = map[int32]string{
0: "UNDEFINED_L4",
6: "TCP",
17: "UDP",
}
var PortBased_L4Protocol_value = map[string]int32{
"UNDEFINED_L4": 0,
"TCP": 6,
"UDP": 17,
}
func (x PortBased_L4Protocol) String() string {
return proto.EnumName(PortBased_L4Protocol_name, int32(x))
}
func (PortBased_L4Protocol) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_8ef957478313ccf4, []int{1, 0}
}
type PortBased_L3Protocol int32
const (
PortBased_UNDEFINED_L3 PortBased_L3Protocol = 0
PortBased_IPv4 PortBased_L3Protocol = 1
PortBased_IPv6 PortBased_L3Protocol = 2
PortBased_ALL PortBased_L3Protocol = 3
)
var PortBased_L3Protocol_name = map[int32]string{
0: "UNDEFINED_L3",
1: "IPv4",
2: "IPv6",
3: "ALL",
}
var PortBased_L3Protocol_value = map[string]int32{
"UNDEFINED_L3": 0,
"IPv4": 1,
"IPv6": 2,
"ALL": 3,
}
func (x PortBased_L3Protocol) String() string {
return proto.EnumName(PortBased_L3Protocol_name, int32(x))
}
func (PortBased_L3Protocol) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_8ef957478313ccf4, []int{1, 1}
}
// Proxy allows to listen on network socket or unix domain socket, and resend to another network/unix domain socket
type Proxy struct {
// Types that are valid to be assigned to Rx:
// *Proxy_RxPort
// *Proxy_RxSocket
Rx isProxy_Rx `protobuf_oneof:"rx"`
// Types that are valid to be assigned to Tx:
// *Proxy_TxPort
// *Proxy_TxSocket
Tx isProxy_Tx `protobuf_oneof:"tx"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Proxy) Reset() { *m = Proxy{} }
func (m *Proxy) String() string { return proto.CompactTextString(m) }
func (*Proxy) ProtoMessage() {}
func (*Proxy) Descriptor() ([]byte, []int) {
return fileDescriptor_8ef957478313ccf4, []int{0}
}
func (m *Proxy) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Proxy.Unmarshal(m, b)
}
func (m *Proxy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Proxy.Marshal(b, m, deterministic)
}
func (m *Proxy) XXX_Merge(src proto.Message) {
xxx_messageInfo_Proxy.Merge(m, src)
}
func (m *Proxy) XXX_Size() int {
return xxx_messageInfo_Proxy.Size(m)
}
func (m *Proxy) XXX_DiscardUnknown() {
xxx_messageInfo_Proxy.DiscardUnknown(m)
}
var xxx_messageInfo_Proxy proto.InternalMessageInfo
type isProxy_Rx interface {
isProxy_Rx()
}
type isProxy_Tx interface {
isProxy_Tx()
}
type Proxy_RxPort struct {
RxPort *PortBased `protobuf:"bytes,1,opt,name=rx_port,json=rxPort,proto3,oneof"`
}
type Proxy_RxSocket struct {
RxSocket *SocketBased `protobuf:"bytes,2,opt,name=rx_socket,json=rxSocket,proto3,oneof"`
}
type Proxy_TxPort struct {
TxPort *PortBased `protobuf:"bytes,3,opt,name=tx_port,json=txPort,proto3,oneof"`
}
type Proxy_TxSocket struct {
TxSocket *SocketBased `protobuf:"bytes,4,opt,name=tx_socket,json=txSocket,proto3,oneof"`
}
func (*Proxy_RxPort) isProxy_Rx() {}
func (*Proxy_RxSocket) isProxy_Rx() {}
func (*Proxy_TxPort) isProxy_Tx() {}
func (*Proxy_TxSocket) isProxy_Tx() {}
func (m *Proxy) GetRx() isProxy_Rx {
if m != nil {
return m.Rx
}
return nil
}
func (m *Proxy) GetTx() isProxy_Tx {
if m != nil {
return m.Tx
}
return nil
}
func (m *Proxy) GetRxPort() *PortBased {
if x, ok := m.GetRx().(*Proxy_RxPort); ok {
return x.RxPort
}
return nil
}
func (m *Proxy) GetRxSocket() *SocketBased {
if x, ok := m.GetRx().(*Proxy_RxSocket); ok {
return x.RxSocket
}
return nil
}
func (m *Proxy) GetTxPort() *PortBased {
if x, ok := m.GetTx().(*Proxy_TxPort); ok {
return x.TxPort
}
return nil
}
func (m *Proxy) GetTxSocket() *SocketBased {
if x, ok := m.GetTx().(*Proxy_TxSocket); ok {
return x.TxSocket
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Proxy) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Proxy_OneofMarshaler, _Proxy_OneofUnmarshaler, _Proxy_OneofSizer, []interface{}{
(*Proxy_RxPort)(nil),
(*Proxy_RxSocket)(nil),
(*Proxy_TxPort)(nil),
(*Proxy_TxSocket)(nil),
}
}
func _Proxy_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Proxy)
// rx
switch x := m.Rx.(type) {
case *Proxy_RxPort:
_ = b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RxPort); err != nil {
return err
}
case *Proxy_RxSocket:
_ = b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RxSocket); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Proxy.Rx has unexpected type %T", x)
}
// tx
switch x := m.Tx.(type) {
case *Proxy_TxPort:
_ = b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TxPort); err != nil {
return err
}
case *Proxy_TxSocket:
_ = b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TxSocket); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Proxy.Tx has unexpected type %T", x)
}
return nil
}
func _Proxy_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Proxy)
switch tag {
case 1: // rx.rx_port
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(PortBased)
err := b.DecodeMessage(msg)
m.Rx = &Proxy_RxPort{msg}
return true, err
case 2: // rx.rx_socket
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(SocketBased)
err := b.DecodeMessage(msg)
m.Rx = &Proxy_RxSocket{msg}
return true, err
case 3: // tx.tx_port
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(PortBased)
err := b.DecodeMessage(msg)
m.Tx = &Proxy_TxPort{msg}
return true, err
case 4: // tx.tx_socket
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(SocketBased)
err := b.DecodeMessage(msg)
m.Tx = &Proxy_TxSocket{msg}
return true, err
default:
return false, nil
}
}
func _Proxy_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Proxy)
// rx
switch x := m.Rx.(type) {
case *Proxy_RxPort:
s := proto.Size(x.RxPort)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Proxy_RxSocket:
s := proto.Size(x.RxSocket)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
// tx
switch x := m.Tx.(type) {
case *Proxy_TxPort:
s := proto.Size(x.TxPort)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Proxy_TxSocket:
s := proto.Size(x.TxSocket)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func (*Proxy) XXX_MessageName() string {
return "linux.punt.Proxy"
}
// Define network socket type
type PortBased struct {
L4Protocol PortBased_L4Protocol `protobuf:"varint,1,opt,name=l4_protocol,json=l4Protocol,proto3,enum=linux.punt.PortBased_L4Protocol" json:"l4_protocol,omitempty"`
L3Protocol PortBased_L3Protocol `protobuf:"varint,3,opt,name=l3_protocol,json=l3Protocol,proto3,enum=linux.punt.PortBased_L3Protocol" json:"l3_protocol,omitempty"`
Port uint32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PortBased) Reset() { *m = PortBased{} }
func (m *PortBased) String() string { return proto.CompactTextString(m) }
func (*PortBased) ProtoMessage() {}
func (*PortBased) Descriptor() ([]byte, []int) {
return fileDescriptor_8ef957478313ccf4, []int{1}
}
func (m *PortBased) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PortBased.Unmarshal(m, b)
}
func (m *PortBased) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PortBased.Marshal(b, m, deterministic)
}
func (m *PortBased) XXX_Merge(src proto.Message) {
xxx_messageInfo_PortBased.Merge(m, src)
}
func (m *PortBased) XXX_Size() int {
return xxx_messageInfo_PortBased.Size(m)
}
func (m *PortBased) XXX_DiscardUnknown() {
xxx_messageInfo_PortBased.DiscardUnknown(m)
}
var xxx_messageInfo_PortBased proto.InternalMessageInfo
func (m *PortBased) GetL4Protocol() PortBased_L4Protocol {
if m != nil {
return m.L4Protocol
}
return PortBased_UNDEFINED_L4
}
func (m *PortBased) GetL3Protocol() PortBased_L3Protocol {
if m != nil {
return m.L3Protocol
}
return PortBased_UNDEFINED_L3
}
func (m *PortBased) GetPort() uint32 {
if m != nil {
return m.Port
}
return 0
}
func (*PortBased) XXX_MessageName() string {
return "linux.punt.PortBased"
}
// Define unix domain socket type for IPC
type SocketBased struct {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SocketBased) Reset() { *m = SocketBased{} }
func (m *SocketBased) String() string { return proto.CompactTextString(m) }
func (*SocketBased) ProtoMessage() {}
func (*SocketBased) Descriptor() ([]byte, []int) {
return fileDescriptor_8ef957478313ccf4, []int{2}
}
func (m *SocketBased) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SocketBased.Unmarshal(m, b)
}
func (m *SocketBased) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SocketBased.Marshal(b, m, deterministic)
}
func (m *SocketBased) XXX_Merge(src proto.Message) {
xxx_messageInfo_SocketBased.Merge(m, src)
}
func (m *SocketBased) XXX_Size() int {
return xxx_messageInfo_SocketBased.Size(m)
}
func (m *SocketBased) XXX_DiscardUnknown() {
xxx_messageInfo_SocketBased.DiscardUnknown(m)
}
var xxx_messageInfo_SocketBased proto.InternalMessageInfo
func (m *SocketBased) GetPath() string {
if m != nil {
return m.Path
}
return ""
}
func (*SocketBased) XXX_MessageName() string {
return "linux.punt.SocketBased"
}
func init() {
proto.RegisterEnum("linux.punt.PortBased_L4Protocol", PortBased_L4Protocol_name, PortBased_L4Protocol_value)
proto.RegisterEnum("linux.punt.PortBased_L3Protocol", PortBased_L3Protocol_name, PortBased_L3Protocol_value)
proto.RegisterType((*Proxy)(nil), "linux.punt.Proxy")
proto.RegisterType((*PortBased)(nil), "linux.punt.PortBased")
proto.RegisterType((*SocketBased)(nil), "linux.punt.SocketBased")
}
func init() { proto.RegisterFile("models/linux/punt/punt.proto", fileDescriptor_8ef957478313ccf4) }
var fileDescriptor_8ef957478313ccf4 = []byte{
// 394 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcf, 0x8e, 0xd3, 0x30,
0x10, 0xc6, 0x9b, 0x3f, 0x64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