1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
5 // source: /usr/share/vpp/api/plugins/nat64.api.json
7 // Package nat64 contains generated bindings for API file nat64.api.
15 api "git.fd.io/govpp.git/api"
16 interface_types "git.fd.io/govpp.git/binapi/interface_types"
17 ip_types "git.fd.io/govpp.git/binapi/ip_types"
18 nat_types "git.fd.io/govpp.git/binapi/nat_types"
19 codec "git.fd.io/govpp.git/codec"
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
31 VersionCrc = 0xfbd06e33
34 // Nat64AddDelInterface defines message 'nat64_add_del_interface'.
35 type Nat64AddDelInterface struct {
36 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
37 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
38 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
41 func (m *Nat64AddDelInterface) Reset() { *m = Nat64AddDelInterface{} }
42 func (*Nat64AddDelInterface) GetMessageName() string { return "nat64_add_del_interface" }
43 func (*Nat64AddDelInterface) GetCrcString() string { return "f3699b83" }
44 func (*Nat64AddDelInterface) GetMessageType() api.MessageType {
45 return api.RequestMessage
48 func (m *Nat64AddDelInterface) Size() (size int) {
54 size += 4 // m.SwIfIndex
57 func (m *Nat64AddDelInterface) Marshal(b []byte) ([]byte, error) {
59 b = make([]byte, m.Size())
61 buf := codec.NewBuffer(b)
62 buf.EncodeBool(m.IsAdd)
63 buf.EncodeUint8(uint8(m.Flags))
64 buf.EncodeUint32(uint32(m.SwIfIndex))
65 return buf.Bytes(), nil
67 func (m *Nat64AddDelInterface) Unmarshal(b []byte) error {
68 buf := codec.NewBuffer(b)
69 m.IsAdd = buf.DecodeBool()
70 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
71 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
75 // Nat64AddDelInterfaceAddr defines message 'nat64_add_del_interface_addr'.
76 type Nat64AddDelInterfaceAddr struct {
77 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
78 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
81 func (m *Nat64AddDelInterfaceAddr) Reset() { *m = Nat64AddDelInterfaceAddr{} }
82 func (*Nat64AddDelInterfaceAddr) GetMessageName() string { return "nat64_add_del_interface_addr" }
83 func (*Nat64AddDelInterfaceAddr) GetCrcString() string { return "47d6e753" }
84 func (*Nat64AddDelInterfaceAddr) GetMessageType() api.MessageType {
85 return api.RequestMessage
88 func (m *Nat64AddDelInterfaceAddr) Size() (size int) {
93 size += 4 // m.SwIfIndex
96 func (m *Nat64AddDelInterfaceAddr) Marshal(b []byte) ([]byte, error) {
98 b = make([]byte, m.Size())
100 buf := codec.NewBuffer(b)
101 buf.EncodeBool(m.IsAdd)
102 buf.EncodeUint32(uint32(m.SwIfIndex))
103 return buf.Bytes(), nil
105 func (m *Nat64AddDelInterfaceAddr) Unmarshal(b []byte) error {
106 buf := codec.NewBuffer(b)
107 m.IsAdd = buf.DecodeBool()
108 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
112 // Nat64AddDelInterfaceAddrReply defines message 'nat64_add_del_interface_addr_reply'.
113 type Nat64AddDelInterfaceAddrReply struct {
114 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
117 func (m *Nat64AddDelInterfaceAddrReply) Reset() { *m = Nat64AddDelInterfaceAddrReply{} }
118 func (*Nat64AddDelInterfaceAddrReply) GetMessageName() string {
119 return "nat64_add_del_interface_addr_reply"
121 func (*Nat64AddDelInterfaceAddrReply) GetCrcString() string { return "e8d4e804" }
122 func (*Nat64AddDelInterfaceAddrReply) GetMessageType() api.MessageType {
123 return api.ReplyMessage
126 func (m *Nat64AddDelInterfaceAddrReply) Size() (size int) {
130 size += 4 // m.Retval
133 func (m *Nat64AddDelInterfaceAddrReply) Marshal(b []byte) ([]byte, error) {
135 b = make([]byte, m.Size())
137 buf := codec.NewBuffer(b)
138 buf.EncodeInt32(m.Retval)
139 return buf.Bytes(), nil
141 func (m *Nat64AddDelInterfaceAddrReply) Unmarshal(b []byte) error {
142 buf := codec.NewBuffer(b)
143 m.Retval = buf.DecodeInt32()
147 // Nat64AddDelInterfaceReply defines message 'nat64_add_del_interface_reply'.
148 type Nat64AddDelInterfaceReply struct {
149 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
152 func (m *Nat64AddDelInterfaceReply) Reset() { *m = Nat64AddDelInterfaceReply{} }
153 func (*Nat64AddDelInterfaceReply) GetMessageName() string { return "nat64_add_del_interface_reply" }
154 func (*Nat64AddDelInterfaceReply) GetCrcString() string { return "e8d4e804" }
155 func (*Nat64AddDelInterfaceReply) GetMessageType() api.MessageType {
156 return api.ReplyMessage
159 func (m *Nat64AddDelInterfaceReply) Size() (size int) {
163 size += 4 // m.Retval
166 func (m *Nat64AddDelInterfaceReply) Marshal(b []byte) ([]byte, error) {
168 b = make([]byte, m.Size())
170 buf := codec.NewBuffer(b)
171 buf.EncodeInt32(m.Retval)
172 return buf.Bytes(), nil
174 func (m *Nat64AddDelInterfaceReply) Unmarshal(b []byte) error {
175 buf := codec.NewBuffer(b)
176 m.Retval = buf.DecodeInt32()
180 // Nat64AddDelPoolAddrRange defines message 'nat64_add_del_pool_addr_range'.
181 type Nat64AddDelPoolAddrRange struct {
182 StartAddr ip_types.IP4Address `binapi:"ip4_address,name=start_addr" json:"start_addr,omitempty"`
183 EndAddr ip_types.IP4Address `binapi:"ip4_address,name=end_addr" json:"end_addr,omitempty"`
184 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
185 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
188 func (m *Nat64AddDelPoolAddrRange) Reset() { *m = Nat64AddDelPoolAddrRange{} }
189 func (*Nat64AddDelPoolAddrRange) GetMessageName() string { return "nat64_add_del_pool_addr_range" }
190 func (*Nat64AddDelPoolAddrRange) GetCrcString() string { return "a3b944e3" }
191 func (*Nat64AddDelPoolAddrRange) GetMessageType() api.MessageType {
192 return api.RequestMessage
195 func (m *Nat64AddDelPoolAddrRange) Size() (size int) {
199 size += 1 * 4 // m.StartAddr
200 size += 1 * 4 // m.EndAddr
205 func (m *Nat64AddDelPoolAddrRange) Marshal(b []byte) ([]byte, error) {
207 b = make([]byte, m.Size())
209 buf := codec.NewBuffer(b)
210 buf.EncodeBytes(m.StartAddr[:], 4)
211 buf.EncodeBytes(m.EndAddr[:], 4)
212 buf.EncodeUint32(m.VrfID)
213 buf.EncodeBool(m.IsAdd)
214 return buf.Bytes(), nil
216 func (m *Nat64AddDelPoolAddrRange) Unmarshal(b []byte) error {
217 buf := codec.NewBuffer(b)
218 copy(m.StartAddr[:], buf.DecodeBytes(4))
219 copy(m.EndAddr[:], buf.DecodeBytes(4))
220 m.VrfID = buf.DecodeUint32()
221 m.IsAdd = buf.DecodeBool()
225 // Nat64AddDelPoolAddrRangeReply defines message 'nat64_add_del_pool_addr_range_reply'.
226 type Nat64AddDelPoolAddrRangeReply struct {
227 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
230 func (m *Nat64AddDelPoolAddrRangeReply) Reset() { *m = Nat64AddDelPoolAddrRangeReply{} }
231 func (*Nat64AddDelPoolAddrRangeReply) GetMessageName() string {
232 return "nat64_add_del_pool_addr_range_reply"
234 func (*Nat64AddDelPoolAddrRangeReply) GetCrcString() string { return "e8d4e804" }
235 func (*Nat64AddDelPoolAddrRangeReply) GetMessageType() api.MessageType {
236 return api.ReplyMessage
239 func (m *Nat64AddDelPoolAddrRangeReply) Size() (size int) {
243 size += 4 // m.Retval
246 func (m *Nat64AddDelPoolAddrRangeReply) Marshal(b []byte) ([]byte, error) {
248 b = make([]byte, m.Size())
250 buf := codec.NewBuffer(b)
251 buf.EncodeInt32(m.Retval)
252 return buf.Bytes(), nil
254 func (m *Nat64AddDelPoolAddrRangeReply) Unmarshal(b []byte) error {
255 buf := codec.NewBuffer(b)
256 m.Retval = buf.DecodeInt32()
260 // Nat64AddDelPrefix defines message 'nat64_add_del_prefix'.
261 type Nat64AddDelPrefix struct {
262 Prefix ip_types.IP6Prefix `binapi:"ip6_prefix,name=prefix" json:"prefix,omitempty"`
263 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
264 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
267 func (m *Nat64AddDelPrefix) Reset() { *m = Nat64AddDelPrefix{} }
268 func (*Nat64AddDelPrefix) GetMessageName() string { return "nat64_add_del_prefix" }
269 func (*Nat64AddDelPrefix) GetCrcString() string { return "727b2f4c" }
270 func (*Nat64AddDelPrefix) GetMessageType() api.MessageType {
271 return api.RequestMessage
274 func (m *Nat64AddDelPrefix) Size() (size int) {
278 size += 1 * 16 // m.Prefix.Address
279 size += 1 // m.Prefix.Len
284 func (m *Nat64AddDelPrefix) Marshal(b []byte) ([]byte, error) {
286 b = make([]byte, m.Size())
288 buf := codec.NewBuffer(b)
289 buf.EncodeBytes(m.Prefix.Address[:], 16)
290 buf.EncodeUint8(m.Prefix.Len)
291 buf.EncodeUint32(m.VrfID)
292 buf.EncodeBool(m.IsAdd)
293 return buf.Bytes(), nil
295 func (m *Nat64AddDelPrefix) Unmarshal(b []byte) error {
296 buf := codec.NewBuffer(b)
297 copy(m.Prefix.Address[:], buf.DecodeBytes(16))
298 m.Prefix.Len = buf.DecodeUint8()
299 m.VrfID = buf.DecodeUint32()
300 m.IsAdd = buf.DecodeBool()
304 // Nat64AddDelPrefixReply defines message 'nat64_add_del_prefix_reply'.
305 type Nat64AddDelPrefixReply struct {
306 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
309 func (m *Nat64AddDelPrefixReply) Reset() { *m = Nat64AddDelPrefixReply{} }
310 func (*Nat64AddDelPrefixReply) GetMessageName() string { return "nat64_add_del_prefix_reply" }
311 func (*Nat64AddDelPrefixReply) GetCrcString() string { return "e8d4e804" }
312 func (*Nat64AddDelPrefixReply) GetMessageType() api.MessageType {
313 return api.ReplyMessage
316 func (m *Nat64AddDelPrefixReply) Size() (size int) {
320 size += 4 // m.Retval
323 func (m *Nat64AddDelPrefixReply) Marshal(b []byte) ([]byte, error) {
325 b = make([]byte, m.Size())
327 buf := codec.NewBuffer(b)
328 buf.EncodeInt32(m.Retval)
329 return buf.Bytes(), nil
331 func (m *Nat64AddDelPrefixReply) Unmarshal(b []byte) error {
332 buf := codec.NewBuffer(b)
333 m.Retval = buf.DecodeInt32()
337 // Nat64AddDelStaticBib defines message 'nat64_add_del_static_bib'.
338 type Nat64AddDelStaticBib struct {
339 IAddr ip_types.IP6Address `binapi:"ip6_address,name=i_addr" json:"i_addr,omitempty"`
340 OAddr ip_types.IP4Address `binapi:"ip4_address,name=o_addr" json:"o_addr,omitempty"`
341 IPort uint16 `binapi:"u16,name=i_port" json:"i_port,omitempty"`
342 OPort uint16 `binapi:"u16,name=o_port" json:"o_port,omitempty"`
343 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
344 Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
345 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
348 func (m *Nat64AddDelStaticBib) Reset() { *m = Nat64AddDelStaticBib{} }
349 func (*Nat64AddDelStaticBib) GetMessageName() string { return "nat64_add_del_static_bib" }
350 func (*Nat64AddDelStaticBib) GetCrcString() string { return "1c404de5" }
351 func (*Nat64AddDelStaticBib) GetMessageType() api.MessageType {
352 return api.RequestMessage
355 func (m *Nat64AddDelStaticBib) Size() (size int) {
359 size += 1 * 16 // m.IAddr
360 size += 1 * 4 // m.OAddr
368 func (m *Nat64AddDelStaticBib) Marshal(b []byte) ([]byte, error) {
370 b = make([]byte, m.Size())
372 buf := codec.NewBuffer(b)
373 buf.EncodeBytes(m.IAddr[:], 16)
374 buf.EncodeBytes(m.OAddr[:], 4)
375 buf.EncodeUint16(m.IPort)
376 buf.EncodeUint16(m.OPort)
377 buf.EncodeUint32(m.VrfID)
378 buf.EncodeUint8(m.Proto)
379 buf.EncodeBool(m.IsAdd)
380 return buf.Bytes(), nil
382 func (m *Nat64AddDelStaticBib) Unmarshal(b []byte) error {
383 buf := codec.NewBuffer(b)
384 copy(m.IAddr[:], buf.DecodeBytes(16))
385 copy(m.OAddr[:], buf.DecodeBytes(4))
386 m.IPort = buf.DecodeUint16()
387 m.OPort = buf.DecodeUint16()
388 m.VrfID = buf.DecodeUint32()
389 m.Proto = buf.DecodeUint8()
390 m.IsAdd = buf.DecodeBool()
394 // Nat64AddDelStaticBibReply defines message 'nat64_add_del_static_bib_reply'.
395 type Nat64AddDelStaticBibReply struct {
396 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
399 func (m *Nat64AddDelStaticBibReply) Reset() { *m = Nat64AddDelStaticBibReply{} }
400 func (*Nat64AddDelStaticBibReply) GetMessageName() string { return "nat64_add_del_static_bib_reply" }
401 func (*Nat64AddDelStaticBibReply) GetCrcString() string { return "e8d4e804" }
402 func (*Nat64AddDelStaticBibReply) GetMessageType() api.MessageType {
403 return api.ReplyMessage
406 func (m *Nat64AddDelStaticBibReply) Size() (size int) {
410 size += 4 // m.Retval
413 func (m *Nat64AddDelStaticBibReply) Marshal(b []byte) ([]byte, error) {
415 b = make([]byte, m.Size())
417 buf := codec.NewBuffer(b)
418 buf.EncodeInt32(m.Retval)
419 return buf.Bytes(), nil
421 func (m *Nat64AddDelStaticBibReply) Unmarshal(b []byte) error {
422 buf := codec.NewBuffer(b)
423 m.Retval = buf.DecodeInt32()
427 // Nat64BibDetails defines message 'nat64_bib_details'.
428 type Nat64BibDetails struct {
429 IAddr ip_types.IP6Address `binapi:"ip6_address,name=i_addr" json:"i_addr,omitempty"`
430 OAddr ip_types.IP4Address `binapi:"ip4_address,name=o_addr" json:"o_addr,omitempty"`
431 IPort uint16 `binapi:"u16,name=i_port" json:"i_port,omitempty"`
432 OPort uint16 `binapi:"u16,name=o_port" json:"o_port,omitempty"`
433 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
434 Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
435 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
436 SesNum uint32 `binapi:"u32,name=ses_num" json:"ses_num,omitempty"`
439 func (m *Nat64BibDetails) Reset() { *m = Nat64BibDetails{} }
440 func (*Nat64BibDetails) GetMessageName() string { return "nat64_bib_details" }
441 func (*Nat64BibDetails) GetCrcString() string { return "43bc3ddf" }
442 func (*Nat64BibDetails) GetMessageType() api.MessageType {
443 return api.ReplyMessage
446 func (m *Nat64BibDetails) Size() (size int) {
450 size += 1 * 16 // m.IAddr
451 size += 1 * 4 // m.OAddr
457 size += 4 // m.SesNum
460 func (m *Nat64BibDetails) Marshal(b []byte) ([]byte, error) {
462 b = make([]byte, m.Size())
464 buf := codec.NewBuffer(b)
465 buf.EncodeBytes(m.IAddr[:], 16)
466 buf.EncodeBytes(m.OAddr[:], 4)
467 buf.EncodeUint16(m.IPort)
468 buf.EncodeUint16(m.OPort)
469 buf.EncodeUint32(m.VrfID)
470 buf.EncodeUint8(m.Proto)
471 buf.EncodeUint8(uint8(m.Flags))
472 buf.EncodeUint32(m.SesNum)
473 return buf.Bytes(), nil
475 func (m *Nat64BibDetails) Unmarshal(b []byte) error {
476 buf := codec.NewBuffer(b)
477 copy(m.IAddr[:], buf.DecodeBytes(16))
478 copy(m.OAddr[:], buf.DecodeBytes(4))
479 m.IPort = buf.DecodeUint16()
480 m.OPort = buf.DecodeUint16()
481 m.VrfID = buf.DecodeUint32()
482 m.Proto = buf.DecodeUint8()
483 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
484 m.SesNum = buf.DecodeUint32()
488 // Nat64BibDump defines message 'nat64_bib_dump'.
489 type Nat64BibDump struct {
490 Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
493 func (m *Nat64BibDump) Reset() { *m = Nat64BibDump{} }
494 func (*Nat64BibDump) GetMessageName() string { return "nat64_bib_dump" }
495 func (*Nat64BibDump) GetCrcString() string { return "cfcb6b75" }
496 func (*Nat64BibDump) GetMessageType() api.MessageType {
497 return api.RequestMessage
500 func (m *Nat64BibDump) Size() (size int) {
507 func (m *Nat64BibDump) Marshal(b []byte) ([]byte, error) {
509 b = make([]byte, m.Size())
511 buf := codec.NewBuffer(b)
512 buf.EncodeUint8(m.Proto)
513 return buf.Bytes(), nil
515 func (m *Nat64BibDump) Unmarshal(b []byte) error {
516 buf := codec.NewBuffer(b)
517 m.Proto = buf.DecodeUint8()
521 // Nat64GetTimeouts defines message 'nat64_get_timeouts'.
522 type Nat64GetTimeouts struct{}
524 func (m *Nat64GetTimeouts) Reset() { *m = Nat64GetTimeouts{} }
525 func (*Nat64GetTimeouts) GetMessageName() string { return "nat64_get_timeouts" }
526 func (*Nat64GetTimeouts) GetCrcString() string { return "51077d14" }
527 func (*Nat64GetTimeouts) GetMessageType() api.MessageType {
528 return api.RequestMessage
531 func (m *Nat64GetTimeouts) Size() (size int) {
537 func (m *Nat64GetTimeouts) Marshal(b []byte) ([]byte, error) {
539 b = make([]byte, m.Size())
541 buf := codec.NewBuffer(b)
542 return buf.Bytes(), nil
544 func (m *Nat64GetTimeouts) Unmarshal(b []byte) error {
548 // Nat64GetTimeoutsReply defines message 'nat64_get_timeouts_reply'.
549 type Nat64GetTimeoutsReply struct {
550 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
551 UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"`
552 TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"`
553 TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"`
554 ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"`
557 func (m *Nat64GetTimeoutsReply) Reset() { *m = Nat64GetTimeoutsReply{} }
558 func (*Nat64GetTimeoutsReply) GetMessageName() string { return "nat64_get_timeouts_reply" }
559 func (*Nat64GetTimeoutsReply) GetCrcString() string { return "3c4df4e1" }
560 func (*Nat64GetTimeoutsReply) GetMessageType() api.MessageType {
561 return api.ReplyMessage
564 func (m *Nat64GetTimeoutsReply) Size() (size int) {
568 size += 4 // m.Retval
570 size += 4 // m.TCPEstablished
571 size += 4 // m.TCPTransitory
575 func (m *Nat64GetTimeoutsReply) Marshal(b []byte) ([]byte, error) {
577 b = make([]byte, m.Size())
579 buf := codec.NewBuffer(b)
580 buf.EncodeInt32(m.Retval)
581 buf.EncodeUint32(m.UDP)
582 buf.EncodeUint32(m.TCPEstablished)
583 buf.EncodeUint32(m.TCPTransitory)
584 buf.EncodeUint32(m.ICMP)
585 return buf.Bytes(), nil
587 func (m *Nat64GetTimeoutsReply) Unmarshal(b []byte) error {
588 buf := codec.NewBuffer(b)
589 m.Retval = buf.DecodeInt32()
590 m.UDP = buf.DecodeUint32()
591 m.TCPEstablished = buf.DecodeUint32()
592 m.TCPTransitory = buf.DecodeUint32()
593 m.ICMP = buf.DecodeUint32()
597 // Nat64InterfaceDetails defines message 'nat64_interface_details'.
598 type Nat64InterfaceDetails struct {
599 Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
600 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
603 func (m *Nat64InterfaceDetails) Reset() { *m = Nat64InterfaceDetails{} }
604 func (*Nat64InterfaceDetails) GetMessageName() string { return "nat64_interface_details" }
605 func (*Nat64InterfaceDetails) GetCrcString() string { return "5d286289" }
606 func (*Nat64InterfaceDetails) GetMessageType() api.MessageType {
607 return api.ReplyMessage
610 func (m *Nat64InterfaceDetails) Size() (size int) {
615 size += 4 // m.SwIfIndex
618 func (m *Nat64InterfaceDetails) Marshal(b []byte) ([]byte, error) {
620 b = make([]byte, m.Size())
622 buf := codec.NewBuffer(b)
623 buf.EncodeUint8(uint8(m.Flags))
624 buf.EncodeUint32(uint32(m.SwIfIndex))
625 return buf.Bytes(), nil
627 func (m *Nat64InterfaceDetails) Unmarshal(b []byte) error {
628 buf := codec.NewBuffer(b)
629 m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
630 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
634 // Nat64InterfaceDump defines message 'nat64_interface_dump'.
635 type Nat64InterfaceDump struct{}
637 func (m *Nat64InterfaceDump) Reset() { *m = Nat64InterfaceDump{} }
638 func (*Nat64InterfaceDump) GetMessageName() string { return "nat64_interface_dump" }
639 func (*Nat64InterfaceDump) GetCrcString() string { return "51077d14" }
640 func (*Nat64InterfaceDump) GetMessageType() api.MessageType {
641 return api.RequestMessage
644 func (m *Nat64InterfaceDump) Size() (size int) {
650 func (m *Nat64InterfaceDump) Marshal(b []byte) ([]byte, error) {
652 b = make([]byte, m.Size())
654 buf := codec.NewBuffer(b)
655 return buf.Bytes(), nil
657 func (m *Nat64InterfaceDump) Unmarshal(b []byte) error {
661 // Nat64PluginEnableDisable defines message 'nat64_plugin_enable_disable'.
662 // InProgress: the message form may change in the future versions
663 type Nat64PluginEnableDisable struct {
664 BibBuckets uint32 `binapi:"u32,name=bib_buckets" json:"bib_buckets,omitempty"`
665 BibMemorySize uint32 `binapi:"u32,name=bib_memory_size" json:"bib_memory_size,omitempty"`
666 StBuckets uint32 `binapi:"u32,name=st_buckets" json:"st_buckets,omitempty"`
667 StMemorySize uint32 `binapi:"u32,name=st_memory_size" json:"st_memory_size,omitempty"`
668 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
671 func (m *Nat64PluginEnableDisable) Reset() { *m = Nat64PluginEnableDisable{} }
672 func (*Nat64PluginEnableDisable) GetMessageName() string { return "nat64_plugin_enable_disable" }
673 func (*Nat64PluginEnableDisable) GetCrcString() string { return "45948b90" }
674 func (*Nat64PluginEnableDisable) GetMessageType() api.MessageType {
675 return api.RequestMessage
678 func (m *Nat64PluginEnableDisable) Size() (size int) {
682 size += 4 // m.BibBuckets
683 size += 4 // m.BibMemorySize
684 size += 4 // m.StBuckets
685 size += 4 // m.StMemorySize
686 size += 1 // m.Enable
689 func (m *Nat64PluginEnableDisable) Marshal(b []byte) ([]byte, error) {
691 b = make([]byte, m.Size())
693 buf := codec.NewBuffer(b)
694 buf.EncodeUint32(m.BibBuckets)
695 buf.EncodeUint32(m.BibMemorySize)
696 buf.EncodeUint32(m.StBuckets)
697 buf.EncodeUint32(m.StMemorySize)
698 buf.EncodeBool(m.Enable)
699 return buf.Bytes(), nil
701 func (m *Nat64PluginEnableDisable) Unmarshal(b []byte) error {
702 buf := codec.NewBuffer(b)
703 m.BibBuckets = buf.DecodeUint32()
704 m.BibMemorySize = buf.DecodeUint32()
705 m.StBuckets = buf.DecodeUint32()
706 m.StMemorySize = buf.DecodeUint32()
707 m.Enable = buf.DecodeBool()
711 // Nat64PluginEnableDisableReply defines message 'nat64_plugin_enable_disable_reply'.
712 // InProgress: the message form may change in the future versions
713 type Nat64PluginEnableDisableReply struct {
714 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
717 func (m *Nat64PluginEnableDisableReply) Reset() { *m = Nat64PluginEnableDisableReply{} }
718 func (*Nat64PluginEnableDisableReply) GetMessageName() string {
719 return "nat64_plugin_enable_disable_reply"
721 func (*Nat64PluginEnableDisableReply) GetCrcString() string { return "e8d4e804" }
722 func (*Nat64PluginEnableDisableReply) GetMessageType() api.MessageType {
723 return api.ReplyMessage
726 func (m *Nat64PluginEnableDisableReply) Size() (size int) {
730 size += 4 // m.Retval
733 func (m *Nat64PluginEnableDisableReply) Marshal(b []byte) ([]byte, error) {
735 b = make([]byte, m.Size())
737 buf := codec.NewBuffer(b)
738 buf.EncodeInt32(m.Retval)
739 return buf.Bytes(), nil
741 func (m *Nat64PluginEnableDisableReply) Unmarshal(b []byte) error {
742 buf := codec.NewBuffer(b)
743 m.Retval = buf.DecodeInt32()
747 // Nat64PoolAddrDetails defines message 'nat64_pool_addr_details'.
748 type Nat64PoolAddrDetails struct {
749 Address ip_types.IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
750 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
753 func (m *Nat64PoolAddrDetails) Reset() { *m = Nat64PoolAddrDetails{} }
754 func (*Nat64PoolAddrDetails) GetMessageName() string { return "nat64_pool_addr_details" }
755 func (*Nat64PoolAddrDetails) GetCrcString() string { return "9bb99cdb" }
756 func (*Nat64PoolAddrDetails) GetMessageType() api.MessageType {
757 return api.ReplyMessage
760 func (m *Nat64PoolAddrDetails) Size() (size int) {
764 size += 1 * 4 // m.Address
768 func (m *Nat64PoolAddrDetails) Marshal(b []byte) ([]byte, error) {
770 b = make([]byte, m.Size())
772 buf := codec.NewBuffer(b)
773 buf.EncodeBytes(m.Address[:], 4)
774 buf.EncodeUint32(m.VrfID)
775 return buf.Bytes(), nil
777 func (m *Nat64PoolAddrDetails) Unmarshal(b []byte) error {
778 buf := codec.NewBuffer(b)
779 copy(m.Address[:], buf.DecodeBytes(4))
780 m.VrfID = buf.DecodeUint32()
784 // Nat64PoolAddrDump defines message 'nat64_pool_addr_dump'.
785 type Nat64PoolAddrDump struct{}
787 func (m *Nat64PoolAddrDump) Reset() { *m = Nat64PoolAddrDump{} }
788 func (*Nat64PoolAddrDump) GetMessageName() string { return "nat64_pool_addr_dump" }
789 func (*Nat64PoolAddrDump) GetCrcString() string { return "51077d14" }
790 func (*Nat64PoolAddrDump) GetMessageType() api.MessageType {
791 return api.RequestMessage
794 func (m *Nat64PoolAddrDump) Size() (size int) {
800 func (m *Nat64PoolAddrDump) Marshal(b []byte) ([]byte, error) {
802 b = make([]byte, m.Size())
804 buf := codec.NewBuffer(b)
805 return buf.Bytes(), nil
807 func (m *Nat64PoolAddrDump) Unmarshal(b []byte) error {
811 // Nat64PrefixDetails defines message 'nat64_prefix_details'.
812 type Nat64PrefixDetails struct {
813 Prefix ip_types.IP6Prefix `binapi:"ip6_prefix,name=prefix" json:"prefix,omitempty"`
814 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
817 func (m *Nat64PrefixDetails) Reset() { *m = Nat64PrefixDetails{} }
818 func (*Nat64PrefixDetails) GetMessageName() string { return "nat64_prefix_details" }
819 func (*Nat64PrefixDetails) GetCrcString() string { return "20568de3" }
820 func (*Nat64PrefixDetails) GetMessageType() api.MessageType {
821 return api.ReplyMessage
824 func (m *Nat64PrefixDetails) Size() (size int) {
828 size += 1 * 16 // m.Prefix.Address
829 size += 1 // m.Prefix.Len
833 func (m *Nat64PrefixDetails) Marshal(b []byte) ([]byte, error) {
835 b = make([]byte, m.Size())
837 buf := codec.NewBuffer(b)
838 buf.EncodeBytes(m.Prefix.Address[:], 16)
839 buf.EncodeUint8(m.Prefix.Len)
840 buf.EncodeUint32(m.VrfID)
841 return buf.Bytes(), nil
843 func (m *Nat64PrefixDetails) Unmarshal(b []byte) error {
844 buf := codec.NewBuffer(b)
845 copy(m.Prefix.Address[:], buf.DecodeBytes(16))
846 m.Prefix.Len = buf.DecodeUint8()
847 m.VrfID = buf.DecodeUint32()
851 // Nat64PrefixDump defines message 'nat64_prefix_dump'.
852 type Nat64PrefixDump struct{}
854 func (m *Nat64PrefixDump) Reset() { *m = Nat64PrefixDump{} }
855 func (*Nat64PrefixDump) GetMessageName() string { return "nat64_prefix_dump" }
856 func (*Nat64PrefixDump) GetCrcString() string { return "51077d14" }
857 func (*Nat64PrefixDump) GetMessageType() api.MessageType {
858 return api.RequestMessage
861 func (m *Nat64PrefixDump) Size() (size int) {
867 func (m *Nat64PrefixDump) Marshal(b []byte) ([]byte, error) {
869 b = make([]byte, m.Size())
871 buf := codec.NewBuffer(b)
872 return buf.Bytes(), nil
874 func (m *Nat64PrefixDump) Unmarshal(b []byte) error {
878 // Nat64SetTimeouts defines message 'nat64_set_timeouts'.
879 type Nat64SetTimeouts struct {
880 UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"`
881 TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"`
882 TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"`
883 ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"`
886 func (m *Nat64SetTimeouts) Reset() { *m = Nat64SetTimeouts{} }
887 func (*Nat64SetTimeouts) GetMessageName() string { return "nat64_set_timeouts" }
888 func (*Nat64SetTimeouts) GetCrcString() string { return "d4746b16" }
889 func (*Nat64SetTimeouts) GetMessageType() api.MessageType {
890 return api.RequestMessage
893 func (m *Nat64SetTimeouts) Size() (size int) {
898 size += 4 // m.TCPEstablished
899 size += 4 // m.TCPTransitory
903 func (m *Nat64SetTimeouts) Marshal(b []byte) ([]byte, error) {
905 b = make([]byte, m.Size())
907 buf := codec.NewBuffer(b)
908 buf.EncodeUint32(m.UDP)
909 buf.EncodeUint32(m.TCPEstablished)
910 buf.EncodeUint32(m.TCPTransitory)
911 buf.EncodeUint32(m.ICMP)
912 return buf.Bytes(), nil
914 func (m *Nat64SetTimeouts) Unmarshal(b []byte) error {
915 buf := codec.NewBuffer(b)
916 m.UDP = buf.DecodeUint32()
917 m.TCPEstablished = buf.DecodeUint32()
918 m.TCPTransitory = buf.DecodeUint32()
919 m.ICMP = buf.DecodeUint32()
923 // Nat64SetTimeoutsReply defines message 'nat64_set_timeouts_reply'.
924 type Nat64SetTimeoutsReply struct {
925 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
928 func (m *Nat64SetTimeoutsReply) Reset() { *m = Nat64SetTimeoutsReply{} }
929 func (*Nat64SetTimeoutsReply) GetMessageName() string { return "nat64_set_timeouts_reply" }
930 func (*Nat64SetTimeoutsReply) GetCrcString() string { return "e8d4e804" }
931 func (*Nat64SetTimeoutsReply) GetMessageType() api.MessageType {
932 return api.ReplyMessage
935 func (m *Nat64SetTimeoutsReply) Size() (size int) {
939 size += 4 // m.Retval
942 func (m *Nat64SetTimeoutsReply) Marshal(b []byte) ([]byte, error) {
944 b = make([]byte, m.Size())
946 buf := codec.NewBuffer(b)
947 buf.EncodeInt32(m.Retval)
948 return buf.Bytes(), nil
950 func (m *Nat64SetTimeoutsReply) Unmarshal(b []byte) error {
951 buf := codec.NewBuffer(b)
952 m.Retval = buf.DecodeInt32()
956 // Nat64StDetails defines message 'nat64_st_details'.
957 type Nat64StDetails struct {
958 IlAddr ip_types.IP6Address `binapi:"ip6_address,name=il_addr" json:"il_addr,omitempty"`
959 OlAddr ip_types.IP4Address `binapi:"ip4_address,name=ol_addr" json:"ol_addr,omitempty"`
960 IlPort uint16 `binapi:"u16,name=il_port" json:"il_port,omitempty"`
961 OlPort uint16 `binapi:"u16,name=ol_port" json:"ol_port,omitempty"`
962 IrAddr ip_types.IP6Address `binapi:"ip6_address,name=ir_addr" json:"ir_addr,omitempty"`
963 OrAddr ip_types.IP4Address `binapi:"ip4_address,name=or_addr" json:"or_addr,omitempty"`
964 RPort uint16 `binapi:"u16,name=r_port" json:"r_port,omitempty"`
965 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
966 Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
969 func (m *Nat64StDetails) Reset() { *m = Nat64StDetails{} }
970 func (*Nat64StDetails) GetMessageName() string { return "nat64_st_details" }
971 func (*Nat64StDetails) GetCrcString() string { return "dd3361ed" }
972 func (*Nat64StDetails) GetMessageType() api.MessageType {
973 return api.ReplyMessage
976 func (m *Nat64StDetails) Size() (size int) {
980 size += 1 * 16 // m.IlAddr
981 size += 1 * 4 // m.OlAddr
982 size += 2 // m.IlPort
983 size += 2 // m.OlPort
984 size += 1 * 16 // m.IrAddr
985 size += 1 * 4 // m.OrAddr
991 func (m *Nat64StDetails) Marshal(b []byte) ([]byte, error) {
993 b = make([]byte, m.Size())
995 buf := codec.NewBuffer(b)
996 buf.EncodeBytes(m.IlAddr[:], 16)
997 buf.EncodeBytes(m.OlAddr[:], 4)
998 buf.EncodeUint16(m.IlPort)
999 buf.EncodeUint16(m.OlPort)
1000 buf.EncodeBytes(m.IrAddr[:], 16)
1001 buf.EncodeBytes(m.OrAddr[:], 4)
1002 buf.EncodeUint16(m.RPort)
1003 buf.EncodeUint32(m.VrfID)
1004 buf.EncodeUint8(m.Proto)
1005 return buf.Bytes(), nil
1007 func (m *Nat64StDetails) Unmarshal(b []byte) error {
1008 buf := codec.NewBuffer(b)
1009 copy(m.IlAddr[:], buf.DecodeBytes(16))
1010 copy(m.OlAddr[:], buf.DecodeBytes(4))
1011 m.IlPort = buf.DecodeUint16()
1012 m.OlPort = buf.DecodeUint16()
1013 copy(m.IrAddr[:], buf.DecodeBytes(16))
1014 copy(m.OrAddr[:], buf.DecodeBytes(4))
1015 m.RPort = buf.DecodeUint16()
1016 m.VrfID = buf.DecodeUint32()
1017 m.Proto = buf.DecodeUint8()
1021 // Nat64StDump defines message 'nat64_st_dump'.
1022 type Nat64StDump struct {
1023 Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
1026 func (m *Nat64StDump) Reset() { *m = Nat64StDump{} }
1027 func (*Nat64StDump) GetMessageName() string { return "nat64_st_dump" }
1028 func (*Nat64StDump) GetCrcString() string { return "cfcb6b75" }
1029 func (*Nat64StDump) GetMessageType() api.MessageType {
1030 return api.RequestMessage
1033 func (m *Nat64StDump) Size() (size int) {
1037 size += 1 // m.Proto
1040 func (m *Nat64StDump) Marshal(b []byte) ([]byte, error) {
1042 b = make([]byte, m.Size())
1044 buf := codec.NewBuffer(b)
1045 buf.EncodeUint8(m.Proto)
1046 return buf.Bytes(), nil
1048 func (m *Nat64StDump) Unmarshal(b []byte) error {
1049 buf := codec.NewBuffer(b)
1050 m.Proto = buf.DecodeUint8()
1054 func init() { file_nat64_binapi_init() }
1055 func file_nat64_binapi_init() {
1056 api.RegisterMessage((*Nat64AddDelInterface)(nil), "nat64_add_del_interface_f3699b83")
1057 api.RegisterMessage((*Nat64AddDelInterfaceAddr)(nil), "nat64_add_del_interface_addr_47d6e753")
1058 api.RegisterMessage((*Nat64AddDelInterfaceAddrReply)(nil), "nat64_add_del_interface_addr_reply_e8d4e804")
1059 api.RegisterMessage((*Nat64AddDelInterfaceReply)(nil), "nat64_add_del_interface_reply_e8d4e804")
1060 api.RegisterMessage((*Nat64AddDelPoolAddrRange)(nil), "nat64_add_del_pool_addr_range_a3b944e3")
1061 api.RegisterMessage((*Nat64AddDelPoolAddrRangeReply)(nil), "nat64_add_del_pool_addr_range_reply_e8d4e804")
1062 api.RegisterMessage((*Nat64AddDelPrefix)(nil), "nat64_add_del_prefix_727b2f4c")
1063 api.RegisterMessage((*Nat64AddDelPrefixReply)(nil), "nat64_add_del_prefix_reply_e8d4e804")
1064 api.RegisterMessage((*Nat64AddDelStaticBib)(nil), "nat64_add_del_static_bib_1c404de5")
1065 api.RegisterMessage((*Nat64AddDelStaticBibReply)(nil), "nat64_add_del_static_bib_reply_e8d4e804")
1066 api.RegisterMessage((*Nat64BibDetails)(nil), "nat64_bib_details_43bc3ddf")
1067 api.RegisterMessage((*Nat64BibDump)(nil), "nat64_bib_dump_cfcb6b75")
1068 api.RegisterMessage((*Nat64GetTimeouts)(nil), "nat64_get_timeouts_51077d14")
1069 api.RegisterMessage((*Nat64GetTimeoutsReply)(nil), "nat64_get_timeouts_reply_3c4df4e1")
1070 api.RegisterMessage((*Nat64InterfaceDetails)(nil), "nat64_interface_details_5d286289")
1071 api.RegisterMessage((*Nat64InterfaceDump)(nil), "nat64_interface_dump_51077d14")
1072 api.RegisterMessage((*Nat64PluginEnableDisable)(nil), "nat64_plugin_enable_disable_45948b90")
1073 api.RegisterMessage((*Nat64PluginEnableDisableReply)(nil), "nat64_plugin_enable_disable_reply_e8d4e804")
1074 api.RegisterMessage((*Nat64PoolAddrDetails)(nil), "nat64_pool_addr_details_9bb99cdb")
1075 api.RegisterMessage((*Nat64PoolAddrDump)(nil), "nat64_pool_addr_dump_51077d14")
1076 api.RegisterMessage((*Nat64PrefixDetails)(nil), "nat64_prefix_details_20568de3")
1077 api.RegisterMessage((*Nat64PrefixDump)(nil), "nat64_prefix_dump_51077d14")
1078 api.RegisterMessage((*Nat64SetTimeouts)(nil), "nat64_set_timeouts_d4746b16")
1079 api.RegisterMessage((*Nat64SetTimeoutsReply)(nil), "nat64_set_timeouts_reply_e8d4e804")
1080 api.RegisterMessage((*Nat64StDetails)(nil), "nat64_st_details_dd3361ed")
1081 api.RegisterMessage((*Nat64StDump)(nil), "nat64_st_dump_cfcb6b75")
1084 // Messages returns list of all messages in this module.
1085 func AllMessages() []api.Message {
1086 return []api.Message{
1087 (*Nat64AddDelInterface)(nil),
1088 (*Nat64AddDelInterfaceAddr)(nil),
1089 (*Nat64AddDelInterfaceAddrReply)(nil),
1090 (*Nat64AddDelInterfaceReply)(nil),
1091 (*Nat64AddDelPoolAddrRange)(nil),
1092 (*Nat64AddDelPoolAddrRangeReply)(nil),
1093 (*Nat64AddDelPrefix)(nil),
1094 (*Nat64AddDelPrefixReply)(nil),
1095 (*Nat64AddDelStaticBib)(nil),
1096 (*Nat64AddDelStaticBibReply)(nil),
1097 (*Nat64BibDetails)(nil),
1098 (*Nat64BibDump)(nil),
1099 (*Nat64GetTimeouts)(nil),
1100 (*Nat64GetTimeoutsReply)(nil),
1101 (*Nat64InterfaceDetails)(nil),
1102 (*Nat64InterfaceDump)(nil),
1103 (*Nat64PluginEnableDisable)(nil),
1104 (*Nat64PluginEnableDisableReply)(nil),
1105 (*Nat64PoolAddrDetails)(nil),
1106 (*Nat64PoolAddrDump)(nil),
1107 (*Nat64PrefixDetails)(nil),
1108 (*Nat64PrefixDump)(nil),
1109 (*Nat64SetTimeouts)(nil),
1110 (*Nat64SetTimeoutsReply)(nil),
1111 (*Nat64StDetails)(nil),
1112 (*Nat64StDump)(nil),