1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: /usr/share/vpp/api/plugins/cnat.api.json
7 // Package cnat contains generated bindings for API file cnat.api.
19 api "git.fd.io/govpp.git/api"
20 _ "git.fd.io/govpp.git/binapi/fib_types"
21 interface_types "git.fd.io/govpp.git/binapi/interface_types"
22 ip_types "git.fd.io/govpp.git/binapi/ip_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 = 0xfd05573b
38 // CnatEndpointTupleFlags defines enum 'cnat_endpoint_tuple_flags'.
39 type CnatEndpointTupleFlags uint8
42 CNAT_EPT_NO_NAT CnatEndpointTupleFlags = 1
46 CnatEndpointTupleFlags_name = map[uint8]string{
49 CnatEndpointTupleFlags_value = map[string]uint8{
54 func (x CnatEndpointTupleFlags) String() string {
55 s, ok := CnatEndpointTupleFlags_name[uint8(x)]
59 str := func(n uint8) string {
60 s, ok := CnatEndpointTupleFlags_name[uint8(n)]
64 return "CnatEndpointTupleFlags(" + strconv.Itoa(int(n)) + ")"
66 for i := uint8(0); i <= 8; i++ {
81 // CnatLbType defines enum 'cnat_lb_type'.
85 CNAT_LB_TYPE_DEFAULT CnatLbType = 0
86 CNAT_LB_TYPE_MAGLEV CnatLbType = 1
90 CnatLbType_name = map[uint8]string{
91 0: "CNAT_LB_TYPE_DEFAULT",
92 1: "CNAT_LB_TYPE_MAGLEV",
94 CnatLbType_value = map[string]uint8{
95 "CNAT_LB_TYPE_DEFAULT": 0,
96 "CNAT_LB_TYPE_MAGLEV": 1,
100 func (x CnatLbType) String() string {
101 s, ok := CnatLbType_name[uint8(x)]
105 return "CnatLbType(" + strconv.Itoa(int(x)) + ")"
108 // CnatSnatPolicies defines enum 'cnat_snat_policies'.
109 type CnatSnatPolicies uint8
112 CNAT_POLICY_NONE CnatSnatPolicies = 0
113 CNAT_POLICY_IF_PFX CnatSnatPolicies = 1
114 CNAT_POLICY_K8S CnatSnatPolicies = 2
118 CnatSnatPolicies_name = map[uint8]string{
119 0: "CNAT_POLICY_NONE",
120 1: "CNAT_POLICY_IF_PFX",
121 2: "CNAT_POLICY_K8S",
123 CnatSnatPolicies_value = map[string]uint8{
124 "CNAT_POLICY_NONE": 0,
125 "CNAT_POLICY_IF_PFX": 1,
126 "CNAT_POLICY_K8S": 2,
130 func (x CnatSnatPolicies) String() string {
131 s, ok := CnatSnatPolicies_name[uint8(x)]
135 return "CnatSnatPolicies(" + strconv.Itoa(int(x)) + ")"
138 // CnatSnatPolicyTable defines enum 'cnat_snat_policy_table'.
139 type CnatSnatPolicyTable uint8
142 CNAT_POLICY_INCLUDE_V4 CnatSnatPolicyTable = 0
143 CNAT_POLICY_INCLUDE_V6 CnatSnatPolicyTable = 1
144 CNAT_POLICY_POD CnatSnatPolicyTable = 2
148 CnatSnatPolicyTable_name = map[uint8]string{
149 0: "CNAT_POLICY_INCLUDE_V4",
150 1: "CNAT_POLICY_INCLUDE_V6",
151 2: "CNAT_POLICY_POD",
153 CnatSnatPolicyTable_value = map[string]uint8{
154 "CNAT_POLICY_INCLUDE_V4": 0,
155 "CNAT_POLICY_INCLUDE_V6": 1,
156 "CNAT_POLICY_POD": 2,
160 func (x CnatSnatPolicyTable) String() string {
161 s, ok := CnatSnatPolicyTable_name[uint8(x)]
165 return "CnatSnatPolicyTable(" + strconv.Itoa(int(x)) + ")"
168 // CnatTranslationFlags defines enum 'cnat_translation_flags'.
169 type CnatTranslationFlags uint8
172 CNAT_TRANSLATION_ALLOC_PORT CnatTranslationFlags = 1
176 CnatTranslationFlags_name = map[uint8]string{
177 1: "CNAT_TRANSLATION_ALLOC_PORT",
179 CnatTranslationFlags_value = map[string]uint8{
180 "CNAT_TRANSLATION_ALLOC_PORT": 1,
184 func (x CnatTranslationFlags) String() string {
185 s, ok := CnatTranslationFlags_name[uint8(x)]
189 str := func(n uint8) string {
190 s, ok := CnatTranslationFlags_name[uint8(n)]
194 return "CnatTranslationFlags(" + strconv.Itoa(int(n)) + ")"
196 for i := uint8(0); i <= 8; i++ {
211 // CnatEndpoint defines type 'cnat_endpoint'.
212 type CnatEndpoint struct {
213 Addr ip_types.Address `binapi:"address,name=addr" json:"addr,omitempty"`
214 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
215 IfAf ip_types.AddressFamily `binapi:"address_family,name=if_af" json:"if_af,omitempty"`
216 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
219 // CnatEndpointTuple defines type 'cnat_endpoint_tuple'.
220 type CnatEndpointTuple struct {
221 DstEp CnatEndpoint `binapi:"cnat_endpoint,name=dst_ep" json:"dst_ep,omitempty"`
222 SrcEp CnatEndpoint `binapi:"cnat_endpoint,name=src_ep" json:"src_ep,omitempty"`
223 Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"`
226 // CnatSession defines type 'cnat_session'.
227 type CnatSession struct {
228 Src CnatEndpoint `binapi:"cnat_endpoint,name=src" json:"src,omitempty"`
229 Dst CnatEndpoint `binapi:"cnat_endpoint,name=dst" json:"dst,omitempty"`
230 New CnatEndpoint `binapi:"cnat_endpoint,name=new" json:"new,omitempty"`
231 IPProto ip_types.IPProto `binapi:"ip_proto,name=ip_proto" json:"ip_proto,omitempty"`
232 Location uint8 `binapi:"u8,name=location" json:"location,omitempty"`
233 Timestamp float64 `binapi:"f64,name=timestamp" json:"timestamp,omitempty"`
236 // CnatTranslation defines type 'cnat_translation'.
237 type CnatTranslation struct {
238 Vip CnatEndpoint `binapi:"cnat_endpoint,name=vip" json:"vip,omitempty"`
239 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
240 IPProto ip_types.IPProto `binapi:"ip_proto,name=ip_proto" json:"ip_proto,omitempty"`
241 IsRealIP uint8 `binapi:"u8,name=is_real_ip" json:"is_real_ip,omitempty"`
242 Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"`
243 LbType CnatLbType `binapi:"cnat_lb_type,name=lb_type" json:"lb_type,omitempty"`
244 NPaths uint32 `binapi:"u32,name=n_paths" json:"-"`
245 Paths []CnatEndpointTuple `binapi:"cnat_endpoint_tuple[n_paths],name=paths" json:"paths,omitempty"`
248 // CnatGetSnatAddresses defines message 'cnat_get_snat_addresses'.
249 // InProgress: the message form may change in the future versions
250 type CnatGetSnatAddresses struct{}
252 func (m *CnatGetSnatAddresses) Reset() { *m = CnatGetSnatAddresses{} }
253 func (*CnatGetSnatAddresses) GetMessageName() string { return "cnat_get_snat_addresses" }
254 func (*CnatGetSnatAddresses) GetCrcString() string { return "51077d14" }
255 func (*CnatGetSnatAddresses) GetMessageType() api.MessageType {
256 return api.RequestMessage
259 func (m *CnatGetSnatAddresses) Size() (size int) {
265 func (m *CnatGetSnatAddresses) Marshal(b []byte) ([]byte, error) {
267 b = make([]byte, m.Size())
269 buf := codec.NewBuffer(b)
270 return buf.Bytes(), nil
272 func (m *CnatGetSnatAddresses) Unmarshal(b []byte) error {
276 // CnatGetSnatAddressesReply defines message 'cnat_get_snat_addresses_reply'.
277 // InProgress: the message form may change in the future versions
278 type CnatGetSnatAddressesReply struct {
279 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
280 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
281 SnatIP4 ip_types.IP4Address `binapi:"ip4_address,name=snat_ip4" json:"snat_ip4,omitempty"`
282 SnatIP6 ip_types.IP6Address `binapi:"ip6_address,name=snat_ip6" json:"snat_ip6,omitempty"`
283 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
286 func (m *CnatGetSnatAddressesReply) Reset() { *m = CnatGetSnatAddressesReply{} }
287 func (*CnatGetSnatAddressesReply) GetMessageName() string { return "cnat_get_snat_addresses_reply" }
288 func (*CnatGetSnatAddressesReply) GetCrcString() string { return "879513c1" }
289 func (*CnatGetSnatAddressesReply) GetMessageType() api.MessageType {
290 return api.ReplyMessage
293 func (m *CnatGetSnatAddressesReply) Size() (size int) {
297 size += 4 // m.Retval
299 size += 1 * 4 // m.SnatIP4
300 size += 1 * 16 // m.SnatIP6
301 size += 4 // m.SwIfIndex
304 func (m *CnatGetSnatAddressesReply) Marshal(b []byte) ([]byte, error) {
306 b = make([]byte, m.Size())
308 buf := codec.NewBuffer(b)
309 buf.EncodeInt32(m.Retval)
310 buf.EncodeUint32(m.ID)
311 buf.EncodeBytes(m.SnatIP4[:], 4)
312 buf.EncodeBytes(m.SnatIP6[:], 16)
313 buf.EncodeUint32(uint32(m.SwIfIndex))
314 return buf.Bytes(), nil
316 func (m *CnatGetSnatAddressesReply) Unmarshal(b []byte) error {
317 buf := codec.NewBuffer(b)
318 m.Retval = buf.DecodeInt32()
319 m.ID = buf.DecodeUint32()
320 copy(m.SnatIP4[:], buf.DecodeBytes(4))
321 copy(m.SnatIP6[:], buf.DecodeBytes(16))
322 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
326 // CnatSessionDetails defines message 'cnat_session_details'.
327 // InProgress: the message form may change in the future versions
328 type CnatSessionDetails struct {
329 Session CnatSession `binapi:"cnat_session,name=session" json:"session,omitempty"`
332 func (m *CnatSessionDetails) Reset() { *m = CnatSessionDetails{} }
333 func (*CnatSessionDetails) GetMessageName() string { return "cnat_session_details" }
334 func (*CnatSessionDetails) GetCrcString() string { return "7e5017c7" }
335 func (*CnatSessionDetails) GetMessageType() api.MessageType {
336 return api.ReplyMessage
339 func (m *CnatSessionDetails) Size() (size int) {
343 size += 1 // m.Session.Src.Addr.Af
344 size += 1 * 16 // m.Session.Src.Addr.Un
345 size += 4 // m.Session.Src.SwIfIndex
346 size += 1 // m.Session.Src.IfAf
347 size += 2 // m.Session.Src.Port
348 size += 1 // m.Session.Dst.Addr.Af
349 size += 1 * 16 // m.Session.Dst.Addr.Un
350 size += 4 // m.Session.Dst.SwIfIndex
351 size += 1 // m.Session.Dst.IfAf
352 size += 2 // m.Session.Dst.Port
353 size += 1 // m.Session.New.Addr.Af
354 size += 1 * 16 // m.Session.New.Addr.Un
355 size += 4 // m.Session.New.SwIfIndex
356 size += 1 // m.Session.New.IfAf
357 size += 2 // m.Session.New.Port
358 size += 1 // m.Session.IPProto
359 size += 1 // m.Session.Location
360 size += 8 // m.Session.Timestamp
363 func (m *CnatSessionDetails) Marshal(b []byte) ([]byte, error) {
365 b = make([]byte, m.Size())
367 buf := codec.NewBuffer(b)
368 buf.EncodeUint8(uint8(m.Session.Src.Addr.Af))
369 buf.EncodeBytes(m.Session.Src.Addr.Un.XXX_UnionData[:], 16)
370 buf.EncodeUint32(uint32(m.Session.Src.SwIfIndex))
371 buf.EncodeUint8(uint8(m.Session.Src.IfAf))
372 buf.EncodeUint16(m.Session.Src.Port)
373 buf.EncodeUint8(uint8(m.Session.Dst.Addr.Af))
374 buf.EncodeBytes(m.Session.Dst.Addr.Un.XXX_UnionData[:], 16)
375 buf.EncodeUint32(uint32(m.Session.Dst.SwIfIndex))
376 buf.EncodeUint8(uint8(m.Session.Dst.IfAf))
377 buf.EncodeUint16(m.Session.Dst.Port)
378 buf.EncodeUint8(uint8(m.Session.New.Addr.Af))
379 buf.EncodeBytes(m.Session.New.Addr.Un.XXX_UnionData[:], 16)
380 buf.EncodeUint32(uint32(m.Session.New.SwIfIndex))
381 buf.EncodeUint8(uint8(m.Session.New.IfAf))
382 buf.EncodeUint16(m.Session.New.Port)
383 buf.EncodeUint8(uint8(m.Session.IPProto))
384 buf.EncodeUint8(m.Session.Location)
385 buf.EncodeFloat64(m.Session.Timestamp)
386 return buf.Bytes(), nil
388 func (m *CnatSessionDetails) Unmarshal(b []byte) error {
389 buf := codec.NewBuffer(b)
390 m.Session.Src.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
391 copy(m.Session.Src.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
392 m.Session.Src.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
393 m.Session.Src.IfAf = ip_types.AddressFamily(buf.DecodeUint8())
394 m.Session.Src.Port = buf.DecodeUint16()
395 m.Session.Dst.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
396 copy(m.Session.Dst.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
397 m.Session.Dst.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
398 m.Session.Dst.IfAf = ip_types.AddressFamily(buf.DecodeUint8())
399 m.Session.Dst.Port = buf.DecodeUint16()
400 m.Session.New.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
401 copy(m.Session.New.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
402 m.Session.New.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
403 m.Session.New.IfAf = ip_types.AddressFamily(buf.DecodeUint8())
404 m.Session.New.Port = buf.DecodeUint16()
405 m.Session.IPProto = ip_types.IPProto(buf.DecodeUint8())
406 m.Session.Location = buf.DecodeUint8()
407 m.Session.Timestamp = buf.DecodeFloat64()
411 // CnatSessionDump defines message 'cnat_session_dump'.
412 // InProgress: the message form may change in the future versions
413 type CnatSessionDump struct{}
415 func (m *CnatSessionDump) Reset() { *m = CnatSessionDump{} }
416 func (*CnatSessionDump) GetMessageName() string { return "cnat_session_dump" }
417 func (*CnatSessionDump) GetCrcString() string { return "51077d14" }
418 func (*CnatSessionDump) GetMessageType() api.MessageType {
419 return api.RequestMessage
422 func (m *CnatSessionDump) Size() (size int) {
428 func (m *CnatSessionDump) Marshal(b []byte) ([]byte, error) {
430 b = make([]byte, m.Size())
432 buf := codec.NewBuffer(b)
433 return buf.Bytes(), nil
435 func (m *CnatSessionDump) Unmarshal(b []byte) error {
439 // CnatSessionPurge defines message 'cnat_session_purge'.
440 // InProgress: the message form may change in the future versions
441 type CnatSessionPurge struct{}
443 func (m *CnatSessionPurge) Reset() { *m = CnatSessionPurge{} }
444 func (*CnatSessionPurge) GetMessageName() string { return "cnat_session_purge" }
445 func (*CnatSessionPurge) GetCrcString() string { return "51077d14" }
446 func (*CnatSessionPurge) GetMessageType() api.MessageType {
447 return api.RequestMessage
450 func (m *CnatSessionPurge) Size() (size int) {
456 func (m *CnatSessionPurge) Marshal(b []byte) ([]byte, error) {
458 b = make([]byte, m.Size())
460 buf := codec.NewBuffer(b)
461 return buf.Bytes(), nil
463 func (m *CnatSessionPurge) Unmarshal(b []byte) error {
467 // CnatSessionPurgeReply defines message 'cnat_session_purge_reply'.
468 // InProgress: the message form may change in the future versions
469 type CnatSessionPurgeReply struct {
470 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
473 func (m *CnatSessionPurgeReply) Reset() { *m = CnatSessionPurgeReply{} }
474 func (*CnatSessionPurgeReply) GetMessageName() string { return "cnat_session_purge_reply" }
475 func (*CnatSessionPurgeReply) GetCrcString() string { return "e8d4e804" }
476 func (*CnatSessionPurgeReply) GetMessageType() api.MessageType {
477 return api.ReplyMessage
480 func (m *CnatSessionPurgeReply) Size() (size int) {
484 size += 4 // m.Retval
487 func (m *CnatSessionPurgeReply) Marshal(b []byte) ([]byte, error) {
489 b = make([]byte, m.Size())
491 buf := codec.NewBuffer(b)
492 buf.EncodeInt32(m.Retval)
493 return buf.Bytes(), nil
495 func (m *CnatSessionPurgeReply) Unmarshal(b []byte) error {
496 buf := codec.NewBuffer(b)
497 m.Retval = buf.DecodeInt32()
501 // CnatSetSnatAddresses defines message 'cnat_set_snat_addresses'.
502 // InProgress: the message form may change in the future versions
503 type CnatSetSnatAddresses struct {
504 SnatIP4 ip_types.IP4Address `binapi:"ip4_address,name=snat_ip4" json:"snat_ip4,omitempty"`
505 SnatIP6 ip_types.IP6Address `binapi:"ip6_address,name=snat_ip6" json:"snat_ip6,omitempty"`
506 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
509 func (m *CnatSetSnatAddresses) Reset() { *m = CnatSetSnatAddresses{} }
510 func (*CnatSetSnatAddresses) GetMessageName() string { return "cnat_set_snat_addresses" }
511 func (*CnatSetSnatAddresses) GetCrcString() string { return "d997e96c" }
512 func (*CnatSetSnatAddresses) GetMessageType() api.MessageType {
513 return api.RequestMessage
516 func (m *CnatSetSnatAddresses) Size() (size int) {
520 size += 1 * 4 // m.SnatIP4
521 size += 1 * 16 // m.SnatIP6
522 size += 4 // m.SwIfIndex
525 func (m *CnatSetSnatAddresses) Marshal(b []byte) ([]byte, error) {
527 b = make([]byte, m.Size())
529 buf := codec.NewBuffer(b)
530 buf.EncodeBytes(m.SnatIP4[:], 4)
531 buf.EncodeBytes(m.SnatIP6[:], 16)
532 buf.EncodeUint32(uint32(m.SwIfIndex))
533 return buf.Bytes(), nil
535 func (m *CnatSetSnatAddresses) Unmarshal(b []byte) error {
536 buf := codec.NewBuffer(b)
537 copy(m.SnatIP4[:], buf.DecodeBytes(4))
538 copy(m.SnatIP6[:], buf.DecodeBytes(16))
539 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
543 // CnatSetSnatAddressesReply defines message 'cnat_set_snat_addresses_reply'.
544 // InProgress: the message form may change in the future versions
545 type CnatSetSnatAddressesReply struct {
546 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
549 func (m *CnatSetSnatAddressesReply) Reset() { *m = CnatSetSnatAddressesReply{} }
550 func (*CnatSetSnatAddressesReply) GetMessageName() string { return "cnat_set_snat_addresses_reply" }
551 func (*CnatSetSnatAddressesReply) GetCrcString() string { return "e8d4e804" }
552 func (*CnatSetSnatAddressesReply) GetMessageType() api.MessageType {
553 return api.ReplyMessage
556 func (m *CnatSetSnatAddressesReply) Size() (size int) {
560 size += 4 // m.Retval
563 func (m *CnatSetSnatAddressesReply) Marshal(b []byte) ([]byte, error) {
565 b = make([]byte, m.Size())
567 buf := codec.NewBuffer(b)
568 buf.EncodeInt32(m.Retval)
569 return buf.Bytes(), nil
571 func (m *CnatSetSnatAddressesReply) Unmarshal(b []byte) error {
572 buf := codec.NewBuffer(b)
573 m.Retval = buf.DecodeInt32()
577 // CnatSetSnatPolicy defines message 'cnat_set_snat_policy'.
578 // InProgress: the message form may change in the future versions
579 type CnatSetSnatPolicy struct {
580 Policy CnatSnatPolicies `binapi:"cnat_snat_policies,name=policy" json:"policy,omitempty"`
583 func (m *CnatSetSnatPolicy) Reset() { *m = CnatSetSnatPolicy{} }
584 func (*CnatSetSnatPolicy) GetMessageName() string { return "cnat_set_snat_policy" }
585 func (*CnatSetSnatPolicy) GetCrcString() string { return "d3e6eaf4" }
586 func (*CnatSetSnatPolicy) GetMessageType() api.MessageType {
587 return api.RequestMessage
590 func (m *CnatSetSnatPolicy) Size() (size int) {
594 size += 1 // m.Policy
597 func (m *CnatSetSnatPolicy) Marshal(b []byte) ([]byte, error) {
599 b = make([]byte, m.Size())
601 buf := codec.NewBuffer(b)
602 buf.EncodeUint8(uint8(m.Policy))
603 return buf.Bytes(), nil
605 func (m *CnatSetSnatPolicy) Unmarshal(b []byte) error {
606 buf := codec.NewBuffer(b)
607 m.Policy = CnatSnatPolicies(buf.DecodeUint8())
611 // CnatSetSnatPolicyReply defines message 'cnat_set_snat_policy_reply'.
612 // InProgress: the message form may change in the future versions
613 type CnatSetSnatPolicyReply struct {
614 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
617 func (m *CnatSetSnatPolicyReply) Reset() { *m = CnatSetSnatPolicyReply{} }
618 func (*CnatSetSnatPolicyReply) GetMessageName() string { return "cnat_set_snat_policy_reply" }
619 func (*CnatSetSnatPolicyReply) GetCrcString() string { return "e8d4e804" }
620 func (*CnatSetSnatPolicyReply) GetMessageType() api.MessageType {
621 return api.ReplyMessage
624 func (m *CnatSetSnatPolicyReply) Size() (size int) {
628 size += 4 // m.Retval
631 func (m *CnatSetSnatPolicyReply) Marshal(b []byte) ([]byte, error) {
633 b = make([]byte, m.Size())
635 buf := codec.NewBuffer(b)
636 buf.EncodeInt32(m.Retval)
637 return buf.Bytes(), nil
639 func (m *CnatSetSnatPolicyReply) Unmarshal(b []byte) error {
640 buf := codec.NewBuffer(b)
641 m.Retval = buf.DecodeInt32()
645 // CnatSnatPolicyAddDelExcludePfx defines message 'cnat_snat_policy_add_del_exclude_pfx'.
646 // InProgress: the message form may change in the future versions
647 type CnatSnatPolicyAddDelExcludePfx struct {
648 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
649 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
652 func (m *CnatSnatPolicyAddDelExcludePfx) Reset() { *m = CnatSnatPolicyAddDelExcludePfx{} }
653 func (*CnatSnatPolicyAddDelExcludePfx) GetMessageName() string {
654 return "cnat_snat_policy_add_del_exclude_pfx"
656 func (*CnatSnatPolicyAddDelExcludePfx) GetCrcString() string { return "e26dd79a" }
657 func (*CnatSnatPolicyAddDelExcludePfx) GetMessageType() api.MessageType {
658 return api.RequestMessage
661 func (m *CnatSnatPolicyAddDelExcludePfx) Size() (size int) {
666 size += 1 // m.Prefix.Address.Af
667 size += 1 * 16 // m.Prefix.Address.Un
668 size += 1 // m.Prefix.Len
671 func (m *CnatSnatPolicyAddDelExcludePfx) Marshal(b []byte) ([]byte, error) {
673 b = make([]byte, m.Size())
675 buf := codec.NewBuffer(b)
676 buf.EncodeUint8(m.IsAdd)
677 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
678 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
679 buf.EncodeUint8(m.Prefix.Len)
680 return buf.Bytes(), nil
682 func (m *CnatSnatPolicyAddDelExcludePfx) Unmarshal(b []byte) error {
683 buf := codec.NewBuffer(b)
684 m.IsAdd = buf.DecodeUint8()
685 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
686 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
687 m.Prefix.Len = buf.DecodeUint8()
691 // CnatSnatPolicyAddDelExcludePfxReply defines message 'cnat_snat_policy_add_del_exclude_pfx_reply'.
692 // InProgress: the message form may change in the future versions
693 type CnatSnatPolicyAddDelExcludePfxReply struct {
694 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
697 func (m *CnatSnatPolicyAddDelExcludePfxReply) Reset() { *m = CnatSnatPolicyAddDelExcludePfxReply{} }
698 func (*CnatSnatPolicyAddDelExcludePfxReply) GetMessageName() string {
699 return "cnat_snat_policy_add_del_exclude_pfx_reply"
701 func (*CnatSnatPolicyAddDelExcludePfxReply) GetCrcString() string { return "e8d4e804" }
702 func (*CnatSnatPolicyAddDelExcludePfxReply) GetMessageType() api.MessageType {
703 return api.ReplyMessage
706 func (m *CnatSnatPolicyAddDelExcludePfxReply) Size() (size int) {
710 size += 4 // m.Retval
713 func (m *CnatSnatPolicyAddDelExcludePfxReply) Marshal(b []byte) ([]byte, error) {
715 b = make([]byte, m.Size())
717 buf := codec.NewBuffer(b)
718 buf.EncodeInt32(m.Retval)
719 return buf.Bytes(), nil
721 func (m *CnatSnatPolicyAddDelExcludePfxReply) Unmarshal(b []byte) error {
722 buf := codec.NewBuffer(b)
723 m.Retval = buf.DecodeInt32()
727 // CnatSnatPolicyAddDelIf defines message 'cnat_snat_policy_add_del_if'.
728 // InProgress: the message form may change in the future versions
729 type CnatSnatPolicyAddDelIf struct {
730 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
731 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
732 Table CnatSnatPolicyTable `binapi:"cnat_snat_policy_table,name=table" json:"table,omitempty"`
735 func (m *CnatSnatPolicyAddDelIf) Reset() { *m = CnatSnatPolicyAddDelIf{} }
736 func (*CnatSnatPolicyAddDelIf) GetMessageName() string { return "cnat_snat_policy_add_del_if" }
737 func (*CnatSnatPolicyAddDelIf) GetCrcString() string { return "6828deca" }
738 func (*CnatSnatPolicyAddDelIf) GetMessageType() api.MessageType {
739 return api.RequestMessage
742 func (m *CnatSnatPolicyAddDelIf) Size() (size int) {
746 size += 4 // m.SwIfIndex
751 func (m *CnatSnatPolicyAddDelIf) Marshal(b []byte) ([]byte, error) {
753 b = make([]byte, m.Size())
755 buf := codec.NewBuffer(b)
756 buf.EncodeUint32(uint32(m.SwIfIndex))
757 buf.EncodeUint8(m.IsAdd)
758 buf.EncodeUint8(uint8(m.Table))
759 return buf.Bytes(), nil
761 func (m *CnatSnatPolicyAddDelIf) Unmarshal(b []byte) error {
762 buf := codec.NewBuffer(b)
763 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
764 m.IsAdd = buf.DecodeUint8()
765 m.Table = CnatSnatPolicyTable(buf.DecodeUint8())
769 // CnatSnatPolicyAddDelIfReply defines message 'cnat_snat_policy_add_del_if_reply'.
770 // InProgress: the message form may change in the future versions
771 type CnatSnatPolicyAddDelIfReply struct {
772 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
775 func (m *CnatSnatPolicyAddDelIfReply) Reset() { *m = CnatSnatPolicyAddDelIfReply{} }
776 func (*CnatSnatPolicyAddDelIfReply) GetMessageName() string {
777 return "cnat_snat_policy_add_del_if_reply"
779 func (*CnatSnatPolicyAddDelIfReply) GetCrcString() string { return "e8d4e804" }
780 func (*CnatSnatPolicyAddDelIfReply) GetMessageType() api.MessageType {
781 return api.ReplyMessage
784 func (m *CnatSnatPolicyAddDelIfReply) Size() (size int) {
788 size += 4 // m.Retval
791 func (m *CnatSnatPolicyAddDelIfReply) Marshal(b []byte) ([]byte, error) {
793 b = make([]byte, m.Size())
795 buf := codec.NewBuffer(b)
796 buf.EncodeInt32(m.Retval)
797 return buf.Bytes(), nil
799 func (m *CnatSnatPolicyAddDelIfReply) Unmarshal(b []byte) error {
800 buf := codec.NewBuffer(b)
801 m.Retval = buf.DecodeInt32()
805 // CnatTranslationDel defines message 'cnat_translation_del'.
806 // InProgress: the message form may change in the future versions
807 type CnatTranslationDel struct {
808 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
811 func (m *CnatTranslationDel) Reset() { *m = CnatTranslationDel{} }
812 func (*CnatTranslationDel) GetMessageName() string { return "cnat_translation_del" }
813 func (*CnatTranslationDel) GetCrcString() string { return "3a91bde5" }
814 func (*CnatTranslationDel) GetMessageType() api.MessageType {
815 return api.RequestMessage
818 func (m *CnatTranslationDel) Size() (size int) {
825 func (m *CnatTranslationDel) Marshal(b []byte) ([]byte, error) {
827 b = make([]byte, m.Size())
829 buf := codec.NewBuffer(b)
830 buf.EncodeUint32(m.ID)
831 return buf.Bytes(), nil
833 func (m *CnatTranslationDel) Unmarshal(b []byte) error {
834 buf := codec.NewBuffer(b)
835 m.ID = buf.DecodeUint32()
839 // CnatTranslationDelReply defines message 'cnat_translation_del_reply'.
840 // InProgress: the message form may change in the future versions
841 type CnatTranslationDelReply struct {
842 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
845 func (m *CnatTranslationDelReply) Reset() { *m = CnatTranslationDelReply{} }
846 func (*CnatTranslationDelReply) GetMessageName() string { return "cnat_translation_del_reply" }
847 func (*CnatTranslationDelReply) GetCrcString() string { return "e8d4e804" }
848 func (*CnatTranslationDelReply) GetMessageType() api.MessageType {
849 return api.ReplyMessage
852 func (m *CnatTranslationDelReply) Size() (size int) {
856 size += 4 // m.Retval
859 func (m *CnatTranslationDelReply) Marshal(b []byte) ([]byte, error) {
861 b = make([]byte, m.Size())
863 buf := codec.NewBuffer(b)
864 buf.EncodeInt32(m.Retval)
865 return buf.Bytes(), nil
867 func (m *CnatTranslationDelReply) Unmarshal(b []byte) error {
868 buf := codec.NewBuffer(b)
869 m.Retval = buf.DecodeInt32()
873 // CnatTranslationDetails defines message 'cnat_translation_details'.
874 // InProgress: the message form may change in the future versions
875 type CnatTranslationDetails struct {
876 Translation CnatTranslation `binapi:"cnat_translation,name=translation" json:"translation,omitempty"`
879 func (m *CnatTranslationDetails) Reset() { *m = CnatTranslationDetails{} }
880 func (*CnatTranslationDetails) GetMessageName() string { return "cnat_translation_details" }
881 func (*CnatTranslationDetails) GetCrcString() string { return "347e1f16" }
882 func (*CnatTranslationDetails) GetMessageType() api.MessageType {
883 return api.ReplyMessage
886 func (m *CnatTranslationDetails) Size() (size int) {
890 size += 1 // m.Translation.Vip.Addr.Af
891 size += 1 * 16 // m.Translation.Vip.Addr.Un
892 size += 4 // m.Translation.Vip.SwIfIndex
893 size += 1 // m.Translation.Vip.IfAf
894 size += 2 // m.Translation.Vip.Port
895 size += 4 // m.Translation.ID
896 size += 1 // m.Translation.IPProto
897 size += 1 // m.Translation.IsRealIP
898 size += 1 // m.Translation.Flags
899 size += 1 // m.Translation.LbType
900 size += 4 // m.Translation.NPaths
901 for j2 := 0; j2 < len(m.Translation.Paths); j2++ {
902 var s2 CnatEndpointTuple
904 if j2 < len(m.Translation.Paths) {
905 s2 = m.Translation.Paths[j2]
907 size += 1 // s2.DstEp.Addr.Af
908 size += 1 * 16 // s2.DstEp.Addr.Un
909 size += 4 // s2.DstEp.SwIfIndex
910 size += 1 // s2.DstEp.IfAf
911 size += 2 // s2.DstEp.Port
912 size += 1 // s2.SrcEp.Addr.Af
913 size += 1 * 16 // s2.SrcEp.Addr.Un
914 size += 4 // s2.SrcEp.SwIfIndex
915 size += 1 // s2.SrcEp.IfAf
916 size += 2 // s2.SrcEp.Port
917 size += 1 // s2.Flags
921 func (m *CnatTranslationDetails) Marshal(b []byte) ([]byte, error) {
923 b = make([]byte, m.Size())
925 buf := codec.NewBuffer(b)
926 buf.EncodeUint8(uint8(m.Translation.Vip.Addr.Af))
927 buf.EncodeBytes(m.Translation.Vip.Addr.Un.XXX_UnionData[:], 16)
928 buf.EncodeUint32(uint32(m.Translation.Vip.SwIfIndex))
929 buf.EncodeUint8(uint8(m.Translation.Vip.IfAf))
930 buf.EncodeUint16(m.Translation.Vip.Port)
931 buf.EncodeUint32(m.Translation.ID)
932 buf.EncodeUint8(uint8(m.Translation.IPProto))
933 buf.EncodeUint8(m.Translation.IsRealIP)
934 buf.EncodeUint8(m.Translation.Flags)
935 buf.EncodeUint8(uint8(m.Translation.LbType))
936 buf.EncodeUint32(uint32(len(m.Translation.Paths)))
937 for j1 := 0; j1 < len(m.Translation.Paths); j1++ {
938 var v1 CnatEndpointTuple // Paths
939 if j1 < len(m.Translation.Paths) {
940 v1 = m.Translation.Paths[j1]
942 buf.EncodeUint8(uint8(v1.DstEp.Addr.Af))
943 buf.EncodeBytes(v1.DstEp.Addr.Un.XXX_UnionData[:], 16)
944 buf.EncodeUint32(uint32(v1.DstEp.SwIfIndex))
945 buf.EncodeUint8(uint8(v1.DstEp.IfAf))
946 buf.EncodeUint16(v1.DstEp.Port)
947 buf.EncodeUint8(uint8(v1.SrcEp.Addr.Af))
948 buf.EncodeBytes(v1.SrcEp.Addr.Un.XXX_UnionData[:], 16)
949 buf.EncodeUint32(uint32(v1.SrcEp.SwIfIndex))
950 buf.EncodeUint8(uint8(v1.SrcEp.IfAf))
951 buf.EncodeUint16(v1.SrcEp.Port)
952 buf.EncodeUint8(v1.Flags)
954 return buf.Bytes(), nil
956 func (m *CnatTranslationDetails) Unmarshal(b []byte) error {
957 buf := codec.NewBuffer(b)
958 m.Translation.Vip.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
959 copy(m.Translation.Vip.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
960 m.Translation.Vip.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
961 m.Translation.Vip.IfAf = ip_types.AddressFamily(buf.DecodeUint8())
962 m.Translation.Vip.Port = buf.DecodeUint16()
963 m.Translation.ID = buf.DecodeUint32()
964 m.Translation.IPProto = ip_types.IPProto(buf.DecodeUint8())
965 m.Translation.IsRealIP = buf.DecodeUint8()
966 m.Translation.Flags = buf.DecodeUint8()
967 m.Translation.LbType = CnatLbType(buf.DecodeUint8())
968 m.Translation.NPaths = buf.DecodeUint32()
969 m.Translation.Paths = make([]CnatEndpointTuple, m.Translation.NPaths)
970 for j1 := 0; j1 < len(m.Translation.Paths); j1++ {
971 m.Translation.Paths[j1].DstEp.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
972 copy(m.Translation.Paths[j1].DstEp.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
973 m.Translation.Paths[j1].DstEp.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
974 m.Translation.Paths[j1].DstEp.IfAf = ip_types.AddressFamily(buf.DecodeUint8())
975 m.Translation.Paths[j1].DstEp.Port = buf.DecodeUint16()
976 m.Translation.Paths[j1].SrcEp.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
977 copy(m.Translation.Paths[j1].SrcEp.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
978 m.Translation.Paths[j1].SrcEp.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
979 m.Translation.Paths[j1].SrcEp.IfAf = ip_types.AddressFamily(buf.DecodeUint8())
980 m.Translation.Paths[j1].SrcEp.Port = buf.DecodeUint16()
981 m.Translation.Paths[j1].Flags = buf.DecodeUint8()
986 // CnatTranslationDump defines message 'cnat_translation_dump'.
987 // InProgress: the message form may change in the future versions
988 type CnatTranslationDump struct{}
990 func (m *CnatTranslationDump) Reset() { *m = CnatTranslationDump{} }
991 func (*CnatTranslationDump) GetMessageName() string { return "cnat_translation_dump" }
992 func (*CnatTranslationDump) GetCrcString() string { return "51077d14" }
993 func (*CnatTranslationDump) GetMessageType() api.MessageType {
994 return api.RequestMessage
997 func (m *CnatTranslationDump) Size() (size int) {
1003 func (m *CnatTranslationDump) Marshal(b []byte) ([]byte, error) {
1005 b = make([]byte, m.Size())
1007 buf := codec.NewBuffer(b)
1008 return buf.Bytes(), nil
1010 func (m *CnatTranslationDump) Unmarshal(b []byte) error {
1014 // CnatTranslationUpdate defines message 'cnat_translation_update'.
1015 // InProgress: the message form may change in the future versions
1016 type CnatTranslationUpdate struct {
1017 Translation CnatTranslation `binapi:"cnat_translation,name=translation" json:"translation,omitempty"`
1020 func (m *CnatTranslationUpdate) Reset() { *m = CnatTranslationUpdate{} }
1021 func (*CnatTranslationUpdate) GetMessageName() string { return "cnat_translation_update" }
1022 func (*CnatTranslationUpdate) GetCrcString() string { return "cd5aedf5" }
1023 func (*CnatTranslationUpdate) GetMessageType() api.MessageType {
1024 return api.RequestMessage
1027 func (m *CnatTranslationUpdate) Size() (size int) {
1031 size += 1 // m.Translation.Vip.Addr.Af
1032 size += 1 * 16 // m.Translation.Vip.Addr.Un
1033 size += 4 // m.Translation.Vip.SwIfIndex
1034 size += 1 // m.Translation.Vip.IfAf
1035 size += 2 // m.Translation.Vip.Port
1036 size += 4 // m.Translation.ID
1037 size += 1 // m.Translation.IPProto
1038 size += 1 // m.Translation.IsRealIP
1039 size += 1 // m.Translation.Flags
1040 size += 1 // m.Translation.LbType
1041 size += 4 // m.Translation.NPaths
1042 for j2 := 0; j2 < len(m.Translation.Paths); j2++ {
1043 var s2 CnatEndpointTuple
1045 if j2 < len(m.Translation.Paths) {
1046 s2 = m.Translation.Paths[j2]
1048 size += 1 // s2.DstEp.Addr.Af
1049 size += 1 * 16 // s2.DstEp.Addr.Un
1050 size += 4 // s2.DstEp.SwIfIndex
1051 size += 1 // s2.DstEp.IfAf
1052 size += 2 // s2.DstEp.Port
1053 size += 1 // s2.SrcEp.Addr.Af
1054 size += 1 * 16 // s2.SrcEp.Addr.Un
1055 size += 4 // s2.SrcEp.SwIfIndex
1056 size += 1 // s2.SrcEp.IfAf
1057 size += 2 // s2.SrcEp.Port
1058 size += 1 // s2.Flags
1062 func (m *CnatTranslationUpdate) Marshal(b []byte) ([]byte, error) {
1064 b = make([]byte, m.Size())
1066 buf := codec.NewBuffer(b)
1067 buf.EncodeUint8(uint8(m.Translation.Vip.Addr.Af))
1068 buf.EncodeBytes(m.Translation.Vip.Addr.Un.XXX_UnionData[:], 16)
1069 buf.EncodeUint32(uint32(m.Translation.Vip.SwIfIndex))
1070 buf.EncodeUint8(uint8(m.Translation.Vip.IfAf))
1071 buf.EncodeUint16(m.Translation.Vip.Port)
1072 buf.EncodeUint32(m.Translation.ID)
1073 buf.EncodeUint8(uint8(m.Translation.IPProto))
1074 buf.EncodeUint8(m.Translation.IsRealIP)
1075 buf.EncodeUint8(m.Translation.Flags)
1076 buf.EncodeUint8(uint8(m.Translation.LbType))
1077 buf.EncodeUint32(uint32(len(m.Translation.Paths)))
1078 for j1 := 0; j1 < len(m.Translation.Paths); j1++ {
1079 var v1 CnatEndpointTuple // Paths
1080 if j1 < len(m.Translation.Paths) {
1081 v1 = m.Translation.Paths[j1]
1083 buf.EncodeUint8(uint8(v1.DstEp.Addr.Af))
1084 buf.EncodeBytes(v1.DstEp.Addr.Un.XXX_UnionData[:], 16)
1085 buf.EncodeUint32(uint32(v1.DstEp.SwIfIndex))
1086 buf.EncodeUint8(uint8(v1.DstEp.IfAf))
1087 buf.EncodeUint16(v1.DstEp.Port)
1088 buf.EncodeUint8(uint8(v1.SrcEp.Addr.Af))
1089 buf.EncodeBytes(v1.SrcEp.Addr.Un.XXX_UnionData[:], 16)
1090 buf.EncodeUint32(uint32(v1.SrcEp.SwIfIndex))
1091 buf.EncodeUint8(uint8(v1.SrcEp.IfAf))
1092 buf.EncodeUint16(v1.SrcEp.Port)
1093 buf.EncodeUint8(v1.Flags)
1095 return buf.Bytes(), nil
1097 func (m *CnatTranslationUpdate) Unmarshal(b []byte) error {
1098 buf := codec.NewBuffer(b)
1099 m.Translation.Vip.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
1100 copy(m.Translation.Vip.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1101 m.Translation.Vip.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1102 m.Translation.Vip.IfAf = ip_types.AddressFamily(buf.DecodeUint8())
1103 m.Translation.Vip.Port = buf.DecodeUint16()
1104 m.Translation.ID = buf.DecodeUint32()
1105 m.Translation.IPProto = ip_types.IPProto(buf.DecodeUint8())
1106 m.Translation.IsRealIP = buf.DecodeUint8()
1107 m.Translation.Flags = buf.DecodeUint8()
1108 m.Translation.LbType = CnatLbType(buf.DecodeUint8())
1109 m.Translation.NPaths = buf.DecodeUint32()
1110 m.Translation.Paths = make([]CnatEndpointTuple, m.Translation.NPaths)
1111 for j1 := 0; j1 < len(m.Translation.Paths); j1++ {
1112 m.Translation.Paths[j1].DstEp.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
1113 copy(m.Translation.Paths[j1].DstEp.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1114 m.Translation.Paths[j1].DstEp.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1115 m.Translation.Paths[j1].DstEp.IfAf = ip_types.AddressFamily(buf.DecodeUint8())
1116 m.Translation.Paths[j1].DstEp.Port = buf.DecodeUint16()
1117 m.Translation.Paths[j1].SrcEp.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
1118 copy(m.Translation.Paths[j1].SrcEp.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1119 m.Translation.Paths[j1].SrcEp.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1120 m.Translation.Paths[j1].SrcEp.IfAf = ip_types.AddressFamily(buf.DecodeUint8())
1121 m.Translation.Paths[j1].SrcEp.Port = buf.DecodeUint16()
1122 m.Translation.Paths[j1].Flags = buf.DecodeUint8()
1127 // CnatTranslationUpdateReply defines message 'cnat_translation_update_reply'.
1128 // InProgress: the message form may change in the future versions
1129 type CnatTranslationUpdateReply struct {
1130 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1131 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
1134 func (m *CnatTranslationUpdateReply) Reset() { *m = CnatTranslationUpdateReply{} }
1135 func (*CnatTranslationUpdateReply) GetMessageName() string { return "cnat_translation_update_reply" }
1136 func (*CnatTranslationUpdateReply) GetCrcString() string { return "e2fc8294" }
1137 func (*CnatTranslationUpdateReply) GetMessageType() api.MessageType {
1138 return api.ReplyMessage
1141 func (m *CnatTranslationUpdateReply) Size() (size int) {
1145 size += 4 // m.Retval
1149 func (m *CnatTranslationUpdateReply) Marshal(b []byte) ([]byte, error) {
1151 b = make([]byte, m.Size())
1153 buf := codec.NewBuffer(b)
1154 buf.EncodeInt32(m.Retval)
1155 buf.EncodeUint32(m.ID)
1156 return buf.Bytes(), nil
1158 func (m *CnatTranslationUpdateReply) Unmarshal(b []byte) error {
1159 buf := codec.NewBuffer(b)
1160 m.Retval = buf.DecodeInt32()
1161 m.ID = buf.DecodeUint32()
1165 func init() { file_cnat_binapi_init() }
1166 func file_cnat_binapi_init() {
1167 api.RegisterMessage((*CnatGetSnatAddresses)(nil), "cnat_get_snat_addresses_51077d14")
1168 api.RegisterMessage((*CnatGetSnatAddressesReply)(nil), "cnat_get_snat_addresses_reply_879513c1")
1169 api.RegisterMessage((*CnatSessionDetails)(nil), "cnat_session_details_7e5017c7")
1170 api.RegisterMessage((*CnatSessionDump)(nil), "cnat_session_dump_51077d14")
1171 api.RegisterMessage((*CnatSessionPurge)(nil), "cnat_session_purge_51077d14")
1172 api.RegisterMessage((*CnatSessionPurgeReply)(nil), "cnat_session_purge_reply_e8d4e804")
1173 api.RegisterMessage((*CnatSetSnatAddresses)(nil), "cnat_set_snat_addresses_d997e96c")
1174 api.RegisterMessage((*CnatSetSnatAddressesReply)(nil), "cnat_set_snat_addresses_reply_e8d4e804")
1175 api.RegisterMessage((*CnatSetSnatPolicy)(nil), "cnat_set_snat_policy_d3e6eaf4")
1176 api.RegisterMessage((*CnatSetSnatPolicyReply)(nil), "cnat_set_snat_policy_reply_e8d4e804")
1177 api.RegisterMessage((*CnatSnatPolicyAddDelExcludePfx)(nil), "cnat_snat_policy_add_del_exclude_pfx_e26dd79a")
1178 api.RegisterMessage((*CnatSnatPolicyAddDelExcludePfxReply)(nil), "cnat_snat_policy_add_del_exclude_pfx_reply_e8d4e804")
1179 api.RegisterMessage((*CnatSnatPolicyAddDelIf)(nil), "cnat_snat_policy_add_del_if_6828deca")
1180 api.RegisterMessage((*CnatSnatPolicyAddDelIfReply)(nil), "cnat_snat_policy_add_del_if_reply_e8d4e804")
1181 api.RegisterMessage((*CnatTranslationDel)(nil), "cnat_translation_del_3a91bde5")
1182 api.RegisterMessage((*CnatTranslationDelReply)(nil), "cnat_translation_del_reply_e8d4e804")
1183 api.RegisterMessage((*CnatTranslationDetails)(nil), "cnat_translation_details_347e1f16")
1184 api.RegisterMessage((*CnatTranslationDump)(nil), "cnat_translation_dump_51077d14")
1185 api.RegisterMessage((*CnatTranslationUpdate)(nil), "cnat_translation_update_cd5aedf5")
1186 api.RegisterMessage((*CnatTranslationUpdateReply)(nil), "cnat_translation_update_reply_e2fc8294")
1189 // Messages returns list of all messages in this module.
1190 func AllMessages() []api.Message {
1191 return []api.Message{
1192 (*CnatGetSnatAddresses)(nil),
1193 (*CnatGetSnatAddressesReply)(nil),
1194 (*CnatSessionDetails)(nil),
1195 (*CnatSessionDump)(nil),
1196 (*CnatSessionPurge)(nil),
1197 (*CnatSessionPurgeReply)(nil),
1198 (*CnatSetSnatAddresses)(nil),
1199 (*CnatSetSnatAddressesReply)(nil),
1200 (*CnatSetSnatPolicy)(nil),
1201 (*CnatSetSnatPolicyReply)(nil),
1202 (*CnatSnatPolicyAddDelExcludePfx)(nil),
1203 (*CnatSnatPolicyAddDelExcludePfxReply)(nil),
1204 (*CnatSnatPolicyAddDelIf)(nil),
1205 (*CnatSnatPolicyAddDelIfReply)(nil),
1206 (*CnatTranslationDel)(nil),
1207 (*CnatTranslationDelReply)(nil),
1208 (*CnatTranslationDetails)(nil),
1209 (*CnatTranslationDump)(nil),
1210 (*CnatTranslationUpdate)(nil),
1211 (*CnatTranslationUpdateReply)(nil),