github.com/networkservicemesh/govpp@v0.0.0-20240328101142-8a444680fbba/binapi/det44/det44.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  // versions:
     3  //  binapi-generator: v0.10.0-dev
     4  //  VPP:              23.10-rc0~170-g6f1548434
     5  // source: plugins/det44.api.json
     6  
     7  // Package det44 contains generated bindings for API file det44.api.
     8  //
     9  // Contents:
    10  // - 38 messages
    11  package det44
    12  
    13  import (
    14  	interface_types "github.com/networkservicemesh/govpp/binapi/interface_types"
    15  	ip_types "github.com/networkservicemesh/govpp/binapi/ip_types"
    16  	_ "github.com/networkservicemesh/govpp/binapi/nat_types"
    17  	api "go.fd.io/govpp/api"
    18  	codec "go.fd.io/govpp/codec"
    19  )
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the GoVPP api package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // GoVPP api package needs to be updated.
    25  const _ = api.GoVppAPIPackageIsVersion2
    26  
    27  const (
    28  	APIFile    = "det44"
    29  	APIVersion = "1.0.0"
    30  	VersionCrc = 0x6d6e88dd
    31  )
    32  
    33  // Add/delete DET44 mapping
    34  //   - is_add - true if add, false if delete
    35  //   - in_addr - inside IPv4 address
    36  //   - in_plen - inside IPv4 address prefix length
    37  //   - out_addr - outside IPv4 address
    38  //   - out_plen - outside IPv4 address prefix length
    39  //
    40  // Det44AddDelMap defines message 'det44_add_del_map'.
    41  type Det44AddDelMap struct {
    42  	IsAdd   bool                `binapi:"bool,name=is_add" json:"is_add,omitempty"`
    43  	InAddr  ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
    44  	InPlen  uint8               `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
    45  	OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
    46  	OutPlen uint8               `binapi:"u8,name=out_plen" json:"out_plen,omitempty"`
    47  }
    48  
    49  func (m *Det44AddDelMap) Reset()               { *m = Det44AddDelMap{} }
    50  func (*Det44AddDelMap) GetMessageName() string { return "det44_add_del_map" }
    51  func (*Det44AddDelMap) GetCrcString() string   { return "1150a190" }
    52  func (*Det44AddDelMap) GetMessageType() api.MessageType {
    53  	return api.RequestMessage
    54  }
    55  
    56  func (m *Det44AddDelMap) Size() (size int) {
    57  	if m == nil {
    58  		return 0
    59  	}
    60  	size += 1     // m.IsAdd
    61  	size += 1 * 4 // m.InAddr
    62  	size += 1     // m.InPlen
    63  	size += 1 * 4 // m.OutAddr
    64  	size += 1     // m.OutPlen
    65  	return size
    66  }
    67  func (m *Det44AddDelMap) Marshal(b []byte) ([]byte, error) {
    68  	if b == nil {
    69  		b = make([]byte, m.Size())
    70  	}
    71  	buf := codec.NewBuffer(b)
    72  	buf.EncodeBool(m.IsAdd)
    73  	buf.EncodeBytes(m.InAddr[:], 4)
    74  	buf.EncodeUint8(m.InPlen)
    75  	buf.EncodeBytes(m.OutAddr[:], 4)
    76  	buf.EncodeUint8(m.OutPlen)
    77  	return buf.Bytes(), nil
    78  }
    79  func (m *Det44AddDelMap) Unmarshal(b []byte) error {
    80  	buf := codec.NewBuffer(b)
    81  	m.IsAdd = buf.DecodeBool()
    82  	copy(m.InAddr[:], buf.DecodeBytes(4))
    83  	m.InPlen = buf.DecodeUint8()
    84  	copy(m.OutAddr[:], buf.DecodeBytes(4))
    85  	m.OutPlen = buf.DecodeUint8()
    86  	return nil
    87  }
    88  
    89  // Det44AddDelMapReply defines message 'det44_add_del_map_reply'.
    90  type Det44AddDelMapReply struct {
    91  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
    92  }
    93  
    94  func (m *Det44AddDelMapReply) Reset()               { *m = Det44AddDelMapReply{} }
    95  func (*Det44AddDelMapReply) GetMessageName() string { return "det44_add_del_map_reply" }
    96  func (*Det44AddDelMapReply) GetCrcString() string   { return "e8d4e804" }
    97  func (*Det44AddDelMapReply) GetMessageType() api.MessageType {
    98  	return api.ReplyMessage
    99  }
   100  
   101  func (m *Det44AddDelMapReply) Size() (size int) {
   102  	if m == nil {
   103  		return 0
   104  	}
   105  	size += 4 // m.Retval
   106  	return size
   107  }
   108  func (m *Det44AddDelMapReply) Marshal(b []byte) ([]byte, error) {
   109  	if b == nil {
   110  		b = make([]byte, m.Size())
   111  	}
   112  	buf := codec.NewBuffer(b)
   113  	buf.EncodeInt32(m.Retval)
   114  	return buf.Bytes(), nil
   115  }
   116  func (m *Det44AddDelMapReply) Unmarshal(b []byte) error {
   117  	buf := codec.NewBuffer(b)
   118  	m.Retval = buf.DecodeInt32()
   119  	return nil
   120  }
   121  
   122  // Close DET44 session by inside address and port
   123  //   - in_addr - inside IP address
   124  //   - in_port - inside port
   125  //   - ext_addr - external host IP address
   126  //   - ext_port - external host port
   127  //
   128  // Det44CloseSessionIn defines message 'det44_close_session_in'.
   129  type Det44CloseSessionIn struct {
   130  	InAddr  ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
   131  	InPort  uint16              `binapi:"u16,name=in_port" json:"in_port,omitempty"`
   132  	ExtAddr ip_types.IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
   133  	ExtPort uint16              `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
   134  }
   135  
   136  func (m *Det44CloseSessionIn) Reset()               { *m = Det44CloseSessionIn{} }
   137  func (*Det44CloseSessionIn) GetMessageName() string { return "det44_close_session_in" }
   138  func (*Det44CloseSessionIn) GetCrcString() string   { return "3c68e073" }
   139  func (*Det44CloseSessionIn) GetMessageType() api.MessageType {
   140  	return api.RequestMessage
   141  }
   142  
   143  func (m *Det44CloseSessionIn) Size() (size int) {
   144  	if m == nil {
   145  		return 0
   146  	}
   147  	size += 1 * 4 // m.InAddr
   148  	size += 2     // m.InPort
   149  	size += 1 * 4 // m.ExtAddr
   150  	size += 2     // m.ExtPort
   151  	return size
   152  }
   153  func (m *Det44CloseSessionIn) Marshal(b []byte) ([]byte, error) {
   154  	if b == nil {
   155  		b = make([]byte, m.Size())
   156  	}
   157  	buf := codec.NewBuffer(b)
   158  	buf.EncodeBytes(m.InAddr[:], 4)
   159  	buf.EncodeUint16(m.InPort)
   160  	buf.EncodeBytes(m.ExtAddr[:], 4)
   161  	buf.EncodeUint16(m.ExtPort)
   162  	return buf.Bytes(), nil
   163  }
   164  func (m *Det44CloseSessionIn) Unmarshal(b []byte) error {
   165  	buf := codec.NewBuffer(b)
   166  	copy(m.InAddr[:], buf.DecodeBytes(4))
   167  	m.InPort = buf.DecodeUint16()
   168  	copy(m.ExtAddr[:], buf.DecodeBytes(4))
   169  	m.ExtPort = buf.DecodeUint16()
   170  	return nil
   171  }
   172  
   173  // Det44CloseSessionInReply defines message 'det44_close_session_in_reply'.
   174  type Det44CloseSessionInReply struct {
   175  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   176  }
   177  
   178  func (m *Det44CloseSessionInReply) Reset()               { *m = Det44CloseSessionInReply{} }
   179  func (*Det44CloseSessionInReply) GetMessageName() string { return "det44_close_session_in_reply" }
   180  func (*Det44CloseSessionInReply) GetCrcString() string   { return "e8d4e804" }
   181  func (*Det44CloseSessionInReply) GetMessageType() api.MessageType {
   182  	return api.ReplyMessage
   183  }
   184  
   185  func (m *Det44CloseSessionInReply) Size() (size int) {
   186  	if m == nil {
   187  		return 0
   188  	}
   189  	size += 4 // m.Retval
   190  	return size
   191  }
   192  func (m *Det44CloseSessionInReply) Marshal(b []byte) ([]byte, error) {
   193  	if b == nil {
   194  		b = make([]byte, m.Size())
   195  	}
   196  	buf := codec.NewBuffer(b)
   197  	buf.EncodeInt32(m.Retval)
   198  	return buf.Bytes(), nil
   199  }
   200  func (m *Det44CloseSessionInReply) Unmarshal(b []byte) error {
   201  	buf := codec.NewBuffer(b)
   202  	m.Retval = buf.DecodeInt32()
   203  	return nil
   204  }
   205  
   206  // Close DET44 session by outside address and port
   207  //   - out_addr - outside IPv4 address
   208  //   - out_port - outside port
   209  //   - ext_addr - external host IPv4 address
   210  //   - ext_port - external host port
   211  //
   212  // Det44CloseSessionOut defines message 'det44_close_session_out'.
   213  type Det44CloseSessionOut struct {
   214  	OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
   215  	OutPort uint16              `binapi:"u16,name=out_port" json:"out_port,omitempty"`
   216  	ExtAddr ip_types.IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
   217  	ExtPort uint16              `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
   218  }
   219  
   220  func (m *Det44CloseSessionOut) Reset()               { *m = Det44CloseSessionOut{} }
   221  func (*Det44CloseSessionOut) GetMessageName() string { return "det44_close_session_out" }
   222  func (*Det44CloseSessionOut) GetCrcString() string   { return "f6b259d1" }
   223  func (*Det44CloseSessionOut) GetMessageType() api.MessageType {
   224  	return api.RequestMessage
   225  }
   226  
   227  func (m *Det44CloseSessionOut) Size() (size int) {
   228  	if m == nil {
   229  		return 0
   230  	}
   231  	size += 1 * 4 // m.OutAddr
   232  	size += 2     // m.OutPort
   233  	size += 1 * 4 // m.ExtAddr
   234  	size += 2     // m.ExtPort
   235  	return size
   236  }
   237  func (m *Det44CloseSessionOut) Marshal(b []byte) ([]byte, error) {
   238  	if b == nil {
   239  		b = make([]byte, m.Size())
   240  	}
   241  	buf := codec.NewBuffer(b)
   242  	buf.EncodeBytes(m.OutAddr[:], 4)
   243  	buf.EncodeUint16(m.OutPort)
   244  	buf.EncodeBytes(m.ExtAddr[:], 4)
   245  	buf.EncodeUint16(m.ExtPort)
   246  	return buf.Bytes(), nil
   247  }
   248  func (m *Det44CloseSessionOut) Unmarshal(b []byte) error {
   249  	buf := codec.NewBuffer(b)
   250  	copy(m.OutAddr[:], buf.DecodeBytes(4))
   251  	m.OutPort = buf.DecodeUint16()
   252  	copy(m.ExtAddr[:], buf.DecodeBytes(4))
   253  	m.ExtPort = buf.DecodeUint16()
   254  	return nil
   255  }
   256  
   257  // Det44CloseSessionOutReply defines message 'det44_close_session_out_reply'.
   258  type Det44CloseSessionOutReply struct {
   259  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   260  }
   261  
   262  func (m *Det44CloseSessionOutReply) Reset()               { *m = Det44CloseSessionOutReply{} }
   263  func (*Det44CloseSessionOutReply) GetMessageName() string { return "det44_close_session_out_reply" }
   264  func (*Det44CloseSessionOutReply) GetCrcString() string   { return "e8d4e804" }
   265  func (*Det44CloseSessionOutReply) GetMessageType() api.MessageType {
   266  	return api.ReplyMessage
   267  }
   268  
   269  func (m *Det44CloseSessionOutReply) Size() (size int) {
   270  	if m == nil {
   271  		return 0
   272  	}
   273  	size += 4 // m.Retval
   274  	return size
   275  }
   276  func (m *Det44CloseSessionOutReply) Marshal(b []byte) ([]byte, error) {
   277  	if b == nil {
   278  		b = make([]byte, m.Size())
   279  	}
   280  	buf := codec.NewBuffer(b)
   281  	buf.EncodeInt32(m.Retval)
   282  	return buf.Bytes(), nil
   283  }
   284  func (m *Det44CloseSessionOutReply) Unmarshal(b []byte) error {
   285  	buf := codec.NewBuffer(b)
   286  	m.Retval = buf.DecodeInt32()
   287  	return nil
   288  }
   289  
   290  // Get outside address and port range from inside address
   291  //   - in_addr - inside IP address
   292  //
   293  // Det44Forward defines message 'det44_forward'.
   294  type Det44Forward struct {
   295  	InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
   296  }
   297  
   298  func (m *Det44Forward) Reset()               { *m = Det44Forward{} }
   299  func (*Det44Forward) GetMessageName() string { return "det44_forward" }
   300  func (*Det44Forward) GetCrcString() string   { return "7f8a89cd" }
   301  func (*Det44Forward) GetMessageType() api.MessageType {
   302  	return api.RequestMessage
   303  }
   304  
   305  func (m *Det44Forward) Size() (size int) {
   306  	if m == nil {
   307  		return 0
   308  	}
   309  	size += 1 * 4 // m.InAddr
   310  	return size
   311  }
   312  func (m *Det44Forward) Marshal(b []byte) ([]byte, error) {
   313  	if b == nil {
   314  		b = make([]byte, m.Size())
   315  	}
   316  	buf := codec.NewBuffer(b)
   317  	buf.EncodeBytes(m.InAddr[:], 4)
   318  	return buf.Bytes(), nil
   319  }
   320  func (m *Det44Forward) Unmarshal(b []byte) error {
   321  	buf := codec.NewBuffer(b)
   322  	copy(m.InAddr[:], buf.DecodeBytes(4))
   323  	return nil
   324  }
   325  
   326  // Get outside address and port range from inside address
   327  //   - retval - return code
   328  //   - out_port_lo - outside port range start
   329  //   - out_port_hi - outside port range end
   330  //   - out_addr - outside IPv4 address
   331  //
   332  // Det44ForwardReply defines message 'det44_forward_reply'.
   333  type Det44ForwardReply struct {
   334  	Retval    int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
   335  	OutPortLo uint16              `binapi:"u16,name=out_port_lo" json:"out_port_lo,omitempty"`
   336  	OutPortHi uint16              `binapi:"u16,name=out_port_hi" json:"out_port_hi,omitempty"`
   337  	OutAddr   ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
   338  }
   339  
   340  func (m *Det44ForwardReply) Reset()               { *m = Det44ForwardReply{} }
   341  func (*Det44ForwardReply) GetMessageName() string { return "det44_forward_reply" }
   342  func (*Det44ForwardReply) GetCrcString() string   { return "a8ccbdc0" }
   343  func (*Det44ForwardReply) GetMessageType() api.MessageType {
   344  	return api.ReplyMessage
   345  }
   346  
   347  func (m *Det44ForwardReply) Size() (size int) {
   348  	if m == nil {
   349  		return 0
   350  	}
   351  	size += 4     // m.Retval
   352  	size += 2     // m.OutPortLo
   353  	size += 2     // m.OutPortHi
   354  	size += 1 * 4 // m.OutAddr
   355  	return size
   356  }
   357  func (m *Det44ForwardReply) Marshal(b []byte) ([]byte, error) {
   358  	if b == nil {
   359  		b = make([]byte, m.Size())
   360  	}
   361  	buf := codec.NewBuffer(b)
   362  	buf.EncodeInt32(m.Retval)
   363  	buf.EncodeUint16(m.OutPortLo)
   364  	buf.EncodeUint16(m.OutPortHi)
   365  	buf.EncodeBytes(m.OutAddr[:], 4)
   366  	return buf.Bytes(), nil
   367  }
   368  func (m *Det44ForwardReply) Unmarshal(b []byte) error {
   369  	buf := codec.NewBuffer(b)
   370  	m.Retval = buf.DecodeInt32()
   371  	m.OutPortLo = buf.DecodeUint16()
   372  	m.OutPortHi = buf.DecodeUint16()
   373  	copy(m.OutAddr[:], buf.DecodeBytes(4))
   374  	return nil
   375  }
   376  
   377  // Get values of timeouts for DET44 sessions (seconds)
   378  // Det44GetTimeouts defines message 'det44_get_timeouts'.
   379  type Det44GetTimeouts struct{}
   380  
   381  func (m *Det44GetTimeouts) Reset()               { *m = Det44GetTimeouts{} }
   382  func (*Det44GetTimeouts) GetMessageName() string { return "det44_get_timeouts" }
   383  func (*Det44GetTimeouts) GetCrcString() string   { return "51077d14" }
   384  func (*Det44GetTimeouts) GetMessageType() api.MessageType {
   385  	return api.RequestMessage
   386  }
   387  
   388  func (m *Det44GetTimeouts) Size() (size int) {
   389  	if m == nil {
   390  		return 0
   391  	}
   392  	return size
   393  }
   394  func (m *Det44GetTimeouts) Marshal(b []byte) ([]byte, error) {
   395  	if b == nil {
   396  		b = make([]byte, m.Size())
   397  	}
   398  	buf := codec.NewBuffer(b)
   399  	return buf.Bytes(), nil
   400  }
   401  func (m *Det44GetTimeouts) Unmarshal(b []byte) error {
   402  	return nil
   403  }
   404  
   405  // Get values of timeouts for DET44 sessions reply
   406  //   - retval - return code
   407  //   - udp - UDP timeout
   408  //   - tcp_established - TCP established timeout
   409  //   - tcp_transitory - TCP transitory timeout
   410  //   - icmp - ICMP timeout
   411  //
   412  // Det44GetTimeoutsReply defines message 'det44_get_timeouts_reply'.
   413  // InProgress: the message form may change in the future versions
   414  type Det44GetTimeoutsReply struct {
   415  	Retval         int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   416  	UDP            uint32 `binapi:"u32,name=udp" json:"udp,omitempty"`
   417  	TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"`
   418  	TCPTransitory  uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"`
   419  	ICMP           uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"`
   420  }
   421  
   422  func (m *Det44GetTimeoutsReply) Reset()               { *m = Det44GetTimeoutsReply{} }
   423  func (*Det44GetTimeoutsReply) GetMessageName() string { return "det44_get_timeouts_reply" }
   424  func (*Det44GetTimeoutsReply) GetCrcString() string   { return "3c4df4e1" }
   425  func (*Det44GetTimeoutsReply) GetMessageType() api.MessageType {
   426  	return api.ReplyMessage
   427  }
   428  
   429  func (m *Det44GetTimeoutsReply) Size() (size int) {
   430  	if m == nil {
   431  		return 0
   432  	}
   433  	size += 4 // m.Retval
   434  	size += 4 // m.UDP
   435  	size += 4 // m.TCPEstablished
   436  	size += 4 // m.TCPTransitory
   437  	size += 4 // m.ICMP
   438  	return size
   439  }
   440  func (m *Det44GetTimeoutsReply) Marshal(b []byte) ([]byte, error) {
   441  	if b == nil {
   442  		b = make([]byte, m.Size())
   443  	}
   444  	buf := codec.NewBuffer(b)
   445  	buf.EncodeInt32(m.Retval)
   446  	buf.EncodeUint32(m.UDP)
   447  	buf.EncodeUint32(m.TCPEstablished)
   448  	buf.EncodeUint32(m.TCPTransitory)
   449  	buf.EncodeUint32(m.ICMP)
   450  	return buf.Bytes(), nil
   451  }
   452  func (m *Det44GetTimeoutsReply) Unmarshal(b []byte) error {
   453  	buf := codec.NewBuffer(b)
   454  	m.Retval = buf.DecodeInt32()
   455  	m.UDP = buf.DecodeUint32()
   456  	m.TCPEstablished = buf.DecodeUint32()
   457  	m.TCPTransitory = buf.DecodeUint32()
   458  	m.ICMP = buf.DecodeUint32()
   459  	return nil
   460  }
   461  
   462  // Enable/disable DET44 feature on the interface
   463  //   - is_add - true if add, false if delete
   464  //   - is_inside - true if interface is inside, false if outside
   465  //   - sw_if_index - software index of the interface
   466  //
   467  // Det44InterfaceAddDelFeature defines message 'det44_interface_add_del_feature'.
   468  type Det44InterfaceAddDelFeature struct {
   469  	IsAdd     bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
   470  	IsInside  bool                           `binapi:"bool,name=is_inside" json:"is_inside,omitempty"`
   471  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   472  }
   473  
   474  func (m *Det44InterfaceAddDelFeature) Reset()               { *m = Det44InterfaceAddDelFeature{} }
   475  func (*Det44InterfaceAddDelFeature) GetMessageName() string { return "det44_interface_add_del_feature" }
   476  func (*Det44InterfaceAddDelFeature) GetCrcString() string   { return "dc17a836" }
   477  func (*Det44InterfaceAddDelFeature) GetMessageType() api.MessageType {
   478  	return api.RequestMessage
   479  }
   480  
   481  func (m *Det44InterfaceAddDelFeature) Size() (size int) {
   482  	if m == nil {
   483  		return 0
   484  	}
   485  	size += 1 // m.IsAdd
   486  	size += 1 // m.IsInside
   487  	size += 4 // m.SwIfIndex
   488  	return size
   489  }
   490  func (m *Det44InterfaceAddDelFeature) Marshal(b []byte) ([]byte, error) {
   491  	if b == nil {
   492  		b = make([]byte, m.Size())
   493  	}
   494  	buf := codec.NewBuffer(b)
   495  	buf.EncodeBool(m.IsAdd)
   496  	buf.EncodeBool(m.IsInside)
   497  	buf.EncodeUint32(uint32(m.SwIfIndex))
   498  	return buf.Bytes(), nil
   499  }
   500  func (m *Det44InterfaceAddDelFeature) Unmarshal(b []byte) error {
   501  	buf := codec.NewBuffer(b)
   502  	m.IsAdd = buf.DecodeBool()
   503  	m.IsInside = buf.DecodeBool()
   504  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   505  	return nil
   506  }
   507  
   508  // Det44InterfaceAddDelFeatureReply defines message 'det44_interface_add_del_feature_reply'.
   509  type Det44InterfaceAddDelFeatureReply struct {
   510  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   511  }
   512  
   513  func (m *Det44InterfaceAddDelFeatureReply) Reset() { *m = Det44InterfaceAddDelFeatureReply{} }
   514  func (*Det44InterfaceAddDelFeatureReply) GetMessageName() string {
   515  	return "det44_interface_add_del_feature_reply"
   516  }
   517  func (*Det44InterfaceAddDelFeatureReply) GetCrcString() string { return "e8d4e804" }
   518  func (*Det44InterfaceAddDelFeatureReply) GetMessageType() api.MessageType {
   519  	return api.ReplyMessage
   520  }
   521  
   522  func (m *Det44InterfaceAddDelFeatureReply) Size() (size int) {
   523  	if m == nil {
   524  		return 0
   525  	}
   526  	size += 4 // m.Retval
   527  	return size
   528  }
   529  func (m *Det44InterfaceAddDelFeatureReply) Marshal(b []byte) ([]byte, error) {
   530  	if b == nil {
   531  		b = make([]byte, m.Size())
   532  	}
   533  	buf := codec.NewBuffer(b)
   534  	buf.EncodeInt32(m.Retval)
   535  	return buf.Bytes(), nil
   536  }
   537  func (m *Det44InterfaceAddDelFeatureReply) Unmarshal(b []byte) error {
   538  	buf := codec.NewBuffer(b)
   539  	m.Retval = buf.DecodeInt32()
   540  	return nil
   541  }
   542  
   543  // DET44 interface details response
   544  //   - is_inside - true if interface is inside, false if outside
   545  //   - sw_if_index - software index of the interface
   546  //
   547  // Det44InterfaceDetails defines message 'det44_interface_details'.
   548  type Det44InterfaceDetails struct {
   549  	IsInside  bool                           `binapi:"bool,name=is_inside" json:"is_inside,omitempty"`
   550  	IsOutside bool                           `binapi:"bool,name=is_outside" json:"is_outside,omitempty"`
   551  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   552  }
   553  
   554  func (m *Det44InterfaceDetails) Reset()               { *m = Det44InterfaceDetails{} }
   555  func (*Det44InterfaceDetails) GetMessageName() string { return "det44_interface_details" }
   556  func (*Det44InterfaceDetails) GetCrcString() string   { return "e60cc5be" }
   557  func (*Det44InterfaceDetails) GetMessageType() api.MessageType {
   558  	return api.ReplyMessage
   559  }
   560  
   561  func (m *Det44InterfaceDetails) Size() (size int) {
   562  	if m == nil {
   563  		return 0
   564  	}
   565  	size += 1 // m.IsInside
   566  	size += 1 // m.IsOutside
   567  	size += 4 // m.SwIfIndex
   568  	return size
   569  }
   570  func (m *Det44InterfaceDetails) Marshal(b []byte) ([]byte, error) {
   571  	if b == nil {
   572  		b = make([]byte, m.Size())
   573  	}
   574  	buf := codec.NewBuffer(b)
   575  	buf.EncodeBool(m.IsInside)
   576  	buf.EncodeBool(m.IsOutside)
   577  	buf.EncodeUint32(uint32(m.SwIfIndex))
   578  	return buf.Bytes(), nil
   579  }
   580  func (m *Det44InterfaceDetails) Unmarshal(b []byte) error {
   581  	buf := codec.NewBuffer(b)
   582  	m.IsInside = buf.DecodeBool()
   583  	m.IsOutside = buf.DecodeBool()
   584  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   585  	return nil
   586  }
   587  
   588  // Dump interfaces with DET44 feature
   589  // Det44InterfaceDump defines message 'det44_interface_dump'.
   590  type Det44InterfaceDump struct{}
   591  
   592  func (m *Det44InterfaceDump) Reset()               { *m = Det44InterfaceDump{} }
   593  func (*Det44InterfaceDump) GetMessageName() string { return "det44_interface_dump" }
   594  func (*Det44InterfaceDump) GetCrcString() string   { return "51077d14" }
   595  func (*Det44InterfaceDump) GetMessageType() api.MessageType {
   596  	return api.RequestMessage
   597  }
   598  
   599  func (m *Det44InterfaceDump) Size() (size int) {
   600  	if m == nil {
   601  		return 0
   602  	}
   603  	return size
   604  }
   605  func (m *Det44InterfaceDump) Marshal(b []byte) ([]byte, error) {
   606  	if b == nil {
   607  		b = make([]byte, m.Size())
   608  	}
   609  	buf := codec.NewBuffer(b)
   610  	return buf.Bytes(), nil
   611  }
   612  func (m *Det44InterfaceDump) Unmarshal(b []byte) error {
   613  	return nil
   614  }
   615  
   616  // DET44 users response
   617  //   - in_addr - inside IPv4 address
   618  //   - in_plen - inside IPv4 address prefix length
   619  //   - out_addr - outside IPv4 address
   620  //   - out_plen - outside IPv4 address prefix length
   621  //   - sharing_ratio - outside to inside address sharing ratio
   622  //   - ports_per_host - number of ports available to a host
   623  //   - ses_num - number of sessions belonging to this mapping
   624  //
   625  // Det44MapDetails defines message 'det44_map_details'.
   626  type Det44MapDetails struct {
   627  	InAddr       ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
   628  	InPlen       uint8               `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
   629  	OutAddr      ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
   630  	OutPlen      uint8               `binapi:"u8,name=out_plen" json:"out_plen,omitempty"`
   631  	SharingRatio uint32              `binapi:"u32,name=sharing_ratio" json:"sharing_ratio,omitempty"`
   632  	PortsPerHost uint16              `binapi:"u16,name=ports_per_host" json:"ports_per_host,omitempty"`
   633  	SesNum       uint32              `binapi:"u32,name=ses_num" json:"ses_num,omitempty"`
   634  }
   635  
   636  func (m *Det44MapDetails) Reset()               { *m = Det44MapDetails{} }
   637  func (*Det44MapDetails) GetMessageName() string { return "det44_map_details" }
   638  func (*Det44MapDetails) GetCrcString() string   { return "ad91dc83" }
   639  func (*Det44MapDetails) GetMessageType() api.MessageType {
   640  	return api.ReplyMessage
   641  }
   642  
   643  func (m *Det44MapDetails) Size() (size int) {
   644  	if m == nil {
   645  		return 0
   646  	}
   647  	size += 1 * 4 // m.InAddr
   648  	size += 1     // m.InPlen
   649  	size += 1 * 4 // m.OutAddr
   650  	size += 1     // m.OutPlen
   651  	size += 4     // m.SharingRatio
   652  	size += 2     // m.PortsPerHost
   653  	size += 4     // m.SesNum
   654  	return size
   655  }
   656  func (m *Det44MapDetails) Marshal(b []byte) ([]byte, error) {
   657  	if b == nil {
   658  		b = make([]byte, m.Size())
   659  	}
   660  	buf := codec.NewBuffer(b)
   661  	buf.EncodeBytes(m.InAddr[:], 4)
   662  	buf.EncodeUint8(m.InPlen)
   663  	buf.EncodeBytes(m.OutAddr[:], 4)
   664  	buf.EncodeUint8(m.OutPlen)
   665  	buf.EncodeUint32(m.SharingRatio)
   666  	buf.EncodeUint16(m.PortsPerHost)
   667  	buf.EncodeUint32(m.SesNum)
   668  	return buf.Bytes(), nil
   669  }
   670  func (m *Det44MapDetails) Unmarshal(b []byte) error {
   671  	buf := codec.NewBuffer(b)
   672  	copy(m.InAddr[:], buf.DecodeBytes(4))
   673  	m.InPlen = buf.DecodeUint8()
   674  	copy(m.OutAddr[:], buf.DecodeBytes(4))
   675  	m.OutPlen = buf.DecodeUint8()
   676  	m.SharingRatio = buf.DecodeUint32()
   677  	m.PortsPerHost = buf.DecodeUint16()
   678  	m.SesNum = buf.DecodeUint32()
   679  	return nil
   680  }
   681  
   682  // Dump DET44 mappings
   683  // Det44MapDump defines message 'det44_map_dump'.
   684  type Det44MapDump struct{}
   685  
   686  func (m *Det44MapDump) Reset()               { *m = Det44MapDump{} }
   687  func (*Det44MapDump) GetMessageName() string { return "det44_map_dump" }
   688  func (*Det44MapDump) GetCrcString() string   { return "51077d14" }
   689  func (*Det44MapDump) GetMessageType() api.MessageType {
   690  	return api.RequestMessage
   691  }
   692  
   693  func (m *Det44MapDump) Size() (size int) {
   694  	if m == nil {
   695  		return 0
   696  	}
   697  	return size
   698  }
   699  func (m *Det44MapDump) Marshal(b []byte) ([]byte, error) {
   700  	if b == nil {
   701  		b = make([]byte, m.Size())
   702  	}
   703  	buf := codec.NewBuffer(b)
   704  	return buf.Bytes(), nil
   705  }
   706  func (m *Det44MapDump) Unmarshal(b []byte) error {
   707  	return nil
   708  }
   709  
   710  // Enable/disable DET44 plugin
   711  //   - inside_vrf - inside VRF id
   712  //   - outside_vrf - outside VRF id
   713  //   - enable - true if enable, false if disable
   714  //
   715  // Det44PluginEnableDisable defines message 'det44_plugin_enable_disable'.
   716  type Det44PluginEnableDisable struct {
   717  	InsideVrf  uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"`
   718  	OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"`
   719  	Enable     bool   `binapi:"bool,name=enable" json:"enable,omitempty"`
   720  }
   721  
   722  func (m *Det44PluginEnableDisable) Reset()               { *m = Det44PluginEnableDisable{} }
   723  func (*Det44PluginEnableDisable) GetMessageName() string { return "det44_plugin_enable_disable" }
   724  func (*Det44PluginEnableDisable) GetCrcString() string   { return "617b6bf8" }
   725  func (*Det44PluginEnableDisable) GetMessageType() api.MessageType {
   726  	return api.RequestMessage
   727  }
   728  
   729  func (m *Det44PluginEnableDisable) Size() (size int) {
   730  	if m == nil {
   731  		return 0
   732  	}
   733  	size += 4 // m.InsideVrf
   734  	size += 4 // m.OutsideVrf
   735  	size += 1 // m.Enable
   736  	return size
   737  }
   738  func (m *Det44PluginEnableDisable) Marshal(b []byte) ([]byte, error) {
   739  	if b == nil {
   740  		b = make([]byte, m.Size())
   741  	}
   742  	buf := codec.NewBuffer(b)
   743  	buf.EncodeUint32(m.InsideVrf)
   744  	buf.EncodeUint32(m.OutsideVrf)
   745  	buf.EncodeBool(m.Enable)
   746  	return buf.Bytes(), nil
   747  }
   748  func (m *Det44PluginEnableDisable) Unmarshal(b []byte) error {
   749  	buf := codec.NewBuffer(b)
   750  	m.InsideVrf = buf.DecodeUint32()
   751  	m.OutsideVrf = buf.DecodeUint32()
   752  	m.Enable = buf.DecodeBool()
   753  	return nil
   754  }
   755  
   756  // Det44PluginEnableDisableReply defines message 'det44_plugin_enable_disable_reply'.
   757  type Det44PluginEnableDisableReply struct {
   758  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   759  }
   760  
   761  func (m *Det44PluginEnableDisableReply) Reset() { *m = Det44PluginEnableDisableReply{} }
   762  func (*Det44PluginEnableDisableReply) GetMessageName() string {
   763  	return "det44_plugin_enable_disable_reply"
   764  }
   765  func (*Det44PluginEnableDisableReply) GetCrcString() string { return "e8d4e804" }
   766  func (*Det44PluginEnableDisableReply) GetMessageType() api.MessageType {
   767  	return api.ReplyMessage
   768  }
   769  
   770  func (m *Det44PluginEnableDisableReply) Size() (size int) {
   771  	if m == nil {
   772  		return 0
   773  	}
   774  	size += 4 // m.Retval
   775  	return size
   776  }
   777  func (m *Det44PluginEnableDisableReply) Marshal(b []byte) ([]byte, error) {
   778  	if b == nil {
   779  		b = make([]byte, m.Size())
   780  	}
   781  	buf := codec.NewBuffer(b)
   782  	buf.EncodeInt32(m.Retval)
   783  	return buf.Bytes(), nil
   784  }
   785  func (m *Det44PluginEnableDisableReply) Unmarshal(b []byte) error {
   786  	buf := codec.NewBuffer(b)
   787  	m.Retval = buf.DecodeInt32()
   788  	return nil
   789  }
   790  
   791  // Get inside address from outside address and port
   792  //   - out_port - outside port
   793  //   - out_addr - outside IPv4 address
   794  //
   795  // Det44Reverse defines message 'det44_reverse'.
   796  type Det44Reverse struct {
   797  	OutPort uint16              `binapi:"u16,name=out_port" json:"out_port,omitempty"`
   798  	OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
   799  }
   800  
   801  func (m *Det44Reverse) Reset()               { *m = Det44Reverse{} }
   802  func (*Det44Reverse) GetMessageName() string { return "det44_reverse" }
   803  func (*Det44Reverse) GetCrcString() string   { return "a7573fe1" }
   804  func (*Det44Reverse) GetMessageType() api.MessageType {
   805  	return api.RequestMessage
   806  }
   807  
   808  func (m *Det44Reverse) Size() (size int) {
   809  	if m == nil {
   810  		return 0
   811  	}
   812  	size += 2     // m.OutPort
   813  	size += 1 * 4 // m.OutAddr
   814  	return size
   815  }
   816  func (m *Det44Reverse) Marshal(b []byte) ([]byte, error) {
   817  	if b == nil {
   818  		b = make([]byte, m.Size())
   819  	}
   820  	buf := codec.NewBuffer(b)
   821  	buf.EncodeUint16(m.OutPort)
   822  	buf.EncodeBytes(m.OutAddr[:], 4)
   823  	return buf.Bytes(), nil
   824  }
   825  func (m *Det44Reverse) Unmarshal(b []byte) error {
   826  	buf := codec.NewBuffer(b)
   827  	m.OutPort = buf.DecodeUint16()
   828  	copy(m.OutAddr[:], buf.DecodeBytes(4))
   829  	return nil
   830  }
   831  
   832  // Get inside address from outside address and port reply
   833  //   - retval - return code
   834  //   - in_addr - inside IP address
   835  //
   836  // Det44ReverseReply defines message 'det44_reverse_reply'.
   837  type Det44ReverseReply struct {
   838  	Retval int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
   839  	InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
   840  }
   841  
   842  func (m *Det44ReverseReply) Reset()               { *m = Det44ReverseReply{} }
   843  func (*Det44ReverseReply) GetMessageName() string { return "det44_reverse_reply" }
   844  func (*Det44ReverseReply) GetCrcString() string   { return "34066d48" }
   845  func (*Det44ReverseReply) GetMessageType() api.MessageType {
   846  	return api.ReplyMessage
   847  }
   848  
   849  func (m *Det44ReverseReply) Size() (size int) {
   850  	if m == nil {
   851  		return 0
   852  	}
   853  	size += 4     // m.Retval
   854  	size += 1 * 4 // m.InAddr
   855  	return size
   856  }
   857  func (m *Det44ReverseReply) Marshal(b []byte) ([]byte, error) {
   858  	if b == nil {
   859  		b = make([]byte, m.Size())
   860  	}
   861  	buf := codec.NewBuffer(b)
   862  	buf.EncodeInt32(m.Retval)
   863  	buf.EncodeBytes(m.InAddr[:], 4)
   864  	return buf.Bytes(), nil
   865  }
   866  func (m *Det44ReverseReply) Unmarshal(b []byte) error {
   867  	buf := codec.NewBuffer(b)
   868  	m.Retval = buf.DecodeInt32()
   869  	copy(m.InAddr[:], buf.DecodeBytes(4))
   870  	return nil
   871  }
   872  
   873  // DET44 sessions reply
   874  //   - in_port - inside port
   875  //   - ext_addr - external host IPv4 address
   876  //   - ext_port - external host port
   877  //   - out_port - outside port
   878  //   - state - session state
   879  //   - expire - session expiration timestamp
   880  //
   881  // Det44SessionDetails defines message 'det44_session_details'.
   882  type Det44SessionDetails struct {
   883  	InPort  uint16              `binapi:"u16,name=in_port" json:"in_port,omitempty"`
   884  	ExtAddr ip_types.IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
   885  	ExtPort uint16              `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
   886  	OutPort uint16              `binapi:"u16,name=out_port" json:"out_port,omitempty"`
   887  	State   uint8               `binapi:"u8,name=state" json:"state,omitempty"`
   888  	Expire  uint32              `binapi:"u32,name=expire" json:"expire,omitempty"`
   889  }
   890  
   891  func (m *Det44SessionDetails) Reset()               { *m = Det44SessionDetails{} }
   892  func (*Det44SessionDetails) GetMessageName() string { return "det44_session_details" }
   893  func (*Det44SessionDetails) GetCrcString() string   { return "27f3c171" }
   894  func (*Det44SessionDetails) GetMessageType() api.MessageType {
   895  	return api.ReplyMessage
   896  }
   897  
   898  func (m *Det44SessionDetails) Size() (size int) {
   899  	if m == nil {
   900  		return 0
   901  	}
   902  	size += 2     // m.InPort
   903  	size += 1 * 4 // m.ExtAddr
   904  	size += 2     // m.ExtPort
   905  	size += 2     // m.OutPort
   906  	size += 1     // m.State
   907  	size += 4     // m.Expire
   908  	return size
   909  }
   910  func (m *Det44SessionDetails) Marshal(b []byte) ([]byte, error) {
   911  	if b == nil {
   912  		b = make([]byte, m.Size())
   913  	}
   914  	buf := codec.NewBuffer(b)
   915  	buf.EncodeUint16(m.InPort)
   916  	buf.EncodeBytes(m.ExtAddr[:], 4)
   917  	buf.EncodeUint16(m.ExtPort)
   918  	buf.EncodeUint16(m.OutPort)
   919  	buf.EncodeUint8(m.State)
   920  	buf.EncodeUint32(m.Expire)
   921  	return buf.Bytes(), nil
   922  }
   923  func (m *Det44SessionDetails) Unmarshal(b []byte) error {
   924  	buf := codec.NewBuffer(b)
   925  	m.InPort = buf.DecodeUint16()
   926  	copy(m.ExtAddr[:], buf.DecodeBytes(4))
   927  	m.ExtPort = buf.DecodeUint16()
   928  	m.OutPort = buf.DecodeUint16()
   929  	m.State = buf.DecodeUint8()
   930  	m.Expire = buf.DecodeUint32()
   931  	return nil
   932  }
   933  
   934  // Dump DET44 sessions
   935  //   - user_addr - address of an inside user whose sessions to dump
   936  //
   937  // Det44SessionDump defines message 'det44_session_dump'.
   938  type Det44SessionDump struct {
   939  	UserAddr ip_types.IP4Address `binapi:"ip4_address,name=user_addr" json:"user_addr,omitempty"`
   940  }
   941  
   942  func (m *Det44SessionDump) Reset()               { *m = Det44SessionDump{} }
   943  func (*Det44SessionDump) GetMessageName() string { return "det44_session_dump" }
   944  func (*Det44SessionDump) GetCrcString() string   { return "e45a3af7" }
   945  func (*Det44SessionDump) GetMessageType() api.MessageType {
   946  	return api.RequestMessage
   947  }
   948  
   949  func (m *Det44SessionDump) Size() (size int) {
   950  	if m == nil {
   951  		return 0
   952  	}
   953  	size += 1 * 4 // m.UserAddr
   954  	return size
   955  }
   956  func (m *Det44SessionDump) Marshal(b []byte) ([]byte, error) {
   957  	if b == nil {
   958  		b = make([]byte, m.Size())
   959  	}
   960  	buf := codec.NewBuffer(b)
   961  	buf.EncodeBytes(m.UserAddr[:], 4)
   962  	return buf.Bytes(), nil
   963  }
   964  func (m *Det44SessionDump) Unmarshal(b []byte) error {
   965  	buf := codec.NewBuffer(b)
   966  	copy(m.UserAddr[:], buf.DecodeBytes(4))
   967  	return nil
   968  }
   969  
   970  // Set values of timeouts for DET44 sessions (seconds)
   971  //   - udp - UDP timeout (default 300sec)
   972  //   - tcp_established - TCP established timeout (default 7440sec)
   973  //   - tcp_transitory - TCP transitory timeout (default 240sec)
   974  //   - icmp - ICMP timeout (default 60sec)
   975  //
   976  // Det44SetTimeouts defines message 'det44_set_timeouts'.
   977  // InProgress: the message form may change in the future versions
   978  type Det44SetTimeouts struct {
   979  	UDP            uint32 `binapi:"u32,name=udp" json:"udp,omitempty"`
   980  	TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"`
   981  	TCPTransitory  uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"`
   982  	ICMP           uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"`
   983  }
   984  
   985  func (m *Det44SetTimeouts) Reset()               { *m = Det44SetTimeouts{} }
   986  func (*Det44SetTimeouts) GetMessageName() string { return "det44_set_timeouts" }
   987  func (*Det44SetTimeouts) GetCrcString() string   { return "d4746b16" }
   988  func (*Det44SetTimeouts) GetMessageType() api.MessageType {
   989  	return api.RequestMessage
   990  }
   991  
   992  func (m *Det44SetTimeouts) Size() (size int) {
   993  	if m == nil {
   994  		return 0
   995  	}
   996  	size += 4 // m.UDP
   997  	size += 4 // m.TCPEstablished
   998  	size += 4 // m.TCPTransitory
   999  	size += 4 // m.ICMP
  1000  	return size
  1001  }
  1002  func (m *Det44SetTimeouts) Marshal(b []byte) ([]byte, error) {
  1003  	if b == nil {
  1004  		b = make([]byte, m.Size())
  1005  	}
  1006  	buf := codec.NewBuffer(b)
  1007  	buf.EncodeUint32(m.UDP)
  1008  	buf.EncodeUint32(m.TCPEstablished)
  1009  	buf.EncodeUint32(m.TCPTransitory)
  1010  	buf.EncodeUint32(m.ICMP)
  1011  	return buf.Bytes(), nil
  1012  }
  1013  func (m *Det44SetTimeouts) Unmarshal(b []byte) error {
  1014  	buf := codec.NewBuffer(b)
  1015  	m.UDP = buf.DecodeUint32()
  1016  	m.TCPEstablished = buf.DecodeUint32()
  1017  	m.TCPTransitory = buf.DecodeUint32()
  1018  	m.ICMP = buf.DecodeUint32()
  1019  	return nil
  1020  }
  1021  
  1022  // Det44SetTimeoutsReply defines message 'det44_set_timeouts_reply'.
  1023  // InProgress: the message form may change in the future versions
  1024  type Det44SetTimeoutsReply struct {
  1025  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1026  }
  1027  
  1028  func (m *Det44SetTimeoutsReply) Reset()               { *m = Det44SetTimeoutsReply{} }
  1029  func (*Det44SetTimeoutsReply) GetMessageName() string { return "det44_set_timeouts_reply" }
  1030  func (*Det44SetTimeoutsReply) GetCrcString() string   { return "e8d4e804" }
  1031  func (*Det44SetTimeoutsReply) GetMessageType() api.MessageType {
  1032  	return api.ReplyMessage
  1033  }
  1034  
  1035  func (m *Det44SetTimeoutsReply) Size() (size int) {
  1036  	if m == nil {
  1037  		return 0
  1038  	}
  1039  	size += 4 // m.Retval
  1040  	return size
  1041  }
  1042  func (m *Det44SetTimeoutsReply) Marshal(b []byte) ([]byte, error) {
  1043  	if b == nil {
  1044  		b = make([]byte, m.Size())
  1045  	}
  1046  	buf := codec.NewBuffer(b)
  1047  	buf.EncodeInt32(m.Retval)
  1048  	return buf.Bytes(), nil
  1049  }
  1050  func (m *Det44SetTimeoutsReply) Unmarshal(b []byte) error {
  1051  	buf := codec.NewBuffer(b)
  1052  	m.Retval = buf.DecodeInt32()
  1053  	return nil
  1054  }
  1055  
  1056  // Add/delete NAT deterministic mapping
  1057  //   - is_add - true if add, false if delete
  1058  //   - in_addr - inside IPv4 address
  1059  //   - in_plen - inside IPv4 address prefix length
  1060  //   - out_addr - outside IPv4 address
  1061  //   - out_plen - outside IPv4 address prefix length
  1062  //
  1063  // NatDetAddDelMap defines message 'nat_det_add_del_map'.
  1064  // Deprecated: the message will be removed in the future versions
  1065  type NatDetAddDelMap struct {
  1066  	IsAdd   bool                `binapi:"bool,name=is_add" json:"is_add,omitempty"`
  1067  	InAddr  ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
  1068  	InPlen  uint8               `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
  1069  	OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
  1070  	OutPlen uint8               `binapi:"u8,name=out_plen" json:"out_plen,omitempty"`
  1071  }
  1072  
  1073  func (m *NatDetAddDelMap) Reset()               { *m = NatDetAddDelMap{} }
  1074  func (*NatDetAddDelMap) GetMessageName() string { return "nat_det_add_del_map" }
  1075  func (*NatDetAddDelMap) GetCrcString() string   { return "1150a190" }
  1076  func (*NatDetAddDelMap) GetMessageType() api.MessageType {
  1077  	return api.RequestMessage
  1078  }
  1079  
  1080  func (m *NatDetAddDelMap) Size() (size int) {
  1081  	if m == nil {
  1082  		return 0
  1083  	}
  1084  	size += 1     // m.IsAdd
  1085  	size += 1 * 4 // m.InAddr
  1086  	size += 1     // m.InPlen
  1087  	size += 1 * 4 // m.OutAddr
  1088  	size += 1     // m.OutPlen
  1089  	return size
  1090  }
  1091  func (m *NatDetAddDelMap) Marshal(b []byte) ([]byte, error) {
  1092  	if b == nil {
  1093  		b = make([]byte, m.Size())
  1094  	}
  1095  	buf := codec.NewBuffer(b)
  1096  	buf.EncodeBool(m.IsAdd)
  1097  	buf.EncodeBytes(m.InAddr[:], 4)
  1098  	buf.EncodeUint8(m.InPlen)
  1099  	buf.EncodeBytes(m.OutAddr[:], 4)
  1100  	buf.EncodeUint8(m.OutPlen)
  1101  	return buf.Bytes(), nil
  1102  }
  1103  func (m *NatDetAddDelMap) Unmarshal(b []byte) error {
  1104  	buf := codec.NewBuffer(b)
  1105  	m.IsAdd = buf.DecodeBool()
  1106  	copy(m.InAddr[:], buf.DecodeBytes(4))
  1107  	m.InPlen = buf.DecodeUint8()
  1108  	copy(m.OutAddr[:], buf.DecodeBytes(4))
  1109  	m.OutPlen = buf.DecodeUint8()
  1110  	return nil
  1111  }
  1112  
  1113  // NatDetAddDelMapReply defines message 'nat_det_add_del_map_reply'.
  1114  // Deprecated: the message will be removed in the future versions
  1115  type NatDetAddDelMapReply struct {
  1116  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1117  }
  1118  
  1119  func (m *NatDetAddDelMapReply) Reset()               { *m = NatDetAddDelMapReply{} }
  1120  func (*NatDetAddDelMapReply) GetMessageName() string { return "nat_det_add_del_map_reply" }
  1121  func (*NatDetAddDelMapReply) GetCrcString() string   { return "e8d4e804" }
  1122  func (*NatDetAddDelMapReply) GetMessageType() api.MessageType {
  1123  	return api.ReplyMessage
  1124  }
  1125  
  1126  func (m *NatDetAddDelMapReply) Size() (size int) {
  1127  	if m == nil {
  1128  		return 0
  1129  	}
  1130  	size += 4 // m.Retval
  1131  	return size
  1132  }
  1133  func (m *NatDetAddDelMapReply) Marshal(b []byte) ([]byte, error) {
  1134  	if b == nil {
  1135  		b = make([]byte, m.Size())
  1136  	}
  1137  	buf := codec.NewBuffer(b)
  1138  	buf.EncodeInt32(m.Retval)
  1139  	return buf.Bytes(), nil
  1140  }
  1141  func (m *NatDetAddDelMapReply) Unmarshal(b []byte) error {
  1142  	buf := codec.NewBuffer(b)
  1143  	m.Retval = buf.DecodeInt32()
  1144  	return nil
  1145  }
  1146  
  1147  // Close deterministic NAT session by inside address and port
  1148  //   - in_addr - inside IP address
  1149  //   - in_port - inside port
  1150  //   - ext_addr - external host IP address
  1151  //   - ext_port - external host port
  1152  //
  1153  // NatDetCloseSessionIn defines message 'nat_det_close_session_in'.
  1154  // Deprecated: the message will be removed in the future versions
  1155  type NatDetCloseSessionIn struct {
  1156  	InAddr  ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
  1157  	InPort  uint16              `binapi:"u16,name=in_port" json:"in_port,omitempty"`
  1158  	ExtAddr ip_types.IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
  1159  	ExtPort uint16              `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
  1160  }
  1161  
  1162  func (m *NatDetCloseSessionIn) Reset()               { *m = NatDetCloseSessionIn{} }
  1163  func (*NatDetCloseSessionIn) GetMessageName() string { return "nat_det_close_session_in" }
  1164  func (*NatDetCloseSessionIn) GetCrcString() string   { return "3c68e073" }
  1165  func (*NatDetCloseSessionIn) GetMessageType() api.MessageType {
  1166  	return api.RequestMessage
  1167  }
  1168  
  1169  func (m *NatDetCloseSessionIn) Size() (size int) {
  1170  	if m == nil {
  1171  		return 0
  1172  	}
  1173  	size += 1 * 4 // m.InAddr
  1174  	size += 2     // m.InPort
  1175  	size += 1 * 4 // m.ExtAddr
  1176  	size += 2     // m.ExtPort
  1177  	return size
  1178  }
  1179  func (m *NatDetCloseSessionIn) Marshal(b []byte) ([]byte, error) {
  1180  	if b == nil {
  1181  		b = make([]byte, m.Size())
  1182  	}
  1183  	buf := codec.NewBuffer(b)
  1184  	buf.EncodeBytes(m.InAddr[:], 4)
  1185  	buf.EncodeUint16(m.InPort)
  1186  	buf.EncodeBytes(m.ExtAddr[:], 4)
  1187  	buf.EncodeUint16(m.ExtPort)
  1188  	return buf.Bytes(), nil
  1189  }
  1190  func (m *NatDetCloseSessionIn) Unmarshal(b []byte) error {
  1191  	buf := codec.NewBuffer(b)
  1192  	copy(m.InAddr[:], buf.DecodeBytes(4))
  1193  	m.InPort = buf.DecodeUint16()
  1194  	copy(m.ExtAddr[:], buf.DecodeBytes(4))
  1195  	m.ExtPort = buf.DecodeUint16()
  1196  	return nil
  1197  }
  1198  
  1199  // NatDetCloseSessionInReply defines message 'nat_det_close_session_in_reply'.
  1200  // Deprecated: the message will be removed in the future versions
  1201  type NatDetCloseSessionInReply struct {
  1202  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1203  }
  1204  
  1205  func (m *NatDetCloseSessionInReply) Reset()               { *m = NatDetCloseSessionInReply{} }
  1206  func (*NatDetCloseSessionInReply) GetMessageName() string { return "nat_det_close_session_in_reply" }
  1207  func (*NatDetCloseSessionInReply) GetCrcString() string   { return "e8d4e804" }
  1208  func (*NatDetCloseSessionInReply) GetMessageType() api.MessageType {
  1209  	return api.ReplyMessage
  1210  }
  1211  
  1212  func (m *NatDetCloseSessionInReply) Size() (size int) {
  1213  	if m == nil {
  1214  		return 0
  1215  	}
  1216  	size += 4 // m.Retval
  1217  	return size
  1218  }
  1219  func (m *NatDetCloseSessionInReply) Marshal(b []byte) ([]byte, error) {
  1220  	if b == nil {
  1221  		b = make([]byte, m.Size())
  1222  	}
  1223  	buf := codec.NewBuffer(b)
  1224  	buf.EncodeInt32(m.Retval)
  1225  	return buf.Bytes(), nil
  1226  }
  1227  func (m *NatDetCloseSessionInReply) Unmarshal(b []byte) error {
  1228  	buf := codec.NewBuffer(b)
  1229  	m.Retval = buf.DecodeInt32()
  1230  	return nil
  1231  }
  1232  
  1233  // Close deterministic NAT session by outside address and port
  1234  //   - out_addr - outside IPv4 address
  1235  //   - out_port - outside port
  1236  //   - ext_addr - external host IPv4 address
  1237  //   - ext_port - external host port
  1238  //
  1239  // NatDetCloseSessionOut defines message 'nat_det_close_session_out'.
  1240  // Deprecated: the message will be removed in the future versions
  1241  type NatDetCloseSessionOut struct {
  1242  	OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
  1243  	OutPort uint16              `binapi:"u16,name=out_port" json:"out_port,omitempty"`
  1244  	ExtAddr ip_types.IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
  1245  	ExtPort uint16              `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
  1246  }
  1247  
  1248  func (m *NatDetCloseSessionOut) Reset()               { *m = NatDetCloseSessionOut{} }
  1249  func (*NatDetCloseSessionOut) GetMessageName() string { return "nat_det_close_session_out" }
  1250  func (*NatDetCloseSessionOut) GetCrcString() string   { return "f6b259d1" }
  1251  func (*NatDetCloseSessionOut) GetMessageType() api.MessageType {
  1252  	return api.RequestMessage
  1253  }
  1254  
  1255  func (m *NatDetCloseSessionOut) Size() (size int) {
  1256  	if m == nil {
  1257  		return 0
  1258  	}
  1259  	size += 1 * 4 // m.OutAddr
  1260  	size += 2     // m.OutPort
  1261  	size += 1 * 4 // m.ExtAddr
  1262  	size += 2     // m.ExtPort
  1263  	return size
  1264  }
  1265  func (m *NatDetCloseSessionOut) Marshal(b []byte) ([]byte, error) {
  1266  	if b == nil {
  1267  		b = make([]byte, m.Size())
  1268  	}
  1269  	buf := codec.NewBuffer(b)
  1270  	buf.EncodeBytes(m.OutAddr[:], 4)
  1271  	buf.EncodeUint16(m.OutPort)
  1272  	buf.EncodeBytes(m.ExtAddr[:], 4)
  1273  	buf.EncodeUint16(m.ExtPort)
  1274  	return buf.Bytes(), nil
  1275  }
  1276  func (m *NatDetCloseSessionOut) Unmarshal(b []byte) error {
  1277  	buf := codec.NewBuffer(b)
  1278  	copy(m.OutAddr[:], buf.DecodeBytes(4))
  1279  	m.OutPort = buf.DecodeUint16()
  1280  	copy(m.ExtAddr[:], buf.DecodeBytes(4))
  1281  	m.ExtPort = buf.DecodeUint16()
  1282  	return nil
  1283  }
  1284  
  1285  // NatDetCloseSessionOutReply defines message 'nat_det_close_session_out_reply'.
  1286  // Deprecated: the message will be removed in the future versions
  1287  type NatDetCloseSessionOutReply struct {
  1288  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1289  }
  1290  
  1291  func (m *NatDetCloseSessionOutReply) Reset()               { *m = NatDetCloseSessionOutReply{} }
  1292  func (*NatDetCloseSessionOutReply) GetMessageName() string { return "nat_det_close_session_out_reply" }
  1293  func (*NatDetCloseSessionOutReply) GetCrcString() string   { return "e8d4e804" }
  1294  func (*NatDetCloseSessionOutReply) GetMessageType() api.MessageType {
  1295  	return api.ReplyMessage
  1296  }
  1297  
  1298  func (m *NatDetCloseSessionOutReply) Size() (size int) {
  1299  	if m == nil {
  1300  		return 0
  1301  	}
  1302  	size += 4 // m.Retval
  1303  	return size
  1304  }
  1305  func (m *NatDetCloseSessionOutReply) Marshal(b []byte) ([]byte, error) {
  1306  	if b == nil {
  1307  		b = make([]byte, m.Size())
  1308  	}
  1309  	buf := codec.NewBuffer(b)
  1310  	buf.EncodeInt32(m.Retval)
  1311  	return buf.Bytes(), nil
  1312  }
  1313  func (m *NatDetCloseSessionOutReply) Unmarshal(b []byte) error {
  1314  	buf := codec.NewBuffer(b)
  1315  	m.Retval = buf.DecodeInt32()
  1316  	return nil
  1317  }
  1318  
  1319  // Get outside address and port range from inside address
  1320  //   - in_addr - inside IP address
  1321  //
  1322  // NatDetForward defines message 'nat_det_forward'.
  1323  // Deprecated: the message will be removed in the future versions
  1324  type NatDetForward struct {
  1325  	InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
  1326  }
  1327  
  1328  func (m *NatDetForward) Reset()               { *m = NatDetForward{} }
  1329  func (*NatDetForward) GetMessageName() string { return "nat_det_forward" }
  1330  func (*NatDetForward) GetCrcString() string   { return "7f8a89cd" }
  1331  func (*NatDetForward) GetMessageType() api.MessageType {
  1332  	return api.RequestMessage
  1333  }
  1334  
  1335  func (m *NatDetForward) Size() (size int) {
  1336  	if m == nil {
  1337  		return 0
  1338  	}
  1339  	size += 1 * 4 // m.InAddr
  1340  	return size
  1341  }
  1342  func (m *NatDetForward) Marshal(b []byte) ([]byte, error) {
  1343  	if b == nil {
  1344  		b = make([]byte, m.Size())
  1345  	}
  1346  	buf := codec.NewBuffer(b)
  1347  	buf.EncodeBytes(m.InAddr[:], 4)
  1348  	return buf.Bytes(), nil
  1349  }
  1350  func (m *NatDetForward) Unmarshal(b []byte) error {
  1351  	buf := codec.NewBuffer(b)
  1352  	copy(m.InAddr[:], buf.DecodeBytes(4))
  1353  	return nil
  1354  }
  1355  
  1356  // Get outside address and port range from inside address
  1357  //   - retval - return code
  1358  //   - out_port_lo - outside port range start
  1359  //   - out_port_hi - outside port range end
  1360  //   - out_addr - outside IPv4 address
  1361  //
  1362  // NatDetForwardReply defines message 'nat_det_forward_reply'.
  1363  // Deprecated: the message will be removed in the future versions
  1364  type NatDetForwardReply struct {
  1365  	Retval    int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
  1366  	OutPortLo uint16              `binapi:"u16,name=out_port_lo" json:"out_port_lo,omitempty"`
  1367  	OutPortHi uint16              `binapi:"u16,name=out_port_hi" json:"out_port_hi,omitempty"`
  1368  	OutAddr   ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
  1369  }
  1370  
  1371  func (m *NatDetForwardReply) Reset()               { *m = NatDetForwardReply{} }
  1372  func (*NatDetForwardReply) GetMessageName() string { return "nat_det_forward_reply" }
  1373  func (*NatDetForwardReply) GetCrcString() string   { return "a8ccbdc0" }
  1374  func (*NatDetForwardReply) GetMessageType() api.MessageType {
  1375  	return api.ReplyMessage
  1376  }
  1377  
  1378  func (m *NatDetForwardReply) Size() (size int) {
  1379  	if m == nil {
  1380  		return 0
  1381  	}
  1382  	size += 4     // m.Retval
  1383  	size += 2     // m.OutPortLo
  1384  	size += 2     // m.OutPortHi
  1385  	size += 1 * 4 // m.OutAddr
  1386  	return size
  1387  }
  1388  func (m *NatDetForwardReply) Marshal(b []byte) ([]byte, error) {
  1389  	if b == nil {
  1390  		b = make([]byte, m.Size())
  1391  	}
  1392  	buf := codec.NewBuffer(b)
  1393  	buf.EncodeInt32(m.Retval)
  1394  	buf.EncodeUint16(m.OutPortLo)
  1395  	buf.EncodeUint16(m.OutPortHi)
  1396  	buf.EncodeBytes(m.OutAddr[:], 4)
  1397  	return buf.Bytes(), nil
  1398  }
  1399  func (m *NatDetForwardReply) Unmarshal(b []byte) error {
  1400  	buf := codec.NewBuffer(b)
  1401  	m.Retval = buf.DecodeInt32()
  1402  	m.OutPortLo = buf.DecodeUint16()
  1403  	m.OutPortHi = buf.DecodeUint16()
  1404  	copy(m.OutAddr[:], buf.DecodeBytes(4))
  1405  	return nil
  1406  }
  1407  
  1408  // NAT users response
  1409  //   - in_addr - inside IPv4 address
  1410  //   - in_plen - inside IPv4 address prefix length
  1411  //   - out_addr - outside IPv4 address
  1412  //   - out_plen - outside IPv4 address prefix length
  1413  //   - sharing_ratio - outside to inside address sharing ratio
  1414  //   - ports_per_host - number of ports available to a host
  1415  //   - ses_num - number of sessions belonging to this mapping
  1416  //
  1417  // NatDetMapDetails defines message 'nat_det_map_details'.
  1418  // Deprecated: the message will be removed in the future versions
  1419  type NatDetMapDetails struct {
  1420  	InAddr       ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
  1421  	InPlen       uint8               `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
  1422  	OutAddr      ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
  1423  	OutPlen      uint8               `binapi:"u8,name=out_plen" json:"out_plen,omitempty"`
  1424  	SharingRatio uint32              `binapi:"u32,name=sharing_ratio" json:"sharing_ratio,omitempty"`
  1425  	PortsPerHost uint16              `binapi:"u16,name=ports_per_host" json:"ports_per_host,omitempty"`
  1426  	SesNum       uint32              `binapi:"u32,name=ses_num" json:"ses_num,omitempty"`
  1427  }
  1428  
  1429  func (m *NatDetMapDetails) Reset()               { *m = NatDetMapDetails{} }
  1430  func (*NatDetMapDetails) GetMessageName() string { return "nat_det_map_details" }
  1431  func (*NatDetMapDetails) GetCrcString() string   { return "ad91dc83" }
  1432  func (*NatDetMapDetails) GetMessageType() api.MessageType {
  1433  	return api.ReplyMessage
  1434  }
  1435  
  1436  func (m *NatDetMapDetails) Size() (size int) {
  1437  	if m == nil {
  1438  		return 0
  1439  	}
  1440  	size += 1 * 4 // m.InAddr
  1441  	size += 1     // m.InPlen
  1442  	size += 1 * 4 // m.OutAddr
  1443  	size += 1     // m.OutPlen
  1444  	size += 4     // m.SharingRatio
  1445  	size += 2     // m.PortsPerHost
  1446  	size += 4     // m.SesNum
  1447  	return size
  1448  }
  1449  func (m *NatDetMapDetails) Marshal(b []byte) ([]byte, error) {
  1450  	if b == nil {
  1451  		b = make([]byte, m.Size())
  1452  	}
  1453  	buf := codec.NewBuffer(b)
  1454  	buf.EncodeBytes(m.InAddr[:], 4)
  1455  	buf.EncodeUint8(m.InPlen)
  1456  	buf.EncodeBytes(m.OutAddr[:], 4)
  1457  	buf.EncodeUint8(m.OutPlen)
  1458  	buf.EncodeUint32(m.SharingRatio)
  1459  	buf.EncodeUint16(m.PortsPerHost)
  1460  	buf.EncodeUint32(m.SesNum)
  1461  	return buf.Bytes(), nil
  1462  }
  1463  func (m *NatDetMapDetails) Unmarshal(b []byte) error {
  1464  	buf := codec.NewBuffer(b)
  1465  	copy(m.InAddr[:], buf.DecodeBytes(4))
  1466  	m.InPlen = buf.DecodeUint8()
  1467  	copy(m.OutAddr[:], buf.DecodeBytes(4))
  1468  	m.OutPlen = buf.DecodeUint8()
  1469  	m.SharingRatio = buf.DecodeUint32()
  1470  	m.PortsPerHost = buf.DecodeUint16()
  1471  	m.SesNum = buf.DecodeUint32()
  1472  	return nil
  1473  }
  1474  
  1475  // Dump NAT deterministic mappings
  1476  // NatDetMapDump defines message 'nat_det_map_dump'.
  1477  // Deprecated: the message will be removed in the future versions
  1478  type NatDetMapDump struct{}
  1479  
  1480  func (m *NatDetMapDump) Reset()               { *m = NatDetMapDump{} }
  1481  func (*NatDetMapDump) GetMessageName() string { return "nat_det_map_dump" }
  1482  func (*NatDetMapDump) GetCrcString() string   { return "51077d14" }
  1483  func (*NatDetMapDump) GetMessageType() api.MessageType {
  1484  	return api.RequestMessage
  1485  }
  1486  
  1487  func (m *NatDetMapDump) Size() (size int) {
  1488  	if m == nil {
  1489  		return 0
  1490  	}
  1491  	return size
  1492  }
  1493  func (m *NatDetMapDump) Marshal(b []byte) ([]byte, error) {
  1494  	if b == nil {
  1495  		b = make([]byte, m.Size())
  1496  	}
  1497  	buf := codec.NewBuffer(b)
  1498  	return buf.Bytes(), nil
  1499  }
  1500  func (m *NatDetMapDump) Unmarshal(b []byte) error {
  1501  	return nil
  1502  }
  1503  
  1504  // Get inside address from outside address and port
  1505  //   - out_port - outside port
  1506  //   - out_addr - outside IPv4 address
  1507  //
  1508  // NatDetReverse defines message 'nat_det_reverse'.
  1509  // Deprecated: the message will be removed in the future versions
  1510  type NatDetReverse struct {
  1511  	OutPort uint16              `binapi:"u16,name=out_port" json:"out_port,omitempty"`
  1512  	OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
  1513  }
  1514  
  1515  func (m *NatDetReverse) Reset()               { *m = NatDetReverse{} }
  1516  func (*NatDetReverse) GetMessageName() string { return "nat_det_reverse" }
  1517  func (*NatDetReverse) GetCrcString() string   { return "a7573fe1" }
  1518  func (*NatDetReverse) GetMessageType() api.MessageType {
  1519  	return api.RequestMessage
  1520  }
  1521  
  1522  func (m *NatDetReverse) Size() (size int) {
  1523  	if m == nil {
  1524  		return 0
  1525  	}
  1526  	size += 2     // m.OutPort
  1527  	size += 1 * 4 // m.OutAddr
  1528  	return size
  1529  }
  1530  func (m *NatDetReverse) Marshal(b []byte) ([]byte, error) {
  1531  	if b == nil {
  1532  		b = make([]byte, m.Size())
  1533  	}
  1534  	buf := codec.NewBuffer(b)
  1535  	buf.EncodeUint16(m.OutPort)
  1536  	buf.EncodeBytes(m.OutAddr[:], 4)
  1537  	return buf.Bytes(), nil
  1538  }
  1539  func (m *NatDetReverse) Unmarshal(b []byte) error {
  1540  	buf := codec.NewBuffer(b)
  1541  	m.OutPort = buf.DecodeUint16()
  1542  	copy(m.OutAddr[:], buf.DecodeBytes(4))
  1543  	return nil
  1544  }
  1545  
  1546  // Get inside address from outside address and port reply
  1547  //   - retval - return code
  1548  //   - in_addr - inside IP address
  1549  //
  1550  // NatDetReverseReply defines message 'nat_det_reverse_reply'.
  1551  // Deprecated: the message will be removed in the future versions
  1552  type NatDetReverseReply struct {
  1553  	Retval int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
  1554  	InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
  1555  }
  1556  
  1557  func (m *NatDetReverseReply) Reset()               { *m = NatDetReverseReply{} }
  1558  func (*NatDetReverseReply) GetMessageName() string { return "nat_det_reverse_reply" }
  1559  func (*NatDetReverseReply) GetCrcString() string   { return "34066d48" }
  1560  func (*NatDetReverseReply) GetMessageType() api.MessageType {
  1561  	return api.ReplyMessage
  1562  }
  1563  
  1564  func (m *NatDetReverseReply) Size() (size int) {
  1565  	if m == nil {
  1566  		return 0
  1567  	}
  1568  	size += 4     // m.Retval
  1569  	size += 1 * 4 // m.InAddr
  1570  	return size
  1571  }
  1572  func (m *NatDetReverseReply) Marshal(b []byte) ([]byte, error) {
  1573  	if b == nil {
  1574  		b = make([]byte, m.Size())
  1575  	}
  1576  	buf := codec.NewBuffer(b)
  1577  	buf.EncodeInt32(m.Retval)
  1578  	buf.EncodeBytes(m.InAddr[:], 4)
  1579  	return buf.Bytes(), nil
  1580  }
  1581  func (m *NatDetReverseReply) Unmarshal(b []byte) error {
  1582  	buf := codec.NewBuffer(b)
  1583  	m.Retval = buf.DecodeInt32()
  1584  	copy(m.InAddr[:], buf.DecodeBytes(4))
  1585  	return nil
  1586  }
  1587  
  1588  // Deterministic NAT sessions reply
  1589  //   - in_port - inside port
  1590  //   - ext_addr - external host IPv4 address
  1591  //   - ext_port - external host port
  1592  //   - out_port - outside NAT port
  1593  //   - state - session state
  1594  //   - expire - session expiration timestamp
  1595  //
  1596  // NatDetSessionDetails defines message 'nat_det_session_details'.
  1597  // Deprecated: the message will be removed in the future versions
  1598  type NatDetSessionDetails struct {
  1599  	InPort  uint16              `binapi:"u16,name=in_port" json:"in_port,omitempty"`
  1600  	ExtAddr ip_types.IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
  1601  	ExtPort uint16              `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
  1602  	OutPort uint16              `binapi:"u16,name=out_port" json:"out_port,omitempty"`
  1603  	State   uint8               `binapi:"u8,name=state" json:"state,omitempty"`
  1604  	Expire  uint32              `binapi:"u32,name=expire" json:"expire,omitempty"`
  1605  }
  1606  
  1607  func (m *NatDetSessionDetails) Reset()               { *m = NatDetSessionDetails{} }
  1608  func (*NatDetSessionDetails) GetMessageName() string { return "nat_det_session_details" }
  1609  func (*NatDetSessionDetails) GetCrcString() string   { return "27f3c171" }
  1610  func (*NatDetSessionDetails) GetMessageType() api.MessageType {
  1611  	return api.ReplyMessage
  1612  }
  1613  
  1614  func (m *NatDetSessionDetails) Size() (size int) {
  1615  	if m == nil {
  1616  		return 0
  1617  	}
  1618  	size += 2     // m.InPort
  1619  	size += 1 * 4 // m.ExtAddr
  1620  	size += 2     // m.ExtPort
  1621  	size += 2     // m.OutPort
  1622  	size += 1     // m.State
  1623  	size += 4     // m.Expire
  1624  	return size
  1625  }
  1626  func (m *NatDetSessionDetails) Marshal(b []byte) ([]byte, error) {
  1627  	if b == nil {
  1628  		b = make([]byte, m.Size())
  1629  	}
  1630  	buf := codec.NewBuffer(b)
  1631  	buf.EncodeUint16(m.InPort)
  1632  	buf.EncodeBytes(m.ExtAddr[:], 4)
  1633  	buf.EncodeUint16(m.ExtPort)
  1634  	buf.EncodeUint16(m.OutPort)
  1635  	buf.EncodeUint8(m.State)
  1636  	buf.EncodeUint32(m.Expire)
  1637  	return buf.Bytes(), nil
  1638  }
  1639  func (m *NatDetSessionDetails) Unmarshal(b []byte) error {
  1640  	buf := codec.NewBuffer(b)
  1641  	m.InPort = buf.DecodeUint16()
  1642  	copy(m.ExtAddr[:], buf.DecodeBytes(4))
  1643  	m.ExtPort = buf.DecodeUint16()
  1644  	m.OutPort = buf.DecodeUint16()
  1645  	m.State = buf.DecodeUint8()
  1646  	m.Expire = buf.DecodeUint32()
  1647  	return nil
  1648  }
  1649  
  1650  // Dump determinstic NAT sessions
  1651  //   - user_addr - address of an inside user whose sessions to dump
  1652  //
  1653  // NatDetSessionDump defines message 'nat_det_session_dump'.
  1654  // Deprecated: the message will be removed in the future versions
  1655  type NatDetSessionDump struct {
  1656  	UserAddr ip_types.IP4Address `binapi:"ip4_address,name=user_addr" json:"user_addr,omitempty"`
  1657  }
  1658  
  1659  func (m *NatDetSessionDump) Reset()               { *m = NatDetSessionDump{} }
  1660  func (*NatDetSessionDump) GetMessageName() string { return "nat_det_session_dump" }
  1661  func (*NatDetSessionDump) GetCrcString() string   { return "e45a3af7" }
  1662  func (*NatDetSessionDump) GetMessageType() api.MessageType {
  1663  	return api.RequestMessage
  1664  }
  1665  
  1666  func (m *NatDetSessionDump) Size() (size int) {
  1667  	if m == nil {
  1668  		return 0
  1669  	}
  1670  	size += 1 * 4 // m.UserAddr
  1671  	return size
  1672  }
  1673  func (m *NatDetSessionDump) Marshal(b []byte) ([]byte, error) {
  1674  	if b == nil {
  1675  		b = make([]byte, m.Size())
  1676  	}
  1677  	buf := codec.NewBuffer(b)
  1678  	buf.EncodeBytes(m.UserAddr[:], 4)
  1679  	return buf.Bytes(), nil
  1680  }
  1681  func (m *NatDetSessionDump) Unmarshal(b []byte) error {
  1682  	buf := codec.NewBuffer(b)
  1683  	copy(m.UserAddr[:], buf.DecodeBytes(4))
  1684  	return nil
  1685  }
  1686  
  1687  func init() { file_det44_binapi_init() }
  1688  func file_det44_binapi_init() {
  1689  	api.RegisterMessage((*Det44AddDelMap)(nil), "det44_add_del_map_1150a190")
  1690  	api.RegisterMessage((*Det44AddDelMapReply)(nil), "det44_add_del_map_reply_e8d4e804")
  1691  	api.RegisterMessage((*Det44CloseSessionIn)(nil), "det44_close_session_in_3c68e073")
  1692  	api.RegisterMessage((*Det44CloseSessionInReply)(nil), "det44_close_session_in_reply_e8d4e804")
  1693  	api.RegisterMessage((*Det44CloseSessionOut)(nil), "det44_close_session_out_f6b259d1")
  1694  	api.RegisterMessage((*Det44CloseSessionOutReply)(nil), "det44_close_session_out_reply_e8d4e804")
  1695  	api.RegisterMessage((*Det44Forward)(nil), "det44_forward_7f8a89cd")
  1696  	api.RegisterMessage((*Det44ForwardReply)(nil), "det44_forward_reply_a8ccbdc0")
  1697  	api.RegisterMessage((*Det44GetTimeouts)(nil), "det44_get_timeouts_51077d14")
  1698  	api.RegisterMessage((*Det44GetTimeoutsReply)(nil), "det44_get_timeouts_reply_3c4df4e1")
  1699  	api.RegisterMessage((*Det44InterfaceAddDelFeature)(nil), "det44_interface_add_del_feature_dc17a836")
  1700  	api.RegisterMessage((*Det44InterfaceAddDelFeatureReply)(nil), "det44_interface_add_del_feature_reply_e8d4e804")
  1701  	api.RegisterMessage((*Det44InterfaceDetails)(nil), "det44_interface_details_e60cc5be")
  1702  	api.RegisterMessage((*Det44InterfaceDump)(nil), "det44_interface_dump_51077d14")
  1703  	api.RegisterMessage((*Det44MapDetails)(nil), "det44_map_details_ad91dc83")
  1704  	api.RegisterMessage((*Det44MapDump)(nil), "det44_map_dump_51077d14")
  1705  	api.RegisterMessage((*Det44PluginEnableDisable)(nil), "det44_plugin_enable_disable_617b6bf8")
  1706  	api.RegisterMessage((*Det44PluginEnableDisableReply)(nil), "det44_plugin_enable_disable_reply_e8d4e804")
  1707  	api.RegisterMessage((*Det44Reverse)(nil), "det44_reverse_a7573fe1")
  1708  	api.RegisterMessage((*Det44ReverseReply)(nil), "det44_reverse_reply_34066d48")
  1709  	api.RegisterMessage((*Det44SessionDetails)(nil), "det44_session_details_27f3c171")
  1710  	api.RegisterMessage((*Det44SessionDump)(nil), "det44_session_dump_e45a3af7")
  1711  	api.RegisterMessage((*Det44SetTimeouts)(nil), "det44_set_timeouts_d4746b16")
  1712  	api.RegisterMessage((*Det44SetTimeoutsReply)(nil), "det44_set_timeouts_reply_e8d4e804")
  1713  	api.RegisterMessage((*NatDetAddDelMap)(nil), "nat_det_add_del_map_1150a190")
  1714  	api.RegisterMessage((*NatDetAddDelMapReply)(nil), "nat_det_add_del_map_reply_e8d4e804")
  1715  	api.RegisterMessage((*NatDetCloseSessionIn)(nil), "nat_det_close_session_in_3c68e073")
  1716  	api.RegisterMessage((*NatDetCloseSessionInReply)(nil), "nat_det_close_session_in_reply_e8d4e804")
  1717  	api.RegisterMessage((*NatDetCloseSessionOut)(nil), "nat_det_close_session_out_f6b259d1")
  1718  	api.RegisterMessage((*NatDetCloseSessionOutReply)(nil), "nat_det_close_session_out_reply_e8d4e804")
  1719  	api.RegisterMessage((*NatDetForward)(nil), "nat_det_forward_7f8a89cd")
  1720  	api.RegisterMessage((*NatDetForwardReply)(nil), "nat_det_forward_reply_a8ccbdc0")
  1721  	api.RegisterMessage((*NatDetMapDetails)(nil), "nat_det_map_details_ad91dc83")
  1722  	api.RegisterMessage((*NatDetMapDump)(nil), "nat_det_map_dump_51077d14")
  1723  	api.RegisterMessage((*NatDetReverse)(nil), "nat_det_reverse_a7573fe1")
  1724  	api.RegisterMessage((*NatDetReverseReply)(nil), "nat_det_reverse_reply_34066d48")
  1725  	api.RegisterMessage((*NatDetSessionDetails)(nil), "nat_det_session_details_27f3c171")
  1726  	api.RegisterMessage((*NatDetSessionDump)(nil), "nat_det_session_dump_e45a3af7")
  1727  }
  1728  
  1729  // Messages returns list of all messages in this module.
  1730  func AllMessages() []api.Message {
  1731  	return []api.Message{
  1732  		(*Det44AddDelMap)(nil),
  1733  		(*Det44AddDelMapReply)(nil),
  1734  		(*Det44CloseSessionIn)(nil),
  1735  		(*Det44CloseSessionInReply)(nil),
  1736  		(*Det44CloseSessionOut)(nil),
  1737  		(*Det44CloseSessionOutReply)(nil),
  1738  		(*Det44Forward)(nil),
  1739  		(*Det44ForwardReply)(nil),
  1740  		(*Det44GetTimeouts)(nil),
  1741  		(*Det44GetTimeoutsReply)(nil),
  1742  		(*Det44InterfaceAddDelFeature)(nil),
  1743  		(*Det44InterfaceAddDelFeatureReply)(nil),
  1744  		(*Det44InterfaceDetails)(nil),
  1745  		(*Det44InterfaceDump)(nil),
  1746  		(*Det44MapDetails)(nil),
  1747  		(*Det44MapDump)(nil),
  1748  		(*Det44PluginEnableDisable)(nil),
  1749  		(*Det44PluginEnableDisableReply)(nil),
  1750  		(*Det44Reverse)(nil),
  1751  		(*Det44ReverseReply)(nil),
  1752  		(*Det44SessionDetails)(nil),
  1753  		(*Det44SessionDump)(nil),
  1754  		(*Det44SetTimeouts)(nil),
  1755  		(*Det44SetTimeoutsReply)(nil),
  1756  		(*NatDetAddDelMap)(nil),
  1757  		(*NatDetAddDelMapReply)(nil),
  1758  		(*NatDetCloseSessionIn)(nil),
  1759  		(*NatDetCloseSessionInReply)(nil),
  1760  		(*NatDetCloseSessionOut)(nil),
  1761  		(*NatDetCloseSessionOutReply)(nil),
  1762  		(*NatDetForward)(nil),
  1763  		(*NatDetForwardReply)(nil),
  1764  		(*NatDetMapDetails)(nil),
  1765  		(*NatDetMapDump)(nil),
  1766  		(*NatDetReverse)(nil),
  1767  		(*NatDetReverseReply)(nil),
  1768  		(*NatDetSessionDetails)(nil),
  1769  		(*NatDetSessionDump)(nil),
  1770  	}
  1771  }