github.com/networkservicemesh/govpp@v0.0.0-20240328101142-8a444680fbba/binapi/ipip/ipip.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: core/ipip.api.json
     6  
     7  // Package ipip contains generated bindings for API file ipip.api.
     8  //
     9  // Contents:
    10  // -  1 struct
    11  // - 10 messages
    12  package ipip
    13  
    14  import (
    15  	interface_types "github.com/networkservicemesh/govpp/binapi/interface_types"
    16  	ip_types "github.com/networkservicemesh/govpp/binapi/ip_types"
    17  	tunnel_types "github.com/networkservicemesh/govpp/binapi/tunnel_types"
    18  	api "go.fd.io/govpp/api"
    19  	codec "go.fd.io/govpp/codec"
    20  )
    21  
    22  // This is a compile-time assertion to ensure that this generated file
    23  // is compatible with the GoVPP api package it is being compiled against.
    24  // A compilation error at this line likely means your copy of the
    25  // GoVPP api package needs to be updated.
    26  const _ = api.GoVppAPIPackageIsVersion2
    27  
    28  const (
    29  	APIFile    = "ipip"
    30  	APIVersion = "2.0.2"
    31  	VersionCrc = 0x4609caba
    32  )
    33  
    34  // IpipTunnel defines type 'ipip_tunnel'.
    35  type IpipTunnel struct {
    36  	Instance  uint32                             `binapi:"u32,name=instance" json:"instance,omitempty"`
    37  	Src       ip_types.Address                   `binapi:"address,name=src" json:"src,omitempty"`
    38  	Dst       ip_types.Address                   `binapi:"address,name=dst" json:"dst,omitempty"`
    39  	SwIfIndex interface_types.InterfaceIndex     `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
    40  	TableID   uint32                             `binapi:"u32,name=table_id" json:"table_id,omitempty"`
    41  	Flags     tunnel_types.TunnelEncapDecapFlags `binapi:"tunnel_encap_decap_flags,name=flags" json:"flags,omitempty"`
    42  	Mode      tunnel_types.TunnelMode            `binapi:"tunnel_mode,name=mode" json:"mode,omitempty"`
    43  	Dscp      ip_types.IPDscp                    `binapi:"ip_dscp,name=dscp" json:"dscp,omitempty"`
    44  }
    45  
    46  // * Create an IPv4 over IPv6 automatic tunnel (6RD)
    47  // Ipip6rdAddTunnel defines message 'ipip_6rd_add_tunnel'.
    48  type Ipip6rdAddTunnel struct {
    49  	IP6TableID    uint32              `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
    50  	IP4TableID    uint32              `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
    51  	IP6Prefix     ip_types.IP6Prefix  `binapi:"ip6_prefix,name=ip6_prefix" json:"ip6_prefix,omitempty"`
    52  	IP4Prefix     ip_types.IP4Prefix  `binapi:"ip4_prefix,name=ip4_prefix" json:"ip4_prefix,omitempty"`
    53  	IP4Src        ip_types.IP4Address `binapi:"ip4_address,name=ip4_src" json:"ip4_src,omitempty"`
    54  	SecurityCheck bool                `binapi:"bool,name=security_check" json:"security_check,omitempty"`
    55  	TcTos         uint8               `binapi:"u8,name=tc_tos" json:"tc_tos,omitempty"`
    56  }
    57  
    58  func (m *Ipip6rdAddTunnel) Reset()               { *m = Ipip6rdAddTunnel{} }
    59  func (*Ipip6rdAddTunnel) GetMessageName() string { return "ipip_6rd_add_tunnel" }
    60  func (*Ipip6rdAddTunnel) GetCrcString() string   { return "b9ec1863" }
    61  func (*Ipip6rdAddTunnel) GetMessageType() api.MessageType {
    62  	return api.RequestMessage
    63  }
    64  
    65  func (m *Ipip6rdAddTunnel) Size() (size int) {
    66  	if m == nil {
    67  		return 0
    68  	}
    69  	size += 4      // m.IP6TableID
    70  	size += 4      // m.IP4TableID
    71  	size += 1 * 16 // m.IP6Prefix.Address
    72  	size += 1      // m.IP6Prefix.Len
    73  	size += 1 * 4  // m.IP4Prefix.Address
    74  	size += 1      // m.IP4Prefix.Len
    75  	size += 1 * 4  // m.IP4Src
    76  	size += 1      // m.SecurityCheck
    77  	size += 1      // m.TcTos
    78  	return size
    79  }
    80  func (m *Ipip6rdAddTunnel) Marshal(b []byte) ([]byte, error) {
    81  	if b == nil {
    82  		b = make([]byte, m.Size())
    83  	}
    84  	buf := codec.NewBuffer(b)
    85  	buf.EncodeUint32(m.IP6TableID)
    86  	buf.EncodeUint32(m.IP4TableID)
    87  	buf.EncodeBytes(m.IP6Prefix.Address[:], 16)
    88  	buf.EncodeUint8(m.IP6Prefix.Len)
    89  	buf.EncodeBytes(m.IP4Prefix.Address[:], 4)
    90  	buf.EncodeUint8(m.IP4Prefix.Len)
    91  	buf.EncodeBytes(m.IP4Src[:], 4)
    92  	buf.EncodeBool(m.SecurityCheck)
    93  	buf.EncodeUint8(m.TcTos)
    94  	return buf.Bytes(), nil
    95  }
    96  func (m *Ipip6rdAddTunnel) Unmarshal(b []byte) error {
    97  	buf := codec.NewBuffer(b)
    98  	m.IP6TableID = buf.DecodeUint32()
    99  	m.IP4TableID = buf.DecodeUint32()
   100  	copy(m.IP6Prefix.Address[:], buf.DecodeBytes(16))
   101  	m.IP6Prefix.Len = buf.DecodeUint8()
   102  	copy(m.IP4Prefix.Address[:], buf.DecodeBytes(4))
   103  	m.IP4Prefix.Len = buf.DecodeUint8()
   104  	copy(m.IP4Src[:], buf.DecodeBytes(4))
   105  	m.SecurityCheck = buf.DecodeBool()
   106  	m.TcTos = buf.DecodeUint8()
   107  	return nil
   108  }
   109  
   110  // Ipip6rdAddTunnelReply defines message 'ipip_6rd_add_tunnel_reply'.
   111  type Ipip6rdAddTunnelReply struct {
   112  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   113  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   114  }
   115  
   116  func (m *Ipip6rdAddTunnelReply) Reset()               { *m = Ipip6rdAddTunnelReply{} }
   117  func (*Ipip6rdAddTunnelReply) GetMessageName() string { return "ipip_6rd_add_tunnel_reply" }
   118  func (*Ipip6rdAddTunnelReply) GetCrcString() string   { return "5383d31f" }
   119  func (*Ipip6rdAddTunnelReply) GetMessageType() api.MessageType {
   120  	return api.ReplyMessage
   121  }
   122  
   123  func (m *Ipip6rdAddTunnelReply) Size() (size int) {
   124  	if m == nil {
   125  		return 0
   126  	}
   127  	size += 4 // m.Retval
   128  	size += 4 // m.SwIfIndex
   129  	return size
   130  }
   131  func (m *Ipip6rdAddTunnelReply) Marshal(b []byte) ([]byte, error) {
   132  	if b == nil {
   133  		b = make([]byte, m.Size())
   134  	}
   135  	buf := codec.NewBuffer(b)
   136  	buf.EncodeInt32(m.Retval)
   137  	buf.EncodeUint32(uint32(m.SwIfIndex))
   138  	return buf.Bytes(), nil
   139  }
   140  func (m *Ipip6rdAddTunnelReply) Unmarshal(b []byte) error {
   141  	buf := codec.NewBuffer(b)
   142  	m.Retval = buf.DecodeInt32()
   143  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   144  	return nil
   145  }
   146  
   147  // * Delete an IPv4 over IPv6 automatic tunnel (6RD)
   148  // Ipip6rdDelTunnel defines message 'ipip_6rd_del_tunnel'.
   149  type Ipip6rdDelTunnel struct {
   150  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   151  }
   152  
   153  func (m *Ipip6rdDelTunnel) Reset()               { *m = Ipip6rdDelTunnel{} }
   154  func (*Ipip6rdDelTunnel) GetMessageName() string { return "ipip_6rd_del_tunnel" }
   155  func (*Ipip6rdDelTunnel) GetCrcString() string   { return "f9e6675e" }
   156  func (*Ipip6rdDelTunnel) GetMessageType() api.MessageType {
   157  	return api.RequestMessage
   158  }
   159  
   160  func (m *Ipip6rdDelTunnel) Size() (size int) {
   161  	if m == nil {
   162  		return 0
   163  	}
   164  	size += 4 // m.SwIfIndex
   165  	return size
   166  }
   167  func (m *Ipip6rdDelTunnel) Marshal(b []byte) ([]byte, error) {
   168  	if b == nil {
   169  		b = make([]byte, m.Size())
   170  	}
   171  	buf := codec.NewBuffer(b)
   172  	buf.EncodeUint32(uint32(m.SwIfIndex))
   173  	return buf.Bytes(), nil
   174  }
   175  func (m *Ipip6rdDelTunnel) Unmarshal(b []byte) error {
   176  	buf := codec.NewBuffer(b)
   177  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   178  	return nil
   179  }
   180  
   181  // Ipip6rdDelTunnelReply defines message 'ipip_6rd_del_tunnel_reply'.
   182  type Ipip6rdDelTunnelReply struct {
   183  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   184  }
   185  
   186  func (m *Ipip6rdDelTunnelReply) Reset()               { *m = Ipip6rdDelTunnelReply{} }
   187  func (*Ipip6rdDelTunnelReply) GetMessageName() string { return "ipip_6rd_del_tunnel_reply" }
   188  func (*Ipip6rdDelTunnelReply) GetCrcString() string   { return "e8d4e804" }
   189  func (*Ipip6rdDelTunnelReply) GetMessageType() api.MessageType {
   190  	return api.ReplyMessage
   191  }
   192  
   193  func (m *Ipip6rdDelTunnelReply) Size() (size int) {
   194  	if m == nil {
   195  		return 0
   196  	}
   197  	size += 4 // m.Retval
   198  	return size
   199  }
   200  func (m *Ipip6rdDelTunnelReply) Marshal(b []byte) ([]byte, error) {
   201  	if b == nil {
   202  		b = make([]byte, m.Size())
   203  	}
   204  	buf := codec.NewBuffer(b)
   205  	buf.EncodeInt32(m.Retval)
   206  	return buf.Bytes(), nil
   207  }
   208  func (m *Ipip6rdDelTunnelReply) Unmarshal(b []byte) error {
   209  	buf := codec.NewBuffer(b)
   210  	m.Retval = buf.DecodeInt32()
   211  	return nil
   212  }
   213  
   214  // * Create an IP{v4,v6} over IP{v4,v6} tunnel.
   215  // IpipAddTunnel defines message 'ipip_add_tunnel'.
   216  type IpipAddTunnel struct {
   217  	Tunnel IpipTunnel `binapi:"ipip_tunnel,name=tunnel" json:"tunnel,omitempty"`
   218  }
   219  
   220  func (m *IpipAddTunnel) Reset()               { *m = IpipAddTunnel{} }
   221  func (*IpipAddTunnel) GetMessageName() string { return "ipip_add_tunnel" }
   222  func (*IpipAddTunnel) GetCrcString() string   { return "2ac399f5" }
   223  func (*IpipAddTunnel) GetMessageType() api.MessageType {
   224  	return api.RequestMessage
   225  }
   226  
   227  func (m *IpipAddTunnel) Size() (size int) {
   228  	if m == nil {
   229  		return 0
   230  	}
   231  	size += 4      // m.Tunnel.Instance
   232  	size += 1      // m.Tunnel.Src.Af
   233  	size += 1 * 16 // m.Tunnel.Src.Un
   234  	size += 1      // m.Tunnel.Dst.Af
   235  	size += 1 * 16 // m.Tunnel.Dst.Un
   236  	size += 4      // m.Tunnel.SwIfIndex
   237  	size += 4      // m.Tunnel.TableID
   238  	size += 1      // m.Tunnel.Flags
   239  	size += 1      // m.Tunnel.Mode
   240  	size += 1      // m.Tunnel.Dscp
   241  	return size
   242  }
   243  func (m *IpipAddTunnel) Marshal(b []byte) ([]byte, error) {
   244  	if b == nil {
   245  		b = make([]byte, m.Size())
   246  	}
   247  	buf := codec.NewBuffer(b)
   248  	buf.EncodeUint32(m.Tunnel.Instance)
   249  	buf.EncodeUint8(uint8(m.Tunnel.Src.Af))
   250  	buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
   251  	buf.EncodeUint8(uint8(m.Tunnel.Dst.Af))
   252  	buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
   253  	buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
   254  	buf.EncodeUint32(m.Tunnel.TableID)
   255  	buf.EncodeUint8(uint8(m.Tunnel.Flags))
   256  	buf.EncodeUint8(uint8(m.Tunnel.Mode))
   257  	buf.EncodeUint8(uint8(m.Tunnel.Dscp))
   258  	return buf.Bytes(), nil
   259  }
   260  func (m *IpipAddTunnel) Unmarshal(b []byte) error {
   261  	buf := codec.NewBuffer(b)
   262  	m.Tunnel.Instance = buf.DecodeUint32()
   263  	m.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
   264  	copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   265  	m.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
   266  	copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   267  	m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   268  	m.Tunnel.TableID = buf.DecodeUint32()
   269  	m.Tunnel.Flags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
   270  	m.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
   271  	m.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8())
   272  	return nil
   273  }
   274  
   275  // IpipAddTunnelReply defines message 'ipip_add_tunnel_reply'.
   276  type IpipAddTunnelReply struct {
   277  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   278  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   279  }
   280  
   281  func (m *IpipAddTunnelReply) Reset()               { *m = IpipAddTunnelReply{} }
   282  func (*IpipAddTunnelReply) GetMessageName() string { return "ipip_add_tunnel_reply" }
   283  func (*IpipAddTunnelReply) GetCrcString() string   { return "5383d31f" }
   284  func (*IpipAddTunnelReply) GetMessageType() api.MessageType {
   285  	return api.ReplyMessage
   286  }
   287  
   288  func (m *IpipAddTunnelReply) Size() (size int) {
   289  	if m == nil {
   290  		return 0
   291  	}
   292  	size += 4 // m.Retval
   293  	size += 4 // m.SwIfIndex
   294  	return size
   295  }
   296  func (m *IpipAddTunnelReply) Marshal(b []byte) ([]byte, error) {
   297  	if b == nil {
   298  		b = make([]byte, m.Size())
   299  	}
   300  	buf := codec.NewBuffer(b)
   301  	buf.EncodeInt32(m.Retval)
   302  	buf.EncodeUint32(uint32(m.SwIfIndex))
   303  	return buf.Bytes(), nil
   304  }
   305  func (m *IpipAddTunnelReply) Unmarshal(b []byte) error {
   306  	buf := codec.NewBuffer(b)
   307  	m.Retval = buf.DecodeInt32()
   308  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   309  	return nil
   310  }
   311  
   312  // * Delete an IP{v4,v6} over IP{v4,v6} tunnel.
   313  // IpipDelTunnel defines message 'ipip_del_tunnel'.
   314  type IpipDelTunnel struct {
   315  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   316  }
   317  
   318  func (m *IpipDelTunnel) Reset()               { *m = IpipDelTunnel{} }
   319  func (*IpipDelTunnel) GetMessageName() string { return "ipip_del_tunnel" }
   320  func (*IpipDelTunnel) GetCrcString() string   { return "f9e6675e" }
   321  func (*IpipDelTunnel) GetMessageType() api.MessageType {
   322  	return api.RequestMessage
   323  }
   324  
   325  func (m *IpipDelTunnel) Size() (size int) {
   326  	if m == nil {
   327  		return 0
   328  	}
   329  	size += 4 // m.SwIfIndex
   330  	return size
   331  }
   332  func (m *IpipDelTunnel) Marshal(b []byte) ([]byte, error) {
   333  	if b == nil {
   334  		b = make([]byte, m.Size())
   335  	}
   336  	buf := codec.NewBuffer(b)
   337  	buf.EncodeUint32(uint32(m.SwIfIndex))
   338  	return buf.Bytes(), nil
   339  }
   340  func (m *IpipDelTunnel) Unmarshal(b []byte) error {
   341  	buf := codec.NewBuffer(b)
   342  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   343  	return nil
   344  }
   345  
   346  // IpipDelTunnelReply defines message 'ipip_del_tunnel_reply'.
   347  type IpipDelTunnelReply struct {
   348  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   349  }
   350  
   351  func (m *IpipDelTunnelReply) Reset()               { *m = IpipDelTunnelReply{} }
   352  func (*IpipDelTunnelReply) GetMessageName() string { return "ipip_del_tunnel_reply" }
   353  func (*IpipDelTunnelReply) GetCrcString() string   { return "e8d4e804" }
   354  func (*IpipDelTunnelReply) GetMessageType() api.MessageType {
   355  	return api.ReplyMessage
   356  }
   357  
   358  func (m *IpipDelTunnelReply) Size() (size int) {
   359  	if m == nil {
   360  		return 0
   361  	}
   362  	size += 4 // m.Retval
   363  	return size
   364  }
   365  func (m *IpipDelTunnelReply) Marshal(b []byte) ([]byte, error) {
   366  	if b == nil {
   367  		b = make([]byte, m.Size())
   368  	}
   369  	buf := codec.NewBuffer(b)
   370  	buf.EncodeInt32(m.Retval)
   371  	return buf.Bytes(), nil
   372  }
   373  func (m *IpipDelTunnelReply) Unmarshal(b []byte) error {
   374  	buf := codec.NewBuffer(b)
   375  	m.Retval = buf.DecodeInt32()
   376  	return nil
   377  }
   378  
   379  // IpipTunnelDetails defines message 'ipip_tunnel_details'.
   380  type IpipTunnelDetails struct {
   381  	Tunnel IpipTunnel `binapi:"ipip_tunnel,name=tunnel" json:"tunnel,omitempty"`
   382  }
   383  
   384  func (m *IpipTunnelDetails) Reset()               { *m = IpipTunnelDetails{} }
   385  func (*IpipTunnelDetails) GetMessageName() string { return "ipip_tunnel_details" }
   386  func (*IpipTunnelDetails) GetCrcString() string   { return "d31cb34e" }
   387  func (*IpipTunnelDetails) GetMessageType() api.MessageType {
   388  	return api.ReplyMessage
   389  }
   390  
   391  func (m *IpipTunnelDetails) Size() (size int) {
   392  	if m == nil {
   393  		return 0
   394  	}
   395  	size += 4      // m.Tunnel.Instance
   396  	size += 1      // m.Tunnel.Src.Af
   397  	size += 1 * 16 // m.Tunnel.Src.Un
   398  	size += 1      // m.Tunnel.Dst.Af
   399  	size += 1 * 16 // m.Tunnel.Dst.Un
   400  	size += 4      // m.Tunnel.SwIfIndex
   401  	size += 4      // m.Tunnel.TableID
   402  	size += 1      // m.Tunnel.Flags
   403  	size += 1      // m.Tunnel.Mode
   404  	size += 1      // m.Tunnel.Dscp
   405  	return size
   406  }
   407  func (m *IpipTunnelDetails) Marshal(b []byte) ([]byte, error) {
   408  	if b == nil {
   409  		b = make([]byte, m.Size())
   410  	}
   411  	buf := codec.NewBuffer(b)
   412  	buf.EncodeUint32(m.Tunnel.Instance)
   413  	buf.EncodeUint8(uint8(m.Tunnel.Src.Af))
   414  	buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
   415  	buf.EncodeUint8(uint8(m.Tunnel.Dst.Af))
   416  	buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
   417  	buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
   418  	buf.EncodeUint32(m.Tunnel.TableID)
   419  	buf.EncodeUint8(uint8(m.Tunnel.Flags))
   420  	buf.EncodeUint8(uint8(m.Tunnel.Mode))
   421  	buf.EncodeUint8(uint8(m.Tunnel.Dscp))
   422  	return buf.Bytes(), nil
   423  }
   424  func (m *IpipTunnelDetails) Unmarshal(b []byte) error {
   425  	buf := codec.NewBuffer(b)
   426  	m.Tunnel.Instance = buf.DecodeUint32()
   427  	m.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
   428  	copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   429  	m.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
   430  	copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   431  	m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   432  	m.Tunnel.TableID = buf.DecodeUint32()
   433  	m.Tunnel.Flags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
   434  	m.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
   435  	m.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8())
   436  	return nil
   437  }
   438  
   439  // * List all IPIP tunnels
   440  // IpipTunnelDump defines message 'ipip_tunnel_dump'.
   441  type IpipTunnelDump struct {
   442  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   443  }
   444  
   445  func (m *IpipTunnelDump) Reset()               { *m = IpipTunnelDump{} }
   446  func (*IpipTunnelDump) GetMessageName() string { return "ipip_tunnel_dump" }
   447  func (*IpipTunnelDump) GetCrcString() string   { return "f9e6675e" }
   448  func (*IpipTunnelDump) GetMessageType() api.MessageType {
   449  	return api.RequestMessage
   450  }
   451  
   452  func (m *IpipTunnelDump) Size() (size int) {
   453  	if m == nil {
   454  		return 0
   455  	}
   456  	size += 4 // m.SwIfIndex
   457  	return size
   458  }
   459  func (m *IpipTunnelDump) Marshal(b []byte) ([]byte, error) {
   460  	if b == nil {
   461  		b = make([]byte, m.Size())
   462  	}
   463  	buf := codec.NewBuffer(b)
   464  	buf.EncodeUint32(uint32(m.SwIfIndex))
   465  	return buf.Bytes(), nil
   466  }
   467  func (m *IpipTunnelDump) Unmarshal(b []byte) error {
   468  	buf := codec.NewBuffer(b)
   469  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   470  	return nil
   471  }
   472  
   473  func init() { file_ipip_binapi_init() }
   474  func file_ipip_binapi_init() {
   475  	api.RegisterMessage((*Ipip6rdAddTunnel)(nil), "ipip_6rd_add_tunnel_b9ec1863")
   476  	api.RegisterMessage((*Ipip6rdAddTunnelReply)(nil), "ipip_6rd_add_tunnel_reply_5383d31f")
   477  	api.RegisterMessage((*Ipip6rdDelTunnel)(nil), "ipip_6rd_del_tunnel_f9e6675e")
   478  	api.RegisterMessage((*Ipip6rdDelTunnelReply)(nil), "ipip_6rd_del_tunnel_reply_e8d4e804")
   479  	api.RegisterMessage((*IpipAddTunnel)(nil), "ipip_add_tunnel_2ac399f5")
   480  	api.RegisterMessage((*IpipAddTunnelReply)(nil), "ipip_add_tunnel_reply_5383d31f")
   481  	api.RegisterMessage((*IpipDelTunnel)(nil), "ipip_del_tunnel_f9e6675e")
   482  	api.RegisterMessage((*IpipDelTunnelReply)(nil), "ipip_del_tunnel_reply_e8d4e804")
   483  	api.RegisterMessage((*IpipTunnelDetails)(nil), "ipip_tunnel_details_d31cb34e")
   484  	api.RegisterMessage((*IpipTunnelDump)(nil), "ipip_tunnel_dump_f9e6675e")
   485  }
   486  
   487  // Messages returns list of all messages in this module.
   488  func AllMessages() []api.Message {
   489  	return []api.Message{
   490  		(*Ipip6rdAddTunnel)(nil),
   491  		(*Ipip6rdAddTunnelReply)(nil),
   492  		(*Ipip6rdDelTunnel)(nil),
   493  		(*Ipip6rdDelTunnelReply)(nil),
   494  		(*IpipAddTunnel)(nil),
   495  		(*IpipAddTunnelReply)(nil),
   496  		(*IpipDelTunnel)(nil),
   497  		(*IpipDelTunnelReply)(nil),
   498  		(*IpipTunnelDetails)(nil),
   499  		(*IpipTunnelDump)(nil),
   500  	}
   501  }