1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
5 // source: /usr/share/vpp/api/plugins/det44.api.json
7 // Package det44 contains generated bindings for API file det44.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 _ "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 = 0x6d6e88dd
34 // Det44AddDelMap defines message 'det44_add_del_map'.
35 type Det44AddDelMap struct {
36 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
37 InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
38 InPlen uint8 `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
39 OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
40 OutPlen uint8 `binapi:"u8,name=out_plen" json:"out_plen,omitempty"`
43 func (m *Det44AddDelMap) Reset() { *m = Det44AddDelMap{} }
44 func (*Det44AddDelMap) GetMessageName() string { return "det44_add_del_map" }
45 func (*Det44AddDelMap) GetCrcString() string { return "1150a190" }
46 func (*Det44AddDelMap) GetMessageType() api.MessageType {
47 return api.RequestMessage
50 func (m *Det44AddDelMap) Size() (size int) {
55 size += 1 * 4 // m.InAddr
57 size += 1 * 4 // m.OutAddr
58 size += 1 // m.OutPlen
61 func (m *Det44AddDelMap) Marshal(b []byte) ([]byte, error) {
63 b = make([]byte, m.Size())
65 buf := codec.NewBuffer(b)
66 buf.EncodeBool(m.IsAdd)
67 buf.EncodeBytes(m.InAddr[:], 4)
68 buf.EncodeUint8(m.InPlen)
69 buf.EncodeBytes(m.OutAddr[:], 4)
70 buf.EncodeUint8(m.OutPlen)
71 return buf.Bytes(), nil
73 func (m *Det44AddDelMap) Unmarshal(b []byte) error {
74 buf := codec.NewBuffer(b)
75 m.IsAdd = buf.DecodeBool()
76 copy(m.InAddr[:], buf.DecodeBytes(4))
77 m.InPlen = buf.DecodeUint8()
78 copy(m.OutAddr[:], buf.DecodeBytes(4))
79 m.OutPlen = buf.DecodeUint8()
83 // Det44AddDelMapReply defines message 'det44_add_del_map_reply'.
84 type Det44AddDelMapReply struct {
85 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
88 func (m *Det44AddDelMapReply) Reset() { *m = Det44AddDelMapReply{} }
89 func (*Det44AddDelMapReply) GetMessageName() string { return "det44_add_del_map_reply" }
90 func (*Det44AddDelMapReply) GetCrcString() string { return "e8d4e804" }
91 func (*Det44AddDelMapReply) GetMessageType() api.MessageType {
92 return api.ReplyMessage
95 func (m *Det44AddDelMapReply) Size() (size int) {
102 func (m *Det44AddDelMapReply) Marshal(b []byte) ([]byte, error) {
104 b = make([]byte, m.Size())
106 buf := codec.NewBuffer(b)
107 buf.EncodeInt32(m.Retval)
108 return buf.Bytes(), nil
110 func (m *Det44AddDelMapReply) Unmarshal(b []byte) error {
111 buf := codec.NewBuffer(b)
112 m.Retval = buf.DecodeInt32()
116 // Det44CloseSessionIn defines message 'det44_close_session_in'.
117 type Det44CloseSessionIn struct {
118 InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
119 InPort uint16 `binapi:"u16,name=in_port" json:"in_port,omitempty"`
120 ExtAddr ip_types.IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
121 ExtPort uint16 `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
124 func (m *Det44CloseSessionIn) Reset() { *m = Det44CloseSessionIn{} }
125 func (*Det44CloseSessionIn) GetMessageName() string { return "det44_close_session_in" }
126 func (*Det44CloseSessionIn) GetCrcString() string { return "3c68e073" }
127 func (*Det44CloseSessionIn) GetMessageType() api.MessageType {
128 return api.RequestMessage
131 func (m *Det44CloseSessionIn) Size() (size int) {
135 size += 1 * 4 // m.InAddr
136 size += 2 // m.InPort
137 size += 1 * 4 // m.ExtAddr
138 size += 2 // m.ExtPort
141 func (m *Det44CloseSessionIn) Marshal(b []byte) ([]byte, error) {
143 b = make([]byte, m.Size())
145 buf := codec.NewBuffer(b)
146 buf.EncodeBytes(m.InAddr[:], 4)
147 buf.EncodeUint16(m.InPort)
148 buf.EncodeBytes(m.ExtAddr[:], 4)
149 buf.EncodeUint16(m.ExtPort)
150 return buf.Bytes(), nil
152 func (m *Det44CloseSessionIn) Unmarshal(b []byte) error {
153 buf := codec.NewBuffer(b)
154 copy(m.InAddr[:], buf.DecodeBytes(4))
155 m.InPort = buf.DecodeUint16()
156 copy(m.ExtAddr[:], buf.DecodeBytes(4))
157 m.ExtPort = buf.DecodeUint16()
161 // Det44CloseSessionInReply defines message 'det44_close_session_in_reply'.
162 type Det44CloseSessionInReply struct {
163 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
166 func (m *Det44CloseSessionInReply) Reset() { *m = Det44CloseSessionInReply{} }
167 func (*Det44CloseSessionInReply) GetMessageName() string { return "det44_close_session_in_reply" }
168 func (*Det44CloseSessionInReply) GetCrcString() string { return "e8d4e804" }
169 func (*Det44CloseSessionInReply) GetMessageType() api.MessageType {
170 return api.ReplyMessage
173 func (m *Det44CloseSessionInReply) Size() (size int) {
177 size += 4 // m.Retval
180 func (m *Det44CloseSessionInReply) Marshal(b []byte) ([]byte, error) {
182 b = make([]byte, m.Size())
184 buf := codec.NewBuffer(b)
185 buf.EncodeInt32(m.Retval)
186 return buf.Bytes(), nil
188 func (m *Det44CloseSessionInReply) Unmarshal(b []byte) error {
189 buf := codec.NewBuffer(b)
190 m.Retval = buf.DecodeInt32()
194 // Det44CloseSessionOut defines message 'det44_close_session_out'.
195 type Det44CloseSessionOut struct {
196 OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
197 OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"`
198 ExtAddr ip_types.IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
199 ExtPort uint16 `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
202 func (m *Det44CloseSessionOut) Reset() { *m = Det44CloseSessionOut{} }
203 func (*Det44CloseSessionOut) GetMessageName() string { return "det44_close_session_out" }
204 func (*Det44CloseSessionOut) GetCrcString() string { return "f6b259d1" }
205 func (*Det44CloseSessionOut) GetMessageType() api.MessageType {
206 return api.RequestMessage
209 func (m *Det44CloseSessionOut) Size() (size int) {
213 size += 1 * 4 // m.OutAddr
214 size += 2 // m.OutPort
215 size += 1 * 4 // m.ExtAddr
216 size += 2 // m.ExtPort
219 func (m *Det44CloseSessionOut) Marshal(b []byte) ([]byte, error) {
221 b = make([]byte, m.Size())
223 buf := codec.NewBuffer(b)
224 buf.EncodeBytes(m.OutAddr[:], 4)
225 buf.EncodeUint16(m.OutPort)
226 buf.EncodeBytes(m.ExtAddr[:], 4)
227 buf.EncodeUint16(m.ExtPort)
228 return buf.Bytes(), nil
230 func (m *Det44CloseSessionOut) Unmarshal(b []byte) error {
231 buf := codec.NewBuffer(b)
232 copy(m.OutAddr[:], buf.DecodeBytes(4))
233 m.OutPort = buf.DecodeUint16()
234 copy(m.ExtAddr[:], buf.DecodeBytes(4))
235 m.ExtPort = buf.DecodeUint16()
239 // Det44CloseSessionOutReply defines message 'det44_close_session_out_reply'.
240 type Det44CloseSessionOutReply struct {
241 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
244 func (m *Det44CloseSessionOutReply) Reset() { *m = Det44CloseSessionOutReply{} }
245 func (*Det44CloseSessionOutReply) GetMessageName() string { return "det44_close_session_out_reply" }
246 func (*Det44CloseSessionOutReply) GetCrcString() string { return "e8d4e804" }
247 func (*Det44CloseSessionOutReply) GetMessageType() api.MessageType {
248 return api.ReplyMessage
251 func (m *Det44CloseSessionOutReply) Size() (size int) {
255 size += 4 // m.Retval
258 func (m *Det44CloseSessionOutReply) Marshal(b []byte) ([]byte, error) {
260 b = make([]byte, m.Size())
262 buf := codec.NewBuffer(b)
263 buf.EncodeInt32(m.Retval)
264 return buf.Bytes(), nil
266 func (m *Det44CloseSessionOutReply) Unmarshal(b []byte) error {
267 buf := codec.NewBuffer(b)
268 m.Retval = buf.DecodeInt32()
272 // Det44Forward defines message 'det44_forward'.
273 type Det44Forward struct {
274 InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
277 func (m *Det44Forward) Reset() { *m = Det44Forward{} }
278 func (*Det44Forward) GetMessageName() string { return "det44_forward" }
279 func (*Det44Forward) GetCrcString() string { return "7f8a89cd" }
280 func (*Det44Forward) GetMessageType() api.MessageType {
281 return api.RequestMessage
284 func (m *Det44Forward) Size() (size int) {
288 size += 1 * 4 // m.InAddr
291 func (m *Det44Forward) Marshal(b []byte) ([]byte, error) {
293 b = make([]byte, m.Size())
295 buf := codec.NewBuffer(b)
296 buf.EncodeBytes(m.InAddr[:], 4)
297 return buf.Bytes(), nil
299 func (m *Det44Forward) Unmarshal(b []byte) error {
300 buf := codec.NewBuffer(b)
301 copy(m.InAddr[:], buf.DecodeBytes(4))
305 // Det44ForwardReply defines message 'det44_forward_reply'.
306 type Det44ForwardReply struct {
307 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
308 OutPortLo uint16 `binapi:"u16,name=out_port_lo" json:"out_port_lo,omitempty"`
309 OutPortHi uint16 `binapi:"u16,name=out_port_hi" json:"out_port_hi,omitempty"`
310 OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
313 func (m *Det44ForwardReply) Reset() { *m = Det44ForwardReply{} }
314 func (*Det44ForwardReply) GetMessageName() string { return "det44_forward_reply" }
315 func (*Det44ForwardReply) GetCrcString() string { return "a8ccbdc0" }
316 func (*Det44ForwardReply) GetMessageType() api.MessageType {
317 return api.ReplyMessage
320 func (m *Det44ForwardReply) Size() (size int) {
324 size += 4 // m.Retval
325 size += 2 // m.OutPortLo
326 size += 2 // m.OutPortHi
327 size += 1 * 4 // m.OutAddr
330 func (m *Det44ForwardReply) Marshal(b []byte) ([]byte, error) {
332 b = make([]byte, m.Size())
334 buf := codec.NewBuffer(b)
335 buf.EncodeInt32(m.Retval)
336 buf.EncodeUint16(m.OutPortLo)
337 buf.EncodeUint16(m.OutPortHi)
338 buf.EncodeBytes(m.OutAddr[:], 4)
339 return buf.Bytes(), nil
341 func (m *Det44ForwardReply) Unmarshal(b []byte) error {
342 buf := codec.NewBuffer(b)
343 m.Retval = buf.DecodeInt32()
344 m.OutPortLo = buf.DecodeUint16()
345 m.OutPortHi = buf.DecodeUint16()
346 copy(m.OutAddr[:], buf.DecodeBytes(4))
350 // Det44GetTimeouts defines message 'det44_get_timeouts'.
351 type Det44GetTimeouts struct{}
353 func (m *Det44GetTimeouts) Reset() { *m = Det44GetTimeouts{} }
354 func (*Det44GetTimeouts) GetMessageName() string { return "det44_get_timeouts" }
355 func (*Det44GetTimeouts) GetCrcString() string { return "51077d14" }
356 func (*Det44GetTimeouts) GetMessageType() api.MessageType {
357 return api.RequestMessage
360 func (m *Det44GetTimeouts) Size() (size int) {
366 func (m *Det44GetTimeouts) Marshal(b []byte) ([]byte, error) {
368 b = make([]byte, m.Size())
370 buf := codec.NewBuffer(b)
371 return buf.Bytes(), nil
373 func (m *Det44GetTimeouts) Unmarshal(b []byte) error {
377 // Det44GetTimeoutsReply defines message 'det44_get_timeouts_reply'.
378 // InProgress: the message form may change in the future versions
379 type Det44GetTimeoutsReply struct {
380 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
381 UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"`
382 TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"`
383 TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"`
384 ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"`
387 func (m *Det44GetTimeoutsReply) Reset() { *m = Det44GetTimeoutsReply{} }
388 func (*Det44GetTimeoutsReply) GetMessageName() string { return "det44_get_timeouts_reply" }
389 func (*Det44GetTimeoutsReply) GetCrcString() string { return "3c4df4e1" }
390 func (*Det44GetTimeoutsReply) GetMessageType() api.MessageType {
391 return api.ReplyMessage
394 func (m *Det44GetTimeoutsReply) Size() (size int) {
398 size += 4 // m.Retval
400 size += 4 // m.TCPEstablished
401 size += 4 // m.TCPTransitory
405 func (m *Det44GetTimeoutsReply) Marshal(b []byte) ([]byte, error) {
407 b = make([]byte, m.Size())
409 buf := codec.NewBuffer(b)
410 buf.EncodeInt32(m.Retval)
411 buf.EncodeUint32(m.UDP)
412 buf.EncodeUint32(m.TCPEstablished)
413 buf.EncodeUint32(m.TCPTransitory)
414 buf.EncodeUint32(m.ICMP)
415 return buf.Bytes(), nil
417 func (m *Det44GetTimeoutsReply) Unmarshal(b []byte) error {
418 buf := codec.NewBuffer(b)
419 m.Retval = buf.DecodeInt32()
420 m.UDP = buf.DecodeUint32()
421 m.TCPEstablished = buf.DecodeUint32()
422 m.TCPTransitory = buf.DecodeUint32()
423 m.ICMP = buf.DecodeUint32()
427 // Det44InterfaceAddDelFeature defines message 'det44_interface_add_del_feature'.
428 // InProgress: the message form may change in the future versions
429 type Det44InterfaceAddDelFeature struct {
430 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
431 IsInside bool `binapi:"bool,name=is_inside" json:"is_inside,omitempty"`
432 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
435 func (m *Det44InterfaceAddDelFeature) Reset() { *m = Det44InterfaceAddDelFeature{} }
436 func (*Det44InterfaceAddDelFeature) GetMessageName() string { return "det44_interface_add_del_feature" }
437 func (*Det44InterfaceAddDelFeature) GetCrcString() string { return "dc17a836" }
438 func (*Det44InterfaceAddDelFeature) GetMessageType() api.MessageType {
439 return api.RequestMessage
442 func (m *Det44InterfaceAddDelFeature) Size() (size int) {
447 size += 1 // m.IsInside
448 size += 4 // m.SwIfIndex
451 func (m *Det44InterfaceAddDelFeature) Marshal(b []byte) ([]byte, error) {
453 b = make([]byte, m.Size())
455 buf := codec.NewBuffer(b)
456 buf.EncodeBool(m.IsAdd)
457 buf.EncodeBool(m.IsInside)
458 buf.EncodeUint32(uint32(m.SwIfIndex))
459 return buf.Bytes(), nil
461 func (m *Det44InterfaceAddDelFeature) Unmarshal(b []byte) error {
462 buf := codec.NewBuffer(b)
463 m.IsAdd = buf.DecodeBool()
464 m.IsInside = buf.DecodeBool()
465 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
469 // Det44InterfaceAddDelFeatureReply defines message 'det44_interface_add_del_feature_reply'.
470 // InProgress: the message form may change in the future versions
471 type Det44InterfaceAddDelFeatureReply struct {
472 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
475 func (m *Det44InterfaceAddDelFeatureReply) Reset() { *m = Det44InterfaceAddDelFeatureReply{} }
476 func (*Det44InterfaceAddDelFeatureReply) GetMessageName() string {
477 return "det44_interface_add_del_feature_reply"
479 func (*Det44InterfaceAddDelFeatureReply) GetCrcString() string { return "e8d4e804" }
480 func (*Det44InterfaceAddDelFeatureReply) GetMessageType() api.MessageType {
481 return api.ReplyMessage
484 func (m *Det44InterfaceAddDelFeatureReply) Size() (size int) {
488 size += 4 // m.Retval
491 func (m *Det44InterfaceAddDelFeatureReply) Marshal(b []byte) ([]byte, error) {
493 b = make([]byte, m.Size())
495 buf := codec.NewBuffer(b)
496 buf.EncodeInt32(m.Retval)
497 return buf.Bytes(), nil
499 func (m *Det44InterfaceAddDelFeatureReply) Unmarshal(b []byte) error {
500 buf := codec.NewBuffer(b)
501 m.Retval = buf.DecodeInt32()
505 // Det44InterfaceDetails defines message 'det44_interface_details'.
506 // InProgress: the message form may change in the future versions
507 type Det44InterfaceDetails struct {
508 IsInside bool `binapi:"bool,name=is_inside" json:"is_inside,omitempty"`
509 IsOutside bool `binapi:"bool,name=is_outside" json:"is_outside,omitempty"`
510 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
513 func (m *Det44InterfaceDetails) Reset() { *m = Det44InterfaceDetails{} }
514 func (*Det44InterfaceDetails) GetMessageName() string { return "det44_interface_details" }
515 func (*Det44InterfaceDetails) GetCrcString() string { return "e60cc5be" }
516 func (*Det44InterfaceDetails) GetMessageType() api.MessageType {
517 return api.ReplyMessage
520 func (m *Det44InterfaceDetails) Size() (size int) {
524 size += 1 // m.IsInside
525 size += 1 // m.IsOutside
526 size += 4 // m.SwIfIndex
529 func (m *Det44InterfaceDetails) Marshal(b []byte) ([]byte, error) {
531 b = make([]byte, m.Size())
533 buf := codec.NewBuffer(b)
534 buf.EncodeBool(m.IsInside)
535 buf.EncodeBool(m.IsOutside)
536 buf.EncodeUint32(uint32(m.SwIfIndex))
537 return buf.Bytes(), nil
539 func (m *Det44InterfaceDetails) Unmarshal(b []byte) error {
540 buf := codec.NewBuffer(b)
541 m.IsInside = buf.DecodeBool()
542 m.IsOutside = buf.DecodeBool()
543 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
547 // Det44InterfaceDump defines message 'det44_interface_dump'.
548 // InProgress: the message form may change in the future versions
549 type Det44InterfaceDump struct{}
551 func (m *Det44InterfaceDump) Reset() { *m = Det44InterfaceDump{} }
552 func (*Det44InterfaceDump) GetMessageName() string { return "det44_interface_dump" }
553 func (*Det44InterfaceDump) GetCrcString() string { return "51077d14" }
554 func (*Det44InterfaceDump) GetMessageType() api.MessageType {
555 return api.RequestMessage
558 func (m *Det44InterfaceDump) Size() (size int) {
564 func (m *Det44InterfaceDump) Marshal(b []byte) ([]byte, error) {
566 b = make([]byte, m.Size())
568 buf := codec.NewBuffer(b)
569 return buf.Bytes(), nil
571 func (m *Det44InterfaceDump) Unmarshal(b []byte) error {
575 // Det44MapDetails defines message 'det44_map_details'.
576 type Det44MapDetails struct {
577 InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
578 InPlen uint8 `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
579 OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
580 OutPlen uint8 `binapi:"u8,name=out_plen" json:"out_plen,omitempty"`
581 SharingRatio uint32 `binapi:"u32,name=sharing_ratio" json:"sharing_ratio,omitempty"`
582 PortsPerHost uint16 `binapi:"u16,name=ports_per_host" json:"ports_per_host,omitempty"`
583 SesNum uint32 `binapi:"u32,name=ses_num" json:"ses_num,omitempty"`
586 func (m *Det44MapDetails) Reset() { *m = Det44MapDetails{} }
587 func (*Det44MapDetails) GetMessageName() string { return "det44_map_details" }
588 func (*Det44MapDetails) GetCrcString() string { return "ad91dc83" }
589 func (*Det44MapDetails) GetMessageType() api.MessageType {
590 return api.ReplyMessage
593 func (m *Det44MapDetails) Size() (size int) {
597 size += 1 * 4 // m.InAddr
598 size += 1 // m.InPlen
599 size += 1 * 4 // m.OutAddr
600 size += 1 // m.OutPlen
601 size += 4 // m.SharingRatio
602 size += 2 // m.PortsPerHost
603 size += 4 // m.SesNum
606 func (m *Det44MapDetails) Marshal(b []byte) ([]byte, error) {
608 b = make([]byte, m.Size())
610 buf := codec.NewBuffer(b)
611 buf.EncodeBytes(m.InAddr[:], 4)
612 buf.EncodeUint8(m.InPlen)
613 buf.EncodeBytes(m.OutAddr[:], 4)
614 buf.EncodeUint8(m.OutPlen)
615 buf.EncodeUint32(m.SharingRatio)
616 buf.EncodeUint16(m.PortsPerHost)
617 buf.EncodeUint32(m.SesNum)
618 return buf.Bytes(), nil
620 func (m *Det44MapDetails) Unmarshal(b []byte) error {
621 buf := codec.NewBuffer(b)
622 copy(m.InAddr[:], buf.DecodeBytes(4))
623 m.InPlen = buf.DecodeUint8()
624 copy(m.OutAddr[:], buf.DecodeBytes(4))
625 m.OutPlen = buf.DecodeUint8()
626 m.SharingRatio = buf.DecodeUint32()
627 m.PortsPerHost = buf.DecodeUint16()
628 m.SesNum = buf.DecodeUint32()
632 // Det44MapDump defines message 'det44_map_dump'.
633 type Det44MapDump struct{}
635 func (m *Det44MapDump) Reset() { *m = Det44MapDump{} }
636 func (*Det44MapDump) GetMessageName() string { return "det44_map_dump" }
637 func (*Det44MapDump) GetCrcString() string { return "51077d14" }
638 func (*Det44MapDump) GetMessageType() api.MessageType {
639 return api.RequestMessage
642 func (m *Det44MapDump) Size() (size int) {
648 func (m *Det44MapDump) Marshal(b []byte) ([]byte, error) {
650 b = make([]byte, m.Size())
652 buf := codec.NewBuffer(b)
653 return buf.Bytes(), nil
655 func (m *Det44MapDump) Unmarshal(b []byte) error {
659 // Det44PluginEnableDisable defines message 'det44_plugin_enable_disable'.
660 // InProgress: the message form may change in the future versions
661 type Det44PluginEnableDisable struct {
662 InsideVrf uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"`
663 OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"`
664 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
667 func (m *Det44PluginEnableDisable) Reset() { *m = Det44PluginEnableDisable{} }
668 func (*Det44PluginEnableDisable) GetMessageName() string { return "det44_plugin_enable_disable" }
669 func (*Det44PluginEnableDisable) GetCrcString() string { return "617b6bf8" }
670 func (*Det44PluginEnableDisable) GetMessageType() api.MessageType {
671 return api.RequestMessage
674 func (m *Det44PluginEnableDisable) Size() (size int) {
678 size += 4 // m.InsideVrf
679 size += 4 // m.OutsideVrf
680 size += 1 // m.Enable
683 func (m *Det44PluginEnableDisable) Marshal(b []byte) ([]byte, error) {
685 b = make([]byte, m.Size())
687 buf := codec.NewBuffer(b)
688 buf.EncodeUint32(m.InsideVrf)
689 buf.EncodeUint32(m.OutsideVrf)
690 buf.EncodeBool(m.Enable)
691 return buf.Bytes(), nil
693 func (m *Det44PluginEnableDisable) Unmarshal(b []byte) error {
694 buf := codec.NewBuffer(b)
695 m.InsideVrf = buf.DecodeUint32()
696 m.OutsideVrf = buf.DecodeUint32()
697 m.Enable = buf.DecodeBool()
701 // Det44PluginEnableDisableReply defines message 'det44_plugin_enable_disable_reply'.
702 // InProgress: the message form may change in the future versions
703 type Det44PluginEnableDisableReply struct {
704 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
707 func (m *Det44PluginEnableDisableReply) Reset() { *m = Det44PluginEnableDisableReply{} }
708 func (*Det44PluginEnableDisableReply) GetMessageName() string {
709 return "det44_plugin_enable_disable_reply"
711 func (*Det44PluginEnableDisableReply) GetCrcString() string { return "e8d4e804" }
712 func (*Det44PluginEnableDisableReply) GetMessageType() api.MessageType {
713 return api.ReplyMessage
716 func (m *Det44PluginEnableDisableReply) Size() (size int) {
720 size += 4 // m.Retval
723 func (m *Det44PluginEnableDisableReply) Marshal(b []byte) ([]byte, error) {
725 b = make([]byte, m.Size())
727 buf := codec.NewBuffer(b)
728 buf.EncodeInt32(m.Retval)
729 return buf.Bytes(), nil
731 func (m *Det44PluginEnableDisableReply) Unmarshal(b []byte) error {
732 buf := codec.NewBuffer(b)
733 m.Retval = buf.DecodeInt32()
737 // Det44Reverse defines message 'det44_reverse'.
738 type Det44Reverse struct {
739 OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"`
740 OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
743 func (m *Det44Reverse) Reset() { *m = Det44Reverse{} }
744 func (*Det44Reverse) GetMessageName() string { return "det44_reverse" }
745 func (*Det44Reverse) GetCrcString() string { return "a7573fe1" }
746 func (*Det44Reverse) GetMessageType() api.MessageType {
747 return api.RequestMessage
750 func (m *Det44Reverse) Size() (size int) {
754 size += 2 // m.OutPort
755 size += 1 * 4 // m.OutAddr
758 func (m *Det44Reverse) Marshal(b []byte) ([]byte, error) {
760 b = make([]byte, m.Size())
762 buf := codec.NewBuffer(b)
763 buf.EncodeUint16(m.OutPort)
764 buf.EncodeBytes(m.OutAddr[:], 4)
765 return buf.Bytes(), nil
767 func (m *Det44Reverse) Unmarshal(b []byte) error {
768 buf := codec.NewBuffer(b)
769 m.OutPort = buf.DecodeUint16()
770 copy(m.OutAddr[:], buf.DecodeBytes(4))
774 // Det44ReverseReply defines message 'det44_reverse_reply'.
775 type Det44ReverseReply struct {
776 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
777 InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
780 func (m *Det44ReverseReply) Reset() { *m = Det44ReverseReply{} }
781 func (*Det44ReverseReply) GetMessageName() string { return "det44_reverse_reply" }
782 func (*Det44ReverseReply) GetCrcString() string { return "34066d48" }
783 func (*Det44ReverseReply) GetMessageType() api.MessageType {
784 return api.ReplyMessage
787 func (m *Det44ReverseReply) Size() (size int) {
791 size += 4 // m.Retval
792 size += 1 * 4 // m.InAddr
795 func (m *Det44ReverseReply) Marshal(b []byte) ([]byte, error) {
797 b = make([]byte, m.Size())
799 buf := codec.NewBuffer(b)
800 buf.EncodeInt32(m.Retval)
801 buf.EncodeBytes(m.InAddr[:], 4)
802 return buf.Bytes(), nil
804 func (m *Det44ReverseReply) Unmarshal(b []byte) error {
805 buf := codec.NewBuffer(b)
806 m.Retval = buf.DecodeInt32()
807 copy(m.InAddr[:], buf.DecodeBytes(4))
811 // Det44SessionDetails defines message 'det44_session_details'.
812 type Det44SessionDetails struct {
813 InPort uint16 `binapi:"u16,name=in_port" json:"in_port,omitempty"`
814 ExtAddr ip_types.IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
815 ExtPort uint16 `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
816 OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"`
817 State uint8 `binapi:"u8,name=state" json:"state,omitempty"`
818 Expire uint32 `binapi:"u32,name=expire" json:"expire,omitempty"`
821 func (m *Det44SessionDetails) Reset() { *m = Det44SessionDetails{} }
822 func (*Det44SessionDetails) GetMessageName() string { return "det44_session_details" }
823 func (*Det44SessionDetails) GetCrcString() string { return "27f3c171" }
824 func (*Det44SessionDetails) GetMessageType() api.MessageType {
825 return api.ReplyMessage
828 func (m *Det44SessionDetails) Size() (size int) {
832 size += 2 // m.InPort
833 size += 1 * 4 // m.ExtAddr
834 size += 2 // m.ExtPort
835 size += 2 // m.OutPort
837 size += 4 // m.Expire
840 func (m *Det44SessionDetails) Marshal(b []byte) ([]byte, error) {
842 b = make([]byte, m.Size())
844 buf := codec.NewBuffer(b)
845 buf.EncodeUint16(m.InPort)
846 buf.EncodeBytes(m.ExtAddr[:], 4)
847 buf.EncodeUint16(m.ExtPort)
848 buf.EncodeUint16(m.OutPort)
849 buf.EncodeUint8(m.State)
850 buf.EncodeUint32(m.Expire)
851 return buf.Bytes(), nil
853 func (m *Det44SessionDetails) Unmarshal(b []byte) error {
854 buf := codec.NewBuffer(b)
855 m.InPort = buf.DecodeUint16()
856 copy(m.ExtAddr[:], buf.DecodeBytes(4))
857 m.ExtPort = buf.DecodeUint16()
858 m.OutPort = buf.DecodeUint16()
859 m.State = buf.DecodeUint8()
860 m.Expire = buf.DecodeUint32()
864 // Det44SessionDump defines message 'det44_session_dump'.
865 type Det44SessionDump struct {
866 UserAddr ip_types.IP4Address `binapi:"ip4_address,name=user_addr" json:"user_addr,omitempty"`
869 func (m *Det44SessionDump) Reset() { *m = Det44SessionDump{} }
870 func (*Det44SessionDump) GetMessageName() string { return "det44_session_dump" }
871 func (*Det44SessionDump) GetCrcString() string { return "e45a3af7" }
872 func (*Det44SessionDump) GetMessageType() api.MessageType {
873 return api.RequestMessage
876 func (m *Det44SessionDump) Size() (size int) {
880 size += 1 * 4 // m.UserAddr
883 func (m *Det44SessionDump) Marshal(b []byte) ([]byte, error) {
885 b = make([]byte, m.Size())
887 buf := codec.NewBuffer(b)
888 buf.EncodeBytes(m.UserAddr[:], 4)
889 return buf.Bytes(), nil
891 func (m *Det44SessionDump) Unmarshal(b []byte) error {
892 buf := codec.NewBuffer(b)
893 copy(m.UserAddr[:], buf.DecodeBytes(4))
897 // Det44SetTimeouts defines message 'det44_set_timeouts'.
898 // InProgress: the message form may change in the future versions
899 type Det44SetTimeouts struct {
900 UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"`
901 TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"`
902 TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"`
903 ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"`
906 func (m *Det44SetTimeouts) Reset() { *m = Det44SetTimeouts{} }
907 func (*Det44SetTimeouts) GetMessageName() string { return "det44_set_timeouts" }
908 func (*Det44SetTimeouts) GetCrcString() string { return "d4746b16" }
909 func (*Det44SetTimeouts) GetMessageType() api.MessageType {
910 return api.RequestMessage
913 func (m *Det44SetTimeouts) Size() (size int) {
918 size += 4 // m.TCPEstablished
919 size += 4 // m.TCPTransitory
923 func (m *Det44SetTimeouts) Marshal(b []byte) ([]byte, error) {
925 b = make([]byte, m.Size())
927 buf := codec.NewBuffer(b)
928 buf.EncodeUint32(m.UDP)
929 buf.EncodeUint32(m.TCPEstablished)
930 buf.EncodeUint32(m.TCPTransitory)
931 buf.EncodeUint32(m.ICMP)
932 return buf.Bytes(), nil
934 func (m *Det44SetTimeouts) Unmarshal(b []byte) error {
935 buf := codec.NewBuffer(b)
936 m.UDP = buf.DecodeUint32()
937 m.TCPEstablished = buf.DecodeUint32()
938 m.TCPTransitory = buf.DecodeUint32()
939 m.ICMP = buf.DecodeUint32()
943 // Det44SetTimeoutsReply defines message 'det44_set_timeouts_reply'.
944 // InProgress: the message form may change in the future versions
945 type Det44SetTimeoutsReply struct {
946 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
949 func (m *Det44SetTimeoutsReply) Reset() { *m = Det44SetTimeoutsReply{} }
950 func (*Det44SetTimeoutsReply) GetMessageName() string { return "det44_set_timeouts_reply" }
951 func (*Det44SetTimeoutsReply) GetCrcString() string { return "e8d4e804" }
952 func (*Det44SetTimeoutsReply) GetMessageType() api.MessageType {
953 return api.ReplyMessage
956 func (m *Det44SetTimeoutsReply) Size() (size int) {
960 size += 4 // m.Retval
963 func (m *Det44SetTimeoutsReply) Marshal(b []byte) ([]byte, error) {
965 b = make([]byte, m.Size())
967 buf := codec.NewBuffer(b)
968 buf.EncodeInt32(m.Retval)
969 return buf.Bytes(), nil
971 func (m *Det44SetTimeoutsReply) Unmarshal(b []byte) error {
972 buf := codec.NewBuffer(b)
973 m.Retval = buf.DecodeInt32()
977 // NatDetAddDelMap defines message 'nat_det_add_del_map'.
978 // Deprecated: the message will be removed in the future versions
979 type NatDetAddDelMap struct {
980 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
981 InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
982 InPlen uint8 `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
983 OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
984 OutPlen uint8 `binapi:"u8,name=out_plen" json:"out_plen,omitempty"`
987 func (m *NatDetAddDelMap) Reset() { *m = NatDetAddDelMap{} }
988 func (*NatDetAddDelMap) GetMessageName() string { return "nat_det_add_del_map" }
989 func (*NatDetAddDelMap) GetCrcString() string { return "1150a190" }
990 func (*NatDetAddDelMap) GetMessageType() api.MessageType {
991 return api.RequestMessage
994 func (m *NatDetAddDelMap) Size() (size int) {
999 size += 1 * 4 // m.InAddr
1000 size += 1 // m.InPlen
1001 size += 1 * 4 // m.OutAddr
1002 size += 1 // m.OutPlen
1005 func (m *NatDetAddDelMap) Marshal(b []byte) ([]byte, error) {
1007 b = make([]byte, m.Size())
1009 buf := codec.NewBuffer(b)
1010 buf.EncodeBool(m.IsAdd)
1011 buf.EncodeBytes(m.InAddr[:], 4)
1012 buf.EncodeUint8(m.InPlen)
1013 buf.EncodeBytes(m.OutAddr[:], 4)
1014 buf.EncodeUint8(m.OutPlen)
1015 return buf.Bytes(), nil
1017 func (m *NatDetAddDelMap) Unmarshal(b []byte) error {
1018 buf := codec.NewBuffer(b)
1019 m.IsAdd = buf.DecodeBool()
1020 copy(m.InAddr[:], buf.DecodeBytes(4))
1021 m.InPlen = buf.DecodeUint8()
1022 copy(m.OutAddr[:], buf.DecodeBytes(4))
1023 m.OutPlen = buf.DecodeUint8()
1027 // NatDetAddDelMapReply defines message 'nat_det_add_del_map_reply'.
1028 // Deprecated: the message will be removed in the future versions
1029 type NatDetAddDelMapReply struct {
1030 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1033 func (m *NatDetAddDelMapReply) Reset() { *m = NatDetAddDelMapReply{} }
1034 func (*NatDetAddDelMapReply) GetMessageName() string { return "nat_det_add_del_map_reply" }
1035 func (*NatDetAddDelMapReply) GetCrcString() string { return "e8d4e804" }
1036 func (*NatDetAddDelMapReply) GetMessageType() api.MessageType {
1037 return api.ReplyMessage
1040 func (m *NatDetAddDelMapReply) Size() (size int) {
1044 size += 4 // m.Retval
1047 func (m *NatDetAddDelMapReply) Marshal(b []byte) ([]byte, error) {
1049 b = make([]byte, m.Size())
1051 buf := codec.NewBuffer(b)
1052 buf.EncodeInt32(m.Retval)
1053 return buf.Bytes(), nil
1055 func (m *NatDetAddDelMapReply) Unmarshal(b []byte) error {
1056 buf := codec.NewBuffer(b)
1057 m.Retval = buf.DecodeInt32()
1061 // NatDetCloseSessionIn defines message 'nat_det_close_session_in'.
1062 // Deprecated: the message will be removed in the future versions
1063 type NatDetCloseSessionIn struct {
1064 InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
1065 InPort uint16 `binapi:"u16,name=in_port" json:"in_port,omitempty"`
1066 ExtAddr ip_types.IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
1067 ExtPort uint16 `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
1070 func (m *NatDetCloseSessionIn) Reset() { *m = NatDetCloseSessionIn{} }
1071 func (*NatDetCloseSessionIn) GetMessageName() string { return "nat_det_close_session_in" }
1072 func (*NatDetCloseSessionIn) GetCrcString() string { return "3c68e073" }
1073 func (*NatDetCloseSessionIn) GetMessageType() api.MessageType {
1074 return api.RequestMessage
1077 func (m *NatDetCloseSessionIn) Size() (size int) {
1081 size += 1 * 4 // m.InAddr
1082 size += 2 // m.InPort
1083 size += 1 * 4 // m.ExtAddr
1084 size += 2 // m.ExtPort
1087 func (m *NatDetCloseSessionIn) Marshal(b []byte) ([]byte, error) {
1089 b = make([]byte, m.Size())
1091 buf := codec.NewBuffer(b)
1092 buf.EncodeBytes(m.InAddr[:], 4)
1093 buf.EncodeUint16(m.InPort)
1094 buf.EncodeBytes(m.ExtAddr[:], 4)
1095 buf.EncodeUint16(m.ExtPort)
1096 return buf.Bytes(), nil
1098 func (m *NatDetCloseSessionIn) Unmarshal(b []byte) error {
1099 buf := codec.NewBuffer(b)
1100 copy(m.InAddr[:], buf.DecodeBytes(4))
1101 m.InPort = buf.DecodeUint16()
1102 copy(m.ExtAddr[:], buf.DecodeBytes(4))
1103 m.ExtPort = buf.DecodeUint16()
1107 // NatDetCloseSessionInReply defines message 'nat_det_close_session_in_reply'.
1108 // Deprecated: the message will be removed in the future versions
1109 type NatDetCloseSessionInReply struct {
1110 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1113 func (m *NatDetCloseSessionInReply) Reset() { *m = NatDetCloseSessionInReply{} }
1114 func (*NatDetCloseSessionInReply) GetMessageName() string { return "nat_det_close_session_in_reply" }
1115 func (*NatDetCloseSessionInReply) GetCrcString() string { return "e8d4e804" }
1116 func (*NatDetCloseSessionInReply) GetMessageType() api.MessageType {
1117 return api.ReplyMessage
1120 func (m *NatDetCloseSessionInReply) Size() (size int) {
1124 size += 4 // m.Retval
1127 func (m *NatDetCloseSessionInReply) Marshal(b []byte) ([]byte, error) {
1129 b = make([]byte, m.Size())
1131 buf := codec.NewBuffer(b)
1132 buf.EncodeInt32(m.Retval)
1133 return buf.Bytes(), nil
1135 func (m *NatDetCloseSessionInReply) Unmarshal(b []byte) error {
1136 buf := codec.NewBuffer(b)
1137 m.Retval = buf.DecodeInt32()
1141 // NatDetCloseSessionOut defines message 'nat_det_close_session_out'.
1142 // Deprecated: the message will be removed in the future versions
1143 type NatDetCloseSessionOut struct {
1144 OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
1145 OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"`
1146 ExtAddr ip_types.IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
1147 ExtPort uint16 `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
1150 func (m *NatDetCloseSessionOut) Reset() { *m = NatDetCloseSessionOut{} }
1151 func (*NatDetCloseSessionOut) GetMessageName() string { return "nat_det_close_session_out" }
1152 func (*NatDetCloseSessionOut) GetCrcString() string { return "f6b259d1" }
1153 func (*NatDetCloseSessionOut) GetMessageType() api.MessageType {
1154 return api.RequestMessage
1157 func (m *NatDetCloseSessionOut) Size() (size int) {
1161 size += 1 * 4 // m.OutAddr
1162 size += 2 // m.OutPort
1163 size += 1 * 4 // m.ExtAddr
1164 size += 2 // m.ExtPort
1167 func (m *NatDetCloseSessionOut) Marshal(b []byte) ([]byte, error) {
1169 b = make([]byte, m.Size())
1171 buf := codec.NewBuffer(b)
1172 buf.EncodeBytes(m.OutAddr[:], 4)
1173 buf.EncodeUint16(m.OutPort)
1174 buf.EncodeBytes(m.ExtAddr[:], 4)
1175 buf.EncodeUint16(m.ExtPort)
1176 return buf.Bytes(), nil
1178 func (m *NatDetCloseSessionOut) Unmarshal(b []byte) error {
1179 buf := codec.NewBuffer(b)
1180 copy(m.OutAddr[:], buf.DecodeBytes(4))
1181 m.OutPort = buf.DecodeUint16()
1182 copy(m.ExtAddr[:], buf.DecodeBytes(4))
1183 m.ExtPort = buf.DecodeUint16()
1187 // NatDetCloseSessionOutReply defines message 'nat_det_close_session_out_reply'.
1188 // Deprecated: the message will be removed in the future versions
1189 type NatDetCloseSessionOutReply struct {
1190 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1193 func (m *NatDetCloseSessionOutReply) Reset() { *m = NatDetCloseSessionOutReply{} }
1194 func (*NatDetCloseSessionOutReply) GetMessageName() string { return "nat_det_close_session_out_reply" }
1195 func (*NatDetCloseSessionOutReply) GetCrcString() string { return "e8d4e804" }
1196 func (*NatDetCloseSessionOutReply) GetMessageType() api.MessageType {
1197 return api.ReplyMessage
1200 func (m *NatDetCloseSessionOutReply) Size() (size int) {
1204 size += 4 // m.Retval
1207 func (m *NatDetCloseSessionOutReply) Marshal(b []byte) ([]byte, error) {
1209 b = make([]byte, m.Size())
1211 buf := codec.NewBuffer(b)
1212 buf.EncodeInt32(m.Retval)
1213 return buf.Bytes(), nil
1215 func (m *NatDetCloseSessionOutReply) Unmarshal(b []byte) error {
1216 buf := codec.NewBuffer(b)
1217 m.Retval = buf.DecodeInt32()
1221 // NatDetForward defines message 'nat_det_forward'.
1222 // Deprecated: the message will be removed in the future versions
1223 type NatDetForward struct {
1224 InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
1227 func (m *NatDetForward) Reset() { *m = NatDetForward{} }
1228 func (*NatDetForward) GetMessageName() string { return "nat_det_forward" }
1229 func (*NatDetForward) GetCrcString() string { return "7f8a89cd" }
1230 func (*NatDetForward) GetMessageType() api.MessageType {
1231 return api.RequestMessage
1234 func (m *NatDetForward) Size() (size int) {
1238 size += 1 * 4 // m.InAddr
1241 func (m *NatDetForward) Marshal(b []byte) ([]byte, error) {
1243 b = make([]byte, m.Size())
1245 buf := codec.NewBuffer(b)
1246 buf.EncodeBytes(m.InAddr[:], 4)
1247 return buf.Bytes(), nil
1249 func (m *NatDetForward) Unmarshal(b []byte) error {
1250 buf := codec.NewBuffer(b)
1251 copy(m.InAddr[:], buf.DecodeBytes(4))
1255 // NatDetForwardReply defines message 'nat_det_forward_reply'.
1256 // Deprecated: the message will be removed in the future versions
1257 type NatDetForwardReply struct {
1258 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1259 OutPortLo uint16 `binapi:"u16,name=out_port_lo" json:"out_port_lo,omitempty"`
1260 OutPortHi uint16 `binapi:"u16,name=out_port_hi" json:"out_port_hi,omitempty"`
1261 OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
1264 func (m *NatDetForwardReply) Reset() { *m = NatDetForwardReply{} }
1265 func (*NatDetForwardReply) GetMessageName() string { return "nat_det_forward_reply" }
1266 func (*NatDetForwardReply) GetCrcString() string { return "a8ccbdc0" }
1267 func (*NatDetForwardReply) GetMessageType() api.MessageType {
1268 return api.ReplyMessage
1271 func (m *NatDetForwardReply) Size() (size int) {
1275 size += 4 // m.Retval
1276 size += 2 // m.OutPortLo
1277 size += 2 // m.OutPortHi
1278 size += 1 * 4 // m.OutAddr
1281 func (m *NatDetForwardReply) Marshal(b []byte) ([]byte, error) {
1283 b = make([]byte, m.Size())
1285 buf := codec.NewBuffer(b)
1286 buf.EncodeInt32(m.Retval)
1287 buf.EncodeUint16(m.OutPortLo)
1288 buf.EncodeUint16(m.OutPortHi)
1289 buf.EncodeBytes(m.OutAddr[:], 4)
1290 return buf.Bytes(), nil
1292 func (m *NatDetForwardReply) Unmarshal(b []byte) error {
1293 buf := codec.NewBuffer(b)
1294 m.Retval = buf.DecodeInt32()
1295 m.OutPortLo = buf.DecodeUint16()
1296 m.OutPortHi = buf.DecodeUint16()
1297 copy(m.OutAddr[:], buf.DecodeBytes(4))
1301 // NatDetMapDetails defines message 'nat_det_map_details'.
1302 // Deprecated: the message will be removed in the future versions
1303 type NatDetMapDetails struct {
1304 InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
1305 InPlen uint8 `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
1306 OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
1307 OutPlen uint8 `binapi:"u8,name=out_plen" json:"out_plen,omitempty"`
1308 SharingRatio uint32 `binapi:"u32,name=sharing_ratio" json:"sharing_ratio,omitempty"`
1309 PortsPerHost uint16 `binapi:"u16,name=ports_per_host" json:"ports_per_host,omitempty"`
1310 SesNum uint32 `binapi:"u32,name=ses_num" json:"ses_num,omitempty"`
1313 func (m *NatDetMapDetails) Reset() { *m = NatDetMapDetails{} }
1314 func (*NatDetMapDetails) GetMessageName() string { return "nat_det_map_details" }
1315 func (*NatDetMapDetails) GetCrcString() string { return "ad91dc83" }
1316 func (*NatDetMapDetails) GetMessageType() api.MessageType {
1317 return api.ReplyMessage
1320 func (m *NatDetMapDetails) Size() (size int) {
1324 size += 1 * 4 // m.InAddr
1325 size += 1 // m.InPlen
1326 size += 1 * 4 // m.OutAddr
1327 size += 1 // m.OutPlen
1328 size += 4 // m.SharingRatio
1329 size += 2 // m.PortsPerHost
1330 size += 4 // m.SesNum
1333 func (m *NatDetMapDetails) Marshal(b []byte) ([]byte, error) {
1335 b = make([]byte, m.Size())
1337 buf := codec.NewBuffer(b)
1338 buf.EncodeBytes(m.InAddr[:], 4)
1339 buf.EncodeUint8(m.InPlen)
1340 buf.EncodeBytes(m.OutAddr[:], 4)
1341 buf.EncodeUint8(m.OutPlen)
1342 buf.EncodeUint32(m.SharingRatio)
1343 buf.EncodeUint16(m.PortsPerHost)
1344 buf.EncodeUint32(m.SesNum)
1345 return buf.Bytes(), nil
1347 func (m *NatDetMapDetails) Unmarshal(b []byte) error {
1348 buf := codec.NewBuffer(b)
1349 copy(m.InAddr[:], buf.DecodeBytes(4))
1350 m.InPlen = buf.DecodeUint8()
1351 copy(m.OutAddr[:], buf.DecodeBytes(4))
1352 m.OutPlen = buf.DecodeUint8()
1353 m.SharingRatio = buf.DecodeUint32()
1354 m.PortsPerHost = buf.DecodeUint16()
1355 m.SesNum = buf.DecodeUint32()
1359 // NatDetMapDump defines message 'nat_det_map_dump'.
1360 // Deprecated: the message will be removed in the future versions
1361 type NatDetMapDump struct{}
1363 func (m *NatDetMapDump) Reset() { *m = NatDetMapDump{} }
1364 func (*NatDetMapDump) GetMessageName() string { return "nat_det_map_dump" }
1365 func (*NatDetMapDump) GetCrcString() string { return "51077d14" }
1366 func (*NatDetMapDump) GetMessageType() api.MessageType {
1367 return api.RequestMessage
1370 func (m *NatDetMapDump) Size() (size int) {
1376 func (m *NatDetMapDump) Marshal(b []byte) ([]byte, error) {
1378 b = make([]byte, m.Size())
1380 buf := codec.NewBuffer(b)
1381 return buf.Bytes(), nil
1383 func (m *NatDetMapDump) Unmarshal(b []byte) error {
1387 // NatDetReverse defines message 'nat_det_reverse'.
1388 // Deprecated: the message will be removed in the future versions
1389 type NatDetReverse struct {
1390 OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"`
1391 OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
1394 func (m *NatDetReverse) Reset() { *m = NatDetReverse{} }
1395 func (*NatDetReverse) GetMessageName() string { return "nat_det_reverse" }
1396 func (*NatDetReverse) GetCrcString() string { return "a7573fe1" }
1397 func (*NatDetReverse) GetMessageType() api.MessageType {
1398 return api.RequestMessage
1401 func (m *NatDetReverse) Size() (size int) {
1405 size += 2 // m.OutPort
1406 size += 1 * 4 // m.OutAddr
1409 func (m *NatDetReverse) Marshal(b []byte) ([]byte, error) {
1411 b = make([]byte, m.Size())
1413 buf := codec.NewBuffer(b)
1414 buf.EncodeUint16(m.OutPort)
1415 buf.EncodeBytes(m.OutAddr[:], 4)
1416 return buf.Bytes(), nil
1418 func (m *NatDetReverse) Unmarshal(b []byte) error {
1419 buf := codec.NewBuffer(b)
1420 m.OutPort = buf.DecodeUint16()
1421 copy(m.OutAddr[:], buf.DecodeBytes(4))
1425 // NatDetReverseReply defines message 'nat_det_reverse_reply'.
1426 // Deprecated: the message will be removed in the future versions
1427 type NatDetReverseReply struct {
1428 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1429 InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
1432 func (m *NatDetReverseReply) Reset() { *m = NatDetReverseReply{} }
1433 func (*NatDetReverseReply) GetMessageName() string { return "nat_det_reverse_reply" }
1434 func (*NatDetReverseReply) GetCrcString() string { return "34066d48" }
1435 func (*NatDetReverseReply) GetMessageType() api.MessageType {
1436 return api.ReplyMessage
1439 func (m *NatDetReverseReply) Size() (size int) {
1443 size += 4 // m.Retval
1444 size += 1 * 4 // m.InAddr
1447 func (m *NatDetReverseReply) Marshal(b []byte) ([]byte, error) {
1449 b = make([]byte, m.Size())
1451 buf := codec.NewBuffer(b)
1452 buf.EncodeInt32(m.Retval)
1453 buf.EncodeBytes(m.InAddr[:], 4)
1454 return buf.Bytes(), nil
1456 func (m *NatDetReverseReply) Unmarshal(b []byte) error {
1457 buf := codec.NewBuffer(b)
1458 m.Retval = buf.DecodeInt32()
1459 copy(m.InAddr[:], buf.DecodeBytes(4))
1463 // NatDetSessionDetails defines message 'nat_det_session_details'.
1464 // Deprecated: the message will be removed in the future versions
1465 type NatDetSessionDetails struct {
1466 InPort uint16 `binapi:"u16,name=in_port" json:"in_port,omitempty"`
1467 ExtAddr ip_types.IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
1468 ExtPort uint16 `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
1469 OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"`
1470 State uint8 `binapi:"u8,name=state" json:"state,omitempty"`
1471 Expire uint32 `binapi:"u32,name=expire" json:"expire,omitempty"`
1474 func (m *NatDetSessionDetails) Reset() { *m = NatDetSessionDetails{} }
1475 func (*NatDetSessionDetails) GetMessageName() string { return "nat_det_session_details" }
1476 func (*NatDetSessionDetails) GetCrcString() string { return "27f3c171" }
1477 func (*NatDetSessionDetails) GetMessageType() api.MessageType {
1478 return api.ReplyMessage
1481 func (m *NatDetSessionDetails) Size() (size int) {
1485 size += 2 // m.InPort
1486 size += 1 * 4 // m.ExtAddr
1487 size += 2 // m.ExtPort
1488 size += 2 // m.OutPort
1489 size += 1 // m.State
1490 size += 4 // m.Expire
1493 func (m *NatDetSessionDetails) Marshal(b []byte) ([]byte, error) {
1495 b = make([]byte, m.Size())
1497 buf := codec.NewBuffer(b)
1498 buf.EncodeUint16(m.InPort)
1499 buf.EncodeBytes(m.ExtAddr[:], 4)
1500 buf.EncodeUint16(m.ExtPort)
1501 buf.EncodeUint16(m.OutPort)
1502 buf.EncodeUint8(m.State)
1503 buf.EncodeUint32(m.Expire)
1504 return buf.Bytes(), nil
1506 func (m *NatDetSessionDetails) Unmarshal(b []byte) error {
1507 buf := codec.NewBuffer(b)
1508 m.InPort = buf.DecodeUint16()
1509 copy(m.ExtAddr[:], buf.DecodeBytes(4))
1510 m.ExtPort = buf.DecodeUint16()
1511 m.OutPort = buf.DecodeUint16()
1512 m.State = buf.DecodeUint8()
1513 m.Expire = buf.DecodeUint32()
1517 // NatDetSessionDump defines message 'nat_det_session_dump'.
1518 // Deprecated: the message will be removed in the future versions
1519 type NatDetSessionDump struct {
1520 UserAddr ip_types.IP4Address `binapi:"ip4_address,name=user_addr" json:"user_addr,omitempty"`
1523 func (m *NatDetSessionDump) Reset() { *m = NatDetSessionDump{} }
1524 func (*NatDetSessionDump) GetMessageName() string { return "nat_det_session_dump" }
1525 func (*NatDetSessionDump) GetCrcString() string { return "e45a3af7" }
1526 func (*NatDetSessionDump) GetMessageType() api.MessageType {
1527 return api.RequestMessage
1530 func (m *NatDetSessionDump) Size() (size int) {
1534 size += 1 * 4 // m.UserAddr
1537 func (m *NatDetSessionDump) Marshal(b []byte) ([]byte, error) {
1539 b = make([]byte, m.Size())
1541 buf := codec.NewBuffer(b)
1542 buf.EncodeBytes(m.UserAddr[:], 4)
1543 return buf.Bytes(), nil
1545 func (m *NatDetSessionDump) Unmarshal(b []byte) error {
1546 buf := codec.NewBuffer(b)
1547 copy(m.UserAddr[:], buf.DecodeBytes(4))
1551 func init() { file_det44_binapi_init() }
1552 func file_det44_binapi_init() {
1553 api.RegisterMessage((*Det44AddDelMap)(nil), "det44_add_del_map_1150a190")
1554 api.RegisterMessage((*Det44AddDelMapReply)(nil), "det44_add_del_map_reply_e8d4e804")
1555 api.RegisterMessage((*Det44CloseSessionIn)(nil), "det44_close_session_in_3c68e073")
1556 api.RegisterMessage((*Det44CloseSessionInReply)(nil), "det44_close_session_in_reply_e8d4e804")
1557 api.RegisterMessage((*Det44CloseSessionOut)(nil), "det44_close_session_out_f6b259d1")
1558 api.RegisterMessage((*Det44CloseSessionOutReply)(nil), "det44_close_session_out_reply_e8d4e804")
1559 api.RegisterMessage((*Det44Forward)(nil), "det44_forward_7f8a89cd")
1560 api.RegisterMessage((*Det44ForwardReply)(nil), "det44_forward_reply_a8ccbdc0")
1561 api.RegisterMessage((*Det44GetTimeouts)(nil), "det44_get_timeouts_51077d14")
1562 api.RegisterMessage((*Det44GetTimeoutsReply)(nil), "det44_get_timeouts_reply_3c4df4e1")
1563 api.RegisterMessage((*Det44InterfaceAddDelFeature)(nil), "det44_interface_add_del_feature_dc17a836")
1564 api.RegisterMessage((*Det44InterfaceAddDelFeatureReply)(nil), "det44_interface_add_del_feature_reply_e8d4e804")
1565 api.RegisterMessage((*Det44InterfaceDetails)(nil), "det44_interface_details_e60cc5be")
1566 api.RegisterMessage((*Det44InterfaceDump)(nil), "det44_interface_dump_51077d14")
1567 api.RegisterMessage((*Det44MapDetails)(nil), "det44_map_details_ad91dc83")
1568 api.RegisterMessage((*Det44MapDump)(nil), "det44_map_dump_51077d14")
1569 api.RegisterMessage((*Det44PluginEnableDisable)(nil), "det44_plugin_enable_disable_617b6bf8")
1570 api.RegisterMessage((*Det44PluginEnableDisableReply)(nil), "det44_plugin_enable_disable_reply_e8d4e804")
1571 api.RegisterMessage((*Det44Reverse)(nil), "det44_reverse_a7573fe1")
1572 api.RegisterMessage((*Det44ReverseReply)(nil), "det44_reverse_reply_34066d48")
1573 api.RegisterMessage((*Det44SessionDetails)(nil), "det44_session_details_27f3c171")
1574 api.RegisterMessage((*Det44SessionDump)(nil), "det44_session_dump_e45a3af7")
1575 api.RegisterMessage((*Det44SetTimeouts)(nil), "det44_set_timeouts_d4746b16")
1576 api.RegisterMessage((*Det44SetTimeoutsReply)(nil), "det44_set_timeouts_reply_e8d4e804")
1577 api.RegisterMessage((*NatDetAddDelMap)(nil), "nat_det_add_del_map_1150a190")
1578 api.RegisterMessage((*NatDetAddDelMapReply)(nil), "nat_det_add_del_map_reply_e8d4e804")
1579 api.RegisterMessage((*NatDetCloseSessionIn)(nil), "nat_det_close_session_in_3c68e073")
1580 api.RegisterMessage((*NatDetCloseSessionInReply)(nil), "nat_det_close_session_in_reply_e8d4e804")
1581 api.RegisterMessage((*NatDetCloseSessionOut)(nil), "nat_det_close_session_out_f6b259d1")
1582 api.RegisterMessage((*NatDetCloseSessionOutReply)(nil), "nat_det_close_session_out_reply_e8d4e804")
1583 api.RegisterMessage((*NatDetForward)(nil), "nat_det_forward_7f8a89cd")
1584 api.RegisterMessage((*NatDetForwardReply)(nil), "nat_det_forward_reply_a8ccbdc0")
1585 api.RegisterMessage((*NatDetMapDetails)(nil), "nat_det_map_details_ad91dc83")
1586 api.RegisterMessage((*NatDetMapDump)(nil), "nat_det_map_dump_51077d14")
1587 api.RegisterMessage((*NatDetReverse)(nil), "nat_det_reverse_a7573fe1")
1588 api.RegisterMessage((*NatDetReverseReply)(nil), "nat_det_reverse_reply_34066d48")
1589 api.RegisterMessage((*NatDetSessionDetails)(nil), "nat_det_session_details_27f3c171")
1590 api.RegisterMessage((*NatDetSessionDump)(nil), "nat_det_session_dump_e45a3af7")
1593 // Messages returns list of all messages in this module.
1594 func AllMessages() []api.Message {
1595 return []api.Message{
1596 (*Det44AddDelMap)(nil),
1597 (*Det44AddDelMapReply)(nil),
1598 (*Det44CloseSessionIn)(nil),
1599 (*Det44CloseSessionInReply)(nil),
1600 (*Det44CloseSessionOut)(nil),
1601 (*Det44CloseSessionOutReply)(nil),
1602 (*Det44Forward)(nil),
1603 (*Det44ForwardReply)(nil),
1604 (*Det44GetTimeouts)(nil),
1605 (*Det44GetTimeoutsReply)(nil),
1606 (*Det44InterfaceAddDelFeature)(nil),
1607 (*Det44InterfaceAddDelFeatureReply)(nil),
1608 (*Det44InterfaceDetails)(nil),
1609 (*Det44InterfaceDump)(nil),
1610 (*Det44MapDetails)(nil),
1611 (*Det44MapDump)(nil),
1612 (*Det44PluginEnableDisable)(nil),
1613 (*Det44PluginEnableDisableReply)(nil),
1614 (*Det44Reverse)(nil),
1615 (*Det44ReverseReply)(nil),
1616 (*Det44SessionDetails)(nil),
1617 (*Det44SessionDump)(nil),
1618 (*Det44SetTimeouts)(nil),
1619 (*Det44SetTimeoutsReply)(nil),
1620 (*NatDetAddDelMap)(nil),
1621 (*NatDetAddDelMapReply)(nil),
1622 (*NatDetCloseSessionIn)(nil),
1623 (*NatDetCloseSessionInReply)(nil),
1624 (*NatDetCloseSessionOut)(nil),
1625 (*NatDetCloseSessionOutReply)(nil),
1626 (*NatDetForward)(nil),
1627 (*NatDetForwardReply)(nil),
1628 (*NatDetMapDetails)(nil),
1629 (*NatDetMapDump)(nil),
1630 (*NatDetReverse)(nil),
1631 (*NatDetReverseReply)(nil),
1632 (*NatDetSessionDetails)(nil),
1633 (*NatDetSessionDump)(nil),