go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2106/acl/acl.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  
     3  // Package acl contains generated bindings for API file acl.api.
     4  //
     5  // Contents:
     6  // - 38 messages
     7  package acl
     8  
     9  import (
    10  	api "go.fd.io/govpp/api"
    11  	codec "go.fd.io/govpp/codec"
    12  	acl_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/acl_types"
    13  	_ "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/ethernet_types"
    14  	interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/interface_types"
    15  	ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/ip_types"
    16  )
    17  
    18  // This is a compile-time assertion to ensure that this generated file
    19  // is compatible with the GoVPP api package it is being compiled against.
    20  // A compilation error at this line likely means your copy of the
    21  // GoVPP api package needs to be updated.
    22  const _ = api.GoVppAPIPackageIsVersion2
    23  
    24  const (
    25  	APIFile    = "acl"
    26  	APIVersion = "2.0.0"
    27  	VersionCrc = 0x4a805ebc
    28  )
    29  
    30  // ACLAddReplace defines message 'acl_add_replace'.
    31  type ACLAddReplace struct {
    32  	ACLIndex uint32              `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
    33  	Tag      string              `binapi:"string[64],name=tag" json:"tag,omitempty"`
    34  	Count    uint32              `binapi:"u32,name=count" json:"-"`
    35  	R        []acl_types.ACLRule `binapi:"acl_rule[count],name=r" json:"r,omitempty"`
    36  }
    37  
    38  func (m *ACLAddReplace) Reset()               { *m = ACLAddReplace{} }
    39  func (*ACLAddReplace) GetMessageName() string { return "acl_add_replace" }
    40  func (*ACLAddReplace) GetCrcString() string   { return "ee5c2f18" }
    41  func (*ACLAddReplace) GetMessageType() api.MessageType {
    42  	return api.RequestMessage
    43  }
    44  
    45  func (m *ACLAddReplace) Size() (size int) {
    46  	if m == nil {
    47  		return 0
    48  	}
    49  	size += 4  // m.ACLIndex
    50  	size += 64 // m.Tag
    51  	size += 4  // m.Count
    52  	for j1 := 0; j1 < len(m.R); j1++ {
    53  		var s1 acl_types.ACLRule
    54  		_ = s1
    55  		if j1 < len(m.R) {
    56  			s1 = m.R[j1]
    57  		}
    58  		size += 1      // s1.IsPermit
    59  		size += 1      // s1.SrcPrefix.Address.Af
    60  		size += 1 * 16 // s1.SrcPrefix.Address.Un
    61  		size += 1      // s1.SrcPrefix.Len
    62  		size += 1      // s1.DstPrefix.Address.Af
    63  		size += 1 * 16 // s1.DstPrefix.Address.Un
    64  		size += 1      // s1.DstPrefix.Len
    65  		size += 1      // s1.Proto
    66  		size += 2      // s1.SrcportOrIcmptypeFirst
    67  		size += 2      // s1.SrcportOrIcmptypeLast
    68  		size += 2      // s1.DstportOrIcmpcodeFirst
    69  		size += 2      // s1.DstportOrIcmpcodeLast
    70  		size += 1      // s1.TCPFlagsMask
    71  		size += 1      // s1.TCPFlagsValue
    72  	}
    73  	return size
    74  }
    75  func (m *ACLAddReplace) Marshal(b []byte) ([]byte, error) {
    76  	if b == nil {
    77  		b = make([]byte, m.Size())
    78  	}
    79  	buf := codec.NewBuffer(b)
    80  	buf.EncodeUint32(m.ACLIndex)
    81  	buf.EncodeString(m.Tag, 64)
    82  	buf.EncodeUint32(uint32(len(m.R)))
    83  	for j0 := 0; j0 < len(m.R); j0++ {
    84  		var v0 acl_types.ACLRule // R
    85  		if j0 < len(m.R) {
    86  			v0 = m.R[j0]
    87  		}
    88  		buf.EncodeUint8(uint8(v0.IsPermit))
    89  		buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af))
    90  		buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 16)
    91  		buf.EncodeUint8(v0.SrcPrefix.Len)
    92  		buf.EncodeUint8(uint8(v0.DstPrefix.Address.Af))
    93  		buf.EncodeBytes(v0.DstPrefix.Address.Un.XXX_UnionData[:], 16)
    94  		buf.EncodeUint8(v0.DstPrefix.Len)
    95  		buf.EncodeUint8(uint8(v0.Proto))
    96  		buf.EncodeUint16(v0.SrcportOrIcmptypeFirst)
    97  		buf.EncodeUint16(v0.SrcportOrIcmptypeLast)
    98  		buf.EncodeUint16(v0.DstportOrIcmpcodeFirst)
    99  		buf.EncodeUint16(v0.DstportOrIcmpcodeLast)
   100  		buf.EncodeUint8(v0.TCPFlagsMask)
   101  		buf.EncodeUint8(v0.TCPFlagsValue)
   102  	}
   103  	return buf.Bytes(), nil
   104  }
   105  func (m *ACLAddReplace) Unmarshal(b []byte) error {
   106  	buf := codec.NewBuffer(b)
   107  	m.ACLIndex = buf.DecodeUint32()
   108  	m.Tag = buf.DecodeString(64)
   109  	m.Count = buf.DecodeUint32()
   110  	m.R = make([]acl_types.ACLRule, m.Count)
   111  	for j0 := 0; j0 < len(m.R); j0++ {
   112  		m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8())
   113  		m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
   114  		copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   115  		m.R[j0].SrcPrefix.Len = buf.DecodeUint8()
   116  		m.R[j0].DstPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
   117  		copy(m.R[j0].DstPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   118  		m.R[j0].DstPrefix.Len = buf.DecodeUint8()
   119  		m.R[j0].Proto = ip_types.IPProto(buf.DecodeUint8())
   120  		m.R[j0].SrcportOrIcmptypeFirst = buf.DecodeUint16()
   121  		m.R[j0].SrcportOrIcmptypeLast = buf.DecodeUint16()
   122  		m.R[j0].DstportOrIcmpcodeFirst = buf.DecodeUint16()
   123  		m.R[j0].DstportOrIcmpcodeLast = buf.DecodeUint16()
   124  		m.R[j0].TCPFlagsMask = buf.DecodeUint8()
   125  		m.R[j0].TCPFlagsValue = buf.DecodeUint8()
   126  	}
   127  	return nil
   128  }
   129  
   130  // ACLAddReplaceReply defines message 'acl_add_replace_reply'.
   131  type ACLAddReplaceReply struct {
   132  	ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
   133  	Retval   int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   134  }
   135  
   136  func (m *ACLAddReplaceReply) Reset()               { *m = ACLAddReplaceReply{} }
   137  func (*ACLAddReplaceReply) GetMessageName() string { return "acl_add_replace_reply" }
   138  func (*ACLAddReplaceReply) GetCrcString() string   { return "ac407b0c" }
   139  func (*ACLAddReplaceReply) GetMessageType() api.MessageType {
   140  	return api.ReplyMessage
   141  }
   142  
   143  func (m *ACLAddReplaceReply) Size() (size int) {
   144  	if m == nil {
   145  		return 0
   146  	}
   147  	size += 4 // m.ACLIndex
   148  	size += 4 // m.Retval
   149  	return size
   150  }
   151  func (m *ACLAddReplaceReply) Marshal(b []byte) ([]byte, error) {
   152  	if b == nil {
   153  		b = make([]byte, m.Size())
   154  	}
   155  	buf := codec.NewBuffer(b)
   156  	buf.EncodeUint32(m.ACLIndex)
   157  	buf.EncodeInt32(m.Retval)
   158  	return buf.Bytes(), nil
   159  }
   160  func (m *ACLAddReplaceReply) Unmarshal(b []byte) error {
   161  	buf := codec.NewBuffer(b)
   162  	m.ACLIndex = buf.DecodeUint32()
   163  	m.Retval = buf.DecodeInt32()
   164  	return nil
   165  }
   166  
   167  // ACLDel defines message 'acl_del'.
   168  type ACLDel struct {
   169  	ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
   170  }
   171  
   172  func (m *ACLDel) Reset()               { *m = ACLDel{} }
   173  func (*ACLDel) GetMessageName() string { return "acl_del" }
   174  func (*ACLDel) GetCrcString() string   { return "ef34fea4" }
   175  func (*ACLDel) GetMessageType() api.MessageType {
   176  	return api.RequestMessage
   177  }
   178  
   179  func (m *ACLDel) Size() (size int) {
   180  	if m == nil {
   181  		return 0
   182  	}
   183  	size += 4 // m.ACLIndex
   184  	return size
   185  }
   186  func (m *ACLDel) Marshal(b []byte) ([]byte, error) {
   187  	if b == nil {
   188  		b = make([]byte, m.Size())
   189  	}
   190  	buf := codec.NewBuffer(b)
   191  	buf.EncodeUint32(m.ACLIndex)
   192  	return buf.Bytes(), nil
   193  }
   194  func (m *ACLDel) Unmarshal(b []byte) error {
   195  	buf := codec.NewBuffer(b)
   196  	m.ACLIndex = buf.DecodeUint32()
   197  	return nil
   198  }
   199  
   200  // ACLDelReply defines message 'acl_del_reply'.
   201  type ACLDelReply struct {
   202  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   203  }
   204  
   205  func (m *ACLDelReply) Reset()               { *m = ACLDelReply{} }
   206  func (*ACLDelReply) GetMessageName() string { return "acl_del_reply" }
   207  func (*ACLDelReply) GetCrcString() string   { return "e8d4e804" }
   208  func (*ACLDelReply) GetMessageType() api.MessageType {
   209  	return api.ReplyMessage
   210  }
   211  
   212  func (m *ACLDelReply) Size() (size int) {
   213  	if m == nil {
   214  		return 0
   215  	}
   216  	size += 4 // m.Retval
   217  	return size
   218  }
   219  func (m *ACLDelReply) Marshal(b []byte) ([]byte, error) {
   220  	if b == nil {
   221  		b = make([]byte, m.Size())
   222  	}
   223  	buf := codec.NewBuffer(b)
   224  	buf.EncodeInt32(m.Retval)
   225  	return buf.Bytes(), nil
   226  }
   227  func (m *ACLDelReply) Unmarshal(b []byte) error {
   228  	buf := codec.NewBuffer(b)
   229  	m.Retval = buf.DecodeInt32()
   230  	return nil
   231  }
   232  
   233  // ACLDetails defines message 'acl_details'.
   234  type ACLDetails struct {
   235  	ACLIndex uint32              `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
   236  	Tag      string              `binapi:"string[64],name=tag" json:"tag,omitempty"`
   237  	Count    uint32              `binapi:"u32,name=count" json:"-"`
   238  	R        []acl_types.ACLRule `binapi:"acl_rule[count],name=r" json:"r,omitempty"`
   239  }
   240  
   241  func (m *ACLDetails) Reset()               { *m = ACLDetails{} }
   242  func (*ACLDetails) GetMessageName() string { return "acl_details" }
   243  func (*ACLDetails) GetCrcString() string   { return "95babae0" }
   244  func (*ACLDetails) GetMessageType() api.MessageType {
   245  	return api.ReplyMessage
   246  }
   247  
   248  func (m *ACLDetails) Size() (size int) {
   249  	if m == nil {
   250  		return 0
   251  	}
   252  	size += 4  // m.ACLIndex
   253  	size += 64 // m.Tag
   254  	size += 4  // m.Count
   255  	for j1 := 0; j1 < len(m.R); j1++ {
   256  		var s1 acl_types.ACLRule
   257  		_ = s1
   258  		if j1 < len(m.R) {
   259  			s1 = m.R[j1]
   260  		}
   261  		size += 1      // s1.IsPermit
   262  		size += 1      // s1.SrcPrefix.Address.Af
   263  		size += 1 * 16 // s1.SrcPrefix.Address.Un
   264  		size += 1      // s1.SrcPrefix.Len
   265  		size += 1      // s1.DstPrefix.Address.Af
   266  		size += 1 * 16 // s1.DstPrefix.Address.Un
   267  		size += 1      // s1.DstPrefix.Len
   268  		size += 1      // s1.Proto
   269  		size += 2      // s1.SrcportOrIcmptypeFirst
   270  		size += 2      // s1.SrcportOrIcmptypeLast
   271  		size += 2      // s1.DstportOrIcmpcodeFirst
   272  		size += 2      // s1.DstportOrIcmpcodeLast
   273  		size += 1      // s1.TCPFlagsMask
   274  		size += 1      // s1.TCPFlagsValue
   275  	}
   276  	return size
   277  }
   278  func (m *ACLDetails) Marshal(b []byte) ([]byte, error) {
   279  	if b == nil {
   280  		b = make([]byte, m.Size())
   281  	}
   282  	buf := codec.NewBuffer(b)
   283  	buf.EncodeUint32(m.ACLIndex)
   284  	buf.EncodeString(m.Tag, 64)
   285  	buf.EncodeUint32(uint32(len(m.R)))
   286  	for j0 := 0; j0 < len(m.R); j0++ {
   287  		var v0 acl_types.ACLRule // R
   288  		if j0 < len(m.R) {
   289  			v0 = m.R[j0]
   290  		}
   291  		buf.EncodeUint8(uint8(v0.IsPermit))
   292  		buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af))
   293  		buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 16)
   294  		buf.EncodeUint8(v0.SrcPrefix.Len)
   295  		buf.EncodeUint8(uint8(v0.DstPrefix.Address.Af))
   296  		buf.EncodeBytes(v0.DstPrefix.Address.Un.XXX_UnionData[:], 16)
   297  		buf.EncodeUint8(v0.DstPrefix.Len)
   298  		buf.EncodeUint8(uint8(v0.Proto))
   299  		buf.EncodeUint16(v0.SrcportOrIcmptypeFirst)
   300  		buf.EncodeUint16(v0.SrcportOrIcmptypeLast)
   301  		buf.EncodeUint16(v0.DstportOrIcmpcodeFirst)
   302  		buf.EncodeUint16(v0.DstportOrIcmpcodeLast)
   303  		buf.EncodeUint8(v0.TCPFlagsMask)
   304  		buf.EncodeUint8(v0.TCPFlagsValue)
   305  	}
   306  	return buf.Bytes(), nil
   307  }
   308  func (m *ACLDetails) Unmarshal(b []byte) error {
   309  	buf := codec.NewBuffer(b)
   310  	m.ACLIndex = buf.DecodeUint32()
   311  	m.Tag = buf.DecodeString(64)
   312  	m.Count = buf.DecodeUint32()
   313  	m.R = make([]acl_types.ACLRule, m.Count)
   314  	for j0 := 0; j0 < len(m.R); j0++ {
   315  		m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8())
   316  		m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
   317  		copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   318  		m.R[j0].SrcPrefix.Len = buf.DecodeUint8()
   319  		m.R[j0].DstPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
   320  		copy(m.R[j0].DstPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   321  		m.R[j0].DstPrefix.Len = buf.DecodeUint8()
   322  		m.R[j0].Proto = ip_types.IPProto(buf.DecodeUint8())
   323  		m.R[j0].SrcportOrIcmptypeFirst = buf.DecodeUint16()
   324  		m.R[j0].SrcportOrIcmptypeLast = buf.DecodeUint16()
   325  		m.R[j0].DstportOrIcmpcodeFirst = buf.DecodeUint16()
   326  		m.R[j0].DstportOrIcmpcodeLast = buf.DecodeUint16()
   327  		m.R[j0].TCPFlagsMask = buf.DecodeUint8()
   328  		m.R[j0].TCPFlagsValue = buf.DecodeUint8()
   329  	}
   330  	return nil
   331  }
   332  
   333  // ACLDump defines message 'acl_dump'.
   334  type ACLDump struct {
   335  	ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
   336  }
   337  
   338  func (m *ACLDump) Reset()               { *m = ACLDump{} }
   339  func (*ACLDump) GetMessageName() string { return "acl_dump" }
   340  func (*ACLDump) GetCrcString() string   { return "ef34fea4" }
   341  func (*ACLDump) GetMessageType() api.MessageType {
   342  	return api.RequestMessage
   343  }
   344  
   345  func (m *ACLDump) Size() (size int) {
   346  	if m == nil {
   347  		return 0
   348  	}
   349  	size += 4 // m.ACLIndex
   350  	return size
   351  }
   352  func (m *ACLDump) Marshal(b []byte) ([]byte, error) {
   353  	if b == nil {
   354  		b = make([]byte, m.Size())
   355  	}
   356  	buf := codec.NewBuffer(b)
   357  	buf.EncodeUint32(m.ACLIndex)
   358  	return buf.Bytes(), nil
   359  }
   360  func (m *ACLDump) Unmarshal(b []byte) error {
   361  	buf := codec.NewBuffer(b)
   362  	m.ACLIndex = buf.DecodeUint32()
   363  	return nil
   364  }
   365  
   366  // ACLInterfaceAddDel defines message 'acl_interface_add_del'.
   367  type ACLInterfaceAddDel struct {
   368  	IsAdd     bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
   369  	IsInput   bool                           `binapi:"bool,name=is_input" json:"is_input,omitempty"`
   370  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   371  	ACLIndex  uint32                         `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
   372  }
   373  
   374  func (m *ACLInterfaceAddDel) Reset()               { *m = ACLInterfaceAddDel{} }
   375  func (*ACLInterfaceAddDel) GetMessageName() string { return "acl_interface_add_del" }
   376  func (*ACLInterfaceAddDel) GetCrcString() string   { return "4b54bebd" }
   377  func (*ACLInterfaceAddDel) GetMessageType() api.MessageType {
   378  	return api.RequestMessage
   379  }
   380  
   381  func (m *ACLInterfaceAddDel) Size() (size int) {
   382  	if m == nil {
   383  		return 0
   384  	}
   385  	size += 1 // m.IsAdd
   386  	size += 1 // m.IsInput
   387  	size += 4 // m.SwIfIndex
   388  	size += 4 // m.ACLIndex
   389  	return size
   390  }
   391  func (m *ACLInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
   392  	if b == nil {
   393  		b = make([]byte, m.Size())
   394  	}
   395  	buf := codec.NewBuffer(b)
   396  	buf.EncodeBool(m.IsAdd)
   397  	buf.EncodeBool(m.IsInput)
   398  	buf.EncodeUint32(uint32(m.SwIfIndex))
   399  	buf.EncodeUint32(m.ACLIndex)
   400  	return buf.Bytes(), nil
   401  }
   402  func (m *ACLInterfaceAddDel) Unmarshal(b []byte) error {
   403  	buf := codec.NewBuffer(b)
   404  	m.IsAdd = buf.DecodeBool()
   405  	m.IsInput = buf.DecodeBool()
   406  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   407  	m.ACLIndex = buf.DecodeUint32()
   408  	return nil
   409  }
   410  
   411  // ACLInterfaceAddDelReply defines message 'acl_interface_add_del_reply'.
   412  type ACLInterfaceAddDelReply struct {
   413  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   414  }
   415  
   416  func (m *ACLInterfaceAddDelReply) Reset()               { *m = ACLInterfaceAddDelReply{} }
   417  func (*ACLInterfaceAddDelReply) GetMessageName() string { return "acl_interface_add_del_reply" }
   418  func (*ACLInterfaceAddDelReply) GetCrcString() string   { return "e8d4e804" }
   419  func (*ACLInterfaceAddDelReply) GetMessageType() api.MessageType {
   420  	return api.ReplyMessage
   421  }
   422  
   423  func (m *ACLInterfaceAddDelReply) Size() (size int) {
   424  	if m == nil {
   425  		return 0
   426  	}
   427  	size += 4 // m.Retval
   428  	return size
   429  }
   430  func (m *ACLInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
   431  	if b == nil {
   432  		b = make([]byte, m.Size())
   433  	}
   434  	buf := codec.NewBuffer(b)
   435  	buf.EncodeInt32(m.Retval)
   436  	return buf.Bytes(), nil
   437  }
   438  func (m *ACLInterfaceAddDelReply) Unmarshal(b []byte) error {
   439  	buf := codec.NewBuffer(b)
   440  	m.Retval = buf.DecodeInt32()
   441  	return nil
   442  }
   443  
   444  // ACLInterfaceEtypeWhitelistDetails defines message 'acl_interface_etype_whitelist_details'.
   445  type ACLInterfaceEtypeWhitelistDetails struct {
   446  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   447  	Count     uint8                          `binapi:"u8,name=count" json:"-"`
   448  	NInput    uint8                          `binapi:"u8,name=n_input" json:"n_input,omitempty"`
   449  	Whitelist []uint16                       `binapi:"u16[count],name=whitelist" json:"whitelist,omitempty"`
   450  }
   451  
   452  func (m *ACLInterfaceEtypeWhitelistDetails) Reset() { *m = ACLInterfaceEtypeWhitelistDetails{} }
   453  func (*ACLInterfaceEtypeWhitelistDetails) GetMessageName() string {
   454  	return "acl_interface_etype_whitelist_details"
   455  }
   456  func (*ACLInterfaceEtypeWhitelistDetails) GetCrcString() string { return "cc2bfded" }
   457  func (*ACLInterfaceEtypeWhitelistDetails) GetMessageType() api.MessageType {
   458  	return api.ReplyMessage
   459  }
   460  
   461  func (m *ACLInterfaceEtypeWhitelistDetails) Size() (size int) {
   462  	if m == nil {
   463  		return 0
   464  	}
   465  	size += 4                    // m.SwIfIndex
   466  	size += 1                    // m.Count
   467  	size += 1                    // m.NInput
   468  	size += 2 * len(m.Whitelist) // m.Whitelist
   469  	return size
   470  }
   471  func (m *ACLInterfaceEtypeWhitelistDetails) Marshal(b []byte) ([]byte, error) {
   472  	if b == nil {
   473  		b = make([]byte, m.Size())
   474  	}
   475  	buf := codec.NewBuffer(b)
   476  	buf.EncodeUint32(uint32(m.SwIfIndex))
   477  	buf.EncodeUint8(uint8(len(m.Whitelist)))
   478  	buf.EncodeUint8(m.NInput)
   479  	for i := 0; i < len(m.Whitelist); i++ {
   480  		var x uint16
   481  		if i < len(m.Whitelist) {
   482  			x = uint16(m.Whitelist[i])
   483  		}
   484  		buf.EncodeUint16(x)
   485  	}
   486  	return buf.Bytes(), nil
   487  }
   488  func (m *ACLInterfaceEtypeWhitelistDetails) Unmarshal(b []byte) error {
   489  	buf := codec.NewBuffer(b)
   490  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   491  	m.Count = buf.DecodeUint8()
   492  	m.NInput = buf.DecodeUint8()
   493  	m.Whitelist = make([]uint16, m.Count)
   494  	for i := 0; i < len(m.Whitelist); i++ {
   495  		m.Whitelist[i] = buf.DecodeUint16()
   496  	}
   497  	return nil
   498  }
   499  
   500  // ACLInterfaceEtypeWhitelistDump defines message 'acl_interface_etype_whitelist_dump'.
   501  type ACLInterfaceEtypeWhitelistDump struct {
   502  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   503  }
   504  
   505  func (m *ACLInterfaceEtypeWhitelistDump) Reset() { *m = ACLInterfaceEtypeWhitelistDump{} }
   506  func (*ACLInterfaceEtypeWhitelistDump) GetMessageName() string {
   507  	return "acl_interface_etype_whitelist_dump"
   508  }
   509  func (*ACLInterfaceEtypeWhitelistDump) GetCrcString() string { return "f9e6675e" }
   510  func (*ACLInterfaceEtypeWhitelistDump) GetMessageType() api.MessageType {
   511  	return api.RequestMessage
   512  }
   513  
   514  func (m *ACLInterfaceEtypeWhitelistDump) Size() (size int) {
   515  	if m == nil {
   516  		return 0
   517  	}
   518  	size += 4 // m.SwIfIndex
   519  	return size
   520  }
   521  func (m *ACLInterfaceEtypeWhitelistDump) Marshal(b []byte) ([]byte, error) {
   522  	if b == nil {
   523  		b = make([]byte, m.Size())
   524  	}
   525  	buf := codec.NewBuffer(b)
   526  	buf.EncodeUint32(uint32(m.SwIfIndex))
   527  	return buf.Bytes(), nil
   528  }
   529  func (m *ACLInterfaceEtypeWhitelistDump) Unmarshal(b []byte) error {
   530  	buf := codec.NewBuffer(b)
   531  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   532  	return nil
   533  }
   534  
   535  // ACLInterfaceListDetails defines message 'acl_interface_list_details'.
   536  type ACLInterfaceListDetails struct {
   537  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   538  	Count     uint8                          `binapi:"u8,name=count" json:"-"`
   539  	NInput    uint8                          `binapi:"u8,name=n_input" json:"n_input,omitempty"`
   540  	Acls      []uint32                       `binapi:"u32[count],name=acls" json:"acls,omitempty"`
   541  }
   542  
   543  func (m *ACLInterfaceListDetails) Reset()               { *m = ACLInterfaceListDetails{} }
   544  func (*ACLInterfaceListDetails) GetMessageName() string { return "acl_interface_list_details" }
   545  func (*ACLInterfaceListDetails) GetCrcString() string   { return "e695d256" }
   546  func (*ACLInterfaceListDetails) GetMessageType() api.MessageType {
   547  	return api.ReplyMessage
   548  }
   549  
   550  func (m *ACLInterfaceListDetails) Size() (size int) {
   551  	if m == nil {
   552  		return 0
   553  	}
   554  	size += 4               // m.SwIfIndex
   555  	size += 1               // m.Count
   556  	size += 1               // m.NInput
   557  	size += 4 * len(m.Acls) // m.Acls
   558  	return size
   559  }
   560  func (m *ACLInterfaceListDetails) Marshal(b []byte) ([]byte, error) {
   561  	if b == nil {
   562  		b = make([]byte, m.Size())
   563  	}
   564  	buf := codec.NewBuffer(b)
   565  	buf.EncodeUint32(uint32(m.SwIfIndex))
   566  	buf.EncodeUint8(uint8(len(m.Acls)))
   567  	buf.EncodeUint8(m.NInput)
   568  	for i := 0; i < len(m.Acls); i++ {
   569  		var x uint32
   570  		if i < len(m.Acls) {
   571  			x = uint32(m.Acls[i])
   572  		}
   573  		buf.EncodeUint32(x)
   574  	}
   575  	return buf.Bytes(), nil
   576  }
   577  func (m *ACLInterfaceListDetails) Unmarshal(b []byte) error {
   578  	buf := codec.NewBuffer(b)
   579  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   580  	m.Count = buf.DecodeUint8()
   581  	m.NInput = buf.DecodeUint8()
   582  	m.Acls = make([]uint32, m.Count)
   583  	for i := 0; i < len(m.Acls); i++ {
   584  		m.Acls[i] = buf.DecodeUint32()
   585  	}
   586  	return nil
   587  }
   588  
   589  // ACLInterfaceListDump defines message 'acl_interface_list_dump'.
   590  type ACLInterfaceListDump struct {
   591  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   592  }
   593  
   594  func (m *ACLInterfaceListDump) Reset()               { *m = ACLInterfaceListDump{} }
   595  func (*ACLInterfaceListDump) GetMessageName() string { return "acl_interface_list_dump" }
   596  func (*ACLInterfaceListDump) GetCrcString() string   { return "f9e6675e" }
   597  func (*ACLInterfaceListDump) GetMessageType() api.MessageType {
   598  	return api.RequestMessage
   599  }
   600  
   601  func (m *ACLInterfaceListDump) Size() (size int) {
   602  	if m == nil {
   603  		return 0
   604  	}
   605  	size += 4 // m.SwIfIndex
   606  	return size
   607  }
   608  func (m *ACLInterfaceListDump) Marshal(b []byte) ([]byte, error) {
   609  	if b == nil {
   610  		b = make([]byte, m.Size())
   611  	}
   612  	buf := codec.NewBuffer(b)
   613  	buf.EncodeUint32(uint32(m.SwIfIndex))
   614  	return buf.Bytes(), nil
   615  }
   616  func (m *ACLInterfaceListDump) Unmarshal(b []byte) error {
   617  	buf := codec.NewBuffer(b)
   618  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   619  	return nil
   620  }
   621  
   622  // ACLInterfaceSetACLList defines message 'acl_interface_set_acl_list'.
   623  type ACLInterfaceSetACLList struct {
   624  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   625  	Count     uint8                          `binapi:"u8,name=count" json:"-"`
   626  	NInput    uint8                          `binapi:"u8,name=n_input" json:"n_input,omitempty"`
   627  	Acls      []uint32                       `binapi:"u32[count],name=acls" json:"acls,omitempty"`
   628  }
   629  
   630  func (m *ACLInterfaceSetACLList) Reset()               { *m = ACLInterfaceSetACLList{} }
   631  func (*ACLInterfaceSetACLList) GetMessageName() string { return "acl_interface_set_acl_list" }
   632  func (*ACLInterfaceSetACLList) GetCrcString() string   { return "473982bd" }
   633  func (*ACLInterfaceSetACLList) GetMessageType() api.MessageType {
   634  	return api.RequestMessage
   635  }
   636  
   637  func (m *ACLInterfaceSetACLList) Size() (size int) {
   638  	if m == nil {
   639  		return 0
   640  	}
   641  	size += 4               // m.SwIfIndex
   642  	size += 1               // m.Count
   643  	size += 1               // m.NInput
   644  	size += 4 * len(m.Acls) // m.Acls
   645  	return size
   646  }
   647  func (m *ACLInterfaceSetACLList) Marshal(b []byte) ([]byte, error) {
   648  	if b == nil {
   649  		b = make([]byte, m.Size())
   650  	}
   651  	buf := codec.NewBuffer(b)
   652  	buf.EncodeUint32(uint32(m.SwIfIndex))
   653  	buf.EncodeUint8(uint8(len(m.Acls)))
   654  	buf.EncodeUint8(m.NInput)
   655  	for i := 0; i < len(m.Acls); i++ {
   656  		var x uint32
   657  		if i < len(m.Acls) {
   658  			x = uint32(m.Acls[i])
   659  		}
   660  		buf.EncodeUint32(x)
   661  	}
   662  	return buf.Bytes(), nil
   663  }
   664  func (m *ACLInterfaceSetACLList) Unmarshal(b []byte) error {
   665  	buf := codec.NewBuffer(b)
   666  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   667  	m.Count = buf.DecodeUint8()
   668  	m.NInput = buf.DecodeUint8()
   669  	m.Acls = make([]uint32, m.Count)
   670  	for i := 0; i < len(m.Acls); i++ {
   671  		m.Acls[i] = buf.DecodeUint32()
   672  	}
   673  	return nil
   674  }
   675  
   676  // ACLInterfaceSetACLListReply defines message 'acl_interface_set_acl_list_reply'.
   677  type ACLInterfaceSetACLListReply struct {
   678  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   679  }
   680  
   681  func (m *ACLInterfaceSetACLListReply) Reset() { *m = ACLInterfaceSetACLListReply{} }
   682  func (*ACLInterfaceSetACLListReply) GetMessageName() string {
   683  	return "acl_interface_set_acl_list_reply"
   684  }
   685  func (*ACLInterfaceSetACLListReply) GetCrcString() string { return "e8d4e804" }
   686  func (*ACLInterfaceSetACLListReply) GetMessageType() api.MessageType {
   687  	return api.ReplyMessage
   688  }
   689  
   690  func (m *ACLInterfaceSetACLListReply) Size() (size int) {
   691  	if m == nil {
   692  		return 0
   693  	}
   694  	size += 4 // m.Retval
   695  	return size
   696  }
   697  func (m *ACLInterfaceSetACLListReply) Marshal(b []byte) ([]byte, error) {
   698  	if b == nil {
   699  		b = make([]byte, m.Size())
   700  	}
   701  	buf := codec.NewBuffer(b)
   702  	buf.EncodeInt32(m.Retval)
   703  	return buf.Bytes(), nil
   704  }
   705  func (m *ACLInterfaceSetACLListReply) Unmarshal(b []byte) error {
   706  	buf := codec.NewBuffer(b)
   707  	m.Retval = buf.DecodeInt32()
   708  	return nil
   709  }
   710  
   711  // ACLInterfaceSetEtypeWhitelist defines message 'acl_interface_set_etype_whitelist'.
   712  type ACLInterfaceSetEtypeWhitelist struct {
   713  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   714  	Count     uint8                          `binapi:"u8,name=count" json:"-"`
   715  	NInput    uint8                          `binapi:"u8,name=n_input" json:"n_input,omitempty"`
   716  	Whitelist []uint16                       `binapi:"u16[count],name=whitelist" json:"whitelist,omitempty"`
   717  }
   718  
   719  func (m *ACLInterfaceSetEtypeWhitelist) Reset() { *m = ACLInterfaceSetEtypeWhitelist{} }
   720  func (*ACLInterfaceSetEtypeWhitelist) GetMessageName() string {
   721  	return "acl_interface_set_etype_whitelist"
   722  }
   723  func (*ACLInterfaceSetEtypeWhitelist) GetCrcString() string { return "3f5c2d2d" }
   724  func (*ACLInterfaceSetEtypeWhitelist) GetMessageType() api.MessageType {
   725  	return api.RequestMessage
   726  }
   727  
   728  func (m *ACLInterfaceSetEtypeWhitelist) Size() (size int) {
   729  	if m == nil {
   730  		return 0
   731  	}
   732  	size += 4                    // m.SwIfIndex
   733  	size += 1                    // m.Count
   734  	size += 1                    // m.NInput
   735  	size += 2 * len(m.Whitelist) // m.Whitelist
   736  	return size
   737  }
   738  func (m *ACLInterfaceSetEtypeWhitelist) Marshal(b []byte) ([]byte, error) {
   739  	if b == nil {
   740  		b = make([]byte, m.Size())
   741  	}
   742  	buf := codec.NewBuffer(b)
   743  	buf.EncodeUint32(uint32(m.SwIfIndex))
   744  	buf.EncodeUint8(uint8(len(m.Whitelist)))
   745  	buf.EncodeUint8(m.NInput)
   746  	for i := 0; i < len(m.Whitelist); i++ {
   747  		var x uint16
   748  		if i < len(m.Whitelist) {
   749  			x = uint16(m.Whitelist[i])
   750  		}
   751  		buf.EncodeUint16(x)
   752  	}
   753  	return buf.Bytes(), nil
   754  }
   755  func (m *ACLInterfaceSetEtypeWhitelist) Unmarshal(b []byte) error {
   756  	buf := codec.NewBuffer(b)
   757  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   758  	m.Count = buf.DecodeUint8()
   759  	m.NInput = buf.DecodeUint8()
   760  	m.Whitelist = make([]uint16, m.Count)
   761  	for i := 0; i < len(m.Whitelist); i++ {
   762  		m.Whitelist[i] = buf.DecodeUint16()
   763  	}
   764  	return nil
   765  }
   766  
   767  // ACLInterfaceSetEtypeWhitelistReply defines message 'acl_interface_set_etype_whitelist_reply'.
   768  type ACLInterfaceSetEtypeWhitelistReply struct {
   769  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   770  }
   771  
   772  func (m *ACLInterfaceSetEtypeWhitelistReply) Reset() { *m = ACLInterfaceSetEtypeWhitelistReply{} }
   773  func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageName() string {
   774  	return "acl_interface_set_etype_whitelist_reply"
   775  }
   776  func (*ACLInterfaceSetEtypeWhitelistReply) GetCrcString() string { return "e8d4e804" }
   777  func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageType() api.MessageType {
   778  	return api.ReplyMessage
   779  }
   780  
   781  func (m *ACLInterfaceSetEtypeWhitelistReply) Size() (size int) {
   782  	if m == nil {
   783  		return 0
   784  	}
   785  	size += 4 // m.Retval
   786  	return size
   787  }
   788  func (m *ACLInterfaceSetEtypeWhitelistReply) Marshal(b []byte) ([]byte, error) {
   789  	if b == nil {
   790  		b = make([]byte, m.Size())
   791  	}
   792  	buf := codec.NewBuffer(b)
   793  	buf.EncodeInt32(m.Retval)
   794  	return buf.Bytes(), nil
   795  }
   796  func (m *ACLInterfaceSetEtypeWhitelistReply) Unmarshal(b []byte) error {
   797  	buf := codec.NewBuffer(b)
   798  	m.Retval = buf.DecodeInt32()
   799  	return nil
   800  }
   801  
   802  // ACLPluginControlPing defines message 'acl_plugin_control_ping'.
   803  type ACLPluginControlPing struct{}
   804  
   805  func (m *ACLPluginControlPing) Reset()               { *m = ACLPluginControlPing{} }
   806  func (*ACLPluginControlPing) GetMessageName() string { return "acl_plugin_control_ping" }
   807  func (*ACLPluginControlPing) GetCrcString() string   { return "51077d14" }
   808  func (*ACLPluginControlPing) GetMessageType() api.MessageType {
   809  	return api.RequestMessage
   810  }
   811  
   812  func (m *ACLPluginControlPing) Size() (size int) {
   813  	if m == nil {
   814  		return 0
   815  	}
   816  	return size
   817  }
   818  func (m *ACLPluginControlPing) Marshal(b []byte) ([]byte, error) {
   819  	if b == nil {
   820  		b = make([]byte, m.Size())
   821  	}
   822  	buf := codec.NewBuffer(b)
   823  	return buf.Bytes(), nil
   824  }
   825  func (m *ACLPluginControlPing) Unmarshal(b []byte) error {
   826  	return nil
   827  }
   828  
   829  // ACLPluginControlPingReply defines message 'acl_plugin_control_ping_reply'.
   830  type ACLPluginControlPingReply struct {
   831  	Retval      int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   832  	ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
   833  	VpePID      uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
   834  }
   835  
   836  func (m *ACLPluginControlPingReply) Reset()               { *m = ACLPluginControlPingReply{} }
   837  func (*ACLPluginControlPingReply) GetMessageName() string { return "acl_plugin_control_ping_reply" }
   838  func (*ACLPluginControlPingReply) GetCrcString() string   { return "f6b0b8ca" }
   839  func (*ACLPluginControlPingReply) GetMessageType() api.MessageType {
   840  	return api.ReplyMessage
   841  }
   842  
   843  func (m *ACLPluginControlPingReply) Size() (size int) {
   844  	if m == nil {
   845  		return 0
   846  	}
   847  	size += 4 // m.Retval
   848  	size += 4 // m.ClientIndex
   849  	size += 4 // m.VpePID
   850  	return size
   851  }
   852  func (m *ACLPluginControlPingReply) Marshal(b []byte) ([]byte, error) {
   853  	if b == nil {
   854  		b = make([]byte, m.Size())
   855  	}
   856  	buf := codec.NewBuffer(b)
   857  	buf.EncodeInt32(m.Retval)
   858  	buf.EncodeUint32(m.ClientIndex)
   859  	buf.EncodeUint32(m.VpePID)
   860  	return buf.Bytes(), nil
   861  }
   862  func (m *ACLPluginControlPingReply) Unmarshal(b []byte) error {
   863  	buf := codec.NewBuffer(b)
   864  	m.Retval = buf.DecodeInt32()
   865  	m.ClientIndex = buf.DecodeUint32()
   866  	m.VpePID = buf.DecodeUint32()
   867  	return nil
   868  }
   869  
   870  // ACLPluginGetConnTableMaxEntries defines message 'acl_plugin_get_conn_table_max_entries'.
   871  type ACLPluginGetConnTableMaxEntries struct{}
   872  
   873  func (m *ACLPluginGetConnTableMaxEntries) Reset() { *m = ACLPluginGetConnTableMaxEntries{} }
   874  func (*ACLPluginGetConnTableMaxEntries) GetMessageName() string {
   875  	return "acl_plugin_get_conn_table_max_entries"
   876  }
   877  func (*ACLPluginGetConnTableMaxEntries) GetCrcString() string { return "51077d14" }
   878  func (*ACLPluginGetConnTableMaxEntries) GetMessageType() api.MessageType {
   879  	return api.RequestMessage
   880  }
   881  
   882  func (m *ACLPluginGetConnTableMaxEntries) Size() (size int) {
   883  	if m == nil {
   884  		return 0
   885  	}
   886  	return size
   887  }
   888  func (m *ACLPluginGetConnTableMaxEntries) Marshal(b []byte) ([]byte, error) {
   889  	if b == nil {
   890  		b = make([]byte, m.Size())
   891  	}
   892  	buf := codec.NewBuffer(b)
   893  	return buf.Bytes(), nil
   894  }
   895  func (m *ACLPluginGetConnTableMaxEntries) Unmarshal(b []byte) error {
   896  	return nil
   897  }
   898  
   899  // ACLPluginGetConnTableMaxEntriesReply defines message 'acl_plugin_get_conn_table_max_entries_reply'.
   900  type ACLPluginGetConnTableMaxEntriesReply struct {
   901  	ConnTableMaxEntries uint64 `binapi:"u64,name=conn_table_max_entries" json:"conn_table_max_entries,omitempty"`
   902  }
   903  
   904  func (m *ACLPluginGetConnTableMaxEntriesReply) Reset() { *m = ACLPluginGetConnTableMaxEntriesReply{} }
   905  func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageName() string {
   906  	return "acl_plugin_get_conn_table_max_entries_reply"
   907  }
   908  func (*ACLPluginGetConnTableMaxEntriesReply) GetCrcString() string { return "7a096d3d" }
   909  func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageType() api.MessageType {
   910  	return api.ReplyMessage
   911  }
   912  
   913  func (m *ACLPluginGetConnTableMaxEntriesReply) Size() (size int) {
   914  	if m == nil {
   915  		return 0
   916  	}
   917  	size += 8 // m.ConnTableMaxEntries
   918  	return size
   919  }
   920  func (m *ACLPluginGetConnTableMaxEntriesReply) Marshal(b []byte) ([]byte, error) {
   921  	if b == nil {
   922  		b = make([]byte, m.Size())
   923  	}
   924  	buf := codec.NewBuffer(b)
   925  	buf.EncodeUint64(m.ConnTableMaxEntries)
   926  	return buf.Bytes(), nil
   927  }
   928  func (m *ACLPluginGetConnTableMaxEntriesReply) Unmarshal(b []byte) error {
   929  	buf := codec.NewBuffer(b)
   930  	m.ConnTableMaxEntries = buf.DecodeUint64()
   931  	return nil
   932  }
   933  
   934  // ACLPluginGetVersion defines message 'acl_plugin_get_version'.
   935  type ACLPluginGetVersion struct{}
   936  
   937  func (m *ACLPluginGetVersion) Reset()               { *m = ACLPluginGetVersion{} }
   938  func (*ACLPluginGetVersion) GetMessageName() string { return "acl_plugin_get_version" }
   939  func (*ACLPluginGetVersion) GetCrcString() string   { return "51077d14" }
   940  func (*ACLPluginGetVersion) GetMessageType() api.MessageType {
   941  	return api.RequestMessage
   942  }
   943  
   944  func (m *ACLPluginGetVersion) Size() (size int) {
   945  	if m == nil {
   946  		return 0
   947  	}
   948  	return size
   949  }
   950  func (m *ACLPluginGetVersion) Marshal(b []byte) ([]byte, error) {
   951  	if b == nil {
   952  		b = make([]byte, m.Size())
   953  	}
   954  	buf := codec.NewBuffer(b)
   955  	return buf.Bytes(), nil
   956  }
   957  func (m *ACLPluginGetVersion) Unmarshal(b []byte) error {
   958  	return nil
   959  }
   960  
   961  // ACLPluginGetVersionReply defines message 'acl_plugin_get_version_reply'.
   962  type ACLPluginGetVersionReply struct {
   963  	Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
   964  	Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
   965  }
   966  
   967  func (m *ACLPluginGetVersionReply) Reset()               { *m = ACLPluginGetVersionReply{} }
   968  func (*ACLPluginGetVersionReply) GetMessageName() string { return "acl_plugin_get_version_reply" }
   969  func (*ACLPluginGetVersionReply) GetCrcString() string   { return "9b32cf86" }
   970  func (*ACLPluginGetVersionReply) GetMessageType() api.MessageType {
   971  	return api.ReplyMessage
   972  }
   973  
   974  func (m *ACLPluginGetVersionReply) Size() (size int) {
   975  	if m == nil {
   976  		return 0
   977  	}
   978  	size += 4 // m.Major
   979  	size += 4 // m.Minor
   980  	return size
   981  }
   982  func (m *ACLPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
   983  	if b == nil {
   984  		b = make([]byte, m.Size())
   985  	}
   986  	buf := codec.NewBuffer(b)
   987  	buf.EncodeUint32(m.Major)
   988  	buf.EncodeUint32(m.Minor)
   989  	return buf.Bytes(), nil
   990  }
   991  func (m *ACLPluginGetVersionReply) Unmarshal(b []byte) error {
   992  	buf := codec.NewBuffer(b)
   993  	m.Major = buf.DecodeUint32()
   994  	m.Minor = buf.DecodeUint32()
   995  	return nil
   996  }
   997  
   998  // ACLStatsIntfCountersEnable defines message 'acl_stats_intf_counters_enable'.
   999  type ACLStatsIntfCountersEnable struct {
  1000  	Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
  1001  }
  1002  
  1003  func (m *ACLStatsIntfCountersEnable) Reset()               { *m = ACLStatsIntfCountersEnable{} }
  1004  func (*ACLStatsIntfCountersEnable) GetMessageName() string { return "acl_stats_intf_counters_enable" }
  1005  func (*ACLStatsIntfCountersEnable) GetCrcString() string   { return "b3e225d2" }
  1006  func (*ACLStatsIntfCountersEnable) GetMessageType() api.MessageType {
  1007  	return api.RequestMessage
  1008  }
  1009  
  1010  func (m *ACLStatsIntfCountersEnable) Size() (size int) {
  1011  	if m == nil {
  1012  		return 0
  1013  	}
  1014  	size += 1 // m.Enable
  1015  	return size
  1016  }
  1017  func (m *ACLStatsIntfCountersEnable) Marshal(b []byte) ([]byte, error) {
  1018  	if b == nil {
  1019  		b = make([]byte, m.Size())
  1020  	}
  1021  	buf := codec.NewBuffer(b)
  1022  	buf.EncodeBool(m.Enable)
  1023  	return buf.Bytes(), nil
  1024  }
  1025  func (m *ACLStatsIntfCountersEnable) Unmarshal(b []byte) error {
  1026  	buf := codec.NewBuffer(b)
  1027  	m.Enable = buf.DecodeBool()
  1028  	return nil
  1029  }
  1030  
  1031  // ACLStatsIntfCountersEnableReply defines message 'acl_stats_intf_counters_enable_reply'.
  1032  type ACLStatsIntfCountersEnableReply struct {
  1033  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1034  }
  1035  
  1036  func (m *ACLStatsIntfCountersEnableReply) Reset() { *m = ACLStatsIntfCountersEnableReply{} }
  1037  func (*ACLStatsIntfCountersEnableReply) GetMessageName() string {
  1038  	return "acl_stats_intf_counters_enable_reply"
  1039  }
  1040  func (*ACLStatsIntfCountersEnableReply) GetCrcString() string { return "e8d4e804" }
  1041  func (*ACLStatsIntfCountersEnableReply) GetMessageType() api.MessageType {
  1042  	return api.ReplyMessage
  1043  }
  1044  
  1045  func (m *ACLStatsIntfCountersEnableReply) Size() (size int) {
  1046  	if m == nil {
  1047  		return 0
  1048  	}
  1049  	size += 4 // m.Retval
  1050  	return size
  1051  }
  1052  func (m *ACLStatsIntfCountersEnableReply) Marshal(b []byte) ([]byte, error) {
  1053  	if b == nil {
  1054  		b = make([]byte, m.Size())
  1055  	}
  1056  	buf := codec.NewBuffer(b)
  1057  	buf.EncodeInt32(m.Retval)
  1058  	return buf.Bytes(), nil
  1059  }
  1060  func (m *ACLStatsIntfCountersEnableReply) Unmarshal(b []byte) error {
  1061  	buf := codec.NewBuffer(b)
  1062  	m.Retval = buf.DecodeInt32()
  1063  	return nil
  1064  }
  1065  
  1066  // MacipACLAdd defines message 'macip_acl_add'.
  1067  type MacipACLAdd struct {
  1068  	Tag   string                   `binapi:"string[64],name=tag" json:"tag,omitempty"`
  1069  	Count uint32                   `binapi:"u32,name=count" json:"-"`
  1070  	R     []acl_types.MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
  1071  }
  1072  
  1073  func (m *MacipACLAdd) Reset()               { *m = MacipACLAdd{} }
  1074  func (*MacipACLAdd) GetMessageName() string { return "macip_acl_add" }
  1075  func (*MacipACLAdd) GetCrcString() string   { return "ce6fbad0" }
  1076  func (*MacipACLAdd) GetMessageType() api.MessageType {
  1077  	return api.RequestMessage
  1078  }
  1079  
  1080  func (m *MacipACLAdd) Size() (size int) {
  1081  	if m == nil {
  1082  		return 0
  1083  	}
  1084  	size += 64 // m.Tag
  1085  	size += 4  // m.Count
  1086  	for j1 := 0; j1 < len(m.R); j1++ {
  1087  		var s1 acl_types.MacipACLRule
  1088  		_ = s1
  1089  		if j1 < len(m.R) {
  1090  			s1 = m.R[j1]
  1091  		}
  1092  		size += 1      // s1.IsPermit
  1093  		size += 1 * 6  // s1.SrcMac
  1094  		size += 1 * 6  // s1.SrcMacMask
  1095  		size += 1      // s1.SrcPrefix.Address.Af
  1096  		size += 1 * 16 // s1.SrcPrefix.Address.Un
  1097  		size += 1      // s1.SrcPrefix.Len
  1098  	}
  1099  	return size
  1100  }
  1101  func (m *MacipACLAdd) Marshal(b []byte) ([]byte, error) {
  1102  	if b == nil {
  1103  		b = make([]byte, m.Size())
  1104  	}
  1105  	buf := codec.NewBuffer(b)
  1106  	buf.EncodeString(m.Tag, 64)
  1107  	buf.EncodeUint32(uint32(len(m.R)))
  1108  	for j0 := 0; j0 < len(m.R); j0++ {
  1109  		var v0 acl_types.MacipACLRule // R
  1110  		if j0 < len(m.R) {
  1111  			v0 = m.R[j0]
  1112  		}
  1113  		buf.EncodeUint8(uint8(v0.IsPermit))
  1114  		buf.EncodeBytes(v0.SrcMac[:], 6)
  1115  		buf.EncodeBytes(v0.SrcMacMask[:], 6)
  1116  		buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af))
  1117  		buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 16)
  1118  		buf.EncodeUint8(v0.SrcPrefix.Len)
  1119  	}
  1120  	return buf.Bytes(), nil
  1121  }
  1122  func (m *MacipACLAdd) Unmarshal(b []byte) error {
  1123  	buf := codec.NewBuffer(b)
  1124  	m.Tag = buf.DecodeString(64)
  1125  	m.Count = buf.DecodeUint32()
  1126  	m.R = make([]acl_types.MacipACLRule, m.Count)
  1127  	for j0 := 0; j0 < len(m.R); j0++ {
  1128  		m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8())
  1129  		copy(m.R[j0].SrcMac[:], buf.DecodeBytes(6))
  1130  		copy(m.R[j0].SrcMacMask[:], buf.DecodeBytes(6))
  1131  		m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1132  		copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1133  		m.R[j0].SrcPrefix.Len = buf.DecodeUint8()
  1134  	}
  1135  	return nil
  1136  }
  1137  
  1138  // MacipACLAddReplace defines message 'macip_acl_add_replace'.
  1139  type MacipACLAddReplace struct {
  1140  	ACLIndex uint32                   `binapi:"u32,name=acl_index,default=4294967295" json:"acl_index,omitempty"`
  1141  	Tag      string                   `binapi:"string[64],name=tag" json:"tag,omitempty"`
  1142  	Count    uint32                   `binapi:"u32,name=count" json:"-"`
  1143  	R        []acl_types.MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
  1144  }
  1145  
  1146  func (m *MacipACLAddReplace) Reset()               { *m = MacipACLAddReplace{} }
  1147  func (*MacipACLAddReplace) GetMessageName() string { return "macip_acl_add_replace" }
  1148  func (*MacipACLAddReplace) GetCrcString() string   { return "2a461dd4" }
  1149  func (*MacipACLAddReplace) GetMessageType() api.MessageType {
  1150  	return api.RequestMessage
  1151  }
  1152  
  1153  func (m *MacipACLAddReplace) Size() (size int) {
  1154  	if m == nil {
  1155  		return 0
  1156  	}
  1157  	size += 4  // m.ACLIndex
  1158  	size += 64 // m.Tag
  1159  	size += 4  // m.Count
  1160  	for j1 := 0; j1 < len(m.R); j1++ {
  1161  		var s1 acl_types.MacipACLRule
  1162  		_ = s1
  1163  		if j1 < len(m.R) {
  1164  			s1 = m.R[j1]
  1165  		}
  1166  		size += 1      // s1.IsPermit
  1167  		size += 1 * 6  // s1.SrcMac
  1168  		size += 1 * 6  // s1.SrcMacMask
  1169  		size += 1      // s1.SrcPrefix.Address.Af
  1170  		size += 1 * 16 // s1.SrcPrefix.Address.Un
  1171  		size += 1      // s1.SrcPrefix.Len
  1172  	}
  1173  	return size
  1174  }
  1175  func (m *MacipACLAddReplace) Marshal(b []byte) ([]byte, error) {
  1176  	if b == nil {
  1177  		b = make([]byte, m.Size())
  1178  	}
  1179  	buf := codec.NewBuffer(b)
  1180  	buf.EncodeUint32(m.ACLIndex)
  1181  	buf.EncodeString(m.Tag, 64)
  1182  	buf.EncodeUint32(uint32(len(m.R)))
  1183  	for j0 := 0; j0 < len(m.R); j0++ {
  1184  		var v0 acl_types.MacipACLRule // R
  1185  		if j0 < len(m.R) {
  1186  			v0 = m.R[j0]
  1187  		}
  1188  		buf.EncodeUint8(uint8(v0.IsPermit))
  1189  		buf.EncodeBytes(v0.SrcMac[:], 6)
  1190  		buf.EncodeBytes(v0.SrcMacMask[:], 6)
  1191  		buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af))
  1192  		buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 16)
  1193  		buf.EncodeUint8(v0.SrcPrefix.Len)
  1194  	}
  1195  	return buf.Bytes(), nil
  1196  }
  1197  func (m *MacipACLAddReplace) Unmarshal(b []byte) error {
  1198  	buf := codec.NewBuffer(b)
  1199  	m.ACLIndex = buf.DecodeUint32()
  1200  	m.Tag = buf.DecodeString(64)
  1201  	m.Count = buf.DecodeUint32()
  1202  	m.R = make([]acl_types.MacipACLRule, m.Count)
  1203  	for j0 := 0; j0 < len(m.R); j0++ {
  1204  		m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8())
  1205  		copy(m.R[j0].SrcMac[:], buf.DecodeBytes(6))
  1206  		copy(m.R[j0].SrcMacMask[:], buf.DecodeBytes(6))
  1207  		m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1208  		copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1209  		m.R[j0].SrcPrefix.Len = buf.DecodeUint8()
  1210  	}
  1211  	return nil
  1212  }
  1213  
  1214  // MacipACLAddReplaceReply defines message 'macip_acl_add_replace_reply'.
  1215  type MacipACLAddReplaceReply struct {
  1216  	ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
  1217  	Retval   int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  1218  }
  1219  
  1220  func (m *MacipACLAddReplaceReply) Reset()               { *m = MacipACLAddReplaceReply{} }
  1221  func (*MacipACLAddReplaceReply) GetMessageName() string { return "macip_acl_add_replace_reply" }
  1222  func (*MacipACLAddReplaceReply) GetCrcString() string   { return "ac407b0c" }
  1223  func (*MacipACLAddReplaceReply) GetMessageType() api.MessageType {
  1224  	return api.ReplyMessage
  1225  }
  1226  
  1227  func (m *MacipACLAddReplaceReply) Size() (size int) {
  1228  	if m == nil {
  1229  		return 0
  1230  	}
  1231  	size += 4 // m.ACLIndex
  1232  	size += 4 // m.Retval
  1233  	return size
  1234  }
  1235  func (m *MacipACLAddReplaceReply) Marshal(b []byte) ([]byte, error) {
  1236  	if b == nil {
  1237  		b = make([]byte, m.Size())
  1238  	}
  1239  	buf := codec.NewBuffer(b)
  1240  	buf.EncodeUint32(m.ACLIndex)
  1241  	buf.EncodeInt32(m.Retval)
  1242  	return buf.Bytes(), nil
  1243  }
  1244  func (m *MacipACLAddReplaceReply) Unmarshal(b []byte) error {
  1245  	buf := codec.NewBuffer(b)
  1246  	m.ACLIndex = buf.DecodeUint32()
  1247  	m.Retval = buf.DecodeInt32()
  1248  	return nil
  1249  }
  1250  
  1251  // MacipACLAddReply defines message 'macip_acl_add_reply'.
  1252  type MacipACLAddReply struct {
  1253  	ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
  1254  	Retval   int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  1255  }
  1256  
  1257  func (m *MacipACLAddReply) Reset()               { *m = MacipACLAddReply{} }
  1258  func (*MacipACLAddReply) GetMessageName() string { return "macip_acl_add_reply" }
  1259  func (*MacipACLAddReply) GetCrcString() string   { return "ac407b0c" }
  1260  func (*MacipACLAddReply) GetMessageType() api.MessageType {
  1261  	return api.ReplyMessage
  1262  }
  1263  
  1264  func (m *MacipACLAddReply) Size() (size int) {
  1265  	if m == nil {
  1266  		return 0
  1267  	}
  1268  	size += 4 // m.ACLIndex
  1269  	size += 4 // m.Retval
  1270  	return size
  1271  }
  1272  func (m *MacipACLAddReply) Marshal(b []byte) ([]byte, error) {
  1273  	if b == nil {
  1274  		b = make([]byte, m.Size())
  1275  	}
  1276  	buf := codec.NewBuffer(b)
  1277  	buf.EncodeUint32(m.ACLIndex)
  1278  	buf.EncodeInt32(m.Retval)
  1279  	return buf.Bytes(), nil
  1280  }
  1281  func (m *MacipACLAddReply) Unmarshal(b []byte) error {
  1282  	buf := codec.NewBuffer(b)
  1283  	m.ACLIndex = buf.DecodeUint32()
  1284  	m.Retval = buf.DecodeInt32()
  1285  	return nil
  1286  }
  1287  
  1288  // MacipACLDel defines message 'macip_acl_del'.
  1289  type MacipACLDel struct {
  1290  	ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
  1291  }
  1292  
  1293  func (m *MacipACLDel) Reset()               { *m = MacipACLDel{} }
  1294  func (*MacipACLDel) GetMessageName() string { return "macip_acl_del" }
  1295  func (*MacipACLDel) GetCrcString() string   { return "ef34fea4" }
  1296  func (*MacipACLDel) GetMessageType() api.MessageType {
  1297  	return api.RequestMessage
  1298  }
  1299  
  1300  func (m *MacipACLDel) Size() (size int) {
  1301  	if m == nil {
  1302  		return 0
  1303  	}
  1304  	size += 4 // m.ACLIndex
  1305  	return size
  1306  }
  1307  func (m *MacipACLDel) Marshal(b []byte) ([]byte, error) {
  1308  	if b == nil {
  1309  		b = make([]byte, m.Size())
  1310  	}
  1311  	buf := codec.NewBuffer(b)
  1312  	buf.EncodeUint32(m.ACLIndex)
  1313  	return buf.Bytes(), nil
  1314  }
  1315  func (m *MacipACLDel) Unmarshal(b []byte) error {
  1316  	buf := codec.NewBuffer(b)
  1317  	m.ACLIndex = buf.DecodeUint32()
  1318  	return nil
  1319  }
  1320  
  1321  // MacipACLDelReply defines message 'macip_acl_del_reply'.
  1322  type MacipACLDelReply struct {
  1323  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1324  }
  1325  
  1326  func (m *MacipACLDelReply) Reset()               { *m = MacipACLDelReply{} }
  1327  func (*MacipACLDelReply) GetMessageName() string { return "macip_acl_del_reply" }
  1328  func (*MacipACLDelReply) GetCrcString() string   { return "e8d4e804" }
  1329  func (*MacipACLDelReply) GetMessageType() api.MessageType {
  1330  	return api.ReplyMessage
  1331  }
  1332  
  1333  func (m *MacipACLDelReply) Size() (size int) {
  1334  	if m == nil {
  1335  		return 0
  1336  	}
  1337  	size += 4 // m.Retval
  1338  	return size
  1339  }
  1340  func (m *MacipACLDelReply) Marshal(b []byte) ([]byte, error) {
  1341  	if b == nil {
  1342  		b = make([]byte, m.Size())
  1343  	}
  1344  	buf := codec.NewBuffer(b)
  1345  	buf.EncodeInt32(m.Retval)
  1346  	return buf.Bytes(), nil
  1347  }
  1348  func (m *MacipACLDelReply) Unmarshal(b []byte) error {
  1349  	buf := codec.NewBuffer(b)
  1350  	m.Retval = buf.DecodeInt32()
  1351  	return nil
  1352  }
  1353  
  1354  // MacipACLDetails defines message 'macip_acl_details'.
  1355  type MacipACLDetails struct {
  1356  	ACLIndex uint32                   `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
  1357  	Tag      string                   `binapi:"string[64],name=tag" json:"tag,omitempty"`
  1358  	Count    uint32                   `binapi:"u32,name=count" json:"-"`
  1359  	R        []acl_types.MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
  1360  }
  1361  
  1362  func (m *MacipACLDetails) Reset()               { *m = MacipACLDetails{} }
  1363  func (*MacipACLDetails) GetMessageName() string { return "macip_acl_details" }
  1364  func (*MacipACLDetails) GetCrcString() string   { return "27135b59" }
  1365  func (*MacipACLDetails) GetMessageType() api.MessageType {
  1366  	return api.ReplyMessage
  1367  }
  1368  
  1369  func (m *MacipACLDetails) Size() (size int) {
  1370  	if m == nil {
  1371  		return 0
  1372  	}
  1373  	size += 4  // m.ACLIndex
  1374  	size += 64 // m.Tag
  1375  	size += 4  // m.Count
  1376  	for j1 := 0; j1 < len(m.R); j1++ {
  1377  		var s1 acl_types.MacipACLRule
  1378  		_ = s1
  1379  		if j1 < len(m.R) {
  1380  			s1 = m.R[j1]
  1381  		}
  1382  		size += 1      // s1.IsPermit
  1383  		size += 1 * 6  // s1.SrcMac
  1384  		size += 1 * 6  // s1.SrcMacMask
  1385  		size += 1      // s1.SrcPrefix.Address.Af
  1386  		size += 1 * 16 // s1.SrcPrefix.Address.Un
  1387  		size += 1      // s1.SrcPrefix.Len
  1388  	}
  1389  	return size
  1390  }
  1391  func (m *MacipACLDetails) Marshal(b []byte) ([]byte, error) {
  1392  	if b == nil {
  1393  		b = make([]byte, m.Size())
  1394  	}
  1395  	buf := codec.NewBuffer(b)
  1396  	buf.EncodeUint32(m.ACLIndex)
  1397  	buf.EncodeString(m.Tag, 64)
  1398  	buf.EncodeUint32(uint32(len(m.R)))
  1399  	for j0 := 0; j0 < len(m.R); j0++ {
  1400  		var v0 acl_types.MacipACLRule // R
  1401  		if j0 < len(m.R) {
  1402  			v0 = m.R[j0]
  1403  		}
  1404  		buf.EncodeUint8(uint8(v0.IsPermit))
  1405  		buf.EncodeBytes(v0.SrcMac[:], 6)
  1406  		buf.EncodeBytes(v0.SrcMacMask[:], 6)
  1407  		buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af))
  1408  		buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 16)
  1409  		buf.EncodeUint8(v0.SrcPrefix.Len)
  1410  	}
  1411  	return buf.Bytes(), nil
  1412  }
  1413  func (m *MacipACLDetails) Unmarshal(b []byte) error {
  1414  	buf := codec.NewBuffer(b)
  1415  	m.ACLIndex = buf.DecodeUint32()
  1416  	m.Tag = buf.DecodeString(64)
  1417  	m.Count = buf.DecodeUint32()
  1418  	m.R = make([]acl_types.MacipACLRule, m.Count)
  1419  	for j0 := 0; j0 < len(m.R); j0++ {
  1420  		m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8())
  1421  		copy(m.R[j0].SrcMac[:], buf.DecodeBytes(6))
  1422  		copy(m.R[j0].SrcMacMask[:], buf.DecodeBytes(6))
  1423  		m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1424  		copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1425  		m.R[j0].SrcPrefix.Len = buf.DecodeUint8()
  1426  	}
  1427  	return nil
  1428  }
  1429  
  1430  // MacipACLDump defines message 'macip_acl_dump'.
  1431  type MacipACLDump struct {
  1432  	ACLIndex uint32 `binapi:"u32,name=acl_index,default=4294967295" json:"acl_index,omitempty"`
  1433  }
  1434  
  1435  func (m *MacipACLDump) Reset()               { *m = MacipACLDump{} }
  1436  func (*MacipACLDump) GetMessageName() string { return "macip_acl_dump" }
  1437  func (*MacipACLDump) GetCrcString() string   { return "ef34fea4" }
  1438  func (*MacipACLDump) GetMessageType() api.MessageType {
  1439  	return api.RequestMessage
  1440  }
  1441  
  1442  func (m *MacipACLDump) Size() (size int) {
  1443  	if m == nil {
  1444  		return 0
  1445  	}
  1446  	size += 4 // m.ACLIndex
  1447  	return size
  1448  }
  1449  func (m *MacipACLDump) Marshal(b []byte) ([]byte, error) {
  1450  	if b == nil {
  1451  		b = make([]byte, m.Size())
  1452  	}
  1453  	buf := codec.NewBuffer(b)
  1454  	buf.EncodeUint32(m.ACLIndex)
  1455  	return buf.Bytes(), nil
  1456  }
  1457  func (m *MacipACLDump) Unmarshal(b []byte) error {
  1458  	buf := codec.NewBuffer(b)
  1459  	m.ACLIndex = buf.DecodeUint32()
  1460  	return nil
  1461  }
  1462  
  1463  // MacipACLInterfaceAddDel defines message 'macip_acl_interface_add_del'.
  1464  type MacipACLInterfaceAddDel struct {
  1465  	IsAdd     bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
  1466  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1467  	ACLIndex  uint32                         `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
  1468  }
  1469  
  1470  func (m *MacipACLInterfaceAddDel) Reset()               { *m = MacipACLInterfaceAddDel{} }
  1471  func (*MacipACLInterfaceAddDel) GetMessageName() string { return "macip_acl_interface_add_del" }
  1472  func (*MacipACLInterfaceAddDel) GetCrcString() string   { return "4b8690b1" }
  1473  func (*MacipACLInterfaceAddDel) GetMessageType() api.MessageType {
  1474  	return api.RequestMessage
  1475  }
  1476  
  1477  func (m *MacipACLInterfaceAddDel) Size() (size int) {
  1478  	if m == nil {
  1479  		return 0
  1480  	}
  1481  	size += 1 // m.IsAdd
  1482  	size += 4 // m.SwIfIndex
  1483  	size += 4 // m.ACLIndex
  1484  	return size
  1485  }
  1486  func (m *MacipACLInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
  1487  	if b == nil {
  1488  		b = make([]byte, m.Size())
  1489  	}
  1490  	buf := codec.NewBuffer(b)
  1491  	buf.EncodeBool(m.IsAdd)
  1492  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1493  	buf.EncodeUint32(m.ACLIndex)
  1494  	return buf.Bytes(), nil
  1495  }
  1496  func (m *MacipACLInterfaceAddDel) Unmarshal(b []byte) error {
  1497  	buf := codec.NewBuffer(b)
  1498  	m.IsAdd = buf.DecodeBool()
  1499  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1500  	m.ACLIndex = buf.DecodeUint32()
  1501  	return nil
  1502  }
  1503  
  1504  // MacipACLInterfaceAddDelReply defines message 'macip_acl_interface_add_del_reply'.
  1505  type MacipACLInterfaceAddDelReply struct {
  1506  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1507  }
  1508  
  1509  func (m *MacipACLInterfaceAddDelReply) Reset() { *m = MacipACLInterfaceAddDelReply{} }
  1510  func (*MacipACLInterfaceAddDelReply) GetMessageName() string {
  1511  	return "macip_acl_interface_add_del_reply"
  1512  }
  1513  func (*MacipACLInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
  1514  func (*MacipACLInterfaceAddDelReply) GetMessageType() api.MessageType {
  1515  	return api.ReplyMessage
  1516  }
  1517  
  1518  func (m *MacipACLInterfaceAddDelReply) Size() (size int) {
  1519  	if m == nil {
  1520  		return 0
  1521  	}
  1522  	size += 4 // m.Retval
  1523  	return size
  1524  }
  1525  func (m *MacipACLInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
  1526  	if b == nil {
  1527  		b = make([]byte, m.Size())
  1528  	}
  1529  	buf := codec.NewBuffer(b)
  1530  	buf.EncodeInt32(m.Retval)
  1531  	return buf.Bytes(), nil
  1532  }
  1533  func (m *MacipACLInterfaceAddDelReply) Unmarshal(b []byte) error {
  1534  	buf := codec.NewBuffer(b)
  1535  	m.Retval = buf.DecodeInt32()
  1536  	return nil
  1537  }
  1538  
  1539  // MacipACLInterfaceGet defines message 'macip_acl_interface_get'.
  1540  type MacipACLInterfaceGet struct{}
  1541  
  1542  func (m *MacipACLInterfaceGet) Reset()               { *m = MacipACLInterfaceGet{} }
  1543  func (*MacipACLInterfaceGet) GetMessageName() string { return "macip_acl_interface_get" }
  1544  func (*MacipACLInterfaceGet) GetCrcString() string   { return "51077d14" }
  1545  func (*MacipACLInterfaceGet) GetMessageType() api.MessageType {
  1546  	return api.RequestMessage
  1547  }
  1548  
  1549  func (m *MacipACLInterfaceGet) Size() (size int) {
  1550  	if m == nil {
  1551  		return 0
  1552  	}
  1553  	return size
  1554  }
  1555  func (m *MacipACLInterfaceGet) Marshal(b []byte) ([]byte, error) {
  1556  	if b == nil {
  1557  		b = make([]byte, m.Size())
  1558  	}
  1559  	buf := codec.NewBuffer(b)
  1560  	return buf.Bytes(), nil
  1561  }
  1562  func (m *MacipACLInterfaceGet) Unmarshal(b []byte) error {
  1563  	return nil
  1564  }
  1565  
  1566  // MacipACLInterfaceGetReply defines message 'macip_acl_interface_get_reply'.
  1567  type MacipACLInterfaceGetReply struct {
  1568  	Count uint32   `binapi:"u32,name=count" json:"-"`
  1569  	Acls  []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
  1570  }
  1571  
  1572  func (m *MacipACLInterfaceGetReply) Reset()               { *m = MacipACLInterfaceGetReply{} }
  1573  func (*MacipACLInterfaceGetReply) GetMessageName() string { return "macip_acl_interface_get_reply" }
  1574  func (*MacipACLInterfaceGetReply) GetCrcString() string   { return "accf9b05" }
  1575  func (*MacipACLInterfaceGetReply) GetMessageType() api.MessageType {
  1576  	return api.ReplyMessage
  1577  }
  1578  
  1579  func (m *MacipACLInterfaceGetReply) Size() (size int) {
  1580  	if m == nil {
  1581  		return 0
  1582  	}
  1583  	size += 4               // m.Count
  1584  	size += 4 * len(m.Acls) // m.Acls
  1585  	return size
  1586  }
  1587  func (m *MacipACLInterfaceGetReply) Marshal(b []byte) ([]byte, error) {
  1588  	if b == nil {
  1589  		b = make([]byte, m.Size())
  1590  	}
  1591  	buf := codec.NewBuffer(b)
  1592  	buf.EncodeUint32(uint32(len(m.Acls)))
  1593  	for i := 0; i < len(m.Acls); i++ {
  1594  		var x uint32
  1595  		if i < len(m.Acls) {
  1596  			x = uint32(m.Acls[i])
  1597  		}
  1598  		buf.EncodeUint32(x)
  1599  	}
  1600  	return buf.Bytes(), nil
  1601  }
  1602  func (m *MacipACLInterfaceGetReply) Unmarshal(b []byte) error {
  1603  	buf := codec.NewBuffer(b)
  1604  	m.Count = buf.DecodeUint32()
  1605  	m.Acls = make([]uint32, m.Count)
  1606  	for i := 0; i < len(m.Acls); i++ {
  1607  		m.Acls[i] = buf.DecodeUint32()
  1608  	}
  1609  	return nil
  1610  }
  1611  
  1612  // MacipACLInterfaceListDetails defines message 'macip_acl_interface_list_details'.
  1613  type MacipACLInterfaceListDetails struct {
  1614  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1615  	Count     uint8                          `binapi:"u8,name=count" json:"-"`
  1616  	Acls      []uint32                       `binapi:"u32[count],name=acls" json:"acls,omitempty"`
  1617  }
  1618  
  1619  func (m *MacipACLInterfaceListDetails) Reset() { *m = MacipACLInterfaceListDetails{} }
  1620  func (*MacipACLInterfaceListDetails) GetMessageName() string {
  1621  	return "macip_acl_interface_list_details"
  1622  }
  1623  func (*MacipACLInterfaceListDetails) GetCrcString() string { return "a0c5d56d" }
  1624  func (*MacipACLInterfaceListDetails) GetMessageType() api.MessageType {
  1625  	return api.ReplyMessage
  1626  }
  1627  
  1628  func (m *MacipACLInterfaceListDetails) Size() (size int) {
  1629  	if m == nil {
  1630  		return 0
  1631  	}
  1632  	size += 4               // m.SwIfIndex
  1633  	size += 1               // m.Count
  1634  	size += 4 * len(m.Acls) // m.Acls
  1635  	return size
  1636  }
  1637  func (m *MacipACLInterfaceListDetails) Marshal(b []byte) ([]byte, error) {
  1638  	if b == nil {
  1639  		b = make([]byte, m.Size())
  1640  	}
  1641  	buf := codec.NewBuffer(b)
  1642  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1643  	buf.EncodeUint8(uint8(len(m.Acls)))
  1644  	for i := 0; i < len(m.Acls); i++ {
  1645  		var x uint32
  1646  		if i < len(m.Acls) {
  1647  			x = uint32(m.Acls[i])
  1648  		}
  1649  		buf.EncodeUint32(x)
  1650  	}
  1651  	return buf.Bytes(), nil
  1652  }
  1653  func (m *MacipACLInterfaceListDetails) Unmarshal(b []byte) error {
  1654  	buf := codec.NewBuffer(b)
  1655  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1656  	m.Count = buf.DecodeUint8()
  1657  	m.Acls = make([]uint32, m.Count)
  1658  	for i := 0; i < len(m.Acls); i++ {
  1659  		m.Acls[i] = buf.DecodeUint32()
  1660  	}
  1661  	return nil
  1662  }
  1663  
  1664  // MacipACLInterfaceListDump defines message 'macip_acl_interface_list_dump'.
  1665  type MacipACLInterfaceListDump struct {
  1666  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1667  }
  1668  
  1669  func (m *MacipACLInterfaceListDump) Reset()               { *m = MacipACLInterfaceListDump{} }
  1670  func (*MacipACLInterfaceListDump) GetMessageName() string { return "macip_acl_interface_list_dump" }
  1671  func (*MacipACLInterfaceListDump) GetCrcString() string   { return "f9e6675e" }
  1672  func (*MacipACLInterfaceListDump) GetMessageType() api.MessageType {
  1673  	return api.RequestMessage
  1674  }
  1675  
  1676  func (m *MacipACLInterfaceListDump) Size() (size int) {
  1677  	if m == nil {
  1678  		return 0
  1679  	}
  1680  	size += 4 // m.SwIfIndex
  1681  	return size
  1682  }
  1683  func (m *MacipACLInterfaceListDump) Marshal(b []byte) ([]byte, error) {
  1684  	if b == nil {
  1685  		b = make([]byte, m.Size())
  1686  	}
  1687  	buf := codec.NewBuffer(b)
  1688  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1689  	return buf.Bytes(), nil
  1690  }
  1691  func (m *MacipACLInterfaceListDump) Unmarshal(b []byte) error {
  1692  	buf := codec.NewBuffer(b)
  1693  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1694  	return nil
  1695  }
  1696  
  1697  func init() { file_acl_binapi_init() }
  1698  func file_acl_binapi_init() {
  1699  	api.RegisterMessage((*ACLAddReplace)(nil), "acl_add_replace_ee5c2f18")
  1700  	api.RegisterMessage((*ACLAddReplaceReply)(nil), "acl_add_replace_reply_ac407b0c")
  1701  	api.RegisterMessage((*ACLDel)(nil), "acl_del_ef34fea4")
  1702  	api.RegisterMessage((*ACLDelReply)(nil), "acl_del_reply_e8d4e804")
  1703  	api.RegisterMessage((*ACLDetails)(nil), "acl_details_95babae0")
  1704  	api.RegisterMessage((*ACLDump)(nil), "acl_dump_ef34fea4")
  1705  	api.RegisterMessage((*ACLInterfaceAddDel)(nil), "acl_interface_add_del_4b54bebd")
  1706  	api.RegisterMessage((*ACLInterfaceAddDelReply)(nil), "acl_interface_add_del_reply_e8d4e804")
  1707  	api.RegisterMessage((*ACLInterfaceEtypeWhitelistDetails)(nil), "acl_interface_etype_whitelist_details_cc2bfded")
  1708  	api.RegisterMessage((*ACLInterfaceEtypeWhitelistDump)(nil), "acl_interface_etype_whitelist_dump_f9e6675e")
  1709  	api.RegisterMessage((*ACLInterfaceListDetails)(nil), "acl_interface_list_details_e695d256")
  1710  	api.RegisterMessage((*ACLInterfaceListDump)(nil), "acl_interface_list_dump_f9e6675e")
  1711  	api.RegisterMessage((*ACLInterfaceSetACLList)(nil), "acl_interface_set_acl_list_473982bd")
  1712  	api.RegisterMessage((*ACLInterfaceSetACLListReply)(nil), "acl_interface_set_acl_list_reply_e8d4e804")
  1713  	api.RegisterMessage((*ACLInterfaceSetEtypeWhitelist)(nil), "acl_interface_set_etype_whitelist_3f5c2d2d")
  1714  	api.RegisterMessage((*ACLInterfaceSetEtypeWhitelistReply)(nil), "acl_interface_set_etype_whitelist_reply_e8d4e804")
  1715  	api.RegisterMessage((*ACLPluginControlPing)(nil), "acl_plugin_control_ping_51077d14")
  1716  	api.RegisterMessage((*ACLPluginControlPingReply)(nil), "acl_plugin_control_ping_reply_f6b0b8ca")
  1717  	api.RegisterMessage((*ACLPluginGetConnTableMaxEntries)(nil), "acl_plugin_get_conn_table_max_entries_51077d14")
  1718  	api.RegisterMessage((*ACLPluginGetConnTableMaxEntriesReply)(nil), "acl_plugin_get_conn_table_max_entries_reply_7a096d3d")
  1719  	api.RegisterMessage((*ACLPluginGetVersion)(nil), "acl_plugin_get_version_51077d14")
  1720  	api.RegisterMessage((*ACLPluginGetVersionReply)(nil), "acl_plugin_get_version_reply_9b32cf86")
  1721  	api.RegisterMessage((*ACLStatsIntfCountersEnable)(nil), "acl_stats_intf_counters_enable_b3e225d2")
  1722  	api.RegisterMessage((*ACLStatsIntfCountersEnableReply)(nil), "acl_stats_intf_counters_enable_reply_e8d4e804")
  1723  	api.RegisterMessage((*MacipACLAdd)(nil), "macip_acl_add_ce6fbad0")
  1724  	api.RegisterMessage((*MacipACLAddReplace)(nil), "macip_acl_add_replace_2a461dd4")
  1725  	api.RegisterMessage((*MacipACLAddReplaceReply)(nil), "macip_acl_add_replace_reply_ac407b0c")
  1726  	api.RegisterMessage((*MacipACLAddReply)(nil), "macip_acl_add_reply_ac407b0c")
  1727  	api.RegisterMessage((*MacipACLDel)(nil), "macip_acl_del_ef34fea4")
  1728  	api.RegisterMessage((*MacipACLDelReply)(nil), "macip_acl_del_reply_e8d4e804")
  1729  	api.RegisterMessage((*MacipACLDetails)(nil), "macip_acl_details_27135b59")
  1730  	api.RegisterMessage((*MacipACLDump)(nil), "macip_acl_dump_ef34fea4")
  1731  	api.RegisterMessage((*MacipACLInterfaceAddDel)(nil), "macip_acl_interface_add_del_4b8690b1")
  1732  	api.RegisterMessage((*MacipACLInterfaceAddDelReply)(nil), "macip_acl_interface_add_del_reply_e8d4e804")
  1733  	api.RegisterMessage((*MacipACLInterfaceGet)(nil), "macip_acl_interface_get_51077d14")
  1734  	api.RegisterMessage((*MacipACLInterfaceGetReply)(nil), "macip_acl_interface_get_reply_accf9b05")
  1735  	api.RegisterMessage((*MacipACLInterfaceListDetails)(nil), "macip_acl_interface_list_details_a0c5d56d")
  1736  	api.RegisterMessage((*MacipACLInterfaceListDump)(nil), "macip_acl_interface_list_dump_f9e6675e")
  1737  }
  1738  
  1739  // Messages returns list of all messages in this module.
  1740  func AllMessages() []api.Message {
  1741  	return []api.Message{
  1742  		(*ACLAddReplace)(nil),
  1743  		(*ACLAddReplaceReply)(nil),
  1744  		(*ACLDel)(nil),
  1745  		(*ACLDelReply)(nil),
  1746  		(*ACLDetails)(nil),
  1747  		(*ACLDump)(nil),
  1748  		(*ACLInterfaceAddDel)(nil),
  1749  		(*ACLInterfaceAddDelReply)(nil),
  1750  		(*ACLInterfaceEtypeWhitelistDetails)(nil),
  1751  		(*ACLInterfaceEtypeWhitelistDump)(nil),
  1752  		(*ACLInterfaceListDetails)(nil),
  1753  		(*ACLInterfaceListDump)(nil),
  1754  		(*ACLInterfaceSetACLList)(nil),
  1755  		(*ACLInterfaceSetACLListReply)(nil),
  1756  		(*ACLInterfaceSetEtypeWhitelist)(nil),
  1757  		(*ACLInterfaceSetEtypeWhitelistReply)(nil),
  1758  		(*ACLPluginControlPing)(nil),
  1759  		(*ACLPluginControlPingReply)(nil),
  1760  		(*ACLPluginGetConnTableMaxEntries)(nil),
  1761  		(*ACLPluginGetConnTableMaxEntriesReply)(nil),
  1762  		(*ACLPluginGetVersion)(nil),
  1763  		(*ACLPluginGetVersionReply)(nil),
  1764  		(*ACLStatsIntfCountersEnable)(nil),
  1765  		(*ACLStatsIntfCountersEnableReply)(nil),
  1766  		(*MacipACLAdd)(nil),
  1767  		(*MacipACLAddReplace)(nil),
  1768  		(*MacipACLAddReplaceReply)(nil),
  1769  		(*MacipACLAddReply)(nil),
  1770  		(*MacipACLDel)(nil),
  1771  		(*MacipACLDelReply)(nil),
  1772  		(*MacipACLDetails)(nil),
  1773  		(*MacipACLDump)(nil),
  1774  		(*MacipACLInterfaceAddDel)(nil),
  1775  		(*MacipACLInterfaceAddDelReply)(nil),
  1776  		(*MacipACLInterfaceGet)(nil),
  1777  		(*MacipACLInterfaceGetReply)(nil),
  1778  		(*MacipACLInterfaceListDetails)(nil),
  1779  		(*MacipACLInterfaceListDump)(nil),
  1780  	}
  1781  }