github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/rd_cp/rd_cp.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/core/rd_cp.api.json
     6  
     7  // Package rd_cp contains generated bindings for API file rd_cp.api.
     8  //
     9  // Contents:
    10  //   2 messages
    11  //
    12  package rd_cp
    13  
    14  import (
    15  	api "git.fd.io/govpp.git/api"
    16  	codec "git.fd.io/govpp.git/codec"
    17  	interface_types "github.com/edwarnicke/govpp/binapi/interface_types"
    18  )
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the GoVPP api package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // GoVPP api package needs to be updated.
    24  const _ = api.GoVppAPIPackageIsVersion2
    25  
    26  const (
    27  	APIFile    = "rd_cp"
    28  	APIVersion = "1.0.1"
    29  	VersionCrc = 0x871c3bee
    30  )
    31  
    32  // IP6NdAddressAutoconfig defines message 'ip6_nd_address_autoconfig'.
    33  type IP6NdAddressAutoconfig struct {
    34  	SwIfIndex            interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
    35  	Enable               bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
    36  	InstallDefaultRoutes bool                           `binapi:"bool,name=install_default_routes" json:"install_default_routes,omitempty"`
    37  }
    38  
    39  func (m *IP6NdAddressAutoconfig) Reset()               { *m = IP6NdAddressAutoconfig{} }
    40  func (*IP6NdAddressAutoconfig) GetMessageName() string { return "ip6_nd_address_autoconfig" }
    41  func (*IP6NdAddressAutoconfig) GetCrcString() string   { return "9e14a4a7" }
    42  func (*IP6NdAddressAutoconfig) GetMessageType() api.MessageType {
    43  	return api.RequestMessage
    44  }
    45  
    46  func (m *IP6NdAddressAutoconfig) Size() (size int) {
    47  	if m == nil {
    48  		return 0
    49  	}
    50  	size += 4 // m.SwIfIndex
    51  	size += 1 // m.Enable
    52  	size += 1 // m.InstallDefaultRoutes
    53  	return size
    54  }
    55  func (m *IP6NdAddressAutoconfig) Marshal(b []byte) ([]byte, error) {
    56  	if b == nil {
    57  		b = make([]byte, m.Size())
    58  	}
    59  	buf := codec.NewBuffer(b)
    60  	buf.EncodeUint32(uint32(m.SwIfIndex))
    61  	buf.EncodeBool(m.Enable)
    62  	buf.EncodeBool(m.InstallDefaultRoutes)
    63  	return buf.Bytes(), nil
    64  }
    65  func (m *IP6NdAddressAutoconfig) Unmarshal(b []byte) error {
    66  	buf := codec.NewBuffer(b)
    67  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
    68  	m.Enable = buf.DecodeBool()
    69  	m.InstallDefaultRoutes = buf.DecodeBool()
    70  	return nil
    71  }
    72  
    73  // IP6NdAddressAutoconfigReply defines message 'ip6_nd_address_autoconfig_reply'.
    74  type IP6NdAddressAutoconfigReply struct {
    75  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
    76  }
    77  
    78  func (m *IP6NdAddressAutoconfigReply) Reset()               { *m = IP6NdAddressAutoconfigReply{} }
    79  func (*IP6NdAddressAutoconfigReply) GetMessageName() string { return "ip6_nd_address_autoconfig_reply" }
    80  func (*IP6NdAddressAutoconfigReply) GetCrcString() string   { return "e8d4e804" }
    81  func (*IP6NdAddressAutoconfigReply) GetMessageType() api.MessageType {
    82  	return api.ReplyMessage
    83  }
    84  
    85  func (m *IP6NdAddressAutoconfigReply) Size() (size int) {
    86  	if m == nil {
    87  		return 0
    88  	}
    89  	size += 4 // m.Retval
    90  	return size
    91  }
    92  func (m *IP6NdAddressAutoconfigReply) Marshal(b []byte) ([]byte, error) {
    93  	if b == nil {
    94  		b = make([]byte, m.Size())
    95  	}
    96  	buf := codec.NewBuffer(b)
    97  	buf.EncodeInt32(m.Retval)
    98  	return buf.Bytes(), nil
    99  }
   100  func (m *IP6NdAddressAutoconfigReply) Unmarshal(b []byte) error {
   101  	buf := codec.NewBuffer(b)
   102  	m.Retval = buf.DecodeInt32()
   103  	return nil
   104  }
   105  
   106  func init() { file_rd_cp_binapi_init() }
   107  func file_rd_cp_binapi_init() {
   108  	api.RegisterMessage((*IP6NdAddressAutoconfig)(nil), "ip6_nd_address_autoconfig_9e14a4a7")
   109  	api.RegisterMessage((*IP6NdAddressAutoconfigReply)(nil), "ip6_nd_address_autoconfig_reply_e8d4e804")
   110  }
   111  
   112  // Messages returns list of all messages in this module.
   113  func AllMessages() []api.Message {
   114  	return []api.Message{
   115  		(*IP6NdAddressAutoconfig)(nil),
   116  		(*IP6NdAddressAutoconfigReply)(nil),
   117  	}
   118  }