github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/map/map.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  // versions:
     3  //  binapi-generator: v0.4.0-dev
     4  //  VPP:              23.02-rc0~189-g57127b32a
     5  // source: /usr/share/vpp/api/plugins/map.api.json
     6  
     7  // Package maps contains generated bindings for API file map.api.
     8  //
     9  // Contents:
    10  //  32 messages
    11  //
    12  package maps
    13  
    14  import (
    15  	api "git.fd.io/govpp.git/api"
    16  	codec "git.fd.io/govpp.git/codec"
    17  	interface_types "github.com/edwarnicke/govpp/binapi/interface_types"
    18  	ip_types "github.com/edwarnicke/govpp/binapi/ip_types"
    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    = "map"
    29  	APIVersion = "4.2.1"
    30  	VersionCrc = 0xd1f7f56c
    31  )
    32  
    33  // MapAddDelRule defines message 'map_add_del_rule'.
    34  type MapAddDelRule struct {
    35  	Index  uint32              `binapi:"u32,name=index" json:"index,omitempty"`
    36  	IsAdd  bool                `binapi:"bool,name=is_add" json:"is_add,omitempty"`
    37  	IP6Dst ip_types.IP6Address `binapi:"ip6_address,name=ip6_dst" json:"ip6_dst,omitempty"`
    38  	Psid   uint16              `binapi:"u16,name=psid" json:"psid,omitempty"`
    39  }
    40  
    41  func (m *MapAddDelRule) Reset()               { *m = MapAddDelRule{} }
    42  func (*MapAddDelRule) GetMessageName() string { return "map_add_del_rule" }
    43  func (*MapAddDelRule) GetCrcString() string   { return "c65b32f7" }
    44  func (*MapAddDelRule) GetMessageType() api.MessageType {
    45  	return api.RequestMessage
    46  }
    47  
    48  func (m *MapAddDelRule) Size() (size int) {
    49  	if m == nil {
    50  		return 0
    51  	}
    52  	size += 4      // m.Index
    53  	size += 1      // m.IsAdd
    54  	size += 1 * 16 // m.IP6Dst
    55  	size += 2      // m.Psid
    56  	return size
    57  }
    58  func (m *MapAddDelRule) Marshal(b []byte) ([]byte, error) {
    59  	if b == nil {
    60  		b = make([]byte, m.Size())
    61  	}
    62  	buf := codec.NewBuffer(b)
    63  	buf.EncodeUint32(m.Index)
    64  	buf.EncodeBool(m.IsAdd)
    65  	buf.EncodeBytes(m.IP6Dst[:], 16)
    66  	buf.EncodeUint16(m.Psid)
    67  	return buf.Bytes(), nil
    68  }
    69  func (m *MapAddDelRule) Unmarshal(b []byte) error {
    70  	buf := codec.NewBuffer(b)
    71  	m.Index = buf.DecodeUint32()
    72  	m.IsAdd = buf.DecodeBool()
    73  	copy(m.IP6Dst[:], buf.DecodeBytes(16))
    74  	m.Psid = buf.DecodeUint16()
    75  	return nil
    76  }
    77  
    78  // MapAddDelRuleReply defines message 'map_add_del_rule_reply'.
    79  type MapAddDelRuleReply struct {
    80  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
    81  }
    82  
    83  func (m *MapAddDelRuleReply) Reset()               { *m = MapAddDelRuleReply{} }
    84  func (*MapAddDelRuleReply) GetMessageName() string { return "map_add_del_rule_reply" }
    85  func (*MapAddDelRuleReply) GetCrcString() string   { return "e8d4e804" }
    86  func (*MapAddDelRuleReply) GetMessageType() api.MessageType {
    87  	return api.ReplyMessage
    88  }
    89  
    90  func (m *MapAddDelRuleReply) Size() (size int) {
    91  	if m == nil {
    92  		return 0
    93  	}
    94  	size += 4 // m.Retval
    95  	return size
    96  }
    97  func (m *MapAddDelRuleReply) Marshal(b []byte) ([]byte, error) {
    98  	if b == nil {
    99  		b = make([]byte, m.Size())
   100  	}
   101  	buf := codec.NewBuffer(b)
   102  	buf.EncodeInt32(m.Retval)
   103  	return buf.Bytes(), nil
   104  }
   105  func (m *MapAddDelRuleReply) Unmarshal(b []byte) error {
   106  	buf := codec.NewBuffer(b)
   107  	m.Retval = buf.DecodeInt32()
   108  	return nil
   109  }
   110  
   111  // MapAddDomain defines message 'map_add_domain'.
   112  type MapAddDomain struct {
   113  	IP6Prefix  ip_types.IP6Prefix `binapi:"ip6_prefix,name=ip6_prefix" json:"ip6_prefix,omitempty"`
   114  	IP4Prefix  ip_types.IP4Prefix `binapi:"ip4_prefix,name=ip4_prefix" json:"ip4_prefix,omitempty"`
   115  	IP6Src     ip_types.IP6Prefix `binapi:"ip6_prefix,name=ip6_src" json:"ip6_src,omitempty"`
   116  	EaBitsLen  uint8              `binapi:"u8,name=ea_bits_len" json:"ea_bits_len,omitempty"`
   117  	PsidOffset uint8              `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
   118  	PsidLength uint8              `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
   119  	Mtu        uint16             `binapi:"u16,name=mtu,default=1280" json:"mtu,omitempty"`
   120  	Tag        string             `binapi:"string[64],name=tag" json:"tag,omitempty"`
   121  }
   122  
   123  func (m *MapAddDomain) Reset()               { *m = MapAddDomain{} }
   124  func (*MapAddDomain) GetMessageName() string { return "map_add_domain" }
   125  func (*MapAddDomain) GetCrcString() string   { return "249f195c" }
   126  func (*MapAddDomain) GetMessageType() api.MessageType {
   127  	return api.RequestMessage
   128  }
   129  
   130  func (m *MapAddDomain) Size() (size int) {
   131  	if m == nil {
   132  		return 0
   133  	}
   134  	size += 1 * 16 // m.IP6Prefix.Address
   135  	size += 1      // m.IP6Prefix.Len
   136  	size += 1 * 4  // m.IP4Prefix.Address
   137  	size += 1      // m.IP4Prefix.Len
   138  	size += 1 * 16 // m.IP6Src.Address
   139  	size += 1      // m.IP6Src.Len
   140  	size += 1      // m.EaBitsLen
   141  	size += 1      // m.PsidOffset
   142  	size += 1      // m.PsidLength
   143  	size += 2      // m.Mtu
   144  	size += 64     // m.Tag
   145  	return size
   146  }
   147  func (m *MapAddDomain) Marshal(b []byte) ([]byte, error) {
   148  	if b == nil {
   149  		b = make([]byte, m.Size())
   150  	}
   151  	buf := codec.NewBuffer(b)
   152  	buf.EncodeBytes(m.IP6Prefix.Address[:], 16)
   153  	buf.EncodeUint8(m.IP6Prefix.Len)
   154  	buf.EncodeBytes(m.IP4Prefix.Address[:], 4)
   155  	buf.EncodeUint8(m.IP4Prefix.Len)
   156  	buf.EncodeBytes(m.IP6Src.Address[:], 16)
   157  	buf.EncodeUint8(m.IP6Src.Len)
   158  	buf.EncodeUint8(m.EaBitsLen)
   159  	buf.EncodeUint8(m.PsidOffset)
   160  	buf.EncodeUint8(m.PsidLength)
   161  	buf.EncodeUint16(m.Mtu)
   162  	buf.EncodeString(m.Tag, 64)
   163  	return buf.Bytes(), nil
   164  }
   165  func (m *MapAddDomain) Unmarshal(b []byte) error {
   166  	buf := codec.NewBuffer(b)
   167  	copy(m.IP6Prefix.Address[:], buf.DecodeBytes(16))
   168  	m.IP6Prefix.Len = buf.DecodeUint8()
   169  	copy(m.IP4Prefix.Address[:], buf.DecodeBytes(4))
   170  	m.IP4Prefix.Len = buf.DecodeUint8()
   171  	copy(m.IP6Src.Address[:], buf.DecodeBytes(16))
   172  	m.IP6Src.Len = buf.DecodeUint8()
   173  	m.EaBitsLen = buf.DecodeUint8()
   174  	m.PsidOffset = buf.DecodeUint8()
   175  	m.PsidLength = buf.DecodeUint8()
   176  	m.Mtu = buf.DecodeUint16()
   177  	m.Tag = buf.DecodeString(64)
   178  	return nil
   179  }
   180  
   181  // MapAddDomainReply defines message 'map_add_domain_reply'.
   182  type MapAddDomainReply struct {
   183  	Index  uint32 `binapi:"u32,name=index" json:"index,omitempty"`
   184  	Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   185  }
   186  
   187  func (m *MapAddDomainReply) Reset()               { *m = MapAddDomainReply{} }
   188  func (*MapAddDomainReply) GetMessageName() string { return "map_add_domain_reply" }
   189  func (*MapAddDomainReply) GetCrcString() string   { return "3e6d4e2c" }
   190  func (*MapAddDomainReply) GetMessageType() api.MessageType {
   191  	return api.ReplyMessage
   192  }
   193  
   194  func (m *MapAddDomainReply) Size() (size int) {
   195  	if m == nil {
   196  		return 0
   197  	}
   198  	size += 4 // m.Index
   199  	size += 4 // m.Retval
   200  	return size
   201  }
   202  func (m *MapAddDomainReply) Marshal(b []byte) ([]byte, error) {
   203  	if b == nil {
   204  		b = make([]byte, m.Size())
   205  	}
   206  	buf := codec.NewBuffer(b)
   207  	buf.EncodeUint32(m.Index)
   208  	buf.EncodeInt32(m.Retval)
   209  	return buf.Bytes(), nil
   210  }
   211  func (m *MapAddDomainReply) Unmarshal(b []byte) error {
   212  	buf := codec.NewBuffer(b)
   213  	m.Index = buf.DecodeUint32()
   214  	m.Retval = buf.DecodeInt32()
   215  	return nil
   216  }
   217  
   218  // MapDelDomain defines message 'map_del_domain'.
   219  type MapDelDomain struct {
   220  	Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
   221  }
   222  
   223  func (m *MapDelDomain) Reset()               { *m = MapDelDomain{} }
   224  func (*MapDelDomain) GetMessageName() string { return "map_del_domain" }
   225  func (*MapDelDomain) GetCrcString() string   { return "8ac76db6" }
   226  func (*MapDelDomain) GetMessageType() api.MessageType {
   227  	return api.RequestMessage
   228  }
   229  
   230  func (m *MapDelDomain) Size() (size int) {
   231  	if m == nil {
   232  		return 0
   233  	}
   234  	size += 4 // m.Index
   235  	return size
   236  }
   237  func (m *MapDelDomain) Marshal(b []byte) ([]byte, error) {
   238  	if b == nil {
   239  		b = make([]byte, m.Size())
   240  	}
   241  	buf := codec.NewBuffer(b)
   242  	buf.EncodeUint32(m.Index)
   243  	return buf.Bytes(), nil
   244  }
   245  func (m *MapDelDomain) Unmarshal(b []byte) error {
   246  	buf := codec.NewBuffer(b)
   247  	m.Index = buf.DecodeUint32()
   248  	return nil
   249  }
   250  
   251  // MapDelDomainReply defines message 'map_del_domain_reply'.
   252  type MapDelDomainReply struct {
   253  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   254  }
   255  
   256  func (m *MapDelDomainReply) Reset()               { *m = MapDelDomainReply{} }
   257  func (*MapDelDomainReply) GetMessageName() string { return "map_del_domain_reply" }
   258  func (*MapDelDomainReply) GetCrcString() string   { return "e8d4e804" }
   259  func (*MapDelDomainReply) GetMessageType() api.MessageType {
   260  	return api.ReplyMessage
   261  }
   262  
   263  func (m *MapDelDomainReply) Size() (size int) {
   264  	if m == nil {
   265  		return 0
   266  	}
   267  	size += 4 // m.Retval
   268  	return size
   269  }
   270  func (m *MapDelDomainReply) Marshal(b []byte) ([]byte, error) {
   271  	if b == nil {
   272  		b = make([]byte, m.Size())
   273  	}
   274  	buf := codec.NewBuffer(b)
   275  	buf.EncodeInt32(m.Retval)
   276  	return buf.Bytes(), nil
   277  }
   278  func (m *MapDelDomainReply) Unmarshal(b []byte) error {
   279  	buf := codec.NewBuffer(b)
   280  	m.Retval = buf.DecodeInt32()
   281  	return nil
   282  }
   283  
   284  // MapDomainDetails defines message 'map_domain_details'.
   285  type MapDomainDetails struct {
   286  	DomainIndex uint32             `binapi:"u32,name=domain_index" json:"domain_index,omitempty"`
   287  	IP6Prefix   ip_types.IP6Prefix `binapi:"ip6_prefix,name=ip6_prefix" json:"ip6_prefix,omitempty"`
   288  	IP4Prefix   ip_types.IP4Prefix `binapi:"ip4_prefix,name=ip4_prefix" json:"ip4_prefix,omitempty"`
   289  	IP6Src      ip_types.IP6Prefix `binapi:"ip6_prefix,name=ip6_src" json:"ip6_src,omitempty"`
   290  	EaBitsLen   uint8              `binapi:"u8,name=ea_bits_len" json:"ea_bits_len,omitempty"`
   291  	PsidOffset  uint8              `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
   292  	PsidLength  uint8              `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
   293  	Flags       uint8              `binapi:"u8,name=flags" json:"flags,omitempty"`
   294  	Mtu         uint16             `binapi:"u16,name=mtu" json:"mtu,omitempty"`
   295  	Tag         string             `binapi:"string[64],name=tag" json:"tag,omitempty"`
   296  }
   297  
   298  func (m *MapDomainDetails) Reset()               { *m = MapDomainDetails{} }
   299  func (*MapDomainDetails) GetMessageName() string { return "map_domain_details" }
   300  func (*MapDomainDetails) GetCrcString() string   { return "796edb50" }
   301  func (*MapDomainDetails) GetMessageType() api.MessageType {
   302  	return api.ReplyMessage
   303  }
   304  
   305  func (m *MapDomainDetails) Size() (size int) {
   306  	if m == nil {
   307  		return 0
   308  	}
   309  	size += 4      // m.DomainIndex
   310  	size += 1 * 16 // m.IP6Prefix.Address
   311  	size += 1      // m.IP6Prefix.Len
   312  	size += 1 * 4  // m.IP4Prefix.Address
   313  	size += 1      // m.IP4Prefix.Len
   314  	size += 1 * 16 // m.IP6Src.Address
   315  	size += 1      // m.IP6Src.Len
   316  	size += 1      // m.EaBitsLen
   317  	size += 1      // m.PsidOffset
   318  	size += 1      // m.PsidLength
   319  	size += 1      // m.Flags
   320  	size += 2      // m.Mtu
   321  	size += 64     // m.Tag
   322  	return size
   323  }
   324  func (m *MapDomainDetails) Marshal(b []byte) ([]byte, error) {
   325  	if b == nil {
   326  		b = make([]byte, m.Size())
   327  	}
   328  	buf := codec.NewBuffer(b)
   329  	buf.EncodeUint32(m.DomainIndex)
   330  	buf.EncodeBytes(m.IP6Prefix.Address[:], 16)
   331  	buf.EncodeUint8(m.IP6Prefix.Len)
   332  	buf.EncodeBytes(m.IP4Prefix.Address[:], 4)
   333  	buf.EncodeUint8(m.IP4Prefix.Len)
   334  	buf.EncodeBytes(m.IP6Src.Address[:], 16)
   335  	buf.EncodeUint8(m.IP6Src.Len)
   336  	buf.EncodeUint8(m.EaBitsLen)
   337  	buf.EncodeUint8(m.PsidOffset)
   338  	buf.EncodeUint8(m.PsidLength)
   339  	buf.EncodeUint8(m.Flags)
   340  	buf.EncodeUint16(m.Mtu)
   341  	buf.EncodeString(m.Tag, 64)
   342  	return buf.Bytes(), nil
   343  }
   344  func (m *MapDomainDetails) Unmarshal(b []byte) error {
   345  	buf := codec.NewBuffer(b)
   346  	m.DomainIndex = buf.DecodeUint32()
   347  	copy(m.IP6Prefix.Address[:], buf.DecodeBytes(16))
   348  	m.IP6Prefix.Len = buf.DecodeUint8()
   349  	copy(m.IP4Prefix.Address[:], buf.DecodeBytes(4))
   350  	m.IP4Prefix.Len = buf.DecodeUint8()
   351  	copy(m.IP6Src.Address[:], buf.DecodeBytes(16))
   352  	m.IP6Src.Len = buf.DecodeUint8()
   353  	m.EaBitsLen = buf.DecodeUint8()
   354  	m.PsidOffset = buf.DecodeUint8()
   355  	m.PsidLength = buf.DecodeUint8()
   356  	m.Flags = buf.DecodeUint8()
   357  	m.Mtu = buf.DecodeUint16()
   358  	m.Tag = buf.DecodeString(64)
   359  	return nil
   360  }
   361  
   362  // MapDomainDump defines message 'map_domain_dump'.
   363  // Deprecated: the message will be removed in the future versions
   364  type MapDomainDump struct{}
   365  
   366  func (m *MapDomainDump) Reset()               { *m = MapDomainDump{} }
   367  func (*MapDomainDump) GetMessageName() string { return "map_domain_dump" }
   368  func (*MapDomainDump) GetCrcString() string   { return "51077d14" }
   369  func (*MapDomainDump) GetMessageType() api.MessageType {
   370  	return api.RequestMessage
   371  }
   372  
   373  func (m *MapDomainDump) Size() (size int) {
   374  	if m == nil {
   375  		return 0
   376  	}
   377  	return size
   378  }
   379  func (m *MapDomainDump) Marshal(b []byte) ([]byte, error) {
   380  	if b == nil {
   381  		b = make([]byte, m.Size())
   382  	}
   383  	buf := codec.NewBuffer(b)
   384  	return buf.Bytes(), nil
   385  }
   386  func (m *MapDomainDump) Unmarshal(b []byte) error {
   387  	return nil
   388  }
   389  
   390  // MapDomainsGet defines message 'map_domains_get'.
   391  type MapDomainsGet struct {
   392  	Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
   393  }
   394  
   395  func (m *MapDomainsGet) Reset()               { *m = MapDomainsGet{} }
   396  func (*MapDomainsGet) GetMessageName() string { return "map_domains_get" }
   397  func (*MapDomainsGet) GetCrcString() string   { return "f75ba505" }
   398  func (*MapDomainsGet) GetMessageType() api.MessageType {
   399  	return api.RequestMessage
   400  }
   401  
   402  func (m *MapDomainsGet) Size() (size int) {
   403  	if m == nil {
   404  		return 0
   405  	}
   406  	size += 4 // m.Cursor
   407  	return size
   408  }
   409  func (m *MapDomainsGet) Marshal(b []byte) ([]byte, error) {
   410  	if b == nil {
   411  		b = make([]byte, m.Size())
   412  	}
   413  	buf := codec.NewBuffer(b)
   414  	buf.EncodeUint32(m.Cursor)
   415  	return buf.Bytes(), nil
   416  }
   417  func (m *MapDomainsGet) Unmarshal(b []byte) error {
   418  	buf := codec.NewBuffer(b)
   419  	m.Cursor = buf.DecodeUint32()
   420  	return nil
   421  }
   422  
   423  // MapDomainsGetReply defines message 'map_domains_get_reply'.
   424  type MapDomainsGetReply struct {
   425  	Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   426  	Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
   427  }
   428  
   429  func (m *MapDomainsGetReply) Reset()               { *m = MapDomainsGetReply{} }
   430  func (*MapDomainsGetReply) GetMessageName() string { return "map_domains_get_reply" }
   431  func (*MapDomainsGetReply) GetCrcString() string   { return "53b48f5d" }
   432  func (*MapDomainsGetReply) GetMessageType() api.MessageType {
   433  	return api.ReplyMessage
   434  }
   435  
   436  func (m *MapDomainsGetReply) Size() (size int) {
   437  	if m == nil {
   438  		return 0
   439  	}
   440  	size += 4 // m.Retval
   441  	size += 4 // m.Cursor
   442  	return size
   443  }
   444  func (m *MapDomainsGetReply) Marshal(b []byte) ([]byte, error) {
   445  	if b == nil {
   446  		b = make([]byte, m.Size())
   447  	}
   448  	buf := codec.NewBuffer(b)
   449  	buf.EncodeInt32(m.Retval)
   450  	buf.EncodeUint32(m.Cursor)
   451  	return buf.Bytes(), nil
   452  }
   453  func (m *MapDomainsGetReply) Unmarshal(b []byte) error {
   454  	buf := codec.NewBuffer(b)
   455  	m.Retval = buf.DecodeInt32()
   456  	m.Cursor = buf.DecodeUint32()
   457  	return nil
   458  }
   459  
   460  // MapIfEnableDisable defines message 'map_if_enable_disable'.
   461  type MapIfEnableDisable struct {
   462  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   463  	IsEnable      bool                           `binapi:"bool,name=is_enable" json:"is_enable,omitempty"`
   464  	IsTranslation bool                           `binapi:"bool,name=is_translation" json:"is_translation,omitempty"`
   465  }
   466  
   467  func (m *MapIfEnableDisable) Reset()               { *m = MapIfEnableDisable{} }
   468  func (*MapIfEnableDisable) GetMessageName() string { return "map_if_enable_disable" }
   469  func (*MapIfEnableDisable) GetCrcString() string   { return "59bb32f4" }
   470  func (*MapIfEnableDisable) GetMessageType() api.MessageType {
   471  	return api.RequestMessage
   472  }
   473  
   474  func (m *MapIfEnableDisable) Size() (size int) {
   475  	if m == nil {
   476  		return 0
   477  	}
   478  	size += 4 // m.SwIfIndex
   479  	size += 1 // m.IsEnable
   480  	size += 1 // m.IsTranslation
   481  	return size
   482  }
   483  func (m *MapIfEnableDisable) Marshal(b []byte) ([]byte, error) {
   484  	if b == nil {
   485  		b = make([]byte, m.Size())
   486  	}
   487  	buf := codec.NewBuffer(b)
   488  	buf.EncodeUint32(uint32(m.SwIfIndex))
   489  	buf.EncodeBool(m.IsEnable)
   490  	buf.EncodeBool(m.IsTranslation)
   491  	return buf.Bytes(), nil
   492  }
   493  func (m *MapIfEnableDisable) Unmarshal(b []byte) error {
   494  	buf := codec.NewBuffer(b)
   495  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   496  	m.IsEnable = buf.DecodeBool()
   497  	m.IsTranslation = buf.DecodeBool()
   498  	return nil
   499  }
   500  
   501  // MapIfEnableDisableReply defines message 'map_if_enable_disable_reply'.
   502  type MapIfEnableDisableReply struct {
   503  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   504  }
   505  
   506  func (m *MapIfEnableDisableReply) Reset()               { *m = MapIfEnableDisableReply{} }
   507  func (*MapIfEnableDisableReply) GetMessageName() string { return "map_if_enable_disable_reply" }
   508  func (*MapIfEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
   509  func (*MapIfEnableDisableReply) GetMessageType() api.MessageType {
   510  	return api.ReplyMessage
   511  }
   512  
   513  func (m *MapIfEnableDisableReply) Size() (size int) {
   514  	if m == nil {
   515  		return 0
   516  	}
   517  	size += 4 // m.Retval
   518  	return size
   519  }
   520  func (m *MapIfEnableDisableReply) Marshal(b []byte) ([]byte, error) {
   521  	if b == nil {
   522  		b = make([]byte, m.Size())
   523  	}
   524  	buf := codec.NewBuffer(b)
   525  	buf.EncodeInt32(m.Retval)
   526  	return buf.Bytes(), nil
   527  }
   528  func (m *MapIfEnableDisableReply) Unmarshal(b []byte) error {
   529  	buf := codec.NewBuffer(b)
   530  	m.Retval = buf.DecodeInt32()
   531  	return nil
   532  }
   533  
   534  // MapParamAddDelPreResolve defines message 'map_param_add_del_pre_resolve'.
   535  type MapParamAddDelPreResolve struct {
   536  	IsAdd        bool                `binapi:"bool,name=is_add" json:"is_add,omitempty"`
   537  	IP4NhAddress ip_types.IP4Address `binapi:"ip4_address,name=ip4_nh_address" json:"ip4_nh_address,omitempty"`
   538  	IP6NhAddress ip_types.IP6Address `binapi:"ip6_address,name=ip6_nh_address" json:"ip6_nh_address,omitempty"`
   539  }
   540  
   541  func (m *MapParamAddDelPreResolve) Reset()               { *m = MapParamAddDelPreResolve{} }
   542  func (*MapParamAddDelPreResolve) GetMessageName() string { return "map_param_add_del_pre_resolve" }
   543  func (*MapParamAddDelPreResolve) GetCrcString() string   { return "dae5af03" }
   544  func (*MapParamAddDelPreResolve) GetMessageType() api.MessageType {
   545  	return api.RequestMessage
   546  }
   547  
   548  func (m *MapParamAddDelPreResolve) Size() (size int) {
   549  	if m == nil {
   550  		return 0
   551  	}
   552  	size += 1      // m.IsAdd
   553  	size += 1 * 4  // m.IP4NhAddress
   554  	size += 1 * 16 // m.IP6NhAddress
   555  	return size
   556  }
   557  func (m *MapParamAddDelPreResolve) Marshal(b []byte) ([]byte, error) {
   558  	if b == nil {
   559  		b = make([]byte, m.Size())
   560  	}
   561  	buf := codec.NewBuffer(b)
   562  	buf.EncodeBool(m.IsAdd)
   563  	buf.EncodeBytes(m.IP4NhAddress[:], 4)
   564  	buf.EncodeBytes(m.IP6NhAddress[:], 16)
   565  	return buf.Bytes(), nil
   566  }
   567  func (m *MapParamAddDelPreResolve) Unmarshal(b []byte) error {
   568  	buf := codec.NewBuffer(b)
   569  	m.IsAdd = buf.DecodeBool()
   570  	copy(m.IP4NhAddress[:], buf.DecodeBytes(4))
   571  	copy(m.IP6NhAddress[:], buf.DecodeBytes(16))
   572  	return nil
   573  }
   574  
   575  // MapParamAddDelPreResolveReply defines message 'map_param_add_del_pre_resolve_reply'.
   576  type MapParamAddDelPreResolveReply struct {
   577  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   578  }
   579  
   580  func (m *MapParamAddDelPreResolveReply) Reset() { *m = MapParamAddDelPreResolveReply{} }
   581  func (*MapParamAddDelPreResolveReply) GetMessageName() string {
   582  	return "map_param_add_del_pre_resolve_reply"
   583  }
   584  func (*MapParamAddDelPreResolveReply) GetCrcString() string { return "e8d4e804" }
   585  func (*MapParamAddDelPreResolveReply) GetMessageType() api.MessageType {
   586  	return api.ReplyMessage
   587  }
   588  
   589  func (m *MapParamAddDelPreResolveReply) Size() (size int) {
   590  	if m == nil {
   591  		return 0
   592  	}
   593  	size += 4 // m.Retval
   594  	return size
   595  }
   596  func (m *MapParamAddDelPreResolveReply) Marshal(b []byte) ([]byte, error) {
   597  	if b == nil {
   598  		b = make([]byte, m.Size())
   599  	}
   600  	buf := codec.NewBuffer(b)
   601  	buf.EncodeInt32(m.Retval)
   602  	return buf.Bytes(), nil
   603  }
   604  func (m *MapParamAddDelPreResolveReply) Unmarshal(b []byte) error {
   605  	buf := codec.NewBuffer(b)
   606  	m.Retval = buf.DecodeInt32()
   607  	return nil
   608  }
   609  
   610  // MapParamGet defines message 'map_param_get'.
   611  type MapParamGet struct{}
   612  
   613  func (m *MapParamGet) Reset()               { *m = MapParamGet{} }
   614  func (*MapParamGet) GetMessageName() string { return "map_param_get" }
   615  func (*MapParamGet) GetCrcString() string   { return "51077d14" }
   616  func (*MapParamGet) GetMessageType() api.MessageType {
   617  	return api.RequestMessage
   618  }
   619  
   620  func (m *MapParamGet) Size() (size int) {
   621  	if m == nil {
   622  		return 0
   623  	}
   624  	return size
   625  }
   626  func (m *MapParamGet) Marshal(b []byte) ([]byte, error) {
   627  	if b == nil {
   628  		b = make([]byte, m.Size())
   629  	}
   630  	buf := codec.NewBuffer(b)
   631  	return buf.Bytes(), nil
   632  }
   633  func (m *MapParamGet) Unmarshal(b []byte) error {
   634  	return nil
   635  }
   636  
   637  // MapParamGetReply defines message 'map_param_get_reply'.
   638  type MapParamGetReply struct {
   639  	Retval                 int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
   640  	FragInner              uint8               `binapi:"u8,name=frag_inner" json:"frag_inner,omitempty"`
   641  	FragIgnoreDf           uint8               `binapi:"u8,name=frag_ignore_df" json:"frag_ignore_df,omitempty"`
   642  	ICMPIP4ErrRelaySrc     ip_types.IP4Address `binapi:"ip4_address,name=icmp_ip4_err_relay_src" json:"icmp_ip4_err_relay_src,omitempty"`
   643  	ICMP6EnableUnreachable bool                `binapi:"bool,name=icmp6_enable_unreachable" json:"icmp6_enable_unreachable,omitempty"`
   644  	IP4NhAddress           ip_types.IP4Address `binapi:"ip4_address,name=ip4_nh_address" json:"ip4_nh_address,omitempty"`
   645  	IP6NhAddress           ip_types.IP6Address `binapi:"ip6_address,name=ip6_nh_address" json:"ip6_nh_address,omitempty"`
   646  	IP4LifetimeMs          uint16              `binapi:"u16,name=ip4_lifetime_ms" json:"ip4_lifetime_ms,omitempty"`
   647  	IP4PoolSize            uint16              `binapi:"u16,name=ip4_pool_size" json:"ip4_pool_size,omitempty"`
   648  	IP4Buffers             uint32              `binapi:"u32,name=ip4_buffers" json:"ip4_buffers,omitempty"`
   649  	IP4HtRatio             float64             `binapi:"f64,name=ip4_ht_ratio" json:"ip4_ht_ratio,omitempty"`
   650  	SecCheckEnable         bool                `binapi:"bool,name=sec_check_enable" json:"sec_check_enable,omitempty"`
   651  	SecCheckFragments      bool                `binapi:"bool,name=sec_check_fragments" json:"sec_check_fragments,omitempty"`
   652  	TcCopy                 bool                `binapi:"bool,name=tc_copy" json:"tc_copy,omitempty"`
   653  	TcClass                uint8               `binapi:"u8,name=tc_class" json:"tc_class,omitempty"`
   654  }
   655  
   656  func (m *MapParamGetReply) Reset()               { *m = MapParamGetReply{} }
   657  func (*MapParamGetReply) GetMessageName() string { return "map_param_get_reply" }
   658  func (*MapParamGetReply) GetCrcString() string   { return "26272c90" }
   659  func (*MapParamGetReply) GetMessageType() api.MessageType {
   660  	return api.ReplyMessage
   661  }
   662  
   663  func (m *MapParamGetReply) Size() (size int) {
   664  	if m == nil {
   665  		return 0
   666  	}
   667  	size += 4      // m.Retval
   668  	size += 1      // m.FragInner
   669  	size += 1      // m.FragIgnoreDf
   670  	size += 1 * 4  // m.ICMPIP4ErrRelaySrc
   671  	size += 1      // m.ICMP6EnableUnreachable
   672  	size += 1 * 4  // m.IP4NhAddress
   673  	size += 1 * 16 // m.IP6NhAddress
   674  	size += 2      // m.IP4LifetimeMs
   675  	size += 2      // m.IP4PoolSize
   676  	size += 4      // m.IP4Buffers
   677  	size += 8      // m.IP4HtRatio
   678  	size += 1      // m.SecCheckEnable
   679  	size += 1      // m.SecCheckFragments
   680  	size += 1      // m.TcCopy
   681  	size += 1      // m.TcClass
   682  	return size
   683  }
   684  func (m *MapParamGetReply) Marshal(b []byte) ([]byte, error) {
   685  	if b == nil {
   686  		b = make([]byte, m.Size())
   687  	}
   688  	buf := codec.NewBuffer(b)
   689  	buf.EncodeInt32(m.Retval)
   690  	buf.EncodeUint8(m.FragInner)
   691  	buf.EncodeUint8(m.FragIgnoreDf)
   692  	buf.EncodeBytes(m.ICMPIP4ErrRelaySrc[:], 4)
   693  	buf.EncodeBool(m.ICMP6EnableUnreachable)
   694  	buf.EncodeBytes(m.IP4NhAddress[:], 4)
   695  	buf.EncodeBytes(m.IP6NhAddress[:], 16)
   696  	buf.EncodeUint16(m.IP4LifetimeMs)
   697  	buf.EncodeUint16(m.IP4PoolSize)
   698  	buf.EncodeUint32(m.IP4Buffers)
   699  	buf.EncodeFloat64(m.IP4HtRatio)
   700  	buf.EncodeBool(m.SecCheckEnable)
   701  	buf.EncodeBool(m.SecCheckFragments)
   702  	buf.EncodeBool(m.TcCopy)
   703  	buf.EncodeUint8(m.TcClass)
   704  	return buf.Bytes(), nil
   705  }
   706  func (m *MapParamGetReply) Unmarshal(b []byte) error {
   707  	buf := codec.NewBuffer(b)
   708  	m.Retval = buf.DecodeInt32()
   709  	m.FragInner = buf.DecodeUint8()
   710  	m.FragIgnoreDf = buf.DecodeUint8()
   711  	copy(m.ICMPIP4ErrRelaySrc[:], buf.DecodeBytes(4))
   712  	m.ICMP6EnableUnreachable = buf.DecodeBool()
   713  	copy(m.IP4NhAddress[:], buf.DecodeBytes(4))
   714  	copy(m.IP6NhAddress[:], buf.DecodeBytes(16))
   715  	m.IP4LifetimeMs = buf.DecodeUint16()
   716  	m.IP4PoolSize = buf.DecodeUint16()
   717  	m.IP4Buffers = buf.DecodeUint32()
   718  	m.IP4HtRatio = buf.DecodeFloat64()
   719  	m.SecCheckEnable = buf.DecodeBool()
   720  	m.SecCheckFragments = buf.DecodeBool()
   721  	m.TcCopy = buf.DecodeBool()
   722  	m.TcClass = buf.DecodeUint8()
   723  	return nil
   724  }
   725  
   726  // MapParamSetFragmentation defines message 'map_param_set_fragmentation'.
   727  type MapParamSetFragmentation struct {
   728  	Inner    bool `binapi:"bool,name=inner" json:"inner,omitempty"`
   729  	IgnoreDf bool `binapi:"bool,name=ignore_df" json:"ignore_df,omitempty"`
   730  }
   731  
   732  func (m *MapParamSetFragmentation) Reset()               { *m = MapParamSetFragmentation{} }
   733  func (*MapParamSetFragmentation) GetMessageName() string { return "map_param_set_fragmentation" }
   734  func (*MapParamSetFragmentation) GetCrcString() string   { return "9ff54d90" }
   735  func (*MapParamSetFragmentation) GetMessageType() api.MessageType {
   736  	return api.RequestMessage
   737  }
   738  
   739  func (m *MapParamSetFragmentation) Size() (size int) {
   740  	if m == nil {
   741  		return 0
   742  	}
   743  	size += 1 // m.Inner
   744  	size += 1 // m.IgnoreDf
   745  	return size
   746  }
   747  func (m *MapParamSetFragmentation) Marshal(b []byte) ([]byte, error) {
   748  	if b == nil {
   749  		b = make([]byte, m.Size())
   750  	}
   751  	buf := codec.NewBuffer(b)
   752  	buf.EncodeBool(m.Inner)
   753  	buf.EncodeBool(m.IgnoreDf)
   754  	return buf.Bytes(), nil
   755  }
   756  func (m *MapParamSetFragmentation) Unmarshal(b []byte) error {
   757  	buf := codec.NewBuffer(b)
   758  	m.Inner = buf.DecodeBool()
   759  	m.IgnoreDf = buf.DecodeBool()
   760  	return nil
   761  }
   762  
   763  // MapParamSetFragmentationReply defines message 'map_param_set_fragmentation_reply'.
   764  type MapParamSetFragmentationReply struct {
   765  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   766  }
   767  
   768  func (m *MapParamSetFragmentationReply) Reset() { *m = MapParamSetFragmentationReply{} }
   769  func (*MapParamSetFragmentationReply) GetMessageName() string {
   770  	return "map_param_set_fragmentation_reply"
   771  }
   772  func (*MapParamSetFragmentationReply) GetCrcString() string { return "e8d4e804" }
   773  func (*MapParamSetFragmentationReply) GetMessageType() api.MessageType {
   774  	return api.ReplyMessage
   775  }
   776  
   777  func (m *MapParamSetFragmentationReply) Size() (size int) {
   778  	if m == nil {
   779  		return 0
   780  	}
   781  	size += 4 // m.Retval
   782  	return size
   783  }
   784  func (m *MapParamSetFragmentationReply) Marshal(b []byte) ([]byte, error) {
   785  	if b == nil {
   786  		b = make([]byte, m.Size())
   787  	}
   788  	buf := codec.NewBuffer(b)
   789  	buf.EncodeInt32(m.Retval)
   790  	return buf.Bytes(), nil
   791  }
   792  func (m *MapParamSetFragmentationReply) Unmarshal(b []byte) error {
   793  	buf := codec.NewBuffer(b)
   794  	m.Retval = buf.DecodeInt32()
   795  	return nil
   796  }
   797  
   798  // MapParamSetICMP defines message 'map_param_set_icmp'.
   799  type MapParamSetICMP struct {
   800  	IP4ErrRelaySrc ip_types.IP4Address `binapi:"ip4_address,name=ip4_err_relay_src" json:"ip4_err_relay_src,omitempty"`
   801  }
   802  
   803  func (m *MapParamSetICMP) Reset()               { *m = MapParamSetICMP{} }
   804  func (*MapParamSetICMP) GetMessageName() string { return "map_param_set_icmp" }
   805  func (*MapParamSetICMP) GetCrcString() string   { return "58210cbf" }
   806  func (*MapParamSetICMP) GetMessageType() api.MessageType {
   807  	return api.RequestMessage
   808  }
   809  
   810  func (m *MapParamSetICMP) Size() (size int) {
   811  	if m == nil {
   812  		return 0
   813  	}
   814  	size += 1 * 4 // m.IP4ErrRelaySrc
   815  	return size
   816  }
   817  func (m *MapParamSetICMP) Marshal(b []byte) ([]byte, error) {
   818  	if b == nil {
   819  		b = make([]byte, m.Size())
   820  	}
   821  	buf := codec.NewBuffer(b)
   822  	buf.EncodeBytes(m.IP4ErrRelaySrc[:], 4)
   823  	return buf.Bytes(), nil
   824  }
   825  func (m *MapParamSetICMP) Unmarshal(b []byte) error {
   826  	buf := codec.NewBuffer(b)
   827  	copy(m.IP4ErrRelaySrc[:], buf.DecodeBytes(4))
   828  	return nil
   829  }
   830  
   831  // MapParamSetICMP6 defines message 'map_param_set_icmp6'.
   832  type MapParamSetICMP6 struct {
   833  	EnableUnreachable bool `binapi:"bool,name=enable_unreachable" json:"enable_unreachable,omitempty"`
   834  }
   835  
   836  func (m *MapParamSetICMP6) Reset()               { *m = MapParamSetICMP6{} }
   837  func (*MapParamSetICMP6) GetMessageName() string { return "map_param_set_icmp6" }
   838  func (*MapParamSetICMP6) GetCrcString() string   { return "5d01f8c1" }
   839  func (*MapParamSetICMP6) GetMessageType() api.MessageType {
   840  	return api.RequestMessage
   841  }
   842  
   843  func (m *MapParamSetICMP6) Size() (size int) {
   844  	if m == nil {
   845  		return 0
   846  	}
   847  	size += 1 // m.EnableUnreachable
   848  	return size
   849  }
   850  func (m *MapParamSetICMP6) Marshal(b []byte) ([]byte, error) {
   851  	if b == nil {
   852  		b = make([]byte, m.Size())
   853  	}
   854  	buf := codec.NewBuffer(b)
   855  	buf.EncodeBool(m.EnableUnreachable)
   856  	return buf.Bytes(), nil
   857  }
   858  func (m *MapParamSetICMP6) Unmarshal(b []byte) error {
   859  	buf := codec.NewBuffer(b)
   860  	m.EnableUnreachable = buf.DecodeBool()
   861  	return nil
   862  }
   863  
   864  // MapParamSetICMP6Reply defines message 'map_param_set_icmp6_reply'.
   865  type MapParamSetICMP6Reply struct {
   866  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   867  }
   868  
   869  func (m *MapParamSetICMP6Reply) Reset()               { *m = MapParamSetICMP6Reply{} }
   870  func (*MapParamSetICMP6Reply) GetMessageName() string { return "map_param_set_icmp6_reply" }
   871  func (*MapParamSetICMP6Reply) GetCrcString() string   { return "e8d4e804" }
   872  func (*MapParamSetICMP6Reply) GetMessageType() api.MessageType {
   873  	return api.ReplyMessage
   874  }
   875  
   876  func (m *MapParamSetICMP6Reply) Size() (size int) {
   877  	if m == nil {
   878  		return 0
   879  	}
   880  	size += 4 // m.Retval
   881  	return size
   882  }
   883  func (m *MapParamSetICMP6Reply) Marshal(b []byte) ([]byte, error) {
   884  	if b == nil {
   885  		b = make([]byte, m.Size())
   886  	}
   887  	buf := codec.NewBuffer(b)
   888  	buf.EncodeInt32(m.Retval)
   889  	return buf.Bytes(), nil
   890  }
   891  func (m *MapParamSetICMP6Reply) Unmarshal(b []byte) error {
   892  	buf := codec.NewBuffer(b)
   893  	m.Retval = buf.DecodeInt32()
   894  	return nil
   895  }
   896  
   897  // MapParamSetICMPReply defines message 'map_param_set_icmp_reply'.
   898  type MapParamSetICMPReply struct {
   899  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   900  }
   901  
   902  func (m *MapParamSetICMPReply) Reset()               { *m = MapParamSetICMPReply{} }
   903  func (*MapParamSetICMPReply) GetMessageName() string { return "map_param_set_icmp_reply" }
   904  func (*MapParamSetICMPReply) GetCrcString() string   { return "e8d4e804" }
   905  func (*MapParamSetICMPReply) GetMessageType() api.MessageType {
   906  	return api.ReplyMessage
   907  }
   908  
   909  func (m *MapParamSetICMPReply) Size() (size int) {
   910  	if m == nil {
   911  		return 0
   912  	}
   913  	size += 4 // m.Retval
   914  	return size
   915  }
   916  func (m *MapParamSetICMPReply) Marshal(b []byte) ([]byte, error) {
   917  	if b == nil {
   918  		b = make([]byte, m.Size())
   919  	}
   920  	buf := codec.NewBuffer(b)
   921  	buf.EncodeInt32(m.Retval)
   922  	return buf.Bytes(), nil
   923  }
   924  func (m *MapParamSetICMPReply) Unmarshal(b []byte) error {
   925  	buf := codec.NewBuffer(b)
   926  	m.Retval = buf.DecodeInt32()
   927  	return nil
   928  }
   929  
   930  // MapParamSetSecurityCheck defines message 'map_param_set_security_check'.
   931  type MapParamSetSecurityCheck struct {
   932  	Enable    bool `binapi:"bool,name=enable" json:"enable,omitempty"`
   933  	Fragments bool `binapi:"bool,name=fragments" json:"fragments,omitempty"`
   934  }
   935  
   936  func (m *MapParamSetSecurityCheck) Reset()               { *m = MapParamSetSecurityCheck{} }
   937  func (*MapParamSetSecurityCheck) GetMessageName() string { return "map_param_set_security_check" }
   938  func (*MapParamSetSecurityCheck) GetCrcString() string   { return "6abe9836" }
   939  func (*MapParamSetSecurityCheck) GetMessageType() api.MessageType {
   940  	return api.RequestMessage
   941  }
   942  
   943  func (m *MapParamSetSecurityCheck) Size() (size int) {
   944  	if m == nil {
   945  		return 0
   946  	}
   947  	size += 1 // m.Enable
   948  	size += 1 // m.Fragments
   949  	return size
   950  }
   951  func (m *MapParamSetSecurityCheck) Marshal(b []byte) ([]byte, error) {
   952  	if b == nil {
   953  		b = make([]byte, m.Size())
   954  	}
   955  	buf := codec.NewBuffer(b)
   956  	buf.EncodeBool(m.Enable)
   957  	buf.EncodeBool(m.Fragments)
   958  	return buf.Bytes(), nil
   959  }
   960  func (m *MapParamSetSecurityCheck) Unmarshal(b []byte) error {
   961  	buf := codec.NewBuffer(b)
   962  	m.Enable = buf.DecodeBool()
   963  	m.Fragments = buf.DecodeBool()
   964  	return nil
   965  }
   966  
   967  // MapParamSetSecurityCheckReply defines message 'map_param_set_security_check_reply'.
   968  type MapParamSetSecurityCheckReply struct {
   969  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   970  }
   971  
   972  func (m *MapParamSetSecurityCheckReply) Reset() { *m = MapParamSetSecurityCheckReply{} }
   973  func (*MapParamSetSecurityCheckReply) GetMessageName() string {
   974  	return "map_param_set_security_check_reply"
   975  }
   976  func (*MapParamSetSecurityCheckReply) GetCrcString() string { return "e8d4e804" }
   977  func (*MapParamSetSecurityCheckReply) GetMessageType() api.MessageType {
   978  	return api.ReplyMessage
   979  }
   980  
   981  func (m *MapParamSetSecurityCheckReply) Size() (size int) {
   982  	if m == nil {
   983  		return 0
   984  	}
   985  	size += 4 // m.Retval
   986  	return size
   987  }
   988  func (m *MapParamSetSecurityCheckReply) Marshal(b []byte) ([]byte, error) {
   989  	if b == nil {
   990  		b = make([]byte, m.Size())
   991  	}
   992  	buf := codec.NewBuffer(b)
   993  	buf.EncodeInt32(m.Retval)
   994  	return buf.Bytes(), nil
   995  }
   996  func (m *MapParamSetSecurityCheckReply) Unmarshal(b []byte) error {
   997  	buf := codec.NewBuffer(b)
   998  	m.Retval = buf.DecodeInt32()
   999  	return nil
  1000  }
  1001  
  1002  // MapParamSetTCP defines message 'map_param_set_tcp'.
  1003  type MapParamSetTCP struct {
  1004  	TCPMss uint16 `binapi:"u16,name=tcp_mss" json:"tcp_mss,omitempty"`
  1005  }
  1006  
  1007  func (m *MapParamSetTCP) Reset()               { *m = MapParamSetTCP{} }
  1008  func (*MapParamSetTCP) GetMessageName() string { return "map_param_set_tcp" }
  1009  func (*MapParamSetTCP) GetCrcString() string   { return "87a825d9" }
  1010  func (*MapParamSetTCP) GetMessageType() api.MessageType {
  1011  	return api.RequestMessage
  1012  }
  1013  
  1014  func (m *MapParamSetTCP) Size() (size int) {
  1015  	if m == nil {
  1016  		return 0
  1017  	}
  1018  	size += 2 // m.TCPMss
  1019  	return size
  1020  }
  1021  func (m *MapParamSetTCP) Marshal(b []byte) ([]byte, error) {
  1022  	if b == nil {
  1023  		b = make([]byte, m.Size())
  1024  	}
  1025  	buf := codec.NewBuffer(b)
  1026  	buf.EncodeUint16(m.TCPMss)
  1027  	return buf.Bytes(), nil
  1028  }
  1029  func (m *MapParamSetTCP) Unmarshal(b []byte) error {
  1030  	buf := codec.NewBuffer(b)
  1031  	m.TCPMss = buf.DecodeUint16()
  1032  	return nil
  1033  }
  1034  
  1035  // MapParamSetTCPReply defines message 'map_param_set_tcp_reply'.
  1036  type MapParamSetTCPReply struct {
  1037  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1038  }
  1039  
  1040  func (m *MapParamSetTCPReply) Reset()               { *m = MapParamSetTCPReply{} }
  1041  func (*MapParamSetTCPReply) GetMessageName() string { return "map_param_set_tcp_reply" }
  1042  func (*MapParamSetTCPReply) GetCrcString() string   { return "e8d4e804" }
  1043  func (*MapParamSetTCPReply) GetMessageType() api.MessageType {
  1044  	return api.ReplyMessage
  1045  }
  1046  
  1047  func (m *MapParamSetTCPReply) Size() (size int) {
  1048  	if m == nil {
  1049  		return 0
  1050  	}
  1051  	size += 4 // m.Retval
  1052  	return size
  1053  }
  1054  func (m *MapParamSetTCPReply) Marshal(b []byte) ([]byte, error) {
  1055  	if b == nil {
  1056  		b = make([]byte, m.Size())
  1057  	}
  1058  	buf := codec.NewBuffer(b)
  1059  	buf.EncodeInt32(m.Retval)
  1060  	return buf.Bytes(), nil
  1061  }
  1062  func (m *MapParamSetTCPReply) Unmarshal(b []byte) error {
  1063  	buf := codec.NewBuffer(b)
  1064  	m.Retval = buf.DecodeInt32()
  1065  	return nil
  1066  }
  1067  
  1068  // MapParamSetTrafficClass defines message 'map_param_set_traffic_class'.
  1069  type MapParamSetTrafficClass struct {
  1070  	Copy    bool  `binapi:"bool,name=copy" json:"copy,omitempty"`
  1071  	TcClass uint8 `binapi:"u8,name=tc_class" json:"tc_class,omitempty"`
  1072  }
  1073  
  1074  func (m *MapParamSetTrafficClass) Reset()               { *m = MapParamSetTrafficClass{} }
  1075  func (*MapParamSetTrafficClass) GetMessageName() string { return "map_param_set_traffic_class" }
  1076  func (*MapParamSetTrafficClass) GetCrcString() string   { return "9cac455c" }
  1077  func (*MapParamSetTrafficClass) GetMessageType() api.MessageType {
  1078  	return api.RequestMessage
  1079  }
  1080  
  1081  func (m *MapParamSetTrafficClass) Size() (size int) {
  1082  	if m == nil {
  1083  		return 0
  1084  	}
  1085  	size += 1 // m.Copy
  1086  	size += 1 // m.TcClass
  1087  	return size
  1088  }
  1089  func (m *MapParamSetTrafficClass) Marshal(b []byte) ([]byte, error) {
  1090  	if b == nil {
  1091  		b = make([]byte, m.Size())
  1092  	}
  1093  	buf := codec.NewBuffer(b)
  1094  	buf.EncodeBool(m.Copy)
  1095  	buf.EncodeUint8(m.TcClass)
  1096  	return buf.Bytes(), nil
  1097  }
  1098  func (m *MapParamSetTrafficClass) Unmarshal(b []byte) error {
  1099  	buf := codec.NewBuffer(b)
  1100  	m.Copy = buf.DecodeBool()
  1101  	m.TcClass = buf.DecodeUint8()
  1102  	return nil
  1103  }
  1104  
  1105  // MapParamSetTrafficClassReply defines message 'map_param_set_traffic_class_reply'.
  1106  type MapParamSetTrafficClassReply struct {
  1107  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1108  }
  1109  
  1110  func (m *MapParamSetTrafficClassReply) Reset() { *m = MapParamSetTrafficClassReply{} }
  1111  func (*MapParamSetTrafficClassReply) GetMessageName() string {
  1112  	return "map_param_set_traffic_class_reply"
  1113  }
  1114  func (*MapParamSetTrafficClassReply) GetCrcString() string { return "e8d4e804" }
  1115  func (*MapParamSetTrafficClassReply) GetMessageType() api.MessageType {
  1116  	return api.ReplyMessage
  1117  }
  1118  
  1119  func (m *MapParamSetTrafficClassReply) Size() (size int) {
  1120  	if m == nil {
  1121  		return 0
  1122  	}
  1123  	size += 4 // m.Retval
  1124  	return size
  1125  }
  1126  func (m *MapParamSetTrafficClassReply) Marshal(b []byte) ([]byte, error) {
  1127  	if b == nil {
  1128  		b = make([]byte, m.Size())
  1129  	}
  1130  	buf := codec.NewBuffer(b)
  1131  	buf.EncodeInt32(m.Retval)
  1132  	return buf.Bytes(), nil
  1133  }
  1134  func (m *MapParamSetTrafficClassReply) Unmarshal(b []byte) error {
  1135  	buf := codec.NewBuffer(b)
  1136  	m.Retval = buf.DecodeInt32()
  1137  	return nil
  1138  }
  1139  
  1140  // MapRuleDetails defines message 'map_rule_details'.
  1141  type MapRuleDetails struct {
  1142  	IP6Dst ip_types.IP6Address `binapi:"ip6_address,name=ip6_dst" json:"ip6_dst,omitempty"`
  1143  	Psid   uint16              `binapi:"u16,name=psid" json:"psid,omitempty"`
  1144  }
  1145  
  1146  func (m *MapRuleDetails) Reset()               { *m = MapRuleDetails{} }
  1147  func (*MapRuleDetails) GetMessageName() string { return "map_rule_details" }
  1148  func (*MapRuleDetails) GetCrcString() string   { return "c7cbeea5" }
  1149  func (*MapRuleDetails) GetMessageType() api.MessageType {
  1150  	return api.ReplyMessage
  1151  }
  1152  
  1153  func (m *MapRuleDetails) Size() (size int) {
  1154  	if m == nil {
  1155  		return 0
  1156  	}
  1157  	size += 1 * 16 // m.IP6Dst
  1158  	size += 2      // m.Psid
  1159  	return size
  1160  }
  1161  func (m *MapRuleDetails) Marshal(b []byte) ([]byte, error) {
  1162  	if b == nil {
  1163  		b = make([]byte, m.Size())
  1164  	}
  1165  	buf := codec.NewBuffer(b)
  1166  	buf.EncodeBytes(m.IP6Dst[:], 16)
  1167  	buf.EncodeUint16(m.Psid)
  1168  	return buf.Bytes(), nil
  1169  }
  1170  func (m *MapRuleDetails) Unmarshal(b []byte) error {
  1171  	buf := codec.NewBuffer(b)
  1172  	copy(m.IP6Dst[:], buf.DecodeBytes(16))
  1173  	m.Psid = buf.DecodeUint16()
  1174  	return nil
  1175  }
  1176  
  1177  // MapRuleDump defines message 'map_rule_dump'.
  1178  type MapRuleDump struct {
  1179  	DomainIndex uint32 `binapi:"u32,name=domain_index" json:"domain_index,omitempty"`
  1180  }
  1181  
  1182  func (m *MapRuleDump) Reset()               { *m = MapRuleDump{} }
  1183  func (*MapRuleDump) GetMessageName() string { return "map_rule_dump" }
  1184  func (*MapRuleDump) GetCrcString() string   { return "e43e6ff6" }
  1185  func (*MapRuleDump) GetMessageType() api.MessageType {
  1186  	return api.RequestMessage
  1187  }
  1188  
  1189  func (m *MapRuleDump) Size() (size int) {
  1190  	if m == nil {
  1191  		return 0
  1192  	}
  1193  	size += 4 // m.DomainIndex
  1194  	return size
  1195  }
  1196  func (m *MapRuleDump) Marshal(b []byte) ([]byte, error) {
  1197  	if b == nil {
  1198  		b = make([]byte, m.Size())
  1199  	}
  1200  	buf := codec.NewBuffer(b)
  1201  	buf.EncodeUint32(m.DomainIndex)
  1202  	return buf.Bytes(), nil
  1203  }
  1204  func (m *MapRuleDump) Unmarshal(b []byte) error {
  1205  	buf := codec.NewBuffer(b)
  1206  	m.DomainIndex = buf.DecodeUint32()
  1207  	return nil
  1208  }
  1209  
  1210  // MapSummaryStats defines message 'map_summary_stats'.
  1211  type MapSummaryStats struct{}
  1212  
  1213  func (m *MapSummaryStats) Reset()               { *m = MapSummaryStats{} }
  1214  func (*MapSummaryStats) GetMessageName() string { return "map_summary_stats" }
  1215  func (*MapSummaryStats) GetCrcString() string   { return "51077d14" }
  1216  func (*MapSummaryStats) GetMessageType() api.MessageType {
  1217  	return api.RequestMessage
  1218  }
  1219  
  1220  func (m *MapSummaryStats) Size() (size int) {
  1221  	if m == nil {
  1222  		return 0
  1223  	}
  1224  	return size
  1225  }
  1226  func (m *MapSummaryStats) Marshal(b []byte) ([]byte, error) {
  1227  	if b == nil {
  1228  		b = make([]byte, m.Size())
  1229  	}
  1230  	buf := codec.NewBuffer(b)
  1231  	return buf.Bytes(), nil
  1232  }
  1233  func (m *MapSummaryStats) Unmarshal(b []byte) error {
  1234  	return nil
  1235  }
  1236  
  1237  // MapSummaryStatsReply defines message 'map_summary_stats_reply'.
  1238  type MapSummaryStatsReply struct {
  1239  	Retval             int32    `binapi:"i32,name=retval" json:"retval,omitempty"`
  1240  	TotalBindings      uint64   `binapi:"u64,name=total_bindings" json:"total_bindings,omitempty"`
  1241  	TotalPkts          []uint64 `binapi:"u64[2],name=total_pkts" json:"total_pkts,omitempty"`
  1242  	TotalBytes         []uint64 `binapi:"u64[2],name=total_bytes" json:"total_bytes,omitempty"`
  1243  	TotalIP4Fragments  uint64   `binapi:"u64,name=total_ip4_fragments" json:"total_ip4_fragments,omitempty"`
  1244  	TotalSecurityCheck []uint64 `binapi:"u64[2],name=total_security_check" json:"total_security_check,omitempty"`
  1245  }
  1246  
  1247  func (m *MapSummaryStatsReply) Reset()               { *m = MapSummaryStatsReply{} }
  1248  func (*MapSummaryStatsReply) GetMessageName() string { return "map_summary_stats_reply" }
  1249  func (*MapSummaryStatsReply) GetCrcString() string   { return "0e4ace0e" }
  1250  func (*MapSummaryStatsReply) GetMessageType() api.MessageType {
  1251  	return api.ReplyMessage
  1252  }
  1253  
  1254  func (m *MapSummaryStatsReply) Size() (size int) {
  1255  	if m == nil {
  1256  		return 0
  1257  	}
  1258  	size += 4     // m.Retval
  1259  	size += 8     // m.TotalBindings
  1260  	size += 8 * 2 // m.TotalPkts
  1261  	size += 8 * 2 // m.TotalBytes
  1262  	size += 8     // m.TotalIP4Fragments
  1263  	size += 8 * 2 // m.TotalSecurityCheck
  1264  	return size
  1265  }
  1266  func (m *MapSummaryStatsReply) Marshal(b []byte) ([]byte, error) {
  1267  	if b == nil {
  1268  		b = make([]byte, m.Size())
  1269  	}
  1270  	buf := codec.NewBuffer(b)
  1271  	buf.EncodeInt32(m.Retval)
  1272  	buf.EncodeUint64(m.TotalBindings)
  1273  	for i := 0; i < 2; i++ {
  1274  		var x uint64
  1275  		if i < len(m.TotalPkts) {
  1276  			x = uint64(m.TotalPkts[i])
  1277  		}
  1278  		buf.EncodeUint64(x)
  1279  	}
  1280  	for i := 0; i < 2; i++ {
  1281  		var x uint64
  1282  		if i < len(m.TotalBytes) {
  1283  			x = uint64(m.TotalBytes[i])
  1284  		}
  1285  		buf.EncodeUint64(x)
  1286  	}
  1287  	buf.EncodeUint64(m.TotalIP4Fragments)
  1288  	for i := 0; i < 2; i++ {
  1289  		var x uint64
  1290  		if i < len(m.TotalSecurityCheck) {
  1291  			x = uint64(m.TotalSecurityCheck[i])
  1292  		}
  1293  		buf.EncodeUint64(x)
  1294  	}
  1295  	return buf.Bytes(), nil
  1296  }
  1297  func (m *MapSummaryStatsReply) Unmarshal(b []byte) error {
  1298  	buf := codec.NewBuffer(b)
  1299  	m.Retval = buf.DecodeInt32()
  1300  	m.TotalBindings = buf.DecodeUint64()
  1301  	m.TotalPkts = make([]uint64, 2)
  1302  	for i := 0; i < len(m.TotalPkts); i++ {
  1303  		m.TotalPkts[i] = buf.DecodeUint64()
  1304  	}
  1305  	m.TotalBytes = make([]uint64, 2)
  1306  	for i := 0; i < len(m.TotalBytes); i++ {
  1307  		m.TotalBytes[i] = buf.DecodeUint64()
  1308  	}
  1309  	m.TotalIP4Fragments = buf.DecodeUint64()
  1310  	m.TotalSecurityCheck = make([]uint64, 2)
  1311  	for i := 0; i < len(m.TotalSecurityCheck); i++ {
  1312  		m.TotalSecurityCheck[i] = buf.DecodeUint64()
  1313  	}
  1314  	return nil
  1315  }
  1316  
  1317  func init() { file_maps_binapi_init() }
  1318  func file_maps_binapi_init() {
  1319  	api.RegisterMessage((*MapAddDelRule)(nil), "map_add_del_rule_c65b32f7")
  1320  	api.RegisterMessage((*MapAddDelRuleReply)(nil), "map_add_del_rule_reply_e8d4e804")
  1321  	api.RegisterMessage((*MapAddDomain)(nil), "map_add_domain_249f195c")
  1322  	api.RegisterMessage((*MapAddDomainReply)(nil), "map_add_domain_reply_3e6d4e2c")
  1323  	api.RegisterMessage((*MapDelDomain)(nil), "map_del_domain_8ac76db6")
  1324  	api.RegisterMessage((*MapDelDomainReply)(nil), "map_del_domain_reply_e8d4e804")
  1325  	api.RegisterMessage((*MapDomainDetails)(nil), "map_domain_details_796edb50")
  1326  	api.RegisterMessage((*MapDomainDump)(nil), "map_domain_dump_51077d14")
  1327  	api.RegisterMessage((*MapDomainsGet)(nil), "map_domains_get_f75ba505")
  1328  	api.RegisterMessage((*MapDomainsGetReply)(nil), "map_domains_get_reply_53b48f5d")
  1329  	api.RegisterMessage((*MapIfEnableDisable)(nil), "map_if_enable_disable_59bb32f4")
  1330  	api.RegisterMessage((*MapIfEnableDisableReply)(nil), "map_if_enable_disable_reply_e8d4e804")
  1331  	api.RegisterMessage((*MapParamAddDelPreResolve)(nil), "map_param_add_del_pre_resolve_dae5af03")
  1332  	api.RegisterMessage((*MapParamAddDelPreResolveReply)(nil), "map_param_add_del_pre_resolve_reply_e8d4e804")
  1333  	api.RegisterMessage((*MapParamGet)(nil), "map_param_get_51077d14")
  1334  	api.RegisterMessage((*MapParamGetReply)(nil), "map_param_get_reply_26272c90")
  1335  	api.RegisterMessage((*MapParamSetFragmentation)(nil), "map_param_set_fragmentation_9ff54d90")
  1336  	api.RegisterMessage((*MapParamSetFragmentationReply)(nil), "map_param_set_fragmentation_reply_e8d4e804")
  1337  	api.RegisterMessage((*MapParamSetICMP)(nil), "map_param_set_icmp_58210cbf")
  1338  	api.RegisterMessage((*MapParamSetICMP6)(nil), "map_param_set_icmp6_5d01f8c1")
  1339  	api.RegisterMessage((*MapParamSetICMP6Reply)(nil), "map_param_set_icmp6_reply_e8d4e804")
  1340  	api.RegisterMessage((*MapParamSetICMPReply)(nil), "map_param_set_icmp_reply_e8d4e804")
  1341  	api.RegisterMessage((*MapParamSetSecurityCheck)(nil), "map_param_set_security_check_6abe9836")
  1342  	api.RegisterMessage((*MapParamSetSecurityCheckReply)(nil), "map_param_set_security_check_reply_e8d4e804")
  1343  	api.RegisterMessage((*MapParamSetTCP)(nil), "map_param_set_tcp_87a825d9")
  1344  	api.RegisterMessage((*MapParamSetTCPReply)(nil), "map_param_set_tcp_reply_e8d4e804")
  1345  	api.RegisterMessage((*MapParamSetTrafficClass)(nil), "map_param_set_traffic_class_9cac455c")
  1346  	api.RegisterMessage((*MapParamSetTrafficClassReply)(nil), "map_param_set_traffic_class_reply_e8d4e804")
  1347  	api.RegisterMessage((*MapRuleDetails)(nil), "map_rule_details_c7cbeea5")
  1348  	api.RegisterMessage((*MapRuleDump)(nil), "map_rule_dump_e43e6ff6")
  1349  	api.RegisterMessage((*MapSummaryStats)(nil), "map_summary_stats_51077d14")
  1350  	api.RegisterMessage((*MapSummaryStatsReply)(nil), "map_summary_stats_reply_0e4ace0e")
  1351  }
  1352  
  1353  // Messages returns list of all messages in this module.
  1354  func AllMessages() []api.Message {
  1355  	return []api.Message{
  1356  		(*MapAddDelRule)(nil),
  1357  		(*MapAddDelRuleReply)(nil),
  1358  		(*MapAddDomain)(nil),
  1359  		(*MapAddDomainReply)(nil),
  1360  		(*MapDelDomain)(nil),
  1361  		(*MapDelDomainReply)(nil),
  1362  		(*MapDomainDetails)(nil),
  1363  		(*MapDomainDump)(nil),
  1364  		(*MapDomainsGet)(nil),
  1365  		(*MapDomainsGetReply)(nil),
  1366  		(*MapIfEnableDisable)(nil),
  1367  		(*MapIfEnableDisableReply)(nil),
  1368  		(*MapParamAddDelPreResolve)(nil),
  1369  		(*MapParamAddDelPreResolveReply)(nil),
  1370  		(*MapParamGet)(nil),
  1371  		(*MapParamGetReply)(nil),
  1372  		(*MapParamSetFragmentation)(nil),
  1373  		(*MapParamSetFragmentationReply)(nil),
  1374  		(*MapParamSetICMP)(nil),
  1375  		(*MapParamSetICMP6)(nil),
  1376  		(*MapParamSetICMP6Reply)(nil),
  1377  		(*MapParamSetICMPReply)(nil),
  1378  		(*MapParamSetSecurityCheck)(nil),
  1379  		(*MapParamSetSecurityCheckReply)(nil),
  1380  		(*MapParamSetTCP)(nil),
  1381  		(*MapParamSetTCPReply)(nil),
  1382  		(*MapParamSetTrafficClass)(nil),
  1383  		(*MapParamSetTrafficClassReply)(nil),
  1384  		(*MapRuleDetails)(nil),
  1385  		(*MapRuleDump)(nil),
  1386  		(*MapSummaryStats)(nil),
  1387  		(*MapSummaryStatsReply)(nil),
  1388  	}
  1389  }