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