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

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