github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/l2tp/l2tp.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/l2tp.api.json
     6  
     7  // Package l2tp contains generated bindings for API file l2tp.api.
     8  //
     9  // Contents:
    10  //   1 enum
    11  //  10 messages
    12  //
    13  package l2tp
    14  
    15  import (
    16  	"strconv"
    17  
    18  	api "git.fd.io/govpp.git/api"
    19  	codec "git.fd.io/govpp.git/codec"
    20  	_ "github.com/edwarnicke/govpp/binapi/ethernet_types"
    21  	interface_types "github.com/edwarnicke/govpp/binapi/interface_types"
    22  	ip_types "github.com/edwarnicke/govpp/binapi/ip_types"
    23  )
    24  
    25  // This is a compile-time assertion to ensure that this generated file
    26  // is compatible with the GoVPP api package it is being compiled against.
    27  // A compilation error at this line likely means your copy of the
    28  // GoVPP api package needs to be updated.
    29  const _ = api.GoVppAPIPackageIsVersion2
    30  
    31  const (
    32  	APIFile    = "l2tp"
    33  	APIVersion = "2.0.0"
    34  	VersionCrc = 0x256cef81
    35  )
    36  
    37  // L2tLookupKey defines enum 'l2t_lookup_key'.
    38  type L2tLookupKey uint8
    39  
    40  const (
    41  	L2T_LOOKUP_KEY_API_SRC_ADDR   L2tLookupKey = 0
    42  	L2T_LOOKUP_KEY_API_DST_ADDR   L2tLookupKey = 1
    43  	L2T_LOOKUP_KEY_API_SESSION_ID L2tLookupKey = 2
    44  )
    45  
    46  var (
    47  	L2tLookupKey_name = map[uint8]string{
    48  		0: "L2T_LOOKUP_KEY_API_SRC_ADDR",
    49  		1: "L2T_LOOKUP_KEY_API_DST_ADDR",
    50  		2: "L2T_LOOKUP_KEY_API_SESSION_ID",
    51  	}
    52  	L2tLookupKey_value = map[string]uint8{
    53  		"L2T_LOOKUP_KEY_API_SRC_ADDR":   0,
    54  		"L2T_LOOKUP_KEY_API_DST_ADDR":   1,
    55  		"L2T_LOOKUP_KEY_API_SESSION_ID": 2,
    56  	}
    57  )
    58  
    59  func (x L2tLookupKey) String() string {
    60  	s, ok := L2tLookupKey_name[uint8(x)]
    61  	if ok {
    62  		return s
    63  	}
    64  	return "L2tLookupKey(" + strconv.Itoa(int(x)) + ")"
    65  }
    66  
    67  // L2tpv3CreateTunnel defines message 'l2tpv3_create_tunnel'.
    68  type L2tpv3CreateTunnel struct {
    69  	ClientAddress     ip_types.Address `binapi:"address,name=client_address" json:"client_address,omitempty"`
    70  	OurAddress        ip_types.Address `binapi:"address,name=our_address" json:"our_address,omitempty"`
    71  	LocalSessionID    uint32           `binapi:"u32,name=local_session_id" json:"local_session_id,omitempty"`
    72  	RemoteSessionID   uint32           `binapi:"u32,name=remote_session_id" json:"remote_session_id,omitempty"`
    73  	LocalCookie       uint64           `binapi:"u64,name=local_cookie" json:"local_cookie,omitempty"`
    74  	RemoteCookie      uint64           `binapi:"u64,name=remote_cookie" json:"remote_cookie,omitempty"`
    75  	L2SublayerPresent bool             `binapi:"bool,name=l2_sublayer_present" json:"l2_sublayer_present,omitempty"`
    76  	EncapVrfID        uint32           `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
    77  }
    78  
    79  func (m *L2tpv3CreateTunnel) Reset()               { *m = L2tpv3CreateTunnel{} }
    80  func (*L2tpv3CreateTunnel) GetMessageName() string { return "l2tpv3_create_tunnel" }
    81  func (*L2tpv3CreateTunnel) GetCrcString() string   { return "15bed0c2" }
    82  func (*L2tpv3CreateTunnel) GetMessageType() api.MessageType {
    83  	return api.RequestMessage
    84  }
    85  
    86  func (m *L2tpv3CreateTunnel) Size() (size int) {
    87  	if m == nil {
    88  		return 0
    89  	}
    90  	size += 1      // m.ClientAddress.Af
    91  	size += 1 * 16 // m.ClientAddress.Un
    92  	size += 1      // m.OurAddress.Af
    93  	size += 1 * 16 // m.OurAddress.Un
    94  	size += 4      // m.LocalSessionID
    95  	size += 4      // m.RemoteSessionID
    96  	size += 8      // m.LocalCookie
    97  	size += 8      // m.RemoteCookie
    98  	size += 1      // m.L2SublayerPresent
    99  	size += 4      // m.EncapVrfID
   100  	return size
   101  }
   102  func (m *L2tpv3CreateTunnel) Marshal(b []byte) ([]byte, error) {
   103  	if b == nil {
   104  		b = make([]byte, m.Size())
   105  	}
   106  	buf := codec.NewBuffer(b)
   107  	buf.EncodeUint8(uint8(m.ClientAddress.Af))
   108  	buf.EncodeBytes(m.ClientAddress.Un.XXX_UnionData[:], 16)
   109  	buf.EncodeUint8(uint8(m.OurAddress.Af))
   110  	buf.EncodeBytes(m.OurAddress.Un.XXX_UnionData[:], 16)
   111  	buf.EncodeUint32(m.LocalSessionID)
   112  	buf.EncodeUint32(m.RemoteSessionID)
   113  	buf.EncodeUint64(m.LocalCookie)
   114  	buf.EncodeUint64(m.RemoteCookie)
   115  	buf.EncodeBool(m.L2SublayerPresent)
   116  	buf.EncodeUint32(m.EncapVrfID)
   117  	return buf.Bytes(), nil
   118  }
   119  func (m *L2tpv3CreateTunnel) Unmarshal(b []byte) error {
   120  	buf := codec.NewBuffer(b)
   121  	m.ClientAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   122  	copy(m.ClientAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   123  	m.OurAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   124  	copy(m.OurAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   125  	m.LocalSessionID = buf.DecodeUint32()
   126  	m.RemoteSessionID = buf.DecodeUint32()
   127  	m.LocalCookie = buf.DecodeUint64()
   128  	m.RemoteCookie = buf.DecodeUint64()
   129  	m.L2SublayerPresent = buf.DecodeBool()
   130  	m.EncapVrfID = buf.DecodeUint32()
   131  	return nil
   132  }
   133  
   134  // L2tpv3CreateTunnelReply defines message 'l2tpv3_create_tunnel_reply'.
   135  type L2tpv3CreateTunnelReply struct {
   136  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   137  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   138  }
   139  
   140  func (m *L2tpv3CreateTunnelReply) Reset()               { *m = L2tpv3CreateTunnelReply{} }
   141  func (*L2tpv3CreateTunnelReply) GetMessageName() string { return "l2tpv3_create_tunnel_reply" }
   142  func (*L2tpv3CreateTunnelReply) GetCrcString() string   { return "5383d31f" }
   143  func (*L2tpv3CreateTunnelReply) GetMessageType() api.MessageType {
   144  	return api.ReplyMessage
   145  }
   146  
   147  func (m *L2tpv3CreateTunnelReply) Size() (size int) {
   148  	if m == nil {
   149  		return 0
   150  	}
   151  	size += 4 // m.Retval
   152  	size += 4 // m.SwIfIndex
   153  	return size
   154  }
   155  func (m *L2tpv3CreateTunnelReply) Marshal(b []byte) ([]byte, error) {
   156  	if b == nil {
   157  		b = make([]byte, m.Size())
   158  	}
   159  	buf := codec.NewBuffer(b)
   160  	buf.EncodeInt32(m.Retval)
   161  	buf.EncodeUint32(uint32(m.SwIfIndex))
   162  	return buf.Bytes(), nil
   163  }
   164  func (m *L2tpv3CreateTunnelReply) Unmarshal(b []byte) error {
   165  	buf := codec.NewBuffer(b)
   166  	m.Retval = buf.DecodeInt32()
   167  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   168  	return nil
   169  }
   170  
   171  // L2tpv3InterfaceEnableDisable defines message 'l2tpv3_interface_enable_disable'.
   172  type L2tpv3InterfaceEnableDisable struct {
   173  	EnableDisable bool                           `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
   174  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   175  }
   176  
   177  func (m *L2tpv3InterfaceEnableDisable) Reset() { *m = L2tpv3InterfaceEnableDisable{} }
   178  func (*L2tpv3InterfaceEnableDisable) GetMessageName() string {
   179  	return "l2tpv3_interface_enable_disable"
   180  }
   181  func (*L2tpv3InterfaceEnableDisable) GetCrcString() string { return "3865946c" }
   182  func (*L2tpv3InterfaceEnableDisable) GetMessageType() api.MessageType {
   183  	return api.RequestMessage
   184  }
   185  
   186  func (m *L2tpv3InterfaceEnableDisable) Size() (size int) {
   187  	if m == nil {
   188  		return 0
   189  	}
   190  	size += 1 // m.EnableDisable
   191  	size += 4 // m.SwIfIndex
   192  	return size
   193  }
   194  func (m *L2tpv3InterfaceEnableDisable) Marshal(b []byte) ([]byte, error) {
   195  	if b == nil {
   196  		b = make([]byte, m.Size())
   197  	}
   198  	buf := codec.NewBuffer(b)
   199  	buf.EncodeBool(m.EnableDisable)
   200  	buf.EncodeUint32(uint32(m.SwIfIndex))
   201  	return buf.Bytes(), nil
   202  }
   203  func (m *L2tpv3InterfaceEnableDisable) Unmarshal(b []byte) error {
   204  	buf := codec.NewBuffer(b)
   205  	m.EnableDisable = buf.DecodeBool()
   206  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   207  	return nil
   208  }
   209  
   210  // L2tpv3InterfaceEnableDisableReply defines message 'l2tpv3_interface_enable_disable_reply'.
   211  type L2tpv3InterfaceEnableDisableReply struct {
   212  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   213  }
   214  
   215  func (m *L2tpv3InterfaceEnableDisableReply) Reset() { *m = L2tpv3InterfaceEnableDisableReply{} }
   216  func (*L2tpv3InterfaceEnableDisableReply) GetMessageName() string {
   217  	return "l2tpv3_interface_enable_disable_reply"
   218  }
   219  func (*L2tpv3InterfaceEnableDisableReply) GetCrcString() string { return "e8d4e804" }
   220  func (*L2tpv3InterfaceEnableDisableReply) GetMessageType() api.MessageType {
   221  	return api.ReplyMessage
   222  }
   223  
   224  func (m *L2tpv3InterfaceEnableDisableReply) Size() (size int) {
   225  	if m == nil {
   226  		return 0
   227  	}
   228  	size += 4 // m.Retval
   229  	return size
   230  }
   231  func (m *L2tpv3InterfaceEnableDisableReply) Marshal(b []byte) ([]byte, error) {
   232  	if b == nil {
   233  		b = make([]byte, m.Size())
   234  	}
   235  	buf := codec.NewBuffer(b)
   236  	buf.EncodeInt32(m.Retval)
   237  	return buf.Bytes(), nil
   238  }
   239  func (m *L2tpv3InterfaceEnableDisableReply) Unmarshal(b []byte) error {
   240  	buf := codec.NewBuffer(b)
   241  	m.Retval = buf.DecodeInt32()
   242  	return nil
   243  }
   244  
   245  // L2tpv3SetLookupKey defines message 'l2tpv3_set_lookup_key'.
   246  type L2tpv3SetLookupKey struct {
   247  	Key L2tLookupKey `binapi:"l2t_lookup_key,name=key" json:"key,omitempty"`
   248  }
   249  
   250  func (m *L2tpv3SetLookupKey) Reset()               { *m = L2tpv3SetLookupKey{} }
   251  func (*L2tpv3SetLookupKey) GetMessageName() string { return "l2tpv3_set_lookup_key" }
   252  func (*L2tpv3SetLookupKey) GetCrcString() string   { return "c9892c86" }
   253  func (*L2tpv3SetLookupKey) GetMessageType() api.MessageType {
   254  	return api.RequestMessage
   255  }
   256  
   257  func (m *L2tpv3SetLookupKey) Size() (size int) {
   258  	if m == nil {
   259  		return 0
   260  	}
   261  	size += 1 // m.Key
   262  	return size
   263  }
   264  func (m *L2tpv3SetLookupKey) Marshal(b []byte) ([]byte, error) {
   265  	if b == nil {
   266  		b = make([]byte, m.Size())
   267  	}
   268  	buf := codec.NewBuffer(b)
   269  	buf.EncodeUint8(uint8(m.Key))
   270  	return buf.Bytes(), nil
   271  }
   272  func (m *L2tpv3SetLookupKey) Unmarshal(b []byte) error {
   273  	buf := codec.NewBuffer(b)
   274  	m.Key = L2tLookupKey(buf.DecodeUint8())
   275  	return nil
   276  }
   277  
   278  // L2tpv3SetLookupKeyReply defines message 'l2tpv3_set_lookup_key_reply'.
   279  type L2tpv3SetLookupKeyReply struct {
   280  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   281  }
   282  
   283  func (m *L2tpv3SetLookupKeyReply) Reset()               { *m = L2tpv3SetLookupKeyReply{} }
   284  func (*L2tpv3SetLookupKeyReply) GetMessageName() string { return "l2tpv3_set_lookup_key_reply" }
   285  func (*L2tpv3SetLookupKeyReply) GetCrcString() string   { return "e8d4e804" }
   286  func (*L2tpv3SetLookupKeyReply) GetMessageType() api.MessageType {
   287  	return api.ReplyMessage
   288  }
   289  
   290  func (m *L2tpv3SetLookupKeyReply) Size() (size int) {
   291  	if m == nil {
   292  		return 0
   293  	}
   294  	size += 4 // m.Retval
   295  	return size
   296  }
   297  func (m *L2tpv3SetLookupKeyReply) Marshal(b []byte) ([]byte, error) {
   298  	if b == nil {
   299  		b = make([]byte, m.Size())
   300  	}
   301  	buf := codec.NewBuffer(b)
   302  	buf.EncodeInt32(m.Retval)
   303  	return buf.Bytes(), nil
   304  }
   305  func (m *L2tpv3SetLookupKeyReply) Unmarshal(b []byte) error {
   306  	buf := codec.NewBuffer(b)
   307  	m.Retval = buf.DecodeInt32()
   308  	return nil
   309  }
   310  
   311  // L2tpv3SetTunnelCookies defines message 'l2tpv3_set_tunnel_cookies'.
   312  type L2tpv3SetTunnelCookies struct {
   313  	SwIfIndex       interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   314  	NewLocalCookie  uint64                         `binapi:"u64,name=new_local_cookie" json:"new_local_cookie,omitempty"`
   315  	NewRemoteCookie uint64                         `binapi:"u64,name=new_remote_cookie" json:"new_remote_cookie,omitempty"`
   316  }
   317  
   318  func (m *L2tpv3SetTunnelCookies) Reset()               { *m = L2tpv3SetTunnelCookies{} }
   319  func (*L2tpv3SetTunnelCookies) GetMessageName() string { return "l2tpv3_set_tunnel_cookies" }
   320  func (*L2tpv3SetTunnelCookies) GetCrcString() string   { return "b3f4faf7" }
   321  func (*L2tpv3SetTunnelCookies) GetMessageType() api.MessageType {
   322  	return api.RequestMessage
   323  }
   324  
   325  func (m *L2tpv3SetTunnelCookies) Size() (size int) {
   326  	if m == nil {
   327  		return 0
   328  	}
   329  	size += 4 // m.SwIfIndex
   330  	size += 8 // m.NewLocalCookie
   331  	size += 8 // m.NewRemoteCookie
   332  	return size
   333  }
   334  func (m *L2tpv3SetTunnelCookies) Marshal(b []byte) ([]byte, error) {
   335  	if b == nil {
   336  		b = make([]byte, m.Size())
   337  	}
   338  	buf := codec.NewBuffer(b)
   339  	buf.EncodeUint32(uint32(m.SwIfIndex))
   340  	buf.EncodeUint64(m.NewLocalCookie)
   341  	buf.EncodeUint64(m.NewRemoteCookie)
   342  	return buf.Bytes(), nil
   343  }
   344  func (m *L2tpv3SetTunnelCookies) Unmarshal(b []byte) error {
   345  	buf := codec.NewBuffer(b)
   346  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   347  	m.NewLocalCookie = buf.DecodeUint64()
   348  	m.NewRemoteCookie = buf.DecodeUint64()
   349  	return nil
   350  }
   351  
   352  // L2tpv3SetTunnelCookiesReply defines message 'l2tpv3_set_tunnel_cookies_reply'.
   353  type L2tpv3SetTunnelCookiesReply struct {
   354  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   355  }
   356  
   357  func (m *L2tpv3SetTunnelCookiesReply) Reset()               { *m = L2tpv3SetTunnelCookiesReply{} }
   358  func (*L2tpv3SetTunnelCookiesReply) GetMessageName() string { return "l2tpv3_set_tunnel_cookies_reply" }
   359  func (*L2tpv3SetTunnelCookiesReply) GetCrcString() string   { return "e8d4e804" }
   360  func (*L2tpv3SetTunnelCookiesReply) GetMessageType() api.MessageType {
   361  	return api.ReplyMessage
   362  }
   363  
   364  func (m *L2tpv3SetTunnelCookiesReply) Size() (size int) {
   365  	if m == nil {
   366  		return 0
   367  	}
   368  	size += 4 // m.Retval
   369  	return size
   370  }
   371  func (m *L2tpv3SetTunnelCookiesReply) Marshal(b []byte) ([]byte, error) {
   372  	if b == nil {
   373  		b = make([]byte, m.Size())
   374  	}
   375  	buf := codec.NewBuffer(b)
   376  	buf.EncodeInt32(m.Retval)
   377  	return buf.Bytes(), nil
   378  }
   379  func (m *L2tpv3SetTunnelCookiesReply) Unmarshal(b []byte) error {
   380  	buf := codec.NewBuffer(b)
   381  	m.Retval = buf.DecodeInt32()
   382  	return nil
   383  }
   384  
   385  // SwIfL2tpv3TunnelDetails defines message 'sw_if_l2tpv3_tunnel_details'.
   386  type SwIfL2tpv3TunnelDetails struct {
   387  	SwIfIndex         interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   388  	InterfaceName     string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
   389  	ClientAddress     ip_types.Address               `binapi:"address,name=client_address" json:"client_address,omitempty"`
   390  	OurAddress        ip_types.Address               `binapi:"address,name=our_address" json:"our_address,omitempty"`
   391  	LocalSessionID    uint32                         `binapi:"u32,name=local_session_id" json:"local_session_id,omitempty"`
   392  	RemoteSessionID   uint32                         `binapi:"u32,name=remote_session_id" json:"remote_session_id,omitempty"`
   393  	LocalCookie       []uint64                       `binapi:"u64[2],name=local_cookie" json:"local_cookie,omitempty"`
   394  	RemoteCookie      uint64                         `binapi:"u64,name=remote_cookie" json:"remote_cookie,omitempty"`
   395  	L2SublayerPresent bool                           `binapi:"bool,name=l2_sublayer_present" json:"l2_sublayer_present,omitempty"`
   396  }
   397  
   398  func (m *SwIfL2tpv3TunnelDetails) Reset()               { *m = SwIfL2tpv3TunnelDetails{} }
   399  func (*SwIfL2tpv3TunnelDetails) GetMessageName() string { return "sw_if_l2tpv3_tunnel_details" }
   400  func (*SwIfL2tpv3TunnelDetails) GetCrcString() string   { return "50b88993" }
   401  func (*SwIfL2tpv3TunnelDetails) GetMessageType() api.MessageType {
   402  	return api.ReplyMessage
   403  }
   404  
   405  func (m *SwIfL2tpv3TunnelDetails) Size() (size int) {
   406  	if m == nil {
   407  		return 0
   408  	}
   409  	size += 4      // m.SwIfIndex
   410  	size += 64     // m.InterfaceName
   411  	size += 1      // m.ClientAddress.Af
   412  	size += 1 * 16 // m.ClientAddress.Un
   413  	size += 1      // m.OurAddress.Af
   414  	size += 1 * 16 // m.OurAddress.Un
   415  	size += 4      // m.LocalSessionID
   416  	size += 4      // m.RemoteSessionID
   417  	size += 8 * 2  // m.LocalCookie
   418  	size += 8      // m.RemoteCookie
   419  	size += 1      // m.L2SublayerPresent
   420  	return size
   421  }
   422  func (m *SwIfL2tpv3TunnelDetails) Marshal(b []byte) ([]byte, error) {
   423  	if b == nil {
   424  		b = make([]byte, m.Size())
   425  	}
   426  	buf := codec.NewBuffer(b)
   427  	buf.EncodeUint32(uint32(m.SwIfIndex))
   428  	buf.EncodeString(m.InterfaceName, 64)
   429  	buf.EncodeUint8(uint8(m.ClientAddress.Af))
   430  	buf.EncodeBytes(m.ClientAddress.Un.XXX_UnionData[:], 16)
   431  	buf.EncodeUint8(uint8(m.OurAddress.Af))
   432  	buf.EncodeBytes(m.OurAddress.Un.XXX_UnionData[:], 16)
   433  	buf.EncodeUint32(m.LocalSessionID)
   434  	buf.EncodeUint32(m.RemoteSessionID)
   435  	for i := 0; i < 2; i++ {
   436  		var x uint64
   437  		if i < len(m.LocalCookie) {
   438  			x = uint64(m.LocalCookie[i])
   439  		}
   440  		buf.EncodeUint64(x)
   441  	}
   442  	buf.EncodeUint64(m.RemoteCookie)
   443  	buf.EncodeBool(m.L2SublayerPresent)
   444  	return buf.Bytes(), nil
   445  }
   446  func (m *SwIfL2tpv3TunnelDetails) Unmarshal(b []byte) error {
   447  	buf := codec.NewBuffer(b)
   448  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   449  	m.InterfaceName = buf.DecodeString(64)
   450  	m.ClientAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   451  	copy(m.ClientAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   452  	m.OurAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   453  	copy(m.OurAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   454  	m.LocalSessionID = buf.DecodeUint32()
   455  	m.RemoteSessionID = buf.DecodeUint32()
   456  	m.LocalCookie = make([]uint64, 2)
   457  	for i := 0; i < len(m.LocalCookie); i++ {
   458  		m.LocalCookie[i] = buf.DecodeUint64()
   459  	}
   460  	m.RemoteCookie = buf.DecodeUint64()
   461  	m.L2SublayerPresent = buf.DecodeBool()
   462  	return nil
   463  }
   464  
   465  // SwIfL2tpv3TunnelDump defines message 'sw_if_l2tpv3_tunnel_dump'.
   466  type SwIfL2tpv3TunnelDump struct{}
   467  
   468  func (m *SwIfL2tpv3TunnelDump) Reset()               { *m = SwIfL2tpv3TunnelDump{} }
   469  func (*SwIfL2tpv3TunnelDump) GetMessageName() string { return "sw_if_l2tpv3_tunnel_dump" }
   470  func (*SwIfL2tpv3TunnelDump) GetCrcString() string   { return "51077d14" }
   471  func (*SwIfL2tpv3TunnelDump) GetMessageType() api.MessageType {
   472  	return api.RequestMessage
   473  }
   474  
   475  func (m *SwIfL2tpv3TunnelDump) Size() (size int) {
   476  	if m == nil {
   477  		return 0
   478  	}
   479  	return size
   480  }
   481  func (m *SwIfL2tpv3TunnelDump) Marshal(b []byte) ([]byte, error) {
   482  	if b == nil {
   483  		b = make([]byte, m.Size())
   484  	}
   485  	buf := codec.NewBuffer(b)
   486  	return buf.Bytes(), nil
   487  }
   488  func (m *SwIfL2tpv3TunnelDump) Unmarshal(b []byte) error {
   489  	return nil
   490  }
   491  
   492  func init() { file_l2tp_binapi_init() }
   493  func file_l2tp_binapi_init() {
   494  	api.RegisterMessage((*L2tpv3CreateTunnel)(nil), "l2tpv3_create_tunnel_15bed0c2")
   495  	api.RegisterMessage((*L2tpv3CreateTunnelReply)(nil), "l2tpv3_create_tunnel_reply_5383d31f")
   496  	api.RegisterMessage((*L2tpv3InterfaceEnableDisable)(nil), "l2tpv3_interface_enable_disable_3865946c")
   497  	api.RegisterMessage((*L2tpv3InterfaceEnableDisableReply)(nil), "l2tpv3_interface_enable_disable_reply_e8d4e804")
   498  	api.RegisterMessage((*L2tpv3SetLookupKey)(nil), "l2tpv3_set_lookup_key_c9892c86")
   499  	api.RegisterMessage((*L2tpv3SetLookupKeyReply)(nil), "l2tpv3_set_lookup_key_reply_e8d4e804")
   500  	api.RegisterMessage((*L2tpv3SetTunnelCookies)(nil), "l2tpv3_set_tunnel_cookies_b3f4faf7")
   501  	api.RegisterMessage((*L2tpv3SetTunnelCookiesReply)(nil), "l2tpv3_set_tunnel_cookies_reply_e8d4e804")
   502  	api.RegisterMessage((*SwIfL2tpv3TunnelDetails)(nil), "sw_if_l2tpv3_tunnel_details_50b88993")
   503  	api.RegisterMessage((*SwIfL2tpv3TunnelDump)(nil), "sw_if_l2tpv3_tunnel_dump_51077d14")
   504  }
   505  
   506  // Messages returns list of all messages in this module.
   507  func AllMessages() []api.Message {
   508  	return []api.Message{
   509  		(*L2tpv3CreateTunnel)(nil),
   510  		(*L2tpv3CreateTunnelReply)(nil),
   511  		(*L2tpv3InterfaceEnableDisable)(nil),
   512  		(*L2tpv3InterfaceEnableDisableReply)(nil),
   513  		(*L2tpv3SetLookupKey)(nil),
   514  		(*L2tpv3SetLookupKeyReply)(nil),
   515  		(*L2tpv3SetTunnelCookies)(nil),
   516  		(*L2tpv3SetTunnelCookiesReply)(nil),
   517  		(*SwIfL2tpv3TunnelDetails)(nil),
   518  		(*SwIfL2tpv3TunnelDump)(nil),
   519  	}
   520  }