1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
5 // source: /usr/share/vpp/api/plugins/nat44_ed.api.json
7 // Package nat44_ed contains generated bindings for API file nat44_ed.api.
19 api "git.fd.io/govpp.git/api"
20 interface_types "git.fd.io/govpp.git/binapi/interface_types"
21 ip_types "git.fd.io/govpp.git/binapi/ip_types"
22 nat_types "git.fd.io/govpp.git/binapi/nat_types"
23 codec "git.fd.io/govpp.git/codec"
26 // This is a compile-time assertion to ensure that this generated file
27 // is compatible with the GoVPP api package it is being compiled against.
28 // A compilation error at this line likely means your copy of the
29 // GoVPP api package needs to be updated.
30 const _ = api.GoVppAPIPackageIsVersion2
35 VersionCrc = 0xfd9ae40f
38 // Nat44ConfigFlags defines enum 'nat44_config_flags'.
39 type Nat44ConfigFlags uint8
42 NAT44_IS_ENDPOINT_INDEPENDENT Nat44ConfigFlags = 0
43 NAT44_IS_ENDPOINT_DEPENDENT Nat44ConfigFlags = 1
44 NAT44_IS_STATIC_MAPPING_ONLY Nat44ConfigFlags = 2
45 NAT44_IS_CONNECTION_TRACKING Nat44ConfigFlags = 4
46 NAT44_IS_OUT2IN_DPO Nat44ConfigFlags = 8
50 Nat44ConfigFlags_name = map[uint8]string{
51 0: "NAT44_IS_ENDPOINT_INDEPENDENT",
52 1: "NAT44_IS_ENDPOINT_DEPENDENT",
53 2: "NAT44_IS_STATIC_MAPPING_ONLY",
54 4: "NAT44_IS_CONNECTION_TRACKING",
55 8: "NAT44_IS_OUT2IN_DPO",
57 Nat44ConfigFlags_value = map[string]uint8{
58 "NAT44_IS_ENDPOINT_INDEPENDENT": 0,
59 "NAT44_IS_ENDPOINT_DEPENDENT": 1,
60 "NAT44_IS_STATIC_MAPPING_ONLY": 2,
61 "NAT44_IS_CONNECTION_TRACKING": 4,
62 "NAT44_IS_OUT2IN_DPO": 8,
66 func (x Nat44ConfigFlags) String() string {
67 s, ok := Nat44ConfigFlags_name[uint8(x)]
71 str := func(n uint8) string {
72 s, ok := Nat44ConfigFlags_name[uint8(n)]
76 return "Nat44ConfigFlags(" + strconv.Itoa(int(n)) + ")"
78 for i := uint8(0); i <= 8; i++ {
93 // Nat44LbAddrPort defines type 'nat44_lb_addr_port'.
94 type Nat44LbAddrPort struct {
95 Addr ip_types.IP4Address `binapi:"ip4_address,name=addr" json:"addr,omitempty"`
96 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
97 Probability uint8 `binapi:"u8,name=probability" json:"probability,omitempty"`
98 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
101 // Nat44AddDelAddressRange defines message 'nat44_add_del_address_range'.
102 type Nat44AddDelAddressRange struct {
103 FirstIPAddress ip_types.IP4Address `binapi:"ip4_address,name=first_ip_address" json:"first_ip_address,omitempty"`
104 LastIPAddress ip_types.IP4Address `binapi:"ip4_address,name=last_ip_address" json:"last_ip_address,omitempty"`
105 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
106 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
107 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
110 func (m *Nat44AddDelAddressRange) Reset() { *m = Nat44AddDelAddressRange{} }
111 func (*Nat44AddDelAddressRange) GetMessageName() string { return "nat44_add_del_address_range" }
112 func (*Nat44AddDelAddressRange) GetCrcString() string { return "6f2b8055" }
113 func (*Nat44AddDelAddressRange) GetMessageType() api.MessageType {
114 return api.RequestMessage
117 func (m *Nat44AddDelAddressRange) Size() (size int) {
121 size += 1 * 4 // m.FirstIPAddress
122 size += 1 * 4 // m.LastIPAddress
128 func (m *Nat44AddDelAddressRange) Marshal(b []byte) ([]byte, error) {
130 b = make([]byte, m.Size())
132 buf := codec.NewBuffer(b)
133 buf.EncodeBytes(m.FirstIPAddress[:], 4)
134 buf.EncodeBytes(m.LastIPAddress[:], 4)
135 buf.EncodeUint32(m.VrfID)
136 buf.EncodeBool(m.IsAdd)
137 buf.EncodeUint8(uint8(m.Flags))
138 return buf.Bytes(), nil
140 func (m *Nat44AddDelAddressRange) Unmarshal(b []byte) error {
141 buf := codec.NewBuffer(b)
142 copy(m.FirstIPAddress[:], buf.DecodeBytes(4))
143 copy(m.LastIPAddress[:], buf.DecodeBytes(4))
144 m.VrfID = buf.DecodeUint32()
145 m.IsAdd = buf.DecodeBool()
146 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
150 // Nat44AddDelAddressRangeReply defines message 'nat44_add_del_address_range_reply'.
151 type Nat44AddDelAddressRangeReply struct {
152 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
155 func (m *Nat44AddDelAddressRangeReply) Reset() { *m = Nat44AddDelAddressRangeReply{} }
156 func (*Nat44AddDelAddressRangeReply) GetMessageName() string {
157 return "nat44_add_del_address_range_reply"
159 func (*Nat44AddDelAddressRangeReply) GetCrcString() string { return "e8d4e804" }
160 func (*Nat44AddDelAddressRangeReply) GetMessageType() api.MessageType {
161 return api.ReplyMessage
164 func (m *Nat44AddDelAddressRangeReply) Size() (size int) {
168 size += 4 // m.Retval
171 func (m *Nat44AddDelAddressRangeReply) Marshal(b []byte) ([]byte, error) {
173 b = make([]byte, m.Size())
175 buf := codec.NewBuffer(b)
176 buf.EncodeInt32(m.Retval)
177 return buf.Bytes(), nil
179 func (m *Nat44AddDelAddressRangeReply) Unmarshal(b []byte) error {
180 buf := codec.NewBuffer(b)
181 m.Retval = buf.DecodeInt32()
185 // Nat44AddDelIdentityMapping defines message 'nat44_add_del_identity_mapping'.
186 type Nat44AddDelIdentityMapping struct {
187 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
188 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
189 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
190 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
191 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
192 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
193 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
194 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
197 func (m *Nat44AddDelIdentityMapping) Reset() { *m = Nat44AddDelIdentityMapping{} }
198 func (*Nat44AddDelIdentityMapping) GetMessageName() string { return "nat44_add_del_identity_mapping" }
199 func (*Nat44AddDelIdentityMapping) GetCrcString() string { return "02faaa22" }
200 func (*Nat44AddDelIdentityMapping) GetMessageType() api.MessageType {
201 return api.RequestMessage
204 func (m *Nat44AddDelIdentityMapping) Size() (size int) {
210 size += 1 * 4 // m.IPAddress
211 size += 1 // m.Protocol
213 size += 4 // m.SwIfIndex
218 func (m *Nat44AddDelIdentityMapping) Marshal(b []byte) ([]byte, error) {
220 b = make([]byte, m.Size())
222 buf := codec.NewBuffer(b)
223 buf.EncodeBool(m.IsAdd)
224 buf.EncodeUint8(uint8(m.Flags))
225 buf.EncodeBytes(m.IPAddress[:], 4)
226 buf.EncodeUint8(m.Protocol)
227 buf.EncodeUint16(m.Port)
228 buf.EncodeUint32(uint32(m.SwIfIndex))
229 buf.EncodeUint32(m.VrfID)
230 buf.EncodeString(m.Tag, 64)
231 return buf.Bytes(), nil
233 func (m *Nat44AddDelIdentityMapping) Unmarshal(b []byte) error {
234 buf := codec.NewBuffer(b)
235 m.IsAdd = buf.DecodeBool()
236 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
237 copy(m.IPAddress[:], buf.DecodeBytes(4))
238 m.Protocol = buf.DecodeUint8()
239 m.Port = buf.DecodeUint16()
240 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
241 m.VrfID = buf.DecodeUint32()
242 m.Tag = buf.DecodeString(64)
246 // Nat44AddDelIdentityMappingReply defines message 'nat44_add_del_identity_mapping_reply'.
247 type Nat44AddDelIdentityMappingReply struct {
248 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
251 func (m *Nat44AddDelIdentityMappingReply) Reset() { *m = Nat44AddDelIdentityMappingReply{} }
252 func (*Nat44AddDelIdentityMappingReply) GetMessageName() string {
253 return "nat44_add_del_identity_mapping_reply"
255 func (*Nat44AddDelIdentityMappingReply) GetCrcString() string { return "e8d4e804" }
256 func (*Nat44AddDelIdentityMappingReply) GetMessageType() api.MessageType {
257 return api.ReplyMessage
260 func (m *Nat44AddDelIdentityMappingReply) Size() (size int) {
264 size += 4 // m.Retval
267 func (m *Nat44AddDelIdentityMappingReply) Marshal(b []byte) ([]byte, error) {
269 b = make([]byte, m.Size())
271 buf := codec.NewBuffer(b)
272 buf.EncodeInt32(m.Retval)
273 return buf.Bytes(), nil
275 func (m *Nat44AddDelIdentityMappingReply) Unmarshal(b []byte) error {
276 buf := codec.NewBuffer(b)
277 m.Retval = buf.DecodeInt32()
281 // Nat44AddDelInterfaceAddr defines message 'nat44_add_del_interface_addr'.
282 type Nat44AddDelInterfaceAddr struct {
283 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
284 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
285 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
288 func (m *Nat44AddDelInterfaceAddr) Reset() { *m = Nat44AddDelInterfaceAddr{} }
289 func (*Nat44AddDelInterfaceAddr) GetMessageName() string { return "nat44_add_del_interface_addr" }
290 func (*Nat44AddDelInterfaceAddr) GetCrcString() string { return "4aed50c0" }
291 func (*Nat44AddDelInterfaceAddr) GetMessageType() api.MessageType {
292 return api.RequestMessage
295 func (m *Nat44AddDelInterfaceAddr) Size() (size int) {
300 size += 4 // m.SwIfIndex
304 func (m *Nat44AddDelInterfaceAddr) Marshal(b []byte) ([]byte, error) {
306 b = make([]byte, m.Size())
308 buf := codec.NewBuffer(b)
309 buf.EncodeBool(m.IsAdd)
310 buf.EncodeUint32(uint32(m.SwIfIndex))
311 buf.EncodeUint8(uint8(m.Flags))
312 return buf.Bytes(), nil
314 func (m *Nat44AddDelInterfaceAddr) Unmarshal(b []byte) error {
315 buf := codec.NewBuffer(b)
316 m.IsAdd = buf.DecodeBool()
317 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
318 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
322 // Nat44AddDelInterfaceAddrReply defines message 'nat44_add_del_interface_addr_reply'.
323 type Nat44AddDelInterfaceAddrReply struct {
324 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
327 func (m *Nat44AddDelInterfaceAddrReply) Reset() { *m = Nat44AddDelInterfaceAddrReply{} }
328 func (*Nat44AddDelInterfaceAddrReply) GetMessageName() string {
329 return "nat44_add_del_interface_addr_reply"
331 func (*Nat44AddDelInterfaceAddrReply) GetCrcString() string { return "e8d4e804" }
332 func (*Nat44AddDelInterfaceAddrReply) GetMessageType() api.MessageType {
333 return api.ReplyMessage
336 func (m *Nat44AddDelInterfaceAddrReply) Size() (size int) {
340 size += 4 // m.Retval
343 func (m *Nat44AddDelInterfaceAddrReply) Marshal(b []byte) ([]byte, error) {
345 b = make([]byte, m.Size())
347 buf := codec.NewBuffer(b)
348 buf.EncodeInt32(m.Retval)
349 return buf.Bytes(), nil
351 func (m *Nat44AddDelInterfaceAddrReply) Unmarshal(b []byte) error {
352 buf := codec.NewBuffer(b)
353 m.Retval = buf.DecodeInt32()
357 // Nat44AddDelLbStaticMapping defines message 'nat44_add_del_lb_static_mapping'.
358 type Nat44AddDelLbStaticMapping struct {
359 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
360 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
361 ExternalAddr ip_types.IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"`
362 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"`
363 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
364 Affinity uint32 `binapi:"u32,name=affinity" json:"affinity,omitempty"`
365 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
366 LocalNum uint32 `binapi:"u32,name=local_num" json:"-"`
367 Locals []Nat44LbAddrPort `binapi:"nat44_lb_addr_port[local_num],name=locals" json:"locals,omitempty"`
370 func (m *Nat44AddDelLbStaticMapping) Reset() { *m = Nat44AddDelLbStaticMapping{} }
371 func (*Nat44AddDelLbStaticMapping) GetMessageName() string { return "nat44_add_del_lb_static_mapping" }
372 func (*Nat44AddDelLbStaticMapping) GetCrcString() string { return "4f68ee9d" }
373 func (*Nat44AddDelLbStaticMapping) GetMessageType() api.MessageType {
374 return api.RequestMessage
377 func (m *Nat44AddDelLbStaticMapping) Size() (size int) {
383 size += 1 * 4 // m.ExternalAddr
384 size += 2 // m.ExternalPort
385 size += 1 // m.Protocol
386 size += 4 // m.Affinity
388 size += 4 // m.LocalNum
389 for j1 := 0; j1 < len(m.Locals); j1++ {
390 var s1 Nat44LbAddrPort
392 if j1 < len(m.Locals) {
395 size += 1 * 4 // s1.Addr
397 size += 1 // s1.Probability
398 size += 4 // s1.VrfID
402 func (m *Nat44AddDelLbStaticMapping) Marshal(b []byte) ([]byte, error) {
404 b = make([]byte, m.Size())
406 buf := codec.NewBuffer(b)
407 buf.EncodeBool(m.IsAdd)
408 buf.EncodeUint8(uint8(m.Flags))
409 buf.EncodeBytes(m.ExternalAddr[:], 4)
410 buf.EncodeUint16(m.ExternalPort)
411 buf.EncodeUint8(m.Protocol)
412 buf.EncodeUint32(m.Affinity)
413 buf.EncodeString(m.Tag, 64)
414 buf.EncodeUint32(uint32(len(m.Locals)))
415 for j0 := 0; j0 < len(m.Locals); j0++ {
416 var v0 Nat44LbAddrPort // Locals
417 if j0 < len(m.Locals) {
420 buf.EncodeBytes(v0.Addr[:], 4)
421 buf.EncodeUint16(v0.Port)
422 buf.EncodeUint8(v0.Probability)
423 buf.EncodeUint32(v0.VrfID)
425 return buf.Bytes(), nil
427 func (m *Nat44AddDelLbStaticMapping) Unmarshal(b []byte) error {
428 buf := codec.NewBuffer(b)
429 m.IsAdd = buf.DecodeBool()
430 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
431 copy(m.ExternalAddr[:], buf.DecodeBytes(4))
432 m.ExternalPort = buf.DecodeUint16()
433 m.Protocol = buf.DecodeUint8()
434 m.Affinity = buf.DecodeUint32()
435 m.Tag = buf.DecodeString(64)
436 m.LocalNum = buf.DecodeUint32()
437 m.Locals = make([]Nat44LbAddrPort, m.LocalNum)
438 for j0 := 0; j0 < len(m.Locals); j0++ {
439 copy(m.Locals[j0].Addr[:], buf.DecodeBytes(4))
440 m.Locals[j0].Port = buf.DecodeUint16()
441 m.Locals[j0].Probability = buf.DecodeUint8()
442 m.Locals[j0].VrfID = buf.DecodeUint32()
447 // Nat44AddDelLbStaticMappingReply defines message 'nat44_add_del_lb_static_mapping_reply'.
448 type Nat44AddDelLbStaticMappingReply struct {
449 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
452 func (m *Nat44AddDelLbStaticMappingReply) Reset() { *m = Nat44AddDelLbStaticMappingReply{} }
453 func (*Nat44AddDelLbStaticMappingReply) GetMessageName() string {
454 return "nat44_add_del_lb_static_mapping_reply"
456 func (*Nat44AddDelLbStaticMappingReply) GetCrcString() string { return "e8d4e804" }
457 func (*Nat44AddDelLbStaticMappingReply) GetMessageType() api.MessageType {
458 return api.ReplyMessage
461 func (m *Nat44AddDelLbStaticMappingReply) Size() (size int) {
465 size += 4 // m.Retval
468 func (m *Nat44AddDelLbStaticMappingReply) Marshal(b []byte) ([]byte, error) {
470 b = make([]byte, m.Size())
472 buf := codec.NewBuffer(b)
473 buf.EncodeInt32(m.Retval)
474 return buf.Bytes(), nil
476 func (m *Nat44AddDelLbStaticMappingReply) Unmarshal(b []byte) error {
477 buf := codec.NewBuffer(b)
478 m.Retval = buf.DecodeInt32()
482 // Nat44AddDelStaticMapping defines message 'nat44_add_del_static_mapping'.
483 type Nat44AddDelStaticMapping struct {
484 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
485 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
486 LocalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"`
487 ExternalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"`
488 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
489 LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"`
490 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"`
491 ExternalSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"`
492 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
493 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
496 func (m *Nat44AddDelStaticMapping) Reset() { *m = Nat44AddDelStaticMapping{} }
497 func (*Nat44AddDelStaticMapping) GetMessageName() string { return "nat44_add_del_static_mapping" }
498 func (*Nat44AddDelStaticMapping) GetCrcString() string { return "5ae5f03e" }
499 func (*Nat44AddDelStaticMapping) GetMessageType() api.MessageType {
500 return api.RequestMessage
503 func (m *Nat44AddDelStaticMapping) Size() (size int) {
509 size += 1 * 4 // m.LocalIPAddress
510 size += 1 * 4 // m.ExternalIPAddress
511 size += 1 // m.Protocol
512 size += 2 // m.LocalPort
513 size += 2 // m.ExternalPort
514 size += 4 // m.ExternalSwIfIndex
519 func (m *Nat44AddDelStaticMapping) Marshal(b []byte) ([]byte, error) {
521 b = make([]byte, m.Size())
523 buf := codec.NewBuffer(b)
524 buf.EncodeBool(m.IsAdd)
525 buf.EncodeUint8(uint8(m.Flags))
526 buf.EncodeBytes(m.LocalIPAddress[:], 4)
527 buf.EncodeBytes(m.ExternalIPAddress[:], 4)
528 buf.EncodeUint8(m.Protocol)
529 buf.EncodeUint16(m.LocalPort)
530 buf.EncodeUint16(m.ExternalPort)
531 buf.EncodeUint32(uint32(m.ExternalSwIfIndex))
532 buf.EncodeUint32(m.VrfID)
533 buf.EncodeString(m.Tag, 64)
534 return buf.Bytes(), nil
536 func (m *Nat44AddDelStaticMapping) Unmarshal(b []byte) error {
537 buf := codec.NewBuffer(b)
538 m.IsAdd = buf.DecodeBool()
539 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
540 copy(m.LocalIPAddress[:], buf.DecodeBytes(4))
541 copy(m.ExternalIPAddress[:], buf.DecodeBytes(4))
542 m.Protocol = buf.DecodeUint8()
543 m.LocalPort = buf.DecodeUint16()
544 m.ExternalPort = buf.DecodeUint16()
545 m.ExternalSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
546 m.VrfID = buf.DecodeUint32()
547 m.Tag = buf.DecodeString(64)
551 // Nat44AddDelStaticMappingReply defines message 'nat44_add_del_static_mapping_reply'.
552 type Nat44AddDelStaticMappingReply struct {
553 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
556 func (m *Nat44AddDelStaticMappingReply) Reset() { *m = Nat44AddDelStaticMappingReply{} }
557 func (*Nat44AddDelStaticMappingReply) GetMessageName() string {
558 return "nat44_add_del_static_mapping_reply"
560 func (*Nat44AddDelStaticMappingReply) GetCrcString() string { return "e8d4e804" }
561 func (*Nat44AddDelStaticMappingReply) GetMessageType() api.MessageType {
562 return api.ReplyMessage
565 func (m *Nat44AddDelStaticMappingReply) Size() (size int) {
569 size += 4 // m.Retval
572 func (m *Nat44AddDelStaticMappingReply) Marshal(b []byte) ([]byte, error) {
574 b = make([]byte, m.Size())
576 buf := codec.NewBuffer(b)
577 buf.EncodeInt32(m.Retval)
578 return buf.Bytes(), nil
580 func (m *Nat44AddDelStaticMappingReply) Unmarshal(b []byte) error {
581 buf := codec.NewBuffer(b)
582 m.Retval = buf.DecodeInt32()
586 // Nat44AddDelStaticMappingV2 defines message 'nat44_add_del_static_mapping_v2'.
587 // InProgress: the message form may change in the future versions
588 type Nat44AddDelStaticMappingV2 struct {
589 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
590 MatchPool bool `binapi:"bool,name=match_pool" json:"match_pool,omitempty"`
591 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
592 PoolIPAddress ip_types.IP4Address `binapi:"ip4_address,name=pool_ip_address" json:"pool_ip_address,omitempty"`
593 LocalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"`
594 ExternalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"`
595 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
596 LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"`
597 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"`
598 ExternalSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"`
599 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
600 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
603 func (m *Nat44AddDelStaticMappingV2) Reset() { *m = Nat44AddDelStaticMappingV2{} }
604 func (*Nat44AddDelStaticMappingV2) GetMessageName() string { return "nat44_add_del_static_mapping_v2" }
605 func (*Nat44AddDelStaticMappingV2) GetCrcString() string { return "5e205f1a" }
606 func (*Nat44AddDelStaticMappingV2) GetMessageType() api.MessageType {
607 return api.RequestMessage
610 func (m *Nat44AddDelStaticMappingV2) Size() (size int) {
615 size += 1 // m.MatchPool
617 size += 1 * 4 // m.PoolIPAddress
618 size += 1 * 4 // m.LocalIPAddress
619 size += 1 * 4 // m.ExternalIPAddress
620 size += 1 // m.Protocol
621 size += 2 // m.LocalPort
622 size += 2 // m.ExternalPort
623 size += 4 // m.ExternalSwIfIndex
628 func (m *Nat44AddDelStaticMappingV2) Marshal(b []byte) ([]byte, error) {
630 b = make([]byte, m.Size())
632 buf := codec.NewBuffer(b)
633 buf.EncodeBool(m.IsAdd)
634 buf.EncodeBool(m.MatchPool)
635 buf.EncodeUint8(uint8(m.Flags))
636 buf.EncodeBytes(m.PoolIPAddress[:], 4)
637 buf.EncodeBytes(m.LocalIPAddress[:], 4)
638 buf.EncodeBytes(m.ExternalIPAddress[:], 4)
639 buf.EncodeUint8(m.Protocol)
640 buf.EncodeUint16(m.LocalPort)
641 buf.EncodeUint16(m.ExternalPort)
642 buf.EncodeUint32(uint32(m.ExternalSwIfIndex))
643 buf.EncodeUint32(m.VrfID)
644 buf.EncodeString(m.Tag, 64)
645 return buf.Bytes(), nil
647 func (m *Nat44AddDelStaticMappingV2) Unmarshal(b []byte) error {
648 buf := codec.NewBuffer(b)
649 m.IsAdd = buf.DecodeBool()
650 m.MatchPool = buf.DecodeBool()
651 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
652 copy(m.PoolIPAddress[:], buf.DecodeBytes(4))
653 copy(m.LocalIPAddress[:], buf.DecodeBytes(4))
654 copy(m.ExternalIPAddress[:], buf.DecodeBytes(4))
655 m.Protocol = buf.DecodeUint8()
656 m.LocalPort = buf.DecodeUint16()
657 m.ExternalPort = buf.DecodeUint16()
658 m.ExternalSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
659 m.VrfID = buf.DecodeUint32()
660 m.Tag = buf.DecodeString(64)
664 // Nat44AddDelStaticMappingV2Reply defines message 'nat44_add_del_static_mapping_v2_reply'.
665 // InProgress: the message form may change in the future versions
666 type Nat44AddDelStaticMappingV2Reply struct {
667 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
670 func (m *Nat44AddDelStaticMappingV2Reply) Reset() { *m = Nat44AddDelStaticMappingV2Reply{} }
671 func (*Nat44AddDelStaticMappingV2Reply) GetMessageName() string {
672 return "nat44_add_del_static_mapping_v2_reply"
674 func (*Nat44AddDelStaticMappingV2Reply) GetCrcString() string { return "e8d4e804" }
675 func (*Nat44AddDelStaticMappingV2Reply) GetMessageType() api.MessageType {
676 return api.ReplyMessage
679 func (m *Nat44AddDelStaticMappingV2Reply) Size() (size int) {
683 size += 4 // m.Retval
686 func (m *Nat44AddDelStaticMappingV2Reply) Marshal(b []byte) ([]byte, error) {
688 b = make([]byte, m.Size())
690 buf := codec.NewBuffer(b)
691 buf.EncodeInt32(m.Retval)
692 return buf.Bytes(), nil
694 func (m *Nat44AddDelStaticMappingV2Reply) Unmarshal(b []byte) error {
695 buf := codec.NewBuffer(b)
696 m.Retval = buf.DecodeInt32()
700 // Nat44AddressDetails defines message 'nat44_address_details'.
701 type Nat44AddressDetails struct {
702 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
703 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
704 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
707 func (m *Nat44AddressDetails) Reset() { *m = Nat44AddressDetails{} }
708 func (*Nat44AddressDetails) GetMessageName() string { return "nat44_address_details" }
709 func (*Nat44AddressDetails) GetCrcString() string { return "0d1beac1" }
710 func (*Nat44AddressDetails) GetMessageType() api.MessageType {
711 return api.ReplyMessage
714 func (m *Nat44AddressDetails) Size() (size int) {
718 size += 1 * 4 // m.IPAddress
723 func (m *Nat44AddressDetails) Marshal(b []byte) ([]byte, error) {
725 b = make([]byte, m.Size())
727 buf := codec.NewBuffer(b)
728 buf.EncodeBytes(m.IPAddress[:], 4)
729 buf.EncodeUint8(uint8(m.Flags))
730 buf.EncodeUint32(m.VrfID)
731 return buf.Bytes(), nil
733 func (m *Nat44AddressDetails) Unmarshal(b []byte) error {
734 buf := codec.NewBuffer(b)
735 copy(m.IPAddress[:], buf.DecodeBytes(4))
736 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
737 m.VrfID = buf.DecodeUint32()
741 // Nat44AddressDump defines message 'nat44_address_dump'.
742 type Nat44AddressDump struct{}
744 func (m *Nat44AddressDump) Reset() { *m = Nat44AddressDump{} }
745 func (*Nat44AddressDump) GetMessageName() string { return "nat44_address_dump" }
746 func (*Nat44AddressDump) GetCrcString() string { return "51077d14" }
747 func (*Nat44AddressDump) GetMessageType() api.MessageType {
748 return api.RequestMessage
751 func (m *Nat44AddressDump) Size() (size int) {
757 func (m *Nat44AddressDump) Marshal(b []byte) ([]byte, error) {
759 b = make([]byte, m.Size())
761 buf := codec.NewBuffer(b)
762 return buf.Bytes(), nil
764 func (m *Nat44AddressDump) Unmarshal(b []byte) error {
768 // Nat44DelSession defines message 'nat44_del_session'.
769 type Nat44DelSession struct {
770 Address ip_types.IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
771 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
772 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
773 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
774 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
775 ExtHostAddress ip_types.IP4Address `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"`
776 ExtHostPort uint16 `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"`
779 func (m *Nat44DelSession) Reset() { *m = Nat44DelSession{} }
780 func (*Nat44DelSession) GetMessageName() string { return "nat44_del_session" }
781 func (*Nat44DelSession) GetCrcString() string { return "15a5bf8c" }
782 func (*Nat44DelSession) GetMessageType() api.MessageType {
783 return api.RequestMessage
786 func (m *Nat44DelSession) Size() (size int) {
790 size += 1 * 4 // m.Address
791 size += 1 // m.Protocol
795 size += 1 * 4 // m.ExtHostAddress
796 size += 2 // m.ExtHostPort
799 func (m *Nat44DelSession) Marshal(b []byte) ([]byte, error) {
801 b = make([]byte, m.Size())
803 buf := codec.NewBuffer(b)
804 buf.EncodeBytes(m.Address[:], 4)
805 buf.EncodeUint8(m.Protocol)
806 buf.EncodeUint16(m.Port)
807 buf.EncodeUint32(m.VrfID)
808 buf.EncodeUint8(uint8(m.Flags))
809 buf.EncodeBytes(m.ExtHostAddress[:], 4)
810 buf.EncodeUint16(m.ExtHostPort)
811 return buf.Bytes(), nil
813 func (m *Nat44DelSession) Unmarshal(b []byte) error {
814 buf := codec.NewBuffer(b)
815 copy(m.Address[:], buf.DecodeBytes(4))
816 m.Protocol = buf.DecodeUint8()
817 m.Port = buf.DecodeUint16()
818 m.VrfID = buf.DecodeUint32()
819 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
820 copy(m.ExtHostAddress[:], buf.DecodeBytes(4))
821 m.ExtHostPort = buf.DecodeUint16()
825 // Nat44DelSessionReply defines message 'nat44_del_session_reply'.
826 type Nat44DelSessionReply struct {
827 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
830 func (m *Nat44DelSessionReply) Reset() { *m = Nat44DelSessionReply{} }
831 func (*Nat44DelSessionReply) GetMessageName() string { return "nat44_del_session_reply" }
832 func (*Nat44DelSessionReply) GetCrcString() string { return "e8d4e804" }
833 func (*Nat44DelSessionReply) GetMessageType() api.MessageType {
834 return api.ReplyMessage
837 func (m *Nat44DelSessionReply) Size() (size int) {
841 size += 4 // m.Retval
844 func (m *Nat44DelSessionReply) Marshal(b []byte) ([]byte, error) {
846 b = make([]byte, m.Size())
848 buf := codec.NewBuffer(b)
849 buf.EncodeInt32(m.Retval)
850 return buf.Bytes(), nil
852 func (m *Nat44DelSessionReply) Unmarshal(b []byte) error {
853 buf := codec.NewBuffer(b)
854 m.Retval = buf.DecodeInt32()
858 // Nat44DelUser defines message 'nat44_del_user'.
859 type Nat44DelUser struct {
860 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
861 FibIndex uint32 `binapi:"u32,name=fib_index" json:"fib_index,omitempty"`
864 func (m *Nat44DelUser) Reset() { *m = Nat44DelUser{} }
865 func (*Nat44DelUser) GetMessageName() string { return "nat44_del_user" }
866 func (*Nat44DelUser) GetCrcString() string { return "99a9f998" }
867 func (*Nat44DelUser) GetMessageType() api.MessageType {
868 return api.RequestMessage
871 func (m *Nat44DelUser) Size() (size int) {
875 size += 1 * 4 // m.IPAddress
876 size += 4 // m.FibIndex
879 func (m *Nat44DelUser) Marshal(b []byte) ([]byte, error) {
881 b = make([]byte, m.Size())
883 buf := codec.NewBuffer(b)
884 buf.EncodeBytes(m.IPAddress[:], 4)
885 buf.EncodeUint32(m.FibIndex)
886 return buf.Bytes(), nil
888 func (m *Nat44DelUser) Unmarshal(b []byte) error {
889 buf := codec.NewBuffer(b)
890 copy(m.IPAddress[:], buf.DecodeBytes(4))
891 m.FibIndex = buf.DecodeUint32()
895 // Nat44DelUserReply defines message 'nat44_del_user_reply'.
896 type Nat44DelUserReply struct {
897 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
900 func (m *Nat44DelUserReply) Reset() { *m = Nat44DelUserReply{} }
901 func (*Nat44DelUserReply) GetMessageName() string { return "nat44_del_user_reply" }
902 func (*Nat44DelUserReply) GetCrcString() string { return "e8d4e804" }
903 func (*Nat44DelUserReply) GetMessageType() api.MessageType {
904 return api.ReplyMessage
907 func (m *Nat44DelUserReply) Size() (size int) {
911 size += 4 // m.Retval
914 func (m *Nat44DelUserReply) Marshal(b []byte) ([]byte, error) {
916 b = make([]byte, m.Size())
918 buf := codec.NewBuffer(b)
919 buf.EncodeInt32(m.Retval)
920 return buf.Bytes(), nil
922 func (m *Nat44DelUserReply) Unmarshal(b []byte) error {
923 buf := codec.NewBuffer(b)
924 m.Retval = buf.DecodeInt32()
928 // Nat44EdPluginEnableDisable defines message 'nat44_ed_plugin_enable_disable'.
929 // InProgress: the message form may change in the future versions
930 type Nat44EdPluginEnableDisable struct {
931 InsideVrf uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"`
932 OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"`
933 Sessions uint32 `binapi:"u32,name=sessions" json:"sessions,omitempty"`
934 SessionMemory uint32 `binapi:"u32,name=session_memory" json:"session_memory,omitempty"`
935 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
936 Flags Nat44ConfigFlags `binapi:"nat44_config_flags,name=flags" json:"flags,omitempty"`
939 func (m *Nat44EdPluginEnableDisable) Reset() { *m = Nat44EdPluginEnableDisable{} }
940 func (*Nat44EdPluginEnableDisable) GetMessageName() string { return "nat44_ed_plugin_enable_disable" }
941 func (*Nat44EdPluginEnableDisable) GetCrcString() string { return "be17f8dd" }
942 func (*Nat44EdPluginEnableDisable) GetMessageType() api.MessageType {
943 return api.RequestMessage
946 func (m *Nat44EdPluginEnableDisable) Size() (size int) {
950 size += 4 // m.InsideVrf
951 size += 4 // m.OutsideVrf
952 size += 4 // m.Sessions
953 size += 4 // m.SessionMemory
954 size += 1 // m.Enable
958 func (m *Nat44EdPluginEnableDisable) Marshal(b []byte) ([]byte, error) {
960 b = make([]byte, m.Size())
962 buf := codec.NewBuffer(b)
963 buf.EncodeUint32(m.InsideVrf)
964 buf.EncodeUint32(m.OutsideVrf)
965 buf.EncodeUint32(m.Sessions)
966 buf.EncodeUint32(m.SessionMemory)
967 buf.EncodeBool(m.Enable)
968 buf.EncodeUint8(uint8(m.Flags))
969 return buf.Bytes(), nil
971 func (m *Nat44EdPluginEnableDisable) Unmarshal(b []byte) error {
972 buf := codec.NewBuffer(b)
973 m.InsideVrf = buf.DecodeUint32()
974 m.OutsideVrf = buf.DecodeUint32()
975 m.Sessions = buf.DecodeUint32()
976 m.SessionMemory = buf.DecodeUint32()
977 m.Enable = buf.DecodeBool()
978 m.Flags = Nat44ConfigFlags(buf.DecodeUint8())
982 // Nat44EdPluginEnableDisableReply defines message 'nat44_ed_plugin_enable_disable_reply'.
983 // InProgress: the message form may change in the future versions
984 type Nat44EdPluginEnableDisableReply struct {
985 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
988 func (m *Nat44EdPluginEnableDisableReply) Reset() { *m = Nat44EdPluginEnableDisableReply{} }
989 func (*Nat44EdPluginEnableDisableReply) GetMessageName() string {
990 return "nat44_ed_plugin_enable_disable_reply"
992 func (*Nat44EdPluginEnableDisableReply) GetCrcString() string { return "e8d4e804" }
993 func (*Nat44EdPluginEnableDisableReply) GetMessageType() api.MessageType {
994 return api.ReplyMessage
997 func (m *Nat44EdPluginEnableDisableReply) Size() (size int) {
1001 size += 4 // m.Retval
1004 func (m *Nat44EdPluginEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1006 b = make([]byte, m.Size())
1008 buf := codec.NewBuffer(b)
1009 buf.EncodeInt32(m.Retval)
1010 return buf.Bytes(), nil
1012 func (m *Nat44EdPluginEnableDisableReply) Unmarshal(b []byte) error {
1013 buf := codec.NewBuffer(b)
1014 m.Retval = buf.DecodeInt32()
1018 // Nat44EdSetFqOptions defines message 'nat44_ed_set_fq_options'.
1019 // InProgress: the message form may change in the future versions
1020 type Nat44EdSetFqOptions struct {
1021 FrameQueueNelts uint32 `binapi:"u32,name=frame_queue_nelts" json:"frame_queue_nelts,omitempty"`
1024 func (m *Nat44EdSetFqOptions) Reset() { *m = Nat44EdSetFqOptions{} }
1025 func (*Nat44EdSetFqOptions) GetMessageName() string { return "nat44_ed_set_fq_options" }
1026 func (*Nat44EdSetFqOptions) GetCrcString() string { return "2399bd71" }
1027 func (*Nat44EdSetFqOptions) GetMessageType() api.MessageType {
1028 return api.RequestMessage
1031 func (m *Nat44EdSetFqOptions) Size() (size int) {
1035 size += 4 // m.FrameQueueNelts
1038 func (m *Nat44EdSetFqOptions) Marshal(b []byte) ([]byte, error) {
1040 b = make([]byte, m.Size())
1042 buf := codec.NewBuffer(b)
1043 buf.EncodeUint32(m.FrameQueueNelts)
1044 return buf.Bytes(), nil
1046 func (m *Nat44EdSetFqOptions) Unmarshal(b []byte) error {
1047 buf := codec.NewBuffer(b)
1048 m.FrameQueueNelts = buf.DecodeUint32()
1052 // Nat44EdSetFqOptionsReply defines message 'nat44_ed_set_fq_options_reply'.
1053 // InProgress: the message form may change in the future versions
1054 type Nat44EdSetFqOptionsReply struct {
1055 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1058 func (m *Nat44EdSetFqOptionsReply) Reset() { *m = Nat44EdSetFqOptionsReply{} }
1059 func (*Nat44EdSetFqOptionsReply) GetMessageName() string { return "nat44_ed_set_fq_options_reply" }
1060 func (*Nat44EdSetFqOptionsReply) GetCrcString() string { return "e8d4e804" }
1061 func (*Nat44EdSetFqOptionsReply) GetMessageType() api.MessageType {
1062 return api.ReplyMessage
1065 func (m *Nat44EdSetFqOptionsReply) Size() (size int) {
1069 size += 4 // m.Retval
1072 func (m *Nat44EdSetFqOptionsReply) Marshal(b []byte) ([]byte, error) {
1074 b = make([]byte, m.Size())
1076 buf := codec.NewBuffer(b)
1077 buf.EncodeInt32(m.Retval)
1078 return buf.Bytes(), nil
1080 func (m *Nat44EdSetFqOptionsReply) Unmarshal(b []byte) error {
1081 buf := codec.NewBuffer(b)
1082 m.Retval = buf.DecodeInt32()
1086 // Nat44EdShowFqOptions defines message 'nat44_ed_show_fq_options'.
1087 // InProgress: the message form may change in the future versions
1088 type Nat44EdShowFqOptions struct{}
1090 func (m *Nat44EdShowFqOptions) Reset() { *m = Nat44EdShowFqOptions{} }
1091 func (*Nat44EdShowFqOptions) GetMessageName() string { return "nat44_ed_show_fq_options" }
1092 func (*Nat44EdShowFqOptions) GetCrcString() string { return "51077d14" }
1093 func (*Nat44EdShowFqOptions) GetMessageType() api.MessageType {
1094 return api.RequestMessage
1097 func (m *Nat44EdShowFqOptions) Size() (size int) {
1103 func (m *Nat44EdShowFqOptions) Marshal(b []byte) ([]byte, error) {
1105 b = make([]byte, m.Size())
1107 buf := codec.NewBuffer(b)
1108 return buf.Bytes(), nil
1110 func (m *Nat44EdShowFqOptions) Unmarshal(b []byte) error {
1114 // Nat44EdShowFqOptionsReply defines message 'nat44_ed_show_fq_options_reply'.
1115 // InProgress: the message form may change in the future versions
1116 type Nat44EdShowFqOptionsReply struct {
1117 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1118 FrameQueueNelts uint32 `binapi:"u32,name=frame_queue_nelts" json:"frame_queue_nelts,omitempty"`
1121 func (m *Nat44EdShowFqOptionsReply) Reset() { *m = Nat44EdShowFqOptionsReply{} }
1122 func (*Nat44EdShowFqOptionsReply) GetMessageName() string { return "nat44_ed_show_fq_options_reply" }
1123 func (*Nat44EdShowFqOptionsReply) GetCrcString() string { return "7213b545" }
1124 func (*Nat44EdShowFqOptionsReply) GetMessageType() api.MessageType {
1125 return api.ReplyMessage
1128 func (m *Nat44EdShowFqOptionsReply) Size() (size int) {
1132 size += 4 // m.Retval
1133 size += 4 // m.FrameQueueNelts
1136 func (m *Nat44EdShowFqOptionsReply) Marshal(b []byte) ([]byte, error) {
1138 b = make([]byte, m.Size())
1140 buf := codec.NewBuffer(b)
1141 buf.EncodeInt32(m.Retval)
1142 buf.EncodeUint32(m.FrameQueueNelts)
1143 return buf.Bytes(), nil
1145 func (m *Nat44EdShowFqOptionsReply) Unmarshal(b []byte) error {
1146 buf := codec.NewBuffer(b)
1147 m.Retval = buf.DecodeInt32()
1148 m.FrameQueueNelts = buf.DecodeUint32()
1152 // Nat44ForwardingEnableDisable defines message 'nat44_forwarding_enable_disable'.
1153 // Deprecated: the message will be removed in the future versions
1154 type Nat44ForwardingEnableDisable struct {
1155 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
1158 func (m *Nat44ForwardingEnableDisable) Reset() { *m = Nat44ForwardingEnableDisable{} }
1159 func (*Nat44ForwardingEnableDisable) GetMessageName() string {
1160 return "nat44_forwarding_enable_disable"
1162 func (*Nat44ForwardingEnableDisable) GetCrcString() string { return "b3e225d2" }
1163 func (*Nat44ForwardingEnableDisable) GetMessageType() api.MessageType {
1164 return api.RequestMessage
1167 func (m *Nat44ForwardingEnableDisable) Size() (size int) {
1171 size += 1 // m.Enable
1174 func (m *Nat44ForwardingEnableDisable) Marshal(b []byte) ([]byte, error) {
1176 b = make([]byte, m.Size())
1178 buf := codec.NewBuffer(b)
1179 buf.EncodeBool(m.Enable)
1180 return buf.Bytes(), nil
1182 func (m *Nat44ForwardingEnableDisable) Unmarshal(b []byte) error {
1183 buf := codec.NewBuffer(b)
1184 m.Enable = buf.DecodeBool()
1188 // Nat44ForwardingEnableDisableReply defines message 'nat44_forwarding_enable_disable_reply'.
1189 // Deprecated: the message will be removed in the future versions
1190 type Nat44ForwardingEnableDisableReply struct {
1191 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1194 func (m *Nat44ForwardingEnableDisableReply) Reset() { *m = Nat44ForwardingEnableDisableReply{} }
1195 func (*Nat44ForwardingEnableDisableReply) GetMessageName() string {
1196 return "nat44_forwarding_enable_disable_reply"
1198 func (*Nat44ForwardingEnableDisableReply) GetCrcString() string { return "e8d4e804" }
1199 func (*Nat44ForwardingEnableDisableReply) GetMessageType() api.MessageType {
1200 return api.ReplyMessage
1203 func (m *Nat44ForwardingEnableDisableReply) Size() (size int) {
1207 size += 4 // m.Retval
1210 func (m *Nat44ForwardingEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1212 b = make([]byte, m.Size())
1214 buf := codec.NewBuffer(b)
1215 buf.EncodeInt32(m.Retval)
1216 return buf.Bytes(), nil
1218 func (m *Nat44ForwardingEnableDisableReply) Unmarshal(b []byte) error {
1219 buf := codec.NewBuffer(b)
1220 m.Retval = buf.DecodeInt32()
1224 // Nat44ForwardingIsEnabled defines message 'nat44_forwarding_is_enabled'.
1225 // Deprecated: the message will be removed in the future versions
1226 type Nat44ForwardingIsEnabled struct{}
1228 func (m *Nat44ForwardingIsEnabled) Reset() { *m = Nat44ForwardingIsEnabled{} }
1229 func (*Nat44ForwardingIsEnabled) GetMessageName() string { return "nat44_forwarding_is_enabled" }
1230 func (*Nat44ForwardingIsEnabled) GetCrcString() string { return "51077d14" }
1231 func (*Nat44ForwardingIsEnabled) GetMessageType() api.MessageType {
1232 return api.RequestMessage
1235 func (m *Nat44ForwardingIsEnabled) Size() (size int) {
1241 func (m *Nat44ForwardingIsEnabled) Marshal(b []byte) ([]byte, error) {
1243 b = make([]byte, m.Size())
1245 buf := codec.NewBuffer(b)
1246 return buf.Bytes(), nil
1248 func (m *Nat44ForwardingIsEnabled) Unmarshal(b []byte) error {
1252 // Nat44ForwardingIsEnabledReply defines message 'nat44_forwarding_is_enabled_reply'.
1253 // Deprecated: the message will be removed in the future versions
1254 type Nat44ForwardingIsEnabledReply struct {
1255 Enabled bool `binapi:"bool,name=enabled" json:"enabled,omitempty"`
1258 func (m *Nat44ForwardingIsEnabledReply) Reset() { *m = Nat44ForwardingIsEnabledReply{} }
1259 func (*Nat44ForwardingIsEnabledReply) GetMessageName() string {
1260 return "nat44_forwarding_is_enabled_reply"
1262 func (*Nat44ForwardingIsEnabledReply) GetCrcString() string { return "46924a06" }
1263 func (*Nat44ForwardingIsEnabledReply) GetMessageType() api.MessageType {
1264 return api.ReplyMessage
1267 func (m *Nat44ForwardingIsEnabledReply) Size() (size int) {
1271 size += 1 // m.Enabled
1274 func (m *Nat44ForwardingIsEnabledReply) Marshal(b []byte) ([]byte, error) {
1276 b = make([]byte, m.Size())
1278 buf := codec.NewBuffer(b)
1279 buf.EncodeBool(m.Enabled)
1280 return buf.Bytes(), nil
1282 func (m *Nat44ForwardingIsEnabledReply) Unmarshal(b []byte) error {
1283 buf := codec.NewBuffer(b)
1284 m.Enabled = buf.DecodeBool()
1288 // Nat44IdentityMappingDetails defines message 'nat44_identity_mapping_details'.
1289 type Nat44IdentityMappingDetails struct {
1290 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1291 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
1292 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
1293 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
1294 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1295 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1296 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
1299 func (m *Nat44IdentityMappingDetails) Reset() { *m = Nat44IdentityMappingDetails{} }
1300 func (*Nat44IdentityMappingDetails) GetMessageName() string { return "nat44_identity_mapping_details" }
1301 func (*Nat44IdentityMappingDetails) GetCrcString() string { return "2a52a030" }
1302 func (*Nat44IdentityMappingDetails) GetMessageType() api.MessageType {
1303 return api.ReplyMessage
1306 func (m *Nat44IdentityMappingDetails) Size() (size int) {
1310 size += 1 // m.Flags
1311 size += 1 * 4 // m.IPAddress
1312 size += 1 // m.Protocol
1314 size += 4 // m.SwIfIndex
1315 size += 4 // m.VrfID
1319 func (m *Nat44IdentityMappingDetails) Marshal(b []byte) ([]byte, error) {
1321 b = make([]byte, m.Size())
1323 buf := codec.NewBuffer(b)
1324 buf.EncodeUint8(uint8(m.Flags))
1325 buf.EncodeBytes(m.IPAddress[:], 4)
1326 buf.EncodeUint8(m.Protocol)
1327 buf.EncodeUint16(m.Port)
1328 buf.EncodeUint32(uint32(m.SwIfIndex))
1329 buf.EncodeUint32(m.VrfID)
1330 buf.EncodeString(m.Tag, 64)
1331 return buf.Bytes(), nil
1333 func (m *Nat44IdentityMappingDetails) Unmarshal(b []byte) error {
1334 buf := codec.NewBuffer(b)
1335 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
1336 copy(m.IPAddress[:], buf.DecodeBytes(4))
1337 m.Protocol = buf.DecodeUint8()
1338 m.Port = buf.DecodeUint16()
1339 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1340 m.VrfID = buf.DecodeUint32()
1341 m.Tag = buf.DecodeString(64)
1345 // Nat44IdentityMappingDump defines message 'nat44_identity_mapping_dump'.
1346 type Nat44IdentityMappingDump struct{}
1348 func (m *Nat44IdentityMappingDump) Reset() { *m = Nat44IdentityMappingDump{} }
1349 func (*Nat44IdentityMappingDump) GetMessageName() string { return "nat44_identity_mapping_dump" }
1350 func (*Nat44IdentityMappingDump) GetCrcString() string { return "51077d14" }
1351 func (*Nat44IdentityMappingDump) GetMessageType() api.MessageType {
1352 return api.RequestMessage
1355 func (m *Nat44IdentityMappingDump) Size() (size int) {
1361 func (m *Nat44IdentityMappingDump) Marshal(b []byte) ([]byte, error) {
1363 b = make([]byte, m.Size())
1365 buf := codec.NewBuffer(b)
1366 return buf.Bytes(), nil
1368 func (m *Nat44IdentityMappingDump) Unmarshal(b []byte) error {
1372 // Nat44InterfaceAddDelFeature defines message 'nat44_interface_add_del_feature'.
1373 type Nat44InterfaceAddDelFeature struct {
1374 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1375 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1376 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1379 func (m *Nat44InterfaceAddDelFeature) Reset() { *m = Nat44InterfaceAddDelFeature{} }
1380 func (*Nat44InterfaceAddDelFeature) GetMessageName() string { return "nat44_interface_add_del_feature" }
1381 func (*Nat44InterfaceAddDelFeature) GetCrcString() string { return "f3699b83" }
1382 func (*Nat44InterfaceAddDelFeature) GetMessageType() api.MessageType {
1383 return api.RequestMessage
1386 func (m *Nat44InterfaceAddDelFeature) Size() (size int) {
1390 size += 1 // m.IsAdd
1391 size += 1 // m.Flags
1392 size += 4 // m.SwIfIndex
1395 func (m *Nat44InterfaceAddDelFeature) Marshal(b []byte) ([]byte, error) {
1397 b = make([]byte, m.Size())
1399 buf := codec.NewBuffer(b)
1400 buf.EncodeBool(m.IsAdd)
1401 buf.EncodeUint8(uint8(m.Flags))
1402 buf.EncodeUint32(uint32(m.SwIfIndex))
1403 return buf.Bytes(), nil
1405 func (m *Nat44InterfaceAddDelFeature) Unmarshal(b []byte) error {
1406 buf := codec.NewBuffer(b)
1407 m.IsAdd = buf.DecodeBool()
1408 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
1409 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1413 // Nat44InterfaceAddDelFeatureReply defines message 'nat44_interface_add_del_feature_reply'.
1414 type Nat44InterfaceAddDelFeatureReply struct {
1415 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1418 func (m *Nat44InterfaceAddDelFeatureReply) Reset() { *m = Nat44InterfaceAddDelFeatureReply{} }
1419 func (*Nat44InterfaceAddDelFeatureReply) GetMessageName() string {
1420 return "nat44_interface_add_del_feature_reply"
1422 func (*Nat44InterfaceAddDelFeatureReply) GetCrcString() string { return "e8d4e804" }
1423 func (*Nat44InterfaceAddDelFeatureReply) GetMessageType() api.MessageType {
1424 return api.ReplyMessage
1427 func (m *Nat44InterfaceAddDelFeatureReply) Size() (size int) {
1431 size += 4 // m.Retval
1434 func (m *Nat44InterfaceAddDelFeatureReply) Marshal(b []byte) ([]byte, error) {
1436 b = make([]byte, m.Size())
1438 buf := codec.NewBuffer(b)
1439 buf.EncodeInt32(m.Retval)
1440 return buf.Bytes(), nil
1442 func (m *Nat44InterfaceAddDelFeatureReply) Unmarshal(b []byte) error {
1443 buf := codec.NewBuffer(b)
1444 m.Retval = buf.DecodeInt32()
1448 // Nat44InterfaceAddDelOutputFeature defines message 'nat44_interface_add_del_output_feature'.
1449 type Nat44InterfaceAddDelOutputFeature struct {
1450 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1451 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1452 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1455 func (m *Nat44InterfaceAddDelOutputFeature) Reset() { *m = Nat44InterfaceAddDelOutputFeature{} }
1456 func (*Nat44InterfaceAddDelOutputFeature) GetMessageName() string {
1457 return "nat44_interface_add_del_output_feature"
1459 func (*Nat44InterfaceAddDelOutputFeature) GetCrcString() string { return "f3699b83" }
1460 func (*Nat44InterfaceAddDelOutputFeature) GetMessageType() api.MessageType {
1461 return api.RequestMessage
1464 func (m *Nat44InterfaceAddDelOutputFeature) Size() (size int) {
1468 size += 1 // m.IsAdd
1469 size += 1 // m.Flags
1470 size += 4 // m.SwIfIndex
1473 func (m *Nat44InterfaceAddDelOutputFeature) Marshal(b []byte) ([]byte, error) {
1475 b = make([]byte, m.Size())
1477 buf := codec.NewBuffer(b)
1478 buf.EncodeBool(m.IsAdd)
1479 buf.EncodeUint8(uint8(m.Flags))
1480 buf.EncodeUint32(uint32(m.SwIfIndex))
1481 return buf.Bytes(), nil
1483 func (m *Nat44InterfaceAddDelOutputFeature) Unmarshal(b []byte) error {
1484 buf := codec.NewBuffer(b)
1485 m.IsAdd = buf.DecodeBool()
1486 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
1487 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1491 // Nat44InterfaceAddDelOutputFeatureReply defines message 'nat44_interface_add_del_output_feature_reply'.
1492 type Nat44InterfaceAddDelOutputFeatureReply struct {
1493 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1496 func (m *Nat44InterfaceAddDelOutputFeatureReply) Reset() {
1497 *m = Nat44InterfaceAddDelOutputFeatureReply{}
1499 func (*Nat44InterfaceAddDelOutputFeatureReply) GetMessageName() string {
1500 return "nat44_interface_add_del_output_feature_reply"
1502 func (*Nat44InterfaceAddDelOutputFeatureReply) GetCrcString() string { return "e8d4e804" }
1503 func (*Nat44InterfaceAddDelOutputFeatureReply) GetMessageType() api.MessageType {
1504 return api.ReplyMessage
1507 func (m *Nat44InterfaceAddDelOutputFeatureReply) Size() (size int) {
1511 size += 4 // m.Retval
1514 func (m *Nat44InterfaceAddDelOutputFeatureReply) Marshal(b []byte) ([]byte, error) {
1516 b = make([]byte, m.Size())
1518 buf := codec.NewBuffer(b)
1519 buf.EncodeInt32(m.Retval)
1520 return buf.Bytes(), nil
1522 func (m *Nat44InterfaceAddDelOutputFeatureReply) Unmarshal(b []byte) error {
1523 buf := codec.NewBuffer(b)
1524 m.Retval = buf.DecodeInt32()
1528 // Nat44InterfaceAddrDetails defines message 'nat44_interface_addr_details'.
1529 type Nat44InterfaceAddrDetails struct {
1530 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1531 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1534 func (m *Nat44InterfaceAddrDetails) Reset() { *m = Nat44InterfaceAddrDetails{} }
1535 func (*Nat44InterfaceAddrDetails) GetMessageName() string { return "nat44_interface_addr_details" }
1536 func (*Nat44InterfaceAddrDetails) GetCrcString() string { return "e4aca9ca" }
1537 func (*Nat44InterfaceAddrDetails) GetMessageType() api.MessageType {
1538 return api.ReplyMessage
1541 func (m *Nat44InterfaceAddrDetails) Size() (size int) {
1545 size += 4 // m.SwIfIndex
1546 size += 1 // m.Flags
1549 func (m *Nat44InterfaceAddrDetails) Marshal(b []byte) ([]byte, error) {
1551 b = make([]byte, m.Size())
1553 buf := codec.NewBuffer(b)
1554 buf.EncodeUint32(uint32(m.SwIfIndex))
1555 buf.EncodeUint8(uint8(m.Flags))
1556 return buf.Bytes(), nil
1558 func (m *Nat44InterfaceAddrDetails) Unmarshal(b []byte) error {
1559 buf := codec.NewBuffer(b)
1560 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1561 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
1565 // Nat44InterfaceAddrDump defines message 'nat44_interface_addr_dump'.
1566 type Nat44InterfaceAddrDump struct{}
1568 func (m *Nat44InterfaceAddrDump) Reset() { *m = Nat44InterfaceAddrDump{} }
1569 func (*Nat44InterfaceAddrDump) GetMessageName() string { return "nat44_interface_addr_dump" }
1570 func (*Nat44InterfaceAddrDump) GetCrcString() string { return "51077d14" }
1571 func (*Nat44InterfaceAddrDump) GetMessageType() api.MessageType {
1572 return api.RequestMessage
1575 func (m *Nat44InterfaceAddrDump) Size() (size int) {
1581 func (m *Nat44InterfaceAddrDump) Marshal(b []byte) ([]byte, error) {
1583 b = make([]byte, m.Size())
1585 buf := codec.NewBuffer(b)
1586 return buf.Bytes(), nil
1588 func (m *Nat44InterfaceAddrDump) Unmarshal(b []byte) error {
1592 // Nat44InterfaceDetails defines message 'nat44_interface_details'.
1593 type Nat44InterfaceDetails struct {
1594 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1595 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1598 func (m *Nat44InterfaceDetails) Reset() { *m = Nat44InterfaceDetails{} }
1599 func (*Nat44InterfaceDetails) GetMessageName() string { return "nat44_interface_details" }
1600 func (*Nat44InterfaceDetails) GetCrcString() string { return "5d286289" }
1601 func (*Nat44InterfaceDetails) GetMessageType() api.MessageType {
1602 return api.ReplyMessage
1605 func (m *Nat44InterfaceDetails) Size() (size int) {
1609 size += 1 // m.Flags
1610 size += 4 // m.SwIfIndex
1613 func (m *Nat44InterfaceDetails) Marshal(b []byte) ([]byte, error) {
1615 b = make([]byte, m.Size())
1617 buf := codec.NewBuffer(b)
1618 buf.EncodeUint8(uint8(m.Flags))
1619 buf.EncodeUint32(uint32(m.SwIfIndex))
1620 return buf.Bytes(), nil
1622 func (m *Nat44InterfaceDetails) Unmarshal(b []byte) error {
1623 buf := codec.NewBuffer(b)
1624 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
1625 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1629 // Nat44InterfaceDump defines message 'nat44_interface_dump'.
1630 type Nat44InterfaceDump struct{}
1632 func (m *Nat44InterfaceDump) Reset() { *m = Nat44InterfaceDump{} }
1633 func (*Nat44InterfaceDump) GetMessageName() string { return "nat44_interface_dump" }
1634 func (*Nat44InterfaceDump) GetCrcString() string { return "51077d14" }
1635 func (*Nat44InterfaceDump) GetMessageType() api.MessageType {
1636 return api.RequestMessage
1639 func (m *Nat44InterfaceDump) Size() (size int) {
1645 func (m *Nat44InterfaceDump) Marshal(b []byte) ([]byte, error) {
1647 b = make([]byte, m.Size())
1649 buf := codec.NewBuffer(b)
1650 return buf.Bytes(), nil
1652 func (m *Nat44InterfaceDump) Unmarshal(b []byte) error {
1656 // Nat44InterfaceOutputFeatureDetails defines message 'nat44_interface_output_feature_details'.
1657 type Nat44InterfaceOutputFeatureDetails struct {
1658 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1659 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1662 func (m *Nat44InterfaceOutputFeatureDetails) Reset() { *m = Nat44InterfaceOutputFeatureDetails{} }
1663 func (*Nat44InterfaceOutputFeatureDetails) GetMessageName() string {
1664 return "nat44_interface_output_feature_details"
1666 func (*Nat44InterfaceOutputFeatureDetails) GetCrcString() string { return "5d286289" }
1667 func (*Nat44InterfaceOutputFeatureDetails) GetMessageType() api.MessageType {
1668 return api.ReplyMessage
1671 func (m *Nat44InterfaceOutputFeatureDetails) Size() (size int) {
1675 size += 1 // m.Flags
1676 size += 4 // m.SwIfIndex
1679 func (m *Nat44InterfaceOutputFeatureDetails) Marshal(b []byte) ([]byte, error) {
1681 b = make([]byte, m.Size())
1683 buf := codec.NewBuffer(b)
1684 buf.EncodeUint8(uint8(m.Flags))
1685 buf.EncodeUint32(uint32(m.SwIfIndex))
1686 return buf.Bytes(), nil
1688 func (m *Nat44InterfaceOutputFeatureDetails) Unmarshal(b []byte) error {
1689 buf := codec.NewBuffer(b)
1690 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
1691 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1695 // Nat44InterfaceOutputFeatureDump defines message 'nat44_interface_output_feature_dump'.
1696 type Nat44InterfaceOutputFeatureDump struct{}
1698 func (m *Nat44InterfaceOutputFeatureDump) Reset() { *m = Nat44InterfaceOutputFeatureDump{} }
1699 func (*Nat44InterfaceOutputFeatureDump) GetMessageName() string {
1700 return "nat44_interface_output_feature_dump"
1702 func (*Nat44InterfaceOutputFeatureDump) GetCrcString() string { return "51077d14" }
1703 func (*Nat44InterfaceOutputFeatureDump) GetMessageType() api.MessageType {
1704 return api.RequestMessage
1707 func (m *Nat44InterfaceOutputFeatureDump) Size() (size int) {
1713 func (m *Nat44InterfaceOutputFeatureDump) Marshal(b []byte) ([]byte, error) {
1715 b = make([]byte, m.Size())
1717 buf := codec.NewBuffer(b)
1718 return buf.Bytes(), nil
1720 func (m *Nat44InterfaceOutputFeatureDump) Unmarshal(b []byte) error {
1724 // Nat44LbStaticMappingAddDelLocal defines message 'nat44_lb_static_mapping_add_del_local'.
1725 type Nat44LbStaticMappingAddDelLocal struct {
1726 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1727 ExternalAddr ip_types.IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"`
1728 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"`
1729 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
1730 Local Nat44LbAddrPort `binapi:"nat44_lb_addr_port,name=local" json:"local,omitempty"`
1733 func (m *Nat44LbStaticMappingAddDelLocal) Reset() { *m = Nat44LbStaticMappingAddDelLocal{} }
1734 func (*Nat44LbStaticMappingAddDelLocal) GetMessageName() string {
1735 return "nat44_lb_static_mapping_add_del_local"
1737 func (*Nat44LbStaticMappingAddDelLocal) GetCrcString() string { return "7ca47547" }
1738 func (*Nat44LbStaticMappingAddDelLocal) GetMessageType() api.MessageType {
1739 return api.RequestMessage
1742 func (m *Nat44LbStaticMappingAddDelLocal) Size() (size int) {
1746 size += 1 // m.IsAdd
1747 size += 1 * 4 // m.ExternalAddr
1748 size += 2 // m.ExternalPort
1749 size += 1 // m.Protocol
1750 size += 1 * 4 // m.Local.Addr
1751 size += 2 // m.Local.Port
1752 size += 1 // m.Local.Probability
1753 size += 4 // m.Local.VrfID
1756 func (m *Nat44LbStaticMappingAddDelLocal) Marshal(b []byte) ([]byte, error) {
1758 b = make([]byte, m.Size())
1760 buf := codec.NewBuffer(b)
1761 buf.EncodeBool(m.IsAdd)
1762 buf.EncodeBytes(m.ExternalAddr[:], 4)
1763 buf.EncodeUint16(m.ExternalPort)
1764 buf.EncodeUint8(m.Protocol)
1765 buf.EncodeBytes(m.Local.Addr[:], 4)
1766 buf.EncodeUint16(m.Local.Port)
1767 buf.EncodeUint8(m.Local.Probability)
1768 buf.EncodeUint32(m.Local.VrfID)
1769 return buf.Bytes(), nil
1771 func (m *Nat44LbStaticMappingAddDelLocal) Unmarshal(b []byte) error {
1772 buf := codec.NewBuffer(b)
1773 m.IsAdd = buf.DecodeBool()
1774 copy(m.ExternalAddr[:], buf.DecodeBytes(4))
1775 m.ExternalPort = buf.DecodeUint16()
1776 m.Protocol = buf.DecodeUint8()
1777 copy(m.Local.Addr[:], buf.DecodeBytes(4))
1778 m.Local.Port = buf.DecodeUint16()
1779 m.Local.Probability = buf.DecodeUint8()
1780 m.Local.VrfID = buf.DecodeUint32()
1784 // Nat44LbStaticMappingAddDelLocalReply defines message 'nat44_lb_static_mapping_add_del_local_reply'.
1785 type Nat44LbStaticMappingAddDelLocalReply struct {
1786 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1789 func (m *Nat44LbStaticMappingAddDelLocalReply) Reset() { *m = Nat44LbStaticMappingAddDelLocalReply{} }
1790 func (*Nat44LbStaticMappingAddDelLocalReply) GetMessageName() string {
1791 return "nat44_lb_static_mapping_add_del_local_reply"
1793 func (*Nat44LbStaticMappingAddDelLocalReply) GetCrcString() string { return "e8d4e804" }
1794 func (*Nat44LbStaticMappingAddDelLocalReply) GetMessageType() api.MessageType {
1795 return api.ReplyMessage
1798 func (m *Nat44LbStaticMappingAddDelLocalReply) Size() (size int) {
1802 size += 4 // m.Retval
1805 func (m *Nat44LbStaticMappingAddDelLocalReply) Marshal(b []byte) ([]byte, error) {
1807 b = make([]byte, m.Size())
1809 buf := codec.NewBuffer(b)
1810 buf.EncodeInt32(m.Retval)
1811 return buf.Bytes(), nil
1813 func (m *Nat44LbStaticMappingAddDelLocalReply) Unmarshal(b []byte) error {
1814 buf := codec.NewBuffer(b)
1815 m.Retval = buf.DecodeInt32()
1819 // Nat44LbStaticMappingDetails defines message 'nat44_lb_static_mapping_details'.
1820 type Nat44LbStaticMappingDetails struct {
1821 ExternalAddr ip_types.IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"`
1822 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"`
1823 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
1824 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1825 Affinity uint32 `binapi:"u32,name=affinity" json:"affinity,omitempty"`
1826 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
1827 LocalNum uint32 `binapi:"u32,name=local_num" json:"-"`
1828 Locals []Nat44LbAddrPort `binapi:"nat44_lb_addr_port[local_num],name=locals" json:"locals,omitempty"`
1831 func (m *Nat44LbStaticMappingDetails) Reset() { *m = Nat44LbStaticMappingDetails{} }
1832 func (*Nat44LbStaticMappingDetails) GetMessageName() string { return "nat44_lb_static_mapping_details" }
1833 func (*Nat44LbStaticMappingDetails) GetCrcString() string { return "ed5ce876" }
1834 func (*Nat44LbStaticMappingDetails) GetMessageType() api.MessageType {
1835 return api.ReplyMessage
1838 func (m *Nat44LbStaticMappingDetails) Size() (size int) {
1842 size += 1 * 4 // m.ExternalAddr
1843 size += 2 // m.ExternalPort
1844 size += 1 // m.Protocol
1845 size += 1 // m.Flags
1846 size += 4 // m.Affinity
1848 size += 4 // m.LocalNum
1849 for j1 := 0; j1 < len(m.Locals); j1++ {
1850 var s1 Nat44LbAddrPort
1852 if j1 < len(m.Locals) {
1855 size += 1 * 4 // s1.Addr
1856 size += 2 // s1.Port
1857 size += 1 // s1.Probability
1858 size += 4 // s1.VrfID
1862 func (m *Nat44LbStaticMappingDetails) Marshal(b []byte) ([]byte, error) {
1864 b = make([]byte, m.Size())
1866 buf := codec.NewBuffer(b)
1867 buf.EncodeBytes(m.ExternalAddr[:], 4)
1868 buf.EncodeUint16(m.ExternalPort)
1869 buf.EncodeUint8(m.Protocol)
1870 buf.EncodeUint8(uint8(m.Flags))
1871 buf.EncodeUint32(m.Affinity)
1872 buf.EncodeString(m.Tag, 64)
1873 buf.EncodeUint32(uint32(len(m.Locals)))
1874 for j0 := 0; j0 < len(m.Locals); j0++ {
1875 var v0 Nat44LbAddrPort // Locals
1876 if j0 < len(m.Locals) {
1879 buf.EncodeBytes(v0.Addr[:], 4)
1880 buf.EncodeUint16(v0.Port)
1881 buf.EncodeUint8(v0.Probability)
1882 buf.EncodeUint32(v0.VrfID)
1884 return buf.Bytes(), nil
1886 func (m *Nat44LbStaticMappingDetails) Unmarshal(b []byte) error {
1887 buf := codec.NewBuffer(b)
1888 copy(m.ExternalAddr[:], buf.DecodeBytes(4))
1889 m.ExternalPort = buf.DecodeUint16()
1890 m.Protocol = buf.DecodeUint8()
1891 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
1892 m.Affinity = buf.DecodeUint32()
1893 m.Tag = buf.DecodeString(64)
1894 m.LocalNum = buf.DecodeUint32()
1895 m.Locals = make([]Nat44LbAddrPort, m.LocalNum)
1896 for j0 := 0; j0 < len(m.Locals); j0++ {
1897 copy(m.Locals[j0].Addr[:], buf.DecodeBytes(4))
1898 m.Locals[j0].Port = buf.DecodeUint16()
1899 m.Locals[j0].Probability = buf.DecodeUint8()
1900 m.Locals[j0].VrfID = buf.DecodeUint32()
1905 // Nat44LbStaticMappingDump defines message 'nat44_lb_static_mapping_dump'.
1906 type Nat44LbStaticMappingDump struct{}
1908 func (m *Nat44LbStaticMappingDump) Reset() { *m = Nat44LbStaticMappingDump{} }
1909 func (*Nat44LbStaticMappingDump) GetMessageName() string { return "nat44_lb_static_mapping_dump" }
1910 func (*Nat44LbStaticMappingDump) GetCrcString() string { return "51077d14" }
1911 func (*Nat44LbStaticMappingDump) GetMessageType() api.MessageType {
1912 return api.RequestMessage
1915 func (m *Nat44LbStaticMappingDump) Size() (size int) {
1921 func (m *Nat44LbStaticMappingDump) Marshal(b []byte) ([]byte, error) {
1923 b = make([]byte, m.Size())
1925 buf := codec.NewBuffer(b)
1926 return buf.Bytes(), nil
1928 func (m *Nat44LbStaticMappingDump) Unmarshal(b []byte) error {
1932 // Nat44PluginEnableDisable defines message 'nat44_plugin_enable_disable'.
1933 // Deprecated: the message will be removed in the future versions
1934 type Nat44PluginEnableDisable struct {
1935 InsideVrf uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"`
1936 OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"`
1937 Users uint32 `binapi:"u32,name=users" json:"users,omitempty"`
1938 UserMemory uint32 `binapi:"u32,name=user_memory" json:"user_memory,omitempty"`
1939 Sessions uint32 `binapi:"u32,name=sessions" json:"sessions,omitempty"`
1940 SessionMemory uint32 `binapi:"u32,name=session_memory" json:"session_memory,omitempty"`
1941 UserSessions uint32 `binapi:"u32,name=user_sessions" json:"user_sessions,omitempty"`
1942 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
1943 Flags Nat44ConfigFlags `binapi:"nat44_config_flags,name=flags" json:"flags,omitempty"`
1946 func (m *Nat44PluginEnableDisable) Reset() { *m = Nat44PluginEnableDisable{} }
1947 func (*Nat44PluginEnableDisable) GetMessageName() string { return "nat44_plugin_enable_disable" }
1948 func (*Nat44PluginEnableDisable) GetCrcString() string { return "dea0d501" }
1949 func (*Nat44PluginEnableDisable) GetMessageType() api.MessageType {
1950 return api.RequestMessage
1953 func (m *Nat44PluginEnableDisable) Size() (size int) {
1957 size += 4 // m.InsideVrf
1958 size += 4 // m.OutsideVrf
1959 size += 4 // m.Users
1960 size += 4 // m.UserMemory
1961 size += 4 // m.Sessions
1962 size += 4 // m.SessionMemory
1963 size += 4 // m.UserSessions
1964 size += 1 // m.Enable
1965 size += 1 // m.Flags
1968 func (m *Nat44PluginEnableDisable) Marshal(b []byte) ([]byte, error) {
1970 b = make([]byte, m.Size())
1972 buf := codec.NewBuffer(b)
1973 buf.EncodeUint32(m.InsideVrf)
1974 buf.EncodeUint32(m.OutsideVrf)
1975 buf.EncodeUint32(m.Users)
1976 buf.EncodeUint32(m.UserMemory)
1977 buf.EncodeUint32(m.Sessions)
1978 buf.EncodeUint32(m.SessionMemory)
1979 buf.EncodeUint32(m.UserSessions)
1980 buf.EncodeBool(m.Enable)
1981 buf.EncodeUint8(uint8(m.Flags))
1982 return buf.Bytes(), nil
1984 func (m *Nat44PluginEnableDisable) Unmarshal(b []byte) error {
1985 buf := codec.NewBuffer(b)
1986 m.InsideVrf = buf.DecodeUint32()
1987 m.OutsideVrf = buf.DecodeUint32()
1988 m.Users = buf.DecodeUint32()
1989 m.UserMemory = buf.DecodeUint32()
1990 m.Sessions = buf.DecodeUint32()
1991 m.SessionMemory = buf.DecodeUint32()
1992 m.UserSessions = buf.DecodeUint32()
1993 m.Enable = buf.DecodeBool()
1994 m.Flags = Nat44ConfigFlags(buf.DecodeUint8())
1998 // Nat44PluginEnableDisableReply defines message 'nat44_plugin_enable_disable_reply'.
1999 // Deprecated: the message will be removed in the future versions
2000 type Nat44PluginEnableDisableReply struct {
2001 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2004 func (m *Nat44PluginEnableDisableReply) Reset() { *m = Nat44PluginEnableDisableReply{} }
2005 func (*Nat44PluginEnableDisableReply) GetMessageName() string {
2006 return "nat44_plugin_enable_disable_reply"
2008 func (*Nat44PluginEnableDisableReply) GetCrcString() string { return "e8d4e804" }
2009 func (*Nat44PluginEnableDisableReply) GetMessageType() api.MessageType {
2010 return api.ReplyMessage
2013 func (m *Nat44PluginEnableDisableReply) Size() (size int) {
2017 size += 4 // m.Retval
2020 func (m *Nat44PluginEnableDisableReply) Marshal(b []byte) ([]byte, error) {
2022 b = make([]byte, m.Size())
2024 buf := codec.NewBuffer(b)
2025 buf.EncodeInt32(m.Retval)
2026 return buf.Bytes(), nil
2028 func (m *Nat44PluginEnableDisableReply) Unmarshal(b []byte) error {
2029 buf := codec.NewBuffer(b)
2030 m.Retval = buf.DecodeInt32()
2034 // Nat44SessionCleanup defines message 'nat44_session_cleanup'.
2035 // Deprecated: the message will be removed in the future versions
2036 type Nat44SessionCleanup struct{}
2038 func (m *Nat44SessionCleanup) Reset() { *m = Nat44SessionCleanup{} }
2039 func (*Nat44SessionCleanup) GetMessageName() string { return "nat44_session_cleanup" }
2040 func (*Nat44SessionCleanup) GetCrcString() string { return "51077d14" }
2041 func (*Nat44SessionCleanup) GetMessageType() api.MessageType {
2042 return api.RequestMessage
2045 func (m *Nat44SessionCleanup) Size() (size int) {
2051 func (m *Nat44SessionCleanup) Marshal(b []byte) ([]byte, error) {
2053 b = make([]byte, m.Size())
2055 buf := codec.NewBuffer(b)
2056 return buf.Bytes(), nil
2058 func (m *Nat44SessionCleanup) Unmarshal(b []byte) error {
2062 // Nat44SessionCleanupReply defines message 'nat44_session_cleanup_reply'.
2063 // Deprecated: the message will be removed in the future versions
2064 type Nat44SessionCleanupReply struct {
2065 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2068 func (m *Nat44SessionCleanupReply) Reset() { *m = Nat44SessionCleanupReply{} }
2069 func (*Nat44SessionCleanupReply) GetMessageName() string { return "nat44_session_cleanup_reply" }
2070 func (*Nat44SessionCleanupReply) GetCrcString() string { return "e8d4e804" }
2071 func (*Nat44SessionCleanupReply) GetMessageType() api.MessageType {
2072 return api.ReplyMessage
2075 func (m *Nat44SessionCleanupReply) Size() (size int) {
2079 size += 4 // m.Retval
2082 func (m *Nat44SessionCleanupReply) Marshal(b []byte) ([]byte, error) {
2084 b = make([]byte, m.Size())
2086 buf := codec.NewBuffer(b)
2087 buf.EncodeInt32(m.Retval)
2088 return buf.Bytes(), nil
2090 func (m *Nat44SessionCleanupReply) Unmarshal(b []byte) error {
2091 buf := codec.NewBuffer(b)
2092 m.Retval = buf.DecodeInt32()
2096 // Nat44SetSessionLimit defines message 'nat44_set_session_limit'.
2097 type Nat44SetSessionLimit struct {
2098 SessionLimit uint32 `binapi:"u32,name=session_limit" json:"session_limit,omitempty"`
2099 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2102 func (m *Nat44SetSessionLimit) Reset() { *m = Nat44SetSessionLimit{} }
2103 func (*Nat44SetSessionLimit) GetMessageName() string { return "nat44_set_session_limit" }
2104 func (*Nat44SetSessionLimit) GetCrcString() string { return "8899bbb1" }
2105 func (*Nat44SetSessionLimit) GetMessageType() api.MessageType {
2106 return api.RequestMessage
2109 func (m *Nat44SetSessionLimit) Size() (size int) {
2113 size += 4 // m.SessionLimit
2114 size += 4 // m.VrfID
2117 func (m *Nat44SetSessionLimit) Marshal(b []byte) ([]byte, error) {
2119 b = make([]byte, m.Size())
2121 buf := codec.NewBuffer(b)
2122 buf.EncodeUint32(m.SessionLimit)
2123 buf.EncodeUint32(m.VrfID)
2124 return buf.Bytes(), nil
2126 func (m *Nat44SetSessionLimit) Unmarshal(b []byte) error {
2127 buf := codec.NewBuffer(b)
2128 m.SessionLimit = buf.DecodeUint32()
2129 m.VrfID = buf.DecodeUint32()
2133 // Nat44SetSessionLimitReply defines message 'nat44_set_session_limit_reply'.
2134 type Nat44SetSessionLimitReply struct {
2135 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2138 func (m *Nat44SetSessionLimitReply) Reset() { *m = Nat44SetSessionLimitReply{} }
2139 func (*Nat44SetSessionLimitReply) GetMessageName() string { return "nat44_set_session_limit_reply" }
2140 func (*Nat44SetSessionLimitReply) GetCrcString() string { return "e8d4e804" }
2141 func (*Nat44SetSessionLimitReply) GetMessageType() api.MessageType {
2142 return api.ReplyMessage
2145 func (m *Nat44SetSessionLimitReply) Size() (size int) {
2149 size += 4 // m.Retval
2152 func (m *Nat44SetSessionLimitReply) Marshal(b []byte) ([]byte, error) {
2154 b = make([]byte, m.Size())
2156 buf := codec.NewBuffer(b)
2157 buf.EncodeInt32(m.Retval)
2158 return buf.Bytes(), nil
2160 func (m *Nat44SetSessionLimitReply) Unmarshal(b []byte) error {
2161 buf := codec.NewBuffer(b)
2162 m.Retval = buf.DecodeInt32()
2166 // Nat44ShowRunningConfig defines message 'nat44_show_running_config'.
2167 // InProgress: the message form may change in the future versions
2168 type Nat44ShowRunningConfig struct{}
2170 func (m *Nat44ShowRunningConfig) Reset() { *m = Nat44ShowRunningConfig{} }
2171 func (*Nat44ShowRunningConfig) GetMessageName() string { return "nat44_show_running_config" }
2172 func (*Nat44ShowRunningConfig) GetCrcString() string { return "51077d14" }
2173 func (*Nat44ShowRunningConfig) GetMessageType() api.MessageType {
2174 return api.RequestMessage
2177 func (m *Nat44ShowRunningConfig) Size() (size int) {
2183 func (m *Nat44ShowRunningConfig) Marshal(b []byte) ([]byte, error) {
2185 b = make([]byte, m.Size())
2187 buf := codec.NewBuffer(b)
2188 return buf.Bytes(), nil
2190 func (m *Nat44ShowRunningConfig) Unmarshal(b []byte) error {
2194 // Nat44ShowRunningConfigReply defines message 'nat44_show_running_config_reply'.
2195 // InProgress: the message form may change in the future versions
2196 type Nat44ShowRunningConfigReply struct {
2197 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2198 InsideVrf uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"`
2199 OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"`
2200 Users uint32 `binapi:"u32,name=users" json:"users,omitempty"`
2201 Sessions uint32 `binapi:"u32,name=sessions" json:"sessions,omitempty"`
2202 UserSessions uint32 `binapi:"u32,name=user_sessions" json:"user_sessions,omitempty"`
2203 UserBuckets uint32 `binapi:"u32,name=user_buckets" json:"user_buckets,omitempty"`
2204 TranslationBuckets uint32 `binapi:"u32,name=translation_buckets" json:"translation_buckets,omitempty"`
2205 ForwardingEnabled bool `binapi:"bool,name=forwarding_enabled" json:"forwarding_enabled,omitempty"`
2206 IpfixLoggingEnabled bool `binapi:"bool,name=ipfix_logging_enabled" json:"ipfix_logging_enabled,omitempty"`
2207 Timeouts nat_types.NatTimeouts `binapi:"nat_timeouts,name=timeouts" json:"timeouts,omitempty"`
2208 LogLevel nat_types.NatLogLevel `binapi:"nat_log_level,name=log_level" json:"log_level,omitempty"`
2209 Flags Nat44ConfigFlags `binapi:"nat44_config_flags,name=flags" json:"flags,omitempty"`
2212 func (m *Nat44ShowRunningConfigReply) Reset() { *m = Nat44ShowRunningConfigReply{} }
2213 func (*Nat44ShowRunningConfigReply) GetMessageName() string { return "nat44_show_running_config_reply" }
2214 func (*Nat44ShowRunningConfigReply) GetCrcString() string { return "93d8e267" }
2215 func (*Nat44ShowRunningConfigReply) GetMessageType() api.MessageType {
2216 return api.ReplyMessage
2219 func (m *Nat44ShowRunningConfigReply) Size() (size int) {
2223 size += 4 // m.Retval
2224 size += 4 // m.InsideVrf
2225 size += 4 // m.OutsideVrf
2226 size += 4 // m.Users
2227 size += 4 // m.Sessions
2228 size += 4 // m.UserSessions
2229 size += 4 // m.UserBuckets
2230 size += 4 // m.TranslationBuckets
2231 size += 1 // m.ForwardingEnabled
2232 size += 1 // m.IpfixLoggingEnabled
2233 size += 4 // m.Timeouts.UDP
2234 size += 4 // m.Timeouts.TCPEstablished
2235 size += 4 // m.Timeouts.TCPTransitory
2236 size += 4 // m.Timeouts.ICMP
2237 size += 1 // m.LogLevel
2238 size += 1 // m.Flags
2241 func (m *Nat44ShowRunningConfigReply) Marshal(b []byte) ([]byte, error) {
2243 b = make([]byte, m.Size())
2245 buf := codec.NewBuffer(b)
2246 buf.EncodeInt32(m.Retval)
2247 buf.EncodeUint32(m.InsideVrf)
2248 buf.EncodeUint32(m.OutsideVrf)
2249 buf.EncodeUint32(m.Users)
2250 buf.EncodeUint32(m.Sessions)
2251 buf.EncodeUint32(m.UserSessions)
2252 buf.EncodeUint32(m.UserBuckets)
2253 buf.EncodeUint32(m.TranslationBuckets)
2254 buf.EncodeBool(m.ForwardingEnabled)
2255 buf.EncodeBool(m.IpfixLoggingEnabled)
2256 buf.EncodeUint32(m.Timeouts.UDP)
2257 buf.EncodeUint32(m.Timeouts.TCPEstablished)
2258 buf.EncodeUint32(m.Timeouts.TCPTransitory)
2259 buf.EncodeUint32(m.Timeouts.ICMP)
2260 buf.EncodeUint8(uint8(m.LogLevel))
2261 buf.EncodeUint8(uint8(m.Flags))
2262 return buf.Bytes(), nil
2264 func (m *Nat44ShowRunningConfigReply) Unmarshal(b []byte) error {
2265 buf := codec.NewBuffer(b)
2266 m.Retval = buf.DecodeInt32()
2267 m.InsideVrf = buf.DecodeUint32()
2268 m.OutsideVrf = buf.DecodeUint32()
2269 m.Users = buf.DecodeUint32()
2270 m.Sessions = buf.DecodeUint32()
2271 m.UserSessions = buf.DecodeUint32()
2272 m.UserBuckets = buf.DecodeUint32()
2273 m.TranslationBuckets = buf.DecodeUint32()
2274 m.ForwardingEnabled = buf.DecodeBool()
2275 m.IpfixLoggingEnabled = buf.DecodeBool()
2276 m.Timeouts.UDP = buf.DecodeUint32()
2277 m.Timeouts.TCPEstablished = buf.DecodeUint32()
2278 m.Timeouts.TCPTransitory = buf.DecodeUint32()
2279 m.Timeouts.ICMP = buf.DecodeUint32()
2280 m.LogLevel = nat_types.NatLogLevel(buf.DecodeUint8())
2281 m.Flags = Nat44ConfigFlags(buf.DecodeUint8())
2285 // Nat44StaticMappingDetails defines message 'nat44_static_mapping_details'.
2286 type Nat44StaticMappingDetails struct {
2287 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
2288 LocalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"`
2289 ExternalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"`
2290 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
2291 LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"`
2292 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"`
2293 ExternalSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"`
2294 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2295 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
2298 func (m *Nat44StaticMappingDetails) Reset() { *m = Nat44StaticMappingDetails{} }
2299 func (*Nat44StaticMappingDetails) GetMessageName() string { return "nat44_static_mapping_details" }
2300 func (*Nat44StaticMappingDetails) GetCrcString() string { return "06cb40b2" }
2301 func (*Nat44StaticMappingDetails) GetMessageType() api.MessageType {
2302 return api.ReplyMessage
2305 func (m *Nat44StaticMappingDetails) Size() (size int) {
2309 size += 1 // m.Flags
2310 size += 1 * 4 // m.LocalIPAddress
2311 size += 1 * 4 // m.ExternalIPAddress
2312 size += 1 // m.Protocol
2313 size += 2 // m.LocalPort
2314 size += 2 // m.ExternalPort
2315 size += 4 // m.ExternalSwIfIndex
2316 size += 4 // m.VrfID
2320 func (m *Nat44StaticMappingDetails) Marshal(b []byte) ([]byte, error) {
2322 b = make([]byte, m.Size())
2324 buf := codec.NewBuffer(b)
2325 buf.EncodeUint8(uint8(m.Flags))
2326 buf.EncodeBytes(m.LocalIPAddress[:], 4)
2327 buf.EncodeBytes(m.ExternalIPAddress[:], 4)
2328 buf.EncodeUint8(m.Protocol)
2329 buf.EncodeUint16(m.LocalPort)
2330 buf.EncodeUint16(m.ExternalPort)
2331 buf.EncodeUint32(uint32(m.ExternalSwIfIndex))
2332 buf.EncodeUint32(m.VrfID)
2333 buf.EncodeString(m.Tag, 64)
2334 return buf.Bytes(), nil
2336 func (m *Nat44StaticMappingDetails) Unmarshal(b []byte) error {
2337 buf := codec.NewBuffer(b)
2338 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
2339 copy(m.LocalIPAddress[:], buf.DecodeBytes(4))
2340 copy(m.ExternalIPAddress[:], buf.DecodeBytes(4))
2341 m.Protocol = buf.DecodeUint8()
2342 m.LocalPort = buf.DecodeUint16()
2343 m.ExternalPort = buf.DecodeUint16()
2344 m.ExternalSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2345 m.VrfID = buf.DecodeUint32()
2346 m.Tag = buf.DecodeString(64)
2350 // Nat44StaticMappingDump defines message 'nat44_static_mapping_dump'.
2351 type Nat44StaticMappingDump struct{}
2353 func (m *Nat44StaticMappingDump) Reset() { *m = Nat44StaticMappingDump{} }
2354 func (*Nat44StaticMappingDump) GetMessageName() string { return "nat44_static_mapping_dump" }
2355 func (*Nat44StaticMappingDump) GetCrcString() string { return "51077d14" }
2356 func (*Nat44StaticMappingDump) GetMessageType() api.MessageType {
2357 return api.RequestMessage
2360 func (m *Nat44StaticMappingDump) Size() (size int) {
2366 func (m *Nat44StaticMappingDump) Marshal(b []byte) ([]byte, error) {
2368 b = make([]byte, m.Size())
2370 buf := codec.NewBuffer(b)
2371 return buf.Bytes(), nil
2373 func (m *Nat44StaticMappingDump) Unmarshal(b []byte) error {
2377 // Nat44UserDetails defines message 'nat44_user_details'.
2378 type Nat44UserDetails struct {
2379 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2380 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
2381 Nsessions uint32 `binapi:"u32,name=nsessions" json:"nsessions,omitempty"`
2382 Nstaticsessions uint32 `binapi:"u32,name=nstaticsessions" json:"nstaticsessions,omitempty"`
2385 func (m *Nat44UserDetails) Reset() { *m = Nat44UserDetails{} }
2386 func (*Nat44UserDetails) GetMessageName() string { return "nat44_user_details" }
2387 func (*Nat44UserDetails) GetCrcString() string { return "355896c2" }
2388 func (*Nat44UserDetails) GetMessageType() api.MessageType {
2389 return api.ReplyMessage
2392 func (m *Nat44UserDetails) Size() (size int) {
2396 size += 4 // m.VrfID
2397 size += 1 * 4 // m.IPAddress
2398 size += 4 // m.Nsessions
2399 size += 4 // m.Nstaticsessions
2402 func (m *Nat44UserDetails) Marshal(b []byte) ([]byte, error) {
2404 b = make([]byte, m.Size())
2406 buf := codec.NewBuffer(b)
2407 buf.EncodeUint32(m.VrfID)
2408 buf.EncodeBytes(m.IPAddress[:], 4)
2409 buf.EncodeUint32(m.Nsessions)
2410 buf.EncodeUint32(m.Nstaticsessions)
2411 return buf.Bytes(), nil
2413 func (m *Nat44UserDetails) Unmarshal(b []byte) error {
2414 buf := codec.NewBuffer(b)
2415 m.VrfID = buf.DecodeUint32()
2416 copy(m.IPAddress[:], buf.DecodeBytes(4))
2417 m.Nsessions = buf.DecodeUint32()
2418 m.Nstaticsessions = buf.DecodeUint32()
2422 // Nat44UserDump defines message 'nat44_user_dump'.
2423 type Nat44UserDump struct{}
2425 func (m *Nat44UserDump) Reset() { *m = Nat44UserDump{} }
2426 func (*Nat44UserDump) GetMessageName() string { return "nat44_user_dump" }
2427 func (*Nat44UserDump) GetCrcString() string { return "51077d14" }
2428 func (*Nat44UserDump) GetMessageType() api.MessageType {
2429 return api.RequestMessage
2432 func (m *Nat44UserDump) Size() (size int) {
2438 func (m *Nat44UserDump) Marshal(b []byte) ([]byte, error) {
2440 b = make([]byte, m.Size())
2442 buf := codec.NewBuffer(b)
2443 return buf.Bytes(), nil
2445 func (m *Nat44UserDump) Unmarshal(b []byte) error {
2449 // Nat44UserSessionDetails defines message 'nat44_user_session_details'.
2450 type Nat44UserSessionDetails struct {
2451 OutsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=outside_ip_address" json:"outside_ip_address,omitempty"`
2452 OutsidePort uint16 `binapi:"u16,name=outside_port" json:"outside_port,omitempty"`
2453 InsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=inside_ip_address" json:"inside_ip_address,omitempty"`
2454 InsidePort uint16 `binapi:"u16,name=inside_port" json:"inside_port,omitempty"`
2455 Protocol uint16 `binapi:"u16,name=protocol" json:"protocol,omitempty"`
2456 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
2457 LastHeard uint64 `binapi:"u64,name=last_heard" json:"last_heard,omitempty"`
2458 TotalBytes uint64 `binapi:"u64,name=total_bytes" json:"total_bytes,omitempty"`
2459 TotalPkts uint32 `binapi:"u32,name=total_pkts" json:"total_pkts,omitempty"`
2460 ExtHostAddress ip_types.IP4Address `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"`
2461 ExtHostPort uint16 `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"`
2462 ExtHostNatAddress ip_types.IP4Address `binapi:"ip4_address,name=ext_host_nat_address" json:"ext_host_nat_address,omitempty"`
2463 ExtHostNatPort uint16 `binapi:"u16,name=ext_host_nat_port" json:"ext_host_nat_port,omitempty"`
2466 func (m *Nat44UserSessionDetails) Reset() { *m = Nat44UserSessionDetails{} }
2467 func (*Nat44UserSessionDetails) GetMessageName() string { return "nat44_user_session_details" }
2468 func (*Nat44UserSessionDetails) GetCrcString() string { return "2cf6e16d" }
2469 func (*Nat44UserSessionDetails) GetMessageType() api.MessageType {
2470 return api.ReplyMessage
2473 func (m *Nat44UserSessionDetails) Size() (size int) {
2477 size += 1 * 4 // m.OutsideIPAddress
2478 size += 2 // m.OutsidePort
2479 size += 1 * 4 // m.InsideIPAddress
2480 size += 2 // m.InsidePort
2481 size += 2 // m.Protocol
2482 size += 1 // m.Flags
2483 size += 8 // m.LastHeard
2484 size += 8 // m.TotalBytes
2485 size += 4 // m.TotalPkts
2486 size += 1 * 4 // m.ExtHostAddress
2487 size += 2 // m.ExtHostPort
2488 size += 1 * 4 // m.ExtHostNatAddress
2489 size += 2 // m.ExtHostNatPort
2492 func (m *Nat44UserSessionDetails) Marshal(b []byte) ([]byte, error) {
2494 b = make([]byte, m.Size())
2496 buf := codec.NewBuffer(b)
2497 buf.EncodeBytes(m.OutsideIPAddress[:], 4)
2498 buf.EncodeUint16(m.OutsidePort)
2499 buf.EncodeBytes(m.InsideIPAddress[:], 4)
2500 buf.EncodeUint16(m.InsidePort)
2501 buf.EncodeUint16(m.Protocol)
2502 buf.EncodeUint8(uint8(m.Flags))
2503 buf.EncodeUint64(m.LastHeard)
2504 buf.EncodeUint64(m.TotalBytes)
2505 buf.EncodeUint32(m.TotalPkts)
2506 buf.EncodeBytes(m.ExtHostAddress[:], 4)
2507 buf.EncodeUint16(m.ExtHostPort)
2508 buf.EncodeBytes(m.ExtHostNatAddress[:], 4)
2509 buf.EncodeUint16(m.ExtHostNatPort)
2510 return buf.Bytes(), nil
2512 func (m *Nat44UserSessionDetails) Unmarshal(b []byte) error {
2513 buf := codec.NewBuffer(b)
2514 copy(m.OutsideIPAddress[:], buf.DecodeBytes(4))
2515 m.OutsidePort = buf.DecodeUint16()
2516 copy(m.InsideIPAddress[:], buf.DecodeBytes(4))
2517 m.InsidePort = buf.DecodeUint16()
2518 m.Protocol = buf.DecodeUint16()
2519 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
2520 m.LastHeard = buf.DecodeUint64()
2521 m.TotalBytes = buf.DecodeUint64()
2522 m.TotalPkts = buf.DecodeUint32()
2523 copy(m.ExtHostAddress[:], buf.DecodeBytes(4))
2524 m.ExtHostPort = buf.DecodeUint16()
2525 copy(m.ExtHostNatAddress[:], buf.DecodeBytes(4))
2526 m.ExtHostNatPort = buf.DecodeUint16()
2530 // Nat44UserSessionDump defines message 'nat44_user_session_dump'.
2531 type Nat44UserSessionDump struct {
2532 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
2533 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2536 func (m *Nat44UserSessionDump) Reset() { *m = Nat44UserSessionDump{} }
2537 func (*Nat44UserSessionDump) GetMessageName() string { return "nat44_user_session_dump" }
2538 func (*Nat44UserSessionDump) GetCrcString() string { return "e1899c98" }
2539 func (*Nat44UserSessionDump) GetMessageType() api.MessageType {
2540 return api.RequestMessage
2543 func (m *Nat44UserSessionDump) Size() (size int) {
2547 size += 1 * 4 // m.IPAddress
2548 size += 4 // m.VrfID
2551 func (m *Nat44UserSessionDump) Marshal(b []byte) ([]byte, error) {
2553 b = make([]byte, m.Size())
2555 buf := codec.NewBuffer(b)
2556 buf.EncodeBytes(m.IPAddress[:], 4)
2557 buf.EncodeUint32(m.VrfID)
2558 return buf.Bytes(), nil
2560 func (m *Nat44UserSessionDump) Unmarshal(b []byte) error {
2561 buf := codec.NewBuffer(b)
2562 copy(m.IPAddress[:], buf.DecodeBytes(4))
2563 m.VrfID = buf.DecodeUint32()
2567 // NatControlPing defines message 'nat_control_ping'.
2568 // Deprecated: the message will be removed in the future versions
2569 type NatControlPing struct{}
2571 func (m *NatControlPing) Reset() { *m = NatControlPing{} }
2572 func (*NatControlPing) GetMessageName() string { return "nat_control_ping" }
2573 func (*NatControlPing) GetCrcString() string { return "51077d14" }
2574 func (*NatControlPing) GetMessageType() api.MessageType {
2575 return api.RequestMessage
2578 func (m *NatControlPing) Size() (size int) {
2584 func (m *NatControlPing) Marshal(b []byte) ([]byte, error) {
2586 b = make([]byte, m.Size())
2588 buf := codec.NewBuffer(b)
2589 return buf.Bytes(), nil
2591 func (m *NatControlPing) Unmarshal(b []byte) error {
2595 // NatControlPingReply defines message 'nat_control_ping_reply'.
2596 // Deprecated: the message will be removed in the future versions
2597 type NatControlPingReply struct {
2598 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2599 ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
2600 VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
2603 func (m *NatControlPingReply) Reset() { *m = NatControlPingReply{} }
2604 func (*NatControlPingReply) GetMessageName() string { return "nat_control_ping_reply" }
2605 func (*NatControlPingReply) GetCrcString() string { return "f6b0b8ca" }
2606 func (*NatControlPingReply) GetMessageType() api.MessageType {
2607 return api.ReplyMessage
2610 func (m *NatControlPingReply) Size() (size int) {
2614 size += 4 // m.Retval
2615 size += 4 // m.ClientIndex
2616 size += 4 // m.VpePID
2619 func (m *NatControlPingReply) Marshal(b []byte) ([]byte, error) {
2621 b = make([]byte, m.Size())
2623 buf := codec.NewBuffer(b)
2624 buf.EncodeInt32(m.Retval)
2625 buf.EncodeUint32(m.ClientIndex)
2626 buf.EncodeUint32(m.VpePID)
2627 return buf.Bytes(), nil
2629 func (m *NatControlPingReply) Unmarshal(b []byte) error {
2630 buf := codec.NewBuffer(b)
2631 m.Retval = buf.DecodeInt32()
2632 m.ClientIndex = buf.DecodeUint32()
2633 m.VpePID = buf.DecodeUint32()
2637 // NatGetAddrAndPortAllocAlg defines message 'nat_get_addr_and_port_alloc_alg'.
2638 type NatGetAddrAndPortAllocAlg struct{}
2640 func (m *NatGetAddrAndPortAllocAlg) Reset() { *m = NatGetAddrAndPortAllocAlg{} }
2641 func (*NatGetAddrAndPortAllocAlg) GetMessageName() string { return "nat_get_addr_and_port_alloc_alg" }
2642 func (*NatGetAddrAndPortAllocAlg) GetCrcString() string { return "51077d14" }
2643 func (*NatGetAddrAndPortAllocAlg) GetMessageType() api.MessageType {
2644 return api.RequestMessage
2647 func (m *NatGetAddrAndPortAllocAlg) Size() (size int) {
2653 func (m *NatGetAddrAndPortAllocAlg) Marshal(b []byte) ([]byte, error) {
2655 b = make([]byte, m.Size())
2657 buf := codec.NewBuffer(b)
2658 return buf.Bytes(), nil
2660 func (m *NatGetAddrAndPortAllocAlg) Unmarshal(b []byte) error {
2664 // NatGetAddrAndPortAllocAlgReply defines message 'nat_get_addr_and_port_alloc_alg_reply'.
2665 type NatGetAddrAndPortAllocAlgReply struct {
2666 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2667 Alg uint8 `binapi:"u8,name=alg" json:"alg,omitempty"`
2668 PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
2669 PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
2670 Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"`
2671 StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"`
2672 EndPort uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"`
2675 func (m *NatGetAddrAndPortAllocAlgReply) Reset() { *m = NatGetAddrAndPortAllocAlgReply{} }
2676 func (*NatGetAddrAndPortAllocAlgReply) GetMessageName() string {
2677 return "nat_get_addr_and_port_alloc_alg_reply"
2679 func (*NatGetAddrAndPortAllocAlgReply) GetCrcString() string { return "3607a7d0" }
2680 func (*NatGetAddrAndPortAllocAlgReply) GetMessageType() api.MessageType {
2681 return api.ReplyMessage
2684 func (m *NatGetAddrAndPortAllocAlgReply) Size() (size int) {
2688 size += 4 // m.Retval
2690 size += 1 // m.PsidOffset
2691 size += 1 // m.PsidLength
2693 size += 2 // m.StartPort
2694 size += 2 // m.EndPort
2697 func (m *NatGetAddrAndPortAllocAlgReply) Marshal(b []byte) ([]byte, error) {
2699 b = make([]byte, m.Size())
2701 buf := codec.NewBuffer(b)
2702 buf.EncodeInt32(m.Retval)
2703 buf.EncodeUint8(m.Alg)
2704 buf.EncodeUint8(m.PsidOffset)
2705 buf.EncodeUint8(m.PsidLength)
2706 buf.EncodeUint16(m.Psid)
2707 buf.EncodeUint16(m.StartPort)
2708 buf.EncodeUint16(m.EndPort)
2709 return buf.Bytes(), nil
2711 func (m *NatGetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error {
2712 buf := codec.NewBuffer(b)
2713 m.Retval = buf.DecodeInt32()
2714 m.Alg = buf.DecodeUint8()
2715 m.PsidOffset = buf.DecodeUint8()
2716 m.PsidLength = buf.DecodeUint8()
2717 m.Psid = buf.DecodeUint16()
2718 m.StartPort = buf.DecodeUint16()
2719 m.EndPort = buf.DecodeUint16()
2723 // NatGetMssClamping defines message 'nat_get_mss_clamping'.
2724 type NatGetMssClamping struct{}
2726 func (m *NatGetMssClamping) Reset() { *m = NatGetMssClamping{} }
2727 func (*NatGetMssClamping) GetMessageName() string { return "nat_get_mss_clamping" }
2728 func (*NatGetMssClamping) GetCrcString() string { return "51077d14" }
2729 func (*NatGetMssClamping) GetMessageType() api.MessageType {
2730 return api.RequestMessage
2733 func (m *NatGetMssClamping) Size() (size int) {
2739 func (m *NatGetMssClamping) Marshal(b []byte) ([]byte, error) {
2741 b = make([]byte, m.Size())
2743 buf := codec.NewBuffer(b)
2744 return buf.Bytes(), nil
2746 func (m *NatGetMssClamping) Unmarshal(b []byte) error {
2750 // NatGetMssClampingReply defines message 'nat_get_mss_clamping_reply'.
2751 type NatGetMssClampingReply struct {
2752 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2753 MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"`
2754 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
2757 func (m *NatGetMssClampingReply) Reset() { *m = NatGetMssClampingReply{} }
2758 func (*NatGetMssClampingReply) GetMessageName() string { return "nat_get_mss_clamping_reply" }
2759 func (*NatGetMssClampingReply) GetCrcString() string { return "1c0b2a78" }
2760 func (*NatGetMssClampingReply) GetMessageType() api.MessageType {
2761 return api.ReplyMessage
2764 func (m *NatGetMssClampingReply) Size() (size int) {
2768 size += 4 // m.Retval
2769 size += 2 // m.MssValue
2770 size += 1 // m.Enable
2773 func (m *NatGetMssClampingReply) Marshal(b []byte) ([]byte, error) {
2775 b = make([]byte, m.Size())
2777 buf := codec.NewBuffer(b)
2778 buf.EncodeInt32(m.Retval)
2779 buf.EncodeUint16(m.MssValue)
2780 buf.EncodeBool(m.Enable)
2781 return buf.Bytes(), nil
2783 func (m *NatGetMssClampingReply) Unmarshal(b []byte) error {
2784 buf := codec.NewBuffer(b)
2785 m.Retval = buf.DecodeInt32()
2786 m.MssValue = buf.DecodeUint16()
2787 m.Enable = buf.DecodeBool()
2791 // NatGetTimeouts defines message 'nat_get_timeouts'.
2792 // Deprecated: the message will be removed in the future versions
2793 type NatGetTimeouts struct{}
2795 func (m *NatGetTimeouts) Reset() { *m = NatGetTimeouts{} }
2796 func (*NatGetTimeouts) GetMessageName() string { return "nat_get_timeouts" }
2797 func (*NatGetTimeouts) GetCrcString() string { return "51077d14" }
2798 func (*NatGetTimeouts) GetMessageType() api.MessageType {
2799 return api.RequestMessage
2802 func (m *NatGetTimeouts) Size() (size int) {
2808 func (m *NatGetTimeouts) Marshal(b []byte) ([]byte, error) {
2810 b = make([]byte, m.Size())
2812 buf := codec.NewBuffer(b)
2813 return buf.Bytes(), nil
2815 func (m *NatGetTimeouts) Unmarshal(b []byte) error {
2819 // NatGetTimeoutsReply defines message 'nat_get_timeouts_reply'.
2820 // Deprecated: the message will be removed in the future versions
2821 type NatGetTimeoutsReply struct {
2822 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2823 UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"`
2824 TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"`
2825 TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"`
2826 ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"`
2829 func (m *NatGetTimeoutsReply) Reset() { *m = NatGetTimeoutsReply{} }
2830 func (*NatGetTimeoutsReply) GetMessageName() string { return "nat_get_timeouts_reply" }
2831 func (*NatGetTimeoutsReply) GetCrcString() string { return "3c4df4e1" }
2832 func (*NatGetTimeoutsReply) GetMessageType() api.MessageType {
2833 return api.ReplyMessage
2836 func (m *NatGetTimeoutsReply) Size() (size int) {
2840 size += 4 // m.Retval
2842 size += 4 // m.TCPEstablished
2843 size += 4 // m.TCPTransitory
2847 func (m *NatGetTimeoutsReply) Marshal(b []byte) ([]byte, error) {
2849 b = make([]byte, m.Size())
2851 buf := codec.NewBuffer(b)
2852 buf.EncodeInt32(m.Retval)
2853 buf.EncodeUint32(m.UDP)
2854 buf.EncodeUint32(m.TCPEstablished)
2855 buf.EncodeUint32(m.TCPTransitory)
2856 buf.EncodeUint32(m.ICMP)
2857 return buf.Bytes(), nil
2859 func (m *NatGetTimeoutsReply) Unmarshal(b []byte) error {
2860 buf := codec.NewBuffer(b)
2861 m.Retval = buf.DecodeInt32()
2862 m.UDP = buf.DecodeUint32()
2863 m.TCPEstablished = buf.DecodeUint32()
2864 m.TCPTransitory = buf.DecodeUint32()
2865 m.ICMP = buf.DecodeUint32()
2869 // NatHaFlush defines message 'nat_ha_flush'.
2870 type NatHaFlush struct{}
2872 func (m *NatHaFlush) Reset() { *m = NatHaFlush{} }
2873 func (*NatHaFlush) GetMessageName() string { return "nat_ha_flush" }
2874 func (*NatHaFlush) GetCrcString() string { return "51077d14" }
2875 func (*NatHaFlush) GetMessageType() api.MessageType {
2876 return api.RequestMessage
2879 func (m *NatHaFlush) Size() (size int) {
2885 func (m *NatHaFlush) Marshal(b []byte) ([]byte, error) {
2887 b = make([]byte, m.Size())
2889 buf := codec.NewBuffer(b)
2890 return buf.Bytes(), nil
2892 func (m *NatHaFlush) Unmarshal(b []byte) error {
2896 // NatHaFlushReply defines message 'nat_ha_flush_reply'.
2897 type NatHaFlushReply struct {
2898 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2901 func (m *NatHaFlushReply) Reset() { *m = NatHaFlushReply{} }
2902 func (*NatHaFlushReply) GetMessageName() string { return "nat_ha_flush_reply" }
2903 func (*NatHaFlushReply) GetCrcString() string { return "e8d4e804" }
2904 func (*NatHaFlushReply) GetMessageType() api.MessageType {
2905 return api.ReplyMessage
2908 func (m *NatHaFlushReply) Size() (size int) {
2912 size += 4 // m.Retval
2915 func (m *NatHaFlushReply) Marshal(b []byte) ([]byte, error) {
2917 b = make([]byte, m.Size())
2919 buf := codec.NewBuffer(b)
2920 buf.EncodeInt32(m.Retval)
2921 return buf.Bytes(), nil
2923 func (m *NatHaFlushReply) Unmarshal(b []byte) error {
2924 buf := codec.NewBuffer(b)
2925 m.Retval = buf.DecodeInt32()
2929 // NatHaGetFailover defines message 'nat_ha_get_failover'.
2930 type NatHaGetFailover struct{}
2932 func (m *NatHaGetFailover) Reset() { *m = NatHaGetFailover{} }
2933 func (*NatHaGetFailover) GetMessageName() string { return "nat_ha_get_failover" }
2934 func (*NatHaGetFailover) GetCrcString() string { return "51077d14" }
2935 func (*NatHaGetFailover) GetMessageType() api.MessageType {
2936 return api.RequestMessage
2939 func (m *NatHaGetFailover) Size() (size int) {
2945 func (m *NatHaGetFailover) Marshal(b []byte) ([]byte, error) {
2947 b = make([]byte, m.Size())
2949 buf := codec.NewBuffer(b)
2950 return buf.Bytes(), nil
2952 func (m *NatHaGetFailover) Unmarshal(b []byte) error {
2956 // NatHaGetFailoverReply defines message 'nat_ha_get_failover_reply'.
2957 type NatHaGetFailoverReply struct {
2958 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2959 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
2960 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
2961 SessionRefreshInterval uint32 `binapi:"u32,name=session_refresh_interval" json:"session_refresh_interval,omitempty"`
2964 func (m *NatHaGetFailoverReply) Reset() { *m = NatHaGetFailoverReply{} }
2965 func (*NatHaGetFailoverReply) GetMessageName() string { return "nat_ha_get_failover_reply" }
2966 func (*NatHaGetFailoverReply) GetCrcString() string { return "a67d8752" }
2967 func (*NatHaGetFailoverReply) GetMessageType() api.MessageType {
2968 return api.ReplyMessage
2971 func (m *NatHaGetFailoverReply) Size() (size int) {
2975 size += 4 // m.Retval
2976 size += 1 * 4 // m.IPAddress
2978 size += 4 // m.SessionRefreshInterval
2981 func (m *NatHaGetFailoverReply) Marshal(b []byte) ([]byte, error) {
2983 b = make([]byte, m.Size())
2985 buf := codec.NewBuffer(b)
2986 buf.EncodeInt32(m.Retval)
2987 buf.EncodeBytes(m.IPAddress[:], 4)
2988 buf.EncodeUint16(m.Port)
2989 buf.EncodeUint32(m.SessionRefreshInterval)
2990 return buf.Bytes(), nil
2992 func (m *NatHaGetFailoverReply) Unmarshal(b []byte) error {
2993 buf := codec.NewBuffer(b)
2994 m.Retval = buf.DecodeInt32()
2995 copy(m.IPAddress[:], buf.DecodeBytes(4))
2996 m.Port = buf.DecodeUint16()
2997 m.SessionRefreshInterval = buf.DecodeUint32()
3001 // NatHaGetListener defines message 'nat_ha_get_listener'.
3002 type NatHaGetListener struct{}
3004 func (m *NatHaGetListener) Reset() { *m = NatHaGetListener{} }
3005 func (*NatHaGetListener) GetMessageName() string { return "nat_ha_get_listener" }
3006 func (*NatHaGetListener) GetCrcString() string { return "51077d14" }
3007 func (*NatHaGetListener) GetMessageType() api.MessageType {
3008 return api.RequestMessage
3011 func (m *NatHaGetListener) Size() (size int) {
3017 func (m *NatHaGetListener) Marshal(b []byte) ([]byte, error) {
3019 b = make([]byte, m.Size())
3021 buf := codec.NewBuffer(b)
3022 return buf.Bytes(), nil
3024 func (m *NatHaGetListener) Unmarshal(b []byte) error {
3028 // NatHaGetListenerReply defines message 'nat_ha_get_listener_reply'.
3029 type NatHaGetListenerReply struct {
3030 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3031 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
3032 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
3033 PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
3036 func (m *NatHaGetListenerReply) Reset() { *m = NatHaGetListenerReply{} }
3037 func (*NatHaGetListenerReply) GetMessageName() string { return "nat_ha_get_listener_reply" }
3038 func (*NatHaGetListenerReply) GetCrcString() string { return "123ea41f" }
3039 func (*NatHaGetListenerReply) GetMessageType() api.MessageType {
3040 return api.ReplyMessage
3043 func (m *NatHaGetListenerReply) Size() (size int) {
3047 size += 4 // m.Retval
3048 size += 1 * 4 // m.IPAddress
3050 size += 4 // m.PathMtu
3053 func (m *NatHaGetListenerReply) Marshal(b []byte) ([]byte, error) {
3055 b = make([]byte, m.Size())
3057 buf := codec.NewBuffer(b)
3058 buf.EncodeInt32(m.Retval)
3059 buf.EncodeBytes(m.IPAddress[:], 4)
3060 buf.EncodeUint16(m.Port)
3061 buf.EncodeUint32(m.PathMtu)
3062 return buf.Bytes(), nil
3064 func (m *NatHaGetListenerReply) Unmarshal(b []byte) error {
3065 buf := codec.NewBuffer(b)
3066 m.Retval = buf.DecodeInt32()
3067 copy(m.IPAddress[:], buf.DecodeBytes(4))
3068 m.Port = buf.DecodeUint16()
3069 m.PathMtu = buf.DecodeUint32()
3073 // NatHaResync defines message 'nat_ha_resync'.
3074 type NatHaResync struct {
3075 WantResyncEvent uint8 `binapi:"u8,name=want_resync_event" json:"want_resync_event,omitempty"`
3076 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
3079 func (m *NatHaResync) Reset() { *m = NatHaResync{} }
3080 func (*NatHaResync) GetMessageName() string { return "nat_ha_resync" }
3081 func (*NatHaResync) GetCrcString() string { return "c8ab9e03" }
3082 func (*NatHaResync) GetMessageType() api.MessageType {
3083 return api.RequestMessage
3086 func (m *NatHaResync) Size() (size int) {
3090 size += 1 // m.WantResyncEvent
3094 func (m *NatHaResync) Marshal(b []byte) ([]byte, error) {
3096 b = make([]byte, m.Size())
3098 buf := codec.NewBuffer(b)
3099 buf.EncodeUint8(m.WantResyncEvent)
3100 buf.EncodeUint32(m.PID)
3101 return buf.Bytes(), nil
3103 func (m *NatHaResync) Unmarshal(b []byte) error {
3104 buf := codec.NewBuffer(b)
3105 m.WantResyncEvent = buf.DecodeUint8()
3106 m.PID = buf.DecodeUint32()
3110 // NatHaResyncCompletedEvent defines message 'nat_ha_resync_completed_event'.
3111 type NatHaResyncCompletedEvent struct {
3112 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
3113 MissedCount uint32 `binapi:"u32,name=missed_count" json:"missed_count,omitempty"`
3116 func (m *NatHaResyncCompletedEvent) Reset() { *m = NatHaResyncCompletedEvent{} }
3117 func (*NatHaResyncCompletedEvent) GetMessageName() string { return "nat_ha_resync_completed_event" }
3118 func (*NatHaResyncCompletedEvent) GetCrcString() string { return "fdc598fb" }
3119 func (*NatHaResyncCompletedEvent) GetMessageType() api.MessageType {
3120 return api.EventMessage
3123 func (m *NatHaResyncCompletedEvent) Size() (size int) {
3128 size += 4 // m.MissedCount
3131 func (m *NatHaResyncCompletedEvent) Marshal(b []byte) ([]byte, error) {
3133 b = make([]byte, m.Size())
3135 buf := codec.NewBuffer(b)
3136 buf.EncodeUint32(m.PID)
3137 buf.EncodeUint32(m.MissedCount)
3138 return buf.Bytes(), nil
3140 func (m *NatHaResyncCompletedEvent) Unmarshal(b []byte) error {
3141 buf := codec.NewBuffer(b)
3142 m.PID = buf.DecodeUint32()
3143 m.MissedCount = buf.DecodeUint32()
3147 // NatHaResyncReply defines message 'nat_ha_resync_reply'.
3148 type NatHaResyncReply struct {
3149 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3152 func (m *NatHaResyncReply) Reset() { *m = NatHaResyncReply{} }
3153 func (*NatHaResyncReply) GetMessageName() string { return "nat_ha_resync_reply" }
3154 func (*NatHaResyncReply) GetCrcString() string { return "e8d4e804" }
3155 func (*NatHaResyncReply) GetMessageType() api.MessageType {
3156 return api.ReplyMessage
3159 func (m *NatHaResyncReply) Size() (size int) {
3163 size += 4 // m.Retval
3166 func (m *NatHaResyncReply) Marshal(b []byte) ([]byte, error) {
3168 b = make([]byte, m.Size())
3170 buf := codec.NewBuffer(b)
3171 buf.EncodeInt32(m.Retval)
3172 return buf.Bytes(), nil
3174 func (m *NatHaResyncReply) Unmarshal(b []byte) error {
3175 buf := codec.NewBuffer(b)
3176 m.Retval = buf.DecodeInt32()
3180 // NatHaSetFailover defines message 'nat_ha_set_failover'.
3181 type NatHaSetFailover struct {
3182 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
3183 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
3184 SessionRefreshInterval uint32 `binapi:"u32,name=session_refresh_interval" json:"session_refresh_interval,omitempty"`
3187 func (m *NatHaSetFailover) Reset() { *m = NatHaSetFailover{} }
3188 func (*NatHaSetFailover) GetMessageName() string { return "nat_ha_set_failover" }
3189 func (*NatHaSetFailover) GetCrcString() string { return "718246af" }
3190 func (*NatHaSetFailover) GetMessageType() api.MessageType {
3191 return api.RequestMessage
3194 func (m *NatHaSetFailover) Size() (size int) {
3198 size += 1 * 4 // m.IPAddress
3200 size += 4 // m.SessionRefreshInterval
3203 func (m *NatHaSetFailover) Marshal(b []byte) ([]byte, error) {
3205 b = make([]byte, m.Size())
3207 buf := codec.NewBuffer(b)
3208 buf.EncodeBytes(m.IPAddress[:], 4)
3209 buf.EncodeUint16(m.Port)
3210 buf.EncodeUint32(m.SessionRefreshInterval)
3211 return buf.Bytes(), nil
3213 func (m *NatHaSetFailover) Unmarshal(b []byte) error {
3214 buf := codec.NewBuffer(b)
3215 copy(m.IPAddress[:], buf.DecodeBytes(4))
3216 m.Port = buf.DecodeUint16()
3217 m.SessionRefreshInterval = buf.DecodeUint32()
3221 // NatHaSetFailoverReply defines message 'nat_ha_set_failover_reply'.
3222 type NatHaSetFailoverReply struct {
3223 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3226 func (m *NatHaSetFailoverReply) Reset() { *m = NatHaSetFailoverReply{} }
3227 func (*NatHaSetFailoverReply) GetMessageName() string { return "nat_ha_set_failover_reply" }
3228 func (*NatHaSetFailoverReply) GetCrcString() string { return "e8d4e804" }
3229 func (*NatHaSetFailoverReply) GetMessageType() api.MessageType {
3230 return api.ReplyMessage
3233 func (m *NatHaSetFailoverReply) Size() (size int) {
3237 size += 4 // m.Retval
3240 func (m *NatHaSetFailoverReply) Marshal(b []byte) ([]byte, error) {
3242 b = make([]byte, m.Size())
3244 buf := codec.NewBuffer(b)
3245 buf.EncodeInt32(m.Retval)
3246 return buf.Bytes(), nil
3248 func (m *NatHaSetFailoverReply) Unmarshal(b []byte) error {
3249 buf := codec.NewBuffer(b)
3250 m.Retval = buf.DecodeInt32()
3254 // NatHaSetListener defines message 'nat_ha_set_listener'.
3255 type NatHaSetListener struct {
3256 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
3257 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
3258 PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
3261 func (m *NatHaSetListener) Reset() { *m = NatHaSetListener{} }
3262 func (*NatHaSetListener) GetMessageName() string { return "nat_ha_set_listener" }
3263 func (*NatHaSetListener) GetCrcString() string { return "e4a8cb4e" }
3264 func (*NatHaSetListener) GetMessageType() api.MessageType {
3265 return api.RequestMessage
3268 func (m *NatHaSetListener) Size() (size int) {
3272 size += 1 * 4 // m.IPAddress
3274 size += 4 // m.PathMtu
3277 func (m *NatHaSetListener) Marshal(b []byte) ([]byte, error) {
3279 b = make([]byte, m.Size())
3281 buf := codec.NewBuffer(b)
3282 buf.EncodeBytes(m.IPAddress[:], 4)
3283 buf.EncodeUint16(m.Port)
3284 buf.EncodeUint32(m.PathMtu)
3285 return buf.Bytes(), nil
3287 func (m *NatHaSetListener) Unmarshal(b []byte) error {
3288 buf := codec.NewBuffer(b)
3289 copy(m.IPAddress[:], buf.DecodeBytes(4))
3290 m.Port = buf.DecodeUint16()
3291 m.PathMtu = buf.DecodeUint32()
3295 // NatHaSetListenerReply defines message 'nat_ha_set_listener_reply'.
3296 type NatHaSetListenerReply struct {
3297 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3300 func (m *NatHaSetListenerReply) Reset() { *m = NatHaSetListenerReply{} }
3301 func (*NatHaSetListenerReply) GetMessageName() string { return "nat_ha_set_listener_reply" }
3302 func (*NatHaSetListenerReply) GetCrcString() string { return "e8d4e804" }
3303 func (*NatHaSetListenerReply) GetMessageType() api.MessageType {
3304 return api.ReplyMessage
3307 func (m *NatHaSetListenerReply) Size() (size int) {
3311 size += 4 // m.Retval
3314 func (m *NatHaSetListenerReply) Marshal(b []byte) ([]byte, error) {
3316 b = make([]byte, m.Size())
3318 buf := codec.NewBuffer(b)
3319 buf.EncodeInt32(m.Retval)
3320 return buf.Bytes(), nil
3322 func (m *NatHaSetListenerReply) Unmarshal(b []byte) error {
3323 buf := codec.NewBuffer(b)
3324 m.Retval = buf.DecodeInt32()
3328 // NatIpfixEnableDisable defines message 'nat_ipfix_enable_disable'.
3329 // Deprecated: the message will be removed in the future versions
3330 type NatIpfixEnableDisable struct {
3331 DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"`
3332 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
3333 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
3336 func (m *NatIpfixEnableDisable) Reset() { *m = NatIpfixEnableDisable{} }
3337 func (*NatIpfixEnableDisable) GetMessageName() string { return "nat_ipfix_enable_disable" }
3338 func (*NatIpfixEnableDisable) GetCrcString() string { return "9af4a2d2" }
3339 func (*NatIpfixEnableDisable) GetMessageType() api.MessageType {
3340 return api.RequestMessage
3343 func (m *NatIpfixEnableDisable) Size() (size int) {
3347 size += 4 // m.DomainID
3348 size += 2 // m.SrcPort
3349 size += 1 // m.Enable
3352 func (m *NatIpfixEnableDisable) Marshal(b []byte) ([]byte, error) {
3354 b = make([]byte, m.Size())
3356 buf := codec.NewBuffer(b)
3357 buf.EncodeUint32(m.DomainID)
3358 buf.EncodeUint16(m.SrcPort)
3359 buf.EncodeBool(m.Enable)
3360 return buf.Bytes(), nil
3362 func (m *NatIpfixEnableDisable) Unmarshal(b []byte) error {
3363 buf := codec.NewBuffer(b)
3364 m.DomainID = buf.DecodeUint32()
3365 m.SrcPort = buf.DecodeUint16()
3366 m.Enable = buf.DecodeBool()
3370 // NatIpfixEnableDisableReply defines message 'nat_ipfix_enable_disable_reply'.
3371 // Deprecated: the message will be removed in the future versions
3372 type NatIpfixEnableDisableReply struct {
3373 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3376 func (m *NatIpfixEnableDisableReply) Reset() { *m = NatIpfixEnableDisableReply{} }
3377 func (*NatIpfixEnableDisableReply) GetMessageName() string { return "nat_ipfix_enable_disable_reply" }
3378 func (*NatIpfixEnableDisableReply) GetCrcString() string { return "e8d4e804" }
3379 func (*NatIpfixEnableDisableReply) GetMessageType() api.MessageType {
3380 return api.ReplyMessage
3383 func (m *NatIpfixEnableDisableReply) Size() (size int) {
3387 size += 4 // m.Retval
3390 func (m *NatIpfixEnableDisableReply) Marshal(b []byte) ([]byte, error) {
3392 b = make([]byte, m.Size())
3394 buf := codec.NewBuffer(b)
3395 buf.EncodeInt32(m.Retval)
3396 return buf.Bytes(), nil
3398 func (m *NatIpfixEnableDisableReply) Unmarshal(b []byte) error {
3399 buf := codec.NewBuffer(b)
3400 m.Retval = buf.DecodeInt32()
3404 // NatSetAddrAndPortAllocAlg defines message 'nat_set_addr_and_port_alloc_alg'.
3405 type NatSetAddrAndPortAllocAlg struct {
3406 Alg uint8 `binapi:"u8,name=alg" json:"alg,omitempty"`
3407 PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
3408 PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
3409 Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"`
3410 StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"`
3411 EndPort uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"`
3414 func (m *NatSetAddrAndPortAllocAlg) Reset() { *m = NatSetAddrAndPortAllocAlg{} }
3415 func (*NatSetAddrAndPortAllocAlg) GetMessageName() string { return "nat_set_addr_and_port_alloc_alg" }
3416 func (*NatSetAddrAndPortAllocAlg) GetCrcString() string { return "deeb746f" }
3417 func (*NatSetAddrAndPortAllocAlg) GetMessageType() api.MessageType {
3418 return api.RequestMessage
3421 func (m *NatSetAddrAndPortAllocAlg) Size() (size int) {
3426 size += 1 // m.PsidOffset
3427 size += 1 // m.PsidLength
3429 size += 2 // m.StartPort
3430 size += 2 // m.EndPort
3433 func (m *NatSetAddrAndPortAllocAlg) Marshal(b []byte) ([]byte, error) {
3435 b = make([]byte, m.Size())
3437 buf := codec.NewBuffer(b)
3438 buf.EncodeUint8(m.Alg)
3439 buf.EncodeUint8(m.PsidOffset)
3440 buf.EncodeUint8(m.PsidLength)
3441 buf.EncodeUint16(m.Psid)
3442 buf.EncodeUint16(m.StartPort)
3443 buf.EncodeUint16(m.EndPort)
3444 return buf.Bytes(), nil
3446 func (m *NatSetAddrAndPortAllocAlg) Unmarshal(b []byte) error {
3447 buf := codec.NewBuffer(b)
3448 m.Alg = buf.DecodeUint8()
3449 m.PsidOffset = buf.DecodeUint8()
3450 m.PsidLength = buf.DecodeUint8()
3451 m.Psid = buf.DecodeUint16()
3452 m.StartPort = buf.DecodeUint16()
3453 m.EndPort = buf.DecodeUint16()
3457 // NatSetAddrAndPortAllocAlgReply defines message 'nat_set_addr_and_port_alloc_alg_reply'.
3458 type NatSetAddrAndPortAllocAlgReply struct {
3459 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3462 func (m *NatSetAddrAndPortAllocAlgReply) Reset() { *m = NatSetAddrAndPortAllocAlgReply{} }
3463 func (*NatSetAddrAndPortAllocAlgReply) GetMessageName() string {
3464 return "nat_set_addr_and_port_alloc_alg_reply"
3466 func (*NatSetAddrAndPortAllocAlgReply) GetCrcString() string { return "e8d4e804" }
3467 func (*NatSetAddrAndPortAllocAlgReply) GetMessageType() api.MessageType {
3468 return api.ReplyMessage
3471 func (m *NatSetAddrAndPortAllocAlgReply) Size() (size int) {
3475 size += 4 // m.Retval
3478 func (m *NatSetAddrAndPortAllocAlgReply) Marshal(b []byte) ([]byte, error) {
3480 b = make([]byte, m.Size())
3482 buf := codec.NewBuffer(b)
3483 buf.EncodeInt32(m.Retval)
3484 return buf.Bytes(), nil
3486 func (m *NatSetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error {
3487 buf := codec.NewBuffer(b)
3488 m.Retval = buf.DecodeInt32()
3492 // NatSetLogLevel defines message 'nat_set_log_level'.
3493 // Deprecated: the message will be removed in the future versions
3494 type NatSetLogLevel struct {
3495 LogLevel nat_types.NatLogLevel `binapi:"nat_log_level,name=log_level" json:"log_level,omitempty"`
3498 func (m *NatSetLogLevel) Reset() { *m = NatSetLogLevel{} }
3499 func (*NatSetLogLevel) GetMessageName() string { return "nat_set_log_level" }
3500 func (*NatSetLogLevel) GetCrcString() string { return "70076bfe" }
3501 func (*NatSetLogLevel) GetMessageType() api.MessageType {
3502 return api.RequestMessage
3505 func (m *NatSetLogLevel) Size() (size int) {
3509 size += 1 // m.LogLevel
3512 func (m *NatSetLogLevel) Marshal(b []byte) ([]byte, error) {
3514 b = make([]byte, m.Size())
3516 buf := codec.NewBuffer(b)
3517 buf.EncodeUint8(uint8(m.LogLevel))
3518 return buf.Bytes(), nil
3520 func (m *NatSetLogLevel) Unmarshal(b []byte) error {
3521 buf := codec.NewBuffer(b)
3522 m.LogLevel = nat_types.NatLogLevel(buf.DecodeUint8())
3526 // NatSetLogLevelReply defines message 'nat_set_log_level_reply'.
3527 // Deprecated: the message will be removed in the future versions
3528 type NatSetLogLevelReply struct {
3529 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3532 func (m *NatSetLogLevelReply) Reset() { *m = NatSetLogLevelReply{} }
3533 func (*NatSetLogLevelReply) GetMessageName() string { return "nat_set_log_level_reply" }
3534 func (*NatSetLogLevelReply) GetCrcString() string { return "e8d4e804" }
3535 func (*NatSetLogLevelReply) GetMessageType() api.MessageType {
3536 return api.ReplyMessage
3539 func (m *NatSetLogLevelReply) Size() (size int) {
3543 size += 4 // m.Retval
3546 func (m *NatSetLogLevelReply) Marshal(b []byte) ([]byte, error) {
3548 b = make([]byte, m.Size())
3550 buf := codec.NewBuffer(b)
3551 buf.EncodeInt32(m.Retval)
3552 return buf.Bytes(), nil
3554 func (m *NatSetLogLevelReply) Unmarshal(b []byte) error {
3555 buf := codec.NewBuffer(b)
3556 m.Retval = buf.DecodeInt32()
3560 // NatSetMssClamping defines message 'nat_set_mss_clamping'.
3561 type NatSetMssClamping struct {
3562 MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"`
3563 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
3566 func (m *NatSetMssClamping) Reset() { *m = NatSetMssClamping{} }
3567 func (*NatSetMssClamping) GetMessageName() string { return "nat_set_mss_clamping" }
3568 func (*NatSetMssClamping) GetCrcString() string { return "25e90abb" }
3569 func (*NatSetMssClamping) GetMessageType() api.MessageType {
3570 return api.RequestMessage
3573 func (m *NatSetMssClamping) Size() (size int) {
3577 size += 2 // m.MssValue
3578 size += 1 // m.Enable
3581 func (m *NatSetMssClamping) Marshal(b []byte) ([]byte, error) {
3583 b = make([]byte, m.Size())
3585 buf := codec.NewBuffer(b)
3586 buf.EncodeUint16(m.MssValue)
3587 buf.EncodeBool(m.Enable)
3588 return buf.Bytes(), nil
3590 func (m *NatSetMssClamping) Unmarshal(b []byte) error {
3591 buf := codec.NewBuffer(b)
3592 m.MssValue = buf.DecodeUint16()
3593 m.Enable = buf.DecodeBool()
3597 // NatSetMssClampingReply defines message 'nat_set_mss_clamping_reply'.
3598 type NatSetMssClampingReply struct {
3599 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3602 func (m *NatSetMssClampingReply) Reset() { *m = NatSetMssClampingReply{} }
3603 func (*NatSetMssClampingReply) GetMessageName() string { return "nat_set_mss_clamping_reply" }
3604 func (*NatSetMssClampingReply) GetCrcString() string { return "e8d4e804" }
3605 func (*NatSetMssClampingReply) GetMessageType() api.MessageType {
3606 return api.ReplyMessage
3609 func (m *NatSetMssClampingReply) Size() (size int) {
3613 size += 4 // m.Retval
3616 func (m *NatSetMssClampingReply) Marshal(b []byte) ([]byte, error) {
3618 b = make([]byte, m.Size())
3620 buf := codec.NewBuffer(b)
3621 buf.EncodeInt32(m.Retval)
3622 return buf.Bytes(), nil
3624 func (m *NatSetMssClampingReply) Unmarshal(b []byte) error {
3625 buf := codec.NewBuffer(b)
3626 m.Retval = buf.DecodeInt32()
3630 // NatSetTimeouts defines message 'nat_set_timeouts'.
3631 // Deprecated: the message will be removed in the future versions
3632 type NatSetTimeouts struct {
3633 UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"`
3634 TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"`
3635 TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"`
3636 ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"`
3639 func (m *NatSetTimeouts) Reset() { *m = NatSetTimeouts{} }
3640 func (*NatSetTimeouts) GetMessageName() string { return "nat_set_timeouts" }
3641 func (*NatSetTimeouts) GetCrcString() string { return "d4746b16" }
3642 func (*NatSetTimeouts) GetMessageType() api.MessageType {
3643 return api.RequestMessage
3646 func (m *NatSetTimeouts) Size() (size int) {
3651 size += 4 // m.TCPEstablished
3652 size += 4 // m.TCPTransitory
3656 func (m *NatSetTimeouts) Marshal(b []byte) ([]byte, error) {
3658 b = make([]byte, m.Size())
3660 buf := codec.NewBuffer(b)
3661 buf.EncodeUint32(m.UDP)
3662 buf.EncodeUint32(m.TCPEstablished)
3663 buf.EncodeUint32(m.TCPTransitory)
3664 buf.EncodeUint32(m.ICMP)
3665 return buf.Bytes(), nil
3667 func (m *NatSetTimeouts) Unmarshal(b []byte) error {
3668 buf := codec.NewBuffer(b)
3669 m.UDP = buf.DecodeUint32()
3670 m.TCPEstablished = buf.DecodeUint32()
3671 m.TCPTransitory = buf.DecodeUint32()
3672 m.ICMP = buf.DecodeUint32()
3676 // NatSetTimeoutsReply defines message 'nat_set_timeouts_reply'.
3677 // Deprecated: the message will be removed in the future versions
3678 type NatSetTimeoutsReply struct {
3679 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3682 func (m *NatSetTimeoutsReply) Reset() { *m = NatSetTimeoutsReply{} }
3683 func (*NatSetTimeoutsReply) GetMessageName() string { return "nat_set_timeouts_reply" }
3684 func (*NatSetTimeoutsReply) GetCrcString() string { return "e8d4e804" }
3685 func (*NatSetTimeoutsReply) GetMessageType() api.MessageType {
3686 return api.ReplyMessage
3689 func (m *NatSetTimeoutsReply) Size() (size int) {
3693 size += 4 // m.Retval
3696 func (m *NatSetTimeoutsReply) Marshal(b []byte) ([]byte, error) {
3698 b = make([]byte, m.Size())
3700 buf := codec.NewBuffer(b)
3701 buf.EncodeInt32(m.Retval)
3702 return buf.Bytes(), nil
3704 func (m *NatSetTimeoutsReply) Unmarshal(b []byte) error {
3705 buf := codec.NewBuffer(b)
3706 m.Retval = buf.DecodeInt32()
3710 // NatSetWorkers defines message 'nat_set_workers'.
3711 type NatSetWorkers struct {
3712 WorkerMask uint64 `binapi:"u64,name=worker_mask" json:"worker_mask,omitempty"`
3715 func (m *NatSetWorkers) Reset() { *m = NatSetWorkers{} }
3716 func (*NatSetWorkers) GetMessageName() string { return "nat_set_workers" }
3717 func (*NatSetWorkers) GetCrcString() string { return "da926638" }
3718 func (*NatSetWorkers) GetMessageType() api.MessageType {
3719 return api.RequestMessage
3722 func (m *NatSetWorkers) Size() (size int) {
3726 size += 8 // m.WorkerMask
3729 func (m *NatSetWorkers) Marshal(b []byte) ([]byte, error) {
3731 b = make([]byte, m.Size())
3733 buf := codec.NewBuffer(b)
3734 buf.EncodeUint64(m.WorkerMask)
3735 return buf.Bytes(), nil
3737 func (m *NatSetWorkers) Unmarshal(b []byte) error {
3738 buf := codec.NewBuffer(b)
3739 m.WorkerMask = buf.DecodeUint64()
3743 // NatSetWorkersReply defines message 'nat_set_workers_reply'.
3744 type NatSetWorkersReply struct {
3745 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3748 func (m *NatSetWorkersReply) Reset() { *m = NatSetWorkersReply{} }
3749 func (*NatSetWorkersReply) GetMessageName() string { return "nat_set_workers_reply" }
3750 func (*NatSetWorkersReply) GetCrcString() string { return "e8d4e804" }
3751 func (*NatSetWorkersReply) GetMessageType() api.MessageType {
3752 return api.ReplyMessage
3755 func (m *NatSetWorkersReply) Size() (size int) {
3759 size += 4 // m.Retval
3762 func (m *NatSetWorkersReply) Marshal(b []byte) ([]byte, error) {
3764 b = make([]byte, m.Size())
3766 buf := codec.NewBuffer(b)
3767 buf.EncodeInt32(m.Retval)
3768 return buf.Bytes(), nil
3770 func (m *NatSetWorkersReply) Unmarshal(b []byte) error {
3771 buf := codec.NewBuffer(b)
3772 m.Retval = buf.DecodeInt32()
3776 // NatShowConfig defines message 'nat_show_config'.
3777 // Deprecated: the message will be removed in the future versions
3778 type NatShowConfig struct{}
3780 func (m *NatShowConfig) Reset() { *m = NatShowConfig{} }
3781 func (*NatShowConfig) GetMessageName() string { return "nat_show_config" }
3782 func (*NatShowConfig) GetCrcString() string { return "51077d14" }
3783 func (*NatShowConfig) GetMessageType() api.MessageType {
3784 return api.RequestMessage
3787 func (m *NatShowConfig) Size() (size int) {
3793 func (m *NatShowConfig) Marshal(b []byte) ([]byte, error) {
3795 b = make([]byte, m.Size())
3797 buf := codec.NewBuffer(b)
3798 return buf.Bytes(), nil
3800 func (m *NatShowConfig) Unmarshal(b []byte) error {
3804 // NatShowConfig2 defines message 'nat_show_config_2'.
3805 // Deprecated: the message will be removed in the future versions
3806 type NatShowConfig2 struct{}
3808 func (m *NatShowConfig2) Reset() { *m = NatShowConfig2{} }
3809 func (*NatShowConfig2) GetMessageName() string { return "nat_show_config_2" }
3810 func (*NatShowConfig2) GetCrcString() string { return "51077d14" }
3811 func (*NatShowConfig2) GetMessageType() api.MessageType {
3812 return api.RequestMessage
3815 func (m *NatShowConfig2) Size() (size int) {
3821 func (m *NatShowConfig2) Marshal(b []byte) ([]byte, error) {
3823 b = make([]byte, m.Size())
3825 buf := codec.NewBuffer(b)
3826 return buf.Bytes(), nil
3828 func (m *NatShowConfig2) Unmarshal(b []byte) error {
3832 // NatShowConfig2Reply defines message 'nat_show_config_2_reply'.
3833 // Deprecated: the message will be removed in the future versions
3834 type NatShowConfig2Reply struct {
3835 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3836 StaticMappingOnly bool `binapi:"bool,name=static_mapping_only" json:"static_mapping_only,omitempty"`
3837 StaticMappingConnectionTracking bool `binapi:"bool,name=static_mapping_connection_tracking" json:"static_mapping_connection_tracking,omitempty"`
3838 Deterministic bool `binapi:"bool,name=deterministic" json:"deterministic,omitempty"`
3839 EndpointDependent bool `binapi:"bool,name=endpoint_dependent" json:"endpoint_dependent,omitempty"`
3840 Out2inDpo bool `binapi:"bool,name=out2in_dpo" json:"out2in_dpo,omitempty"`
3841 DsliteCe bool `binapi:"bool,name=dslite_ce" json:"dslite_ce,omitempty"`
3842 TranslationBuckets uint32 `binapi:"u32,name=translation_buckets" json:"translation_buckets,omitempty"`
3843 TranslationMemorySize uint64 `binapi:"u64,name=translation_memory_size" json:"translation_memory_size,omitempty"`
3844 UserBuckets uint32 `binapi:"u32,name=user_buckets" json:"user_buckets,omitempty"`
3845 UserMemorySize uint64 `binapi:"u64,name=user_memory_size" json:"user_memory_size,omitempty"`
3846 MaxTranslationsPerUser uint32 `binapi:"u32,name=max_translations_per_user" json:"max_translations_per_user,omitempty"`
3847 OutsideVrfID uint32 `binapi:"u32,name=outside_vrf_id" json:"outside_vrf_id,omitempty"`
3848 InsideVrfID uint32 `binapi:"u32,name=inside_vrf_id" json:"inside_vrf_id,omitempty"`
3849 Nat64BibBuckets uint32 `binapi:"u32,name=nat64_bib_buckets" json:"nat64_bib_buckets,omitempty"`
3850 Nat64BibMemorySize uint64 `binapi:"u64,name=nat64_bib_memory_size" json:"nat64_bib_memory_size,omitempty"`
3851 Nat64StBuckets uint32 `binapi:"u32,name=nat64_st_buckets" json:"nat64_st_buckets,omitempty"`
3852 Nat64StMemorySize uint64 `binapi:"u64,name=nat64_st_memory_size" json:"nat64_st_memory_size,omitempty"`
3853 MaxTranslationsPerThread uint32 `binapi:"u32,name=max_translations_per_thread" json:"max_translations_per_thread,omitempty"`
3854 MaxUsersPerThread uint32 `binapi:"u32,name=max_users_per_thread" json:"max_users_per_thread,omitempty"`
3857 func (m *NatShowConfig2Reply) Reset() { *m = NatShowConfig2Reply{} }
3858 func (*NatShowConfig2Reply) GetMessageName() string { return "nat_show_config_2_reply" }
3859 func (*NatShowConfig2Reply) GetCrcString() string { return "0404a5b4" }
3860 func (*NatShowConfig2Reply) GetMessageType() api.MessageType {
3861 return api.ReplyMessage
3864 func (m *NatShowConfig2Reply) Size() (size int) {
3868 size += 4 // m.Retval
3869 size += 1 // m.StaticMappingOnly
3870 size += 1 // m.StaticMappingConnectionTracking
3871 size += 1 // m.Deterministic
3872 size += 1 // m.EndpointDependent
3873 size += 1 // m.Out2inDpo
3874 size += 1 // m.DsliteCe
3875 size += 4 // m.TranslationBuckets
3876 size += 8 // m.TranslationMemorySize
3877 size += 4 // m.UserBuckets
3878 size += 8 // m.UserMemorySize
3879 size += 4 // m.MaxTranslationsPerUser
3880 size += 4 // m.OutsideVrfID
3881 size += 4 // m.InsideVrfID
3882 size += 4 // m.Nat64BibBuckets
3883 size += 8 // m.Nat64BibMemorySize
3884 size += 4 // m.Nat64StBuckets
3885 size += 8 // m.Nat64StMemorySize
3886 size += 4 // m.MaxTranslationsPerThread
3887 size += 4 // m.MaxUsersPerThread
3890 func (m *NatShowConfig2Reply) Marshal(b []byte) ([]byte, error) {
3892 b = make([]byte, m.Size())
3894 buf := codec.NewBuffer(b)
3895 buf.EncodeInt32(m.Retval)
3896 buf.EncodeBool(m.StaticMappingOnly)
3897 buf.EncodeBool(m.StaticMappingConnectionTracking)
3898 buf.EncodeBool(m.Deterministic)
3899 buf.EncodeBool(m.EndpointDependent)
3900 buf.EncodeBool(m.Out2inDpo)
3901 buf.EncodeBool(m.DsliteCe)
3902 buf.EncodeUint32(m.TranslationBuckets)
3903 buf.EncodeUint64(m.TranslationMemorySize)
3904 buf.EncodeUint32(m.UserBuckets)
3905 buf.EncodeUint64(m.UserMemorySize)
3906 buf.EncodeUint32(m.MaxTranslationsPerUser)
3907 buf.EncodeUint32(m.OutsideVrfID)
3908 buf.EncodeUint32(m.InsideVrfID)
3909 buf.EncodeUint32(m.Nat64BibBuckets)
3910 buf.EncodeUint64(m.Nat64BibMemorySize)
3911 buf.EncodeUint32(m.Nat64StBuckets)
3912 buf.EncodeUint64(m.Nat64StMemorySize)
3913 buf.EncodeUint32(m.MaxTranslationsPerThread)
3914 buf.EncodeUint32(m.MaxUsersPerThread)
3915 return buf.Bytes(), nil
3917 func (m *NatShowConfig2Reply) Unmarshal(b []byte) error {
3918 buf := codec.NewBuffer(b)
3919 m.Retval = buf.DecodeInt32()
3920 m.StaticMappingOnly = buf.DecodeBool()
3921 m.StaticMappingConnectionTracking = buf.DecodeBool()
3922 m.Deterministic = buf.DecodeBool()
3923 m.EndpointDependent = buf.DecodeBool()
3924 m.Out2inDpo = buf.DecodeBool()
3925 m.DsliteCe = buf.DecodeBool()
3926 m.TranslationBuckets = buf.DecodeUint32()
3927 m.TranslationMemorySize = buf.DecodeUint64()
3928 m.UserBuckets = buf.DecodeUint32()
3929 m.UserMemorySize = buf.DecodeUint64()
3930 m.MaxTranslationsPerUser = buf.DecodeUint32()
3931 m.OutsideVrfID = buf.DecodeUint32()
3932 m.InsideVrfID = buf.DecodeUint32()
3933 m.Nat64BibBuckets = buf.DecodeUint32()
3934 m.Nat64BibMemorySize = buf.DecodeUint64()
3935 m.Nat64StBuckets = buf.DecodeUint32()
3936 m.Nat64StMemorySize = buf.DecodeUint64()
3937 m.MaxTranslationsPerThread = buf.DecodeUint32()
3938 m.MaxUsersPerThread = buf.DecodeUint32()
3942 // NatShowConfigReply defines message 'nat_show_config_reply'.
3943 // Deprecated: the message will be removed in the future versions
3944 type NatShowConfigReply struct {
3945 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3946 StaticMappingOnly bool `binapi:"bool,name=static_mapping_only" json:"static_mapping_only,omitempty"`
3947 StaticMappingConnectionTracking bool `binapi:"bool,name=static_mapping_connection_tracking" json:"static_mapping_connection_tracking,omitempty"`
3948 Deterministic bool `binapi:"bool,name=deterministic" json:"deterministic,omitempty"`
3949 EndpointDependent bool `binapi:"bool,name=endpoint_dependent" json:"endpoint_dependent,omitempty"`
3950 Out2inDpo bool `binapi:"bool,name=out2in_dpo" json:"out2in_dpo,omitempty"`
3951 DsliteCe bool `binapi:"bool,name=dslite_ce" json:"dslite_ce,omitempty"`
3952 TranslationBuckets uint32 `binapi:"u32,name=translation_buckets" json:"translation_buckets,omitempty"`
3953 TranslationMemorySize uint32 `binapi:"u32,name=translation_memory_size" json:"translation_memory_size,omitempty"`
3954 UserBuckets uint32 `binapi:"u32,name=user_buckets" json:"user_buckets,omitempty"`
3955 UserMemorySize uint64 `binapi:"u64,name=user_memory_size" json:"user_memory_size,omitempty"`
3956 MaxTranslationsPerUser uint32 `binapi:"u32,name=max_translations_per_user" json:"max_translations_per_user,omitempty"`
3957 OutsideVrfID uint32 `binapi:"u32,name=outside_vrf_id" json:"outside_vrf_id,omitempty"`
3958 InsideVrfID uint32 `binapi:"u32,name=inside_vrf_id" json:"inside_vrf_id,omitempty"`
3959 Nat64BibBuckets uint32 `binapi:"u32,name=nat64_bib_buckets" json:"nat64_bib_buckets,omitempty"`
3960 Nat64BibMemorySize uint64 `binapi:"u64,name=nat64_bib_memory_size" json:"nat64_bib_memory_size,omitempty"`
3961 Nat64StBuckets uint32 `binapi:"u32,name=nat64_st_buckets" json:"nat64_st_buckets,omitempty"`
3962 Nat64StMemorySize uint64 `binapi:"u64,name=nat64_st_memory_size" json:"nat64_st_memory_size,omitempty"`
3965 func (m *NatShowConfigReply) Reset() { *m = NatShowConfigReply{} }
3966 func (*NatShowConfigReply) GetMessageName() string { return "nat_show_config_reply" }
3967 func (*NatShowConfigReply) GetCrcString() string { return "7903ef06" }
3968 func (*NatShowConfigReply) GetMessageType() api.MessageType {
3969 return api.ReplyMessage
3972 func (m *NatShowConfigReply) Size() (size int) {
3976 size += 4 // m.Retval
3977 size += 1 // m.StaticMappingOnly
3978 size += 1 // m.StaticMappingConnectionTracking
3979 size += 1 // m.Deterministic
3980 size += 1 // m.EndpointDependent
3981 size += 1 // m.Out2inDpo
3982 size += 1 // m.DsliteCe
3983 size += 4 // m.TranslationBuckets
3984 size += 4 // m.TranslationMemorySize
3985 size += 4 // m.UserBuckets
3986 size += 8 // m.UserMemorySize
3987 size += 4 // m.MaxTranslationsPerUser
3988 size += 4 // m.OutsideVrfID
3989 size += 4 // m.InsideVrfID
3990 size += 4 // m.Nat64BibBuckets
3991 size += 8 // m.Nat64BibMemorySize
3992 size += 4 // m.Nat64StBuckets
3993 size += 8 // m.Nat64StMemorySize
3996 func (m *NatShowConfigReply) Marshal(b []byte) ([]byte, error) {
3998 b = make([]byte, m.Size())
4000 buf := codec.NewBuffer(b)
4001 buf.EncodeInt32(m.Retval)
4002 buf.EncodeBool(m.StaticMappingOnly)
4003 buf.EncodeBool(m.StaticMappingConnectionTracking)
4004 buf.EncodeBool(m.Deterministic)
4005 buf.EncodeBool(m.EndpointDependent)
4006 buf.EncodeBool(m.Out2inDpo)
4007 buf.EncodeBool(m.DsliteCe)
4008 buf.EncodeUint32(m.TranslationBuckets)
4009 buf.EncodeUint32(m.TranslationMemorySize)
4010 buf.EncodeUint32(m.UserBuckets)
4011 buf.EncodeUint64(m.UserMemorySize)
4012 buf.EncodeUint32(m.MaxTranslationsPerUser)
4013 buf.EncodeUint32(m.OutsideVrfID)
4014 buf.EncodeUint32(m.InsideVrfID)
4015 buf.EncodeUint32(m.Nat64BibBuckets)
4016 buf.EncodeUint64(m.Nat64BibMemorySize)
4017 buf.EncodeUint32(m.Nat64StBuckets)
4018 buf.EncodeUint64(m.Nat64StMemorySize)
4019 return buf.Bytes(), nil
4021 func (m *NatShowConfigReply) Unmarshal(b []byte) error {
4022 buf := codec.NewBuffer(b)
4023 m.Retval = buf.DecodeInt32()
4024 m.StaticMappingOnly = buf.DecodeBool()
4025 m.StaticMappingConnectionTracking = buf.DecodeBool()
4026 m.Deterministic = buf.DecodeBool()
4027 m.EndpointDependent = buf.DecodeBool()
4028 m.Out2inDpo = buf.DecodeBool()
4029 m.DsliteCe = buf.DecodeBool()
4030 m.TranslationBuckets = buf.DecodeUint32()
4031 m.TranslationMemorySize = buf.DecodeUint32()
4032 m.UserBuckets = buf.DecodeUint32()
4033 m.UserMemorySize = buf.DecodeUint64()
4034 m.MaxTranslationsPerUser = buf.DecodeUint32()
4035 m.OutsideVrfID = buf.DecodeUint32()
4036 m.InsideVrfID = buf.DecodeUint32()
4037 m.Nat64BibBuckets = buf.DecodeUint32()
4038 m.Nat64BibMemorySize = buf.DecodeUint64()
4039 m.Nat64StBuckets = buf.DecodeUint32()
4040 m.Nat64StMemorySize = buf.DecodeUint64()
4044 // NatWorkerDetails defines message 'nat_worker_details'.
4045 type NatWorkerDetails struct {
4046 WorkerIndex uint32 `binapi:"u32,name=worker_index" json:"worker_index,omitempty"`
4047 LcoreID uint32 `binapi:"u32,name=lcore_id" json:"lcore_id,omitempty"`
4048 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
4051 func (m *NatWorkerDetails) Reset() { *m = NatWorkerDetails{} }
4052 func (*NatWorkerDetails) GetMessageName() string { return "nat_worker_details" }
4053 func (*NatWorkerDetails) GetCrcString() string { return "84bf06fc" }
4054 func (*NatWorkerDetails) GetMessageType() api.MessageType {
4055 return api.ReplyMessage
4058 func (m *NatWorkerDetails) Size() (size int) {
4062 size += 4 // m.WorkerIndex
4063 size += 4 // m.LcoreID
4064 size += 64 // m.Name
4067 func (m *NatWorkerDetails) Marshal(b []byte) ([]byte, error) {
4069 b = make([]byte, m.Size())
4071 buf := codec.NewBuffer(b)
4072 buf.EncodeUint32(m.WorkerIndex)
4073 buf.EncodeUint32(m.LcoreID)
4074 buf.EncodeString(m.Name, 64)
4075 return buf.Bytes(), nil
4077 func (m *NatWorkerDetails) Unmarshal(b []byte) error {
4078 buf := codec.NewBuffer(b)
4079 m.WorkerIndex = buf.DecodeUint32()
4080 m.LcoreID = buf.DecodeUint32()
4081 m.Name = buf.DecodeString(64)
4085 // NatWorkerDump defines message 'nat_worker_dump'.
4086 type NatWorkerDump struct{}
4088 func (m *NatWorkerDump) Reset() { *m = NatWorkerDump{} }
4089 func (*NatWorkerDump) GetMessageName() string { return "nat_worker_dump" }
4090 func (*NatWorkerDump) GetCrcString() string { return "51077d14" }
4091 func (*NatWorkerDump) GetMessageType() api.MessageType {
4092 return api.RequestMessage
4095 func (m *NatWorkerDump) Size() (size int) {
4101 func (m *NatWorkerDump) Marshal(b []byte) ([]byte, error) {
4103 b = make([]byte, m.Size())
4105 buf := codec.NewBuffer(b)
4106 return buf.Bytes(), nil
4108 func (m *NatWorkerDump) Unmarshal(b []byte) error {
4112 func init() { file_nat44_ed_binapi_init() }
4113 func file_nat44_ed_binapi_init() {
4114 api.RegisterMessage((*Nat44AddDelAddressRange)(nil), "nat44_add_del_address_range_6f2b8055")
4115 api.RegisterMessage((*Nat44AddDelAddressRangeReply)(nil), "nat44_add_del_address_range_reply_e8d4e804")
4116 api.RegisterMessage((*Nat44AddDelIdentityMapping)(nil), "nat44_add_del_identity_mapping_02faaa22")
4117 api.RegisterMessage((*Nat44AddDelIdentityMappingReply)(nil), "nat44_add_del_identity_mapping_reply_e8d4e804")
4118 api.RegisterMessage((*Nat44AddDelInterfaceAddr)(nil), "nat44_add_del_interface_addr_4aed50c0")
4119 api.RegisterMessage((*Nat44AddDelInterfaceAddrReply)(nil), "nat44_add_del_interface_addr_reply_e8d4e804")
4120 api.RegisterMessage((*Nat44AddDelLbStaticMapping)(nil), "nat44_add_del_lb_static_mapping_4f68ee9d")
4121 api.RegisterMessage((*Nat44AddDelLbStaticMappingReply)(nil), "nat44_add_del_lb_static_mapping_reply_e8d4e804")
4122 api.RegisterMessage((*Nat44AddDelStaticMapping)(nil), "nat44_add_del_static_mapping_5ae5f03e")
4123 api.RegisterMessage((*Nat44AddDelStaticMappingReply)(nil), "nat44_add_del_static_mapping_reply_e8d4e804")
4124 api.RegisterMessage((*Nat44AddDelStaticMappingV2)(nil), "nat44_add_del_static_mapping_v2_5e205f1a")
4125 api.RegisterMessage((*Nat44AddDelStaticMappingV2Reply)(nil), "nat44_add_del_static_mapping_v2_reply_e8d4e804")
4126 api.RegisterMessage((*Nat44AddressDetails)(nil), "nat44_address_details_0d1beac1")
4127 api.RegisterMessage((*Nat44AddressDump)(nil), "nat44_address_dump_51077d14")
4128 api.RegisterMessage((*Nat44DelSession)(nil), "nat44_del_session_15a5bf8c")
4129 api.RegisterMessage((*Nat44DelSessionReply)(nil), "nat44_del_session_reply_e8d4e804")
4130 api.RegisterMessage((*Nat44DelUser)(nil), "nat44_del_user_99a9f998")
4131 api.RegisterMessage((*Nat44DelUserReply)(nil), "nat44_del_user_reply_e8d4e804")
4132 api.RegisterMessage((*Nat44EdPluginEnableDisable)(nil), "nat44_ed_plugin_enable_disable_be17f8dd")
4133 api.RegisterMessage((*Nat44EdPluginEnableDisableReply)(nil), "nat44_ed_plugin_enable_disable_reply_e8d4e804")
4134 api.RegisterMessage((*Nat44EdSetFqOptions)(nil), "nat44_ed_set_fq_options_2399bd71")
4135 api.RegisterMessage((*Nat44EdSetFqOptionsReply)(nil), "nat44_ed_set_fq_options_reply_e8d4e804")
4136 api.RegisterMessage((*Nat44EdShowFqOptions)(nil), "nat44_ed_show_fq_options_51077d14")
4137 api.RegisterMessage((*Nat44EdShowFqOptionsReply)(nil), "nat44_ed_show_fq_options_reply_7213b545")
4138 api.RegisterMessage((*Nat44ForwardingEnableDisable)(nil), "nat44_forwarding_enable_disable_b3e225d2")
4139 api.RegisterMessage((*Nat44ForwardingEnableDisableReply)(nil), "nat44_forwarding_enable_disable_reply_e8d4e804")
4140 api.RegisterMessage((*Nat44ForwardingIsEnabled)(nil), "nat44_forwarding_is_enabled_51077d14")
4141 api.RegisterMessage((*Nat44ForwardingIsEnabledReply)(nil), "nat44_forwarding_is_enabled_reply_46924a06")
4142 api.RegisterMessage((*Nat44IdentityMappingDetails)(nil), "nat44_identity_mapping_details_2a52a030")
4143 api.RegisterMessage((*Nat44IdentityMappingDump)(nil), "nat44_identity_mapping_dump_51077d14")
4144 api.RegisterMessage((*Nat44InterfaceAddDelFeature)(nil), "nat44_interface_add_del_feature_f3699b83")
4145 api.RegisterMessage((*Nat44InterfaceAddDelFeatureReply)(nil), "nat44_interface_add_del_feature_reply_e8d4e804")
4146 api.RegisterMessage((*Nat44InterfaceAddDelOutputFeature)(nil), "nat44_interface_add_del_output_feature_f3699b83")
4147 api.RegisterMessage((*Nat44InterfaceAddDelOutputFeatureReply)(nil), "nat44_interface_add_del_output_feature_reply_e8d4e804")
4148 api.RegisterMessage((*Nat44InterfaceAddrDetails)(nil), "nat44_interface_addr_details_e4aca9ca")
4149 api.RegisterMessage((*Nat44InterfaceAddrDump)(nil), "nat44_interface_addr_dump_51077d14")
4150 api.RegisterMessage((*Nat44InterfaceDetails)(nil), "nat44_interface_details_5d286289")
4151 api.RegisterMessage((*Nat44InterfaceDump)(nil), "nat44_interface_dump_51077d14")
4152 api.RegisterMessage((*Nat44InterfaceOutputFeatureDetails)(nil), "nat44_interface_output_feature_details_5d286289")
4153 api.RegisterMessage((*Nat44InterfaceOutputFeatureDump)(nil), "nat44_interface_output_feature_dump_51077d14")
4154 api.RegisterMessage((*Nat44LbStaticMappingAddDelLocal)(nil), "nat44_lb_static_mapping_add_del_local_7ca47547")
4155 api.RegisterMessage((*Nat44LbStaticMappingAddDelLocalReply)(nil), "nat44_lb_static_mapping_add_del_local_reply_e8d4e804")
4156 api.RegisterMessage((*Nat44LbStaticMappingDetails)(nil), "nat44_lb_static_mapping_details_ed5ce876")
4157 api.RegisterMessage((*Nat44LbStaticMappingDump)(nil), "nat44_lb_static_mapping_dump_51077d14")
4158 api.RegisterMessage((*Nat44PluginEnableDisable)(nil), "nat44_plugin_enable_disable_dea0d501")
4159 api.RegisterMessage((*Nat44PluginEnableDisableReply)(nil), "nat44_plugin_enable_disable_reply_e8d4e804")
4160 api.RegisterMessage((*Nat44SessionCleanup)(nil), "nat44_session_cleanup_51077d14")
4161 api.RegisterMessage((*Nat44SessionCleanupReply)(nil), "nat44_session_cleanup_reply_e8d4e804")
4162 api.RegisterMessage((*Nat44SetSessionLimit)(nil), "nat44_set_session_limit_8899bbb1")
4163 api.RegisterMessage((*Nat44SetSessionLimitReply)(nil), "nat44_set_session_limit_reply_e8d4e804")
4164 api.RegisterMessage((*Nat44ShowRunningConfig)(nil), "nat44_show_running_config_51077d14")
4165 api.RegisterMessage((*Nat44ShowRunningConfigReply)(nil), "nat44_show_running_config_reply_93d8e267")
4166 api.RegisterMessage((*Nat44StaticMappingDetails)(nil), "nat44_static_mapping_details_06cb40b2")
4167 api.RegisterMessage((*Nat44StaticMappingDump)(nil), "nat44_static_mapping_dump_51077d14")
4168 api.RegisterMessage((*Nat44UserDetails)(nil), "nat44_user_details_355896c2")
4169 api.RegisterMessage((*Nat44UserDump)(nil), "nat44_user_dump_51077d14")
4170 api.RegisterMessage((*Nat44UserSessionDetails)(nil), "nat44_user_session_details_2cf6e16d")
4171 api.RegisterMessage((*Nat44UserSessionDump)(nil), "nat44_user_session_dump_e1899c98")
4172 api.RegisterMessage((*NatControlPing)(nil), "nat_control_ping_51077d14")
4173 api.RegisterMessage((*NatControlPingReply)(nil), "nat_control_ping_reply_f6b0b8ca")
4174 api.RegisterMessage((*NatGetAddrAndPortAllocAlg)(nil), "nat_get_addr_and_port_alloc_alg_51077d14")
4175 api.RegisterMessage((*NatGetAddrAndPortAllocAlgReply)(nil), "nat_get_addr_and_port_alloc_alg_reply_3607a7d0")
4176 api.RegisterMessage((*NatGetMssClamping)(nil), "nat_get_mss_clamping_51077d14")
4177 api.RegisterMessage((*NatGetMssClampingReply)(nil), "nat_get_mss_clamping_reply_1c0b2a78")
4178 api.RegisterMessage((*NatGetTimeouts)(nil), "nat_get_timeouts_51077d14")
4179 api.RegisterMessage((*NatGetTimeoutsReply)(nil), "nat_get_timeouts_reply_3c4df4e1")
4180 api.RegisterMessage((*NatHaFlush)(nil), "nat_ha_flush_51077d14")
4181 api.RegisterMessage((*NatHaFlushReply)(nil), "nat_ha_flush_reply_e8d4e804")
4182 api.RegisterMessage((*NatHaGetFailover)(nil), "nat_ha_get_failover_51077d14")
4183 api.RegisterMessage((*NatHaGetFailoverReply)(nil), "nat_ha_get_failover_reply_a67d8752")
4184 api.RegisterMessage((*NatHaGetListener)(nil), "nat_ha_get_listener_51077d14")
4185 api.RegisterMessage((*NatHaGetListenerReply)(nil), "nat_ha_get_listener_reply_123ea41f")
4186 api.RegisterMessage((*NatHaResync)(nil), "nat_ha_resync_c8ab9e03")
4187 api.RegisterMessage((*NatHaResyncCompletedEvent)(nil), "nat_ha_resync_completed_event_fdc598fb")
4188 api.RegisterMessage((*NatHaResyncReply)(nil), "nat_ha_resync_reply_e8d4e804")
4189 api.RegisterMessage((*NatHaSetFailover)(nil), "nat_ha_set_failover_718246af")
4190 api.RegisterMessage((*NatHaSetFailoverReply)(nil), "nat_ha_set_failover_reply_e8d4e804")
4191 api.RegisterMessage((*NatHaSetListener)(nil), "nat_ha_set_listener_e4a8cb4e")
4192 api.RegisterMessage((*NatHaSetListenerReply)(nil), "nat_ha_set_listener_reply_e8d4e804")
4193 api.RegisterMessage((*NatIpfixEnableDisable)(nil), "nat_ipfix_enable_disable_9af4a2d2")
4194 api.RegisterMessage((*NatIpfixEnableDisableReply)(nil), "nat_ipfix_enable_disable_reply_e8d4e804")
4195 api.RegisterMessage((*NatSetAddrAndPortAllocAlg)(nil), "nat_set_addr_and_port_alloc_alg_deeb746f")
4196 api.RegisterMessage((*NatSetAddrAndPortAllocAlgReply)(nil), "nat_set_addr_and_port_alloc_alg_reply_e8d4e804")
4197 api.RegisterMessage((*NatSetLogLevel)(nil), "nat_set_log_level_70076bfe")
4198 api.RegisterMessage((*NatSetLogLevelReply)(nil), "nat_set_log_level_reply_e8d4e804")
4199 api.RegisterMessage((*NatSetMssClamping)(nil), "nat_set_mss_clamping_25e90abb")
4200 api.RegisterMessage((*NatSetMssClampingReply)(nil), "nat_set_mss_clamping_reply_e8d4e804")
4201 api.RegisterMessage((*NatSetTimeouts)(nil), "nat_set_timeouts_d4746b16")
4202 api.RegisterMessage((*NatSetTimeoutsReply)(nil), "nat_set_timeouts_reply_e8d4e804")
4203 api.RegisterMessage((*NatSetWorkers)(nil), "nat_set_workers_da926638")
4204 api.RegisterMessage((*NatSetWorkersReply)(nil), "nat_set_workers_reply_e8d4e804")
4205 api.RegisterMessage((*NatShowConfig)(nil), "nat_show_config_51077d14")
4206 api.RegisterMessage((*NatShowConfig2)(nil), "nat_show_config_2_51077d14")
4207 api.RegisterMessage((*NatShowConfig2Reply)(nil), "nat_show_config_2_reply_0404a5b4")
4208 api.RegisterMessage((*NatShowConfigReply)(nil), "nat_show_config_reply_7903ef06")
4209 api.RegisterMessage((*NatWorkerDetails)(nil), "nat_worker_details_84bf06fc")
4210 api.RegisterMessage((*NatWorkerDump)(nil), "nat_worker_dump_51077d14")
4213 // Messages returns list of all messages in this module.
4214 func AllMessages() []api.Message {
4215 return []api.Message{
4216 (*Nat44AddDelAddressRange)(nil),
4217 (*Nat44AddDelAddressRangeReply)(nil),
4218 (*Nat44AddDelIdentityMapping)(nil),
4219 (*Nat44AddDelIdentityMappingReply)(nil),
4220 (*Nat44AddDelInterfaceAddr)(nil),
4221 (*Nat44AddDelInterfaceAddrReply)(nil),
4222 (*Nat44AddDelLbStaticMapping)(nil),
4223 (*Nat44AddDelLbStaticMappingReply)(nil),
4224 (*Nat44AddDelStaticMapping)(nil),
4225 (*Nat44AddDelStaticMappingReply)(nil),
4226 (*Nat44AddDelStaticMappingV2)(nil),
4227 (*Nat44AddDelStaticMappingV2Reply)(nil),
4228 (*Nat44AddressDetails)(nil),
4229 (*Nat44AddressDump)(nil),
4230 (*Nat44DelSession)(nil),
4231 (*Nat44DelSessionReply)(nil),
4232 (*Nat44DelUser)(nil),
4233 (*Nat44DelUserReply)(nil),
4234 (*Nat44EdPluginEnableDisable)(nil),
4235 (*Nat44EdPluginEnableDisableReply)(nil),
4236 (*Nat44EdSetFqOptions)(nil),
4237 (*Nat44EdSetFqOptionsReply)(nil),
4238 (*Nat44EdShowFqOptions)(nil),
4239 (*Nat44EdShowFqOptionsReply)(nil),
4240 (*Nat44ForwardingEnableDisable)(nil),
4241 (*Nat44ForwardingEnableDisableReply)(nil),
4242 (*Nat44ForwardingIsEnabled)(nil),
4243 (*Nat44ForwardingIsEnabledReply)(nil),
4244 (*Nat44IdentityMappingDetails)(nil),
4245 (*Nat44IdentityMappingDump)(nil),
4246 (*Nat44InterfaceAddDelFeature)(nil),
4247 (*Nat44InterfaceAddDelFeatureReply)(nil),
4248 (*Nat44InterfaceAddDelOutputFeature)(nil),
4249 (*Nat44InterfaceAddDelOutputFeatureReply)(nil),
4250 (*Nat44InterfaceAddrDetails)(nil),
4251 (*Nat44InterfaceAddrDump)(nil),
4252 (*Nat44InterfaceDetails)(nil),
4253 (*Nat44InterfaceDump)(nil),
4254 (*Nat44InterfaceOutputFeatureDetails)(nil),
4255 (*Nat44InterfaceOutputFeatureDump)(nil),
4256 (*Nat44LbStaticMappingAddDelLocal)(nil),
4257 (*Nat44LbStaticMappingAddDelLocalReply)(nil),
4258 (*Nat44LbStaticMappingDetails)(nil),
4259 (*Nat44LbStaticMappingDump)(nil),
4260 (*Nat44PluginEnableDisable)(nil),
4261 (*Nat44PluginEnableDisableReply)(nil),
4262 (*Nat44SessionCleanup)(nil),
4263 (*Nat44SessionCleanupReply)(nil),
4264 (*Nat44SetSessionLimit)(nil),
4265 (*Nat44SetSessionLimitReply)(nil),
4266 (*Nat44ShowRunningConfig)(nil),
4267 (*Nat44ShowRunningConfigReply)(nil),
4268 (*Nat44StaticMappingDetails)(nil),
4269 (*Nat44StaticMappingDump)(nil),
4270 (*Nat44UserDetails)(nil),
4271 (*Nat44UserDump)(nil),
4272 (*Nat44UserSessionDetails)(nil),
4273 (*Nat44UserSessionDump)(nil),
4274 (*NatControlPing)(nil),
4275 (*NatControlPingReply)(nil),
4276 (*NatGetAddrAndPortAllocAlg)(nil),
4277 (*NatGetAddrAndPortAllocAlgReply)(nil),
4278 (*NatGetMssClamping)(nil),
4279 (*NatGetMssClampingReply)(nil),
4280 (*NatGetTimeouts)(nil),
4281 (*NatGetTimeoutsReply)(nil),
4283 (*NatHaFlushReply)(nil),
4284 (*NatHaGetFailover)(nil),
4285 (*NatHaGetFailoverReply)(nil),
4286 (*NatHaGetListener)(nil),
4287 (*NatHaGetListenerReply)(nil),
4288 (*NatHaResync)(nil),
4289 (*NatHaResyncCompletedEvent)(nil),
4290 (*NatHaResyncReply)(nil),
4291 (*NatHaSetFailover)(nil),
4292 (*NatHaSetFailoverReply)(nil),
4293 (*NatHaSetListener)(nil),
4294 (*NatHaSetListenerReply)(nil),
4295 (*NatIpfixEnableDisable)(nil),
4296 (*NatIpfixEnableDisableReply)(nil),
4297 (*NatSetAddrAndPortAllocAlg)(nil),
4298 (*NatSetAddrAndPortAllocAlgReply)(nil),
4299 (*NatSetLogLevel)(nil),
4300 (*NatSetLogLevelReply)(nil),
4301 (*NatSetMssClamping)(nil),
4302 (*NatSetMssClampingReply)(nil),
4303 (*NatSetTimeouts)(nil),
4304 (*NatSetTimeoutsReply)(nil),
4305 (*NatSetWorkers)(nil),
4306 (*NatSetWorkersReply)(nil),
4307 (*NatShowConfig)(nil),
4308 (*NatShowConfig2)(nil),
4309 (*NatShowConfig2Reply)(nil),
4310 (*NatShowConfigReply)(nil),
4311 (*NatWorkerDetails)(nil),
4312 (*NatWorkerDump)(nil),