go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2210/ip6_nd/ip6_nd.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 // Package ip6_nd contains generated bindings for API file ip6_nd.api. 4 // 5 // Contents: 6 // - 1 struct 7 // - 15 messages 8 package ip6_nd 9 10 import ( 11 api "go.fd.io/govpp/api" 12 codec "go.fd.io/govpp/codec" 13 interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2210/interface_types" 14 ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2210/ip_types" 15 ) 16 17 // This is a compile-time assertion to ensure that this generated file 18 // is compatible with the GoVPP api package it is being compiled against. 19 // A compilation error at this line likely means your copy of the 20 // GoVPP api package needs to be updated. 21 const _ = api.GoVppAPIPackageIsVersion2 22 23 const ( 24 APIFile = "ip6_nd" 25 APIVersion = "1.0.0" 26 VersionCrc = 0x64750117 27 ) 28 29 // IP6RaPrefixInfo defines type 'ip6_ra_prefix_info'. 30 type IP6RaPrefixInfo struct { 31 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 32 Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"` 33 ValidTime uint32 `binapi:"u32,name=valid_time" json:"valid_time,omitempty"` 34 PreferredTime uint32 `binapi:"u32,name=preferred_time" json:"preferred_time,omitempty"` 35 } 36 37 // IP6RaEvent defines message 'ip6_ra_event'. 38 type IP6RaEvent struct { 39 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 40 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 41 RouterAddr ip_types.IP6Address `binapi:"ip6_address,name=router_addr" json:"router_addr,omitempty"` 42 CurrentHopLimit uint8 `binapi:"u8,name=current_hop_limit" json:"current_hop_limit,omitempty"` 43 Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"` 44 RouterLifetimeInSec uint16 `binapi:"u16,name=router_lifetime_in_sec" json:"router_lifetime_in_sec,omitempty"` 45 NeighborReachableTimeInMsec uint32 `binapi:"u32,name=neighbor_reachable_time_in_msec" json:"neighbor_reachable_time_in_msec,omitempty"` 46 TimeInMsecBetweenRetransmittedNeighborSolicitations uint32 `binapi:"u32,name=time_in_msec_between_retransmitted_neighbor_solicitations" json:"time_in_msec_between_retransmitted_neighbor_solicitations,omitempty"` 47 NPrefixes uint32 `binapi:"u32,name=n_prefixes" json:"-"` 48 Prefixes []IP6RaPrefixInfo `binapi:"ip6_ra_prefix_info[n_prefixes],name=prefixes" json:"prefixes,omitempty"` 49 } 50 51 func (m *IP6RaEvent) Reset() { *m = IP6RaEvent{} } 52 func (*IP6RaEvent) GetMessageName() string { return "ip6_ra_event" } 53 func (*IP6RaEvent) GetCrcString() string { return "0364c1c5" } 54 func (*IP6RaEvent) GetMessageType() api.MessageType { 55 return api.EventMessage 56 } 57 58 func (m *IP6RaEvent) Size() (size int) { 59 if m == nil { 60 return 0 61 } 62 size += 4 // m.PID 63 size += 4 // m.SwIfIndex 64 size += 1 * 16 // m.RouterAddr 65 size += 1 // m.CurrentHopLimit 66 size += 1 // m.Flags 67 size += 2 // m.RouterLifetimeInSec 68 size += 4 // m.NeighborReachableTimeInMsec 69 size += 4 // m.TimeInMsecBetweenRetransmittedNeighborSolicitations 70 size += 4 // m.NPrefixes 71 for j1 := 0; j1 < len(m.Prefixes); j1++ { 72 var s1 IP6RaPrefixInfo 73 _ = s1 74 if j1 < len(m.Prefixes) { 75 s1 = m.Prefixes[j1] 76 } 77 size += 1 // s1.Prefix.Address.Af 78 size += 1 * 16 // s1.Prefix.Address.Un 79 size += 1 // s1.Prefix.Len 80 size += 1 // s1.Flags 81 size += 4 // s1.ValidTime 82 size += 4 // s1.PreferredTime 83 } 84 return size 85 } 86 func (m *IP6RaEvent) Marshal(b []byte) ([]byte, error) { 87 if b == nil { 88 b = make([]byte, m.Size()) 89 } 90 buf := codec.NewBuffer(b) 91 buf.EncodeUint32(m.PID) 92 buf.EncodeUint32(uint32(m.SwIfIndex)) 93 buf.EncodeBytes(m.RouterAddr[:], 16) 94 buf.EncodeUint8(m.CurrentHopLimit) 95 buf.EncodeUint8(m.Flags) 96 buf.EncodeUint16(m.RouterLifetimeInSec) 97 buf.EncodeUint32(m.NeighborReachableTimeInMsec) 98 buf.EncodeUint32(m.TimeInMsecBetweenRetransmittedNeighborSolicitations) 99 buf.EncodeUint32(uint32(len(m.Prefixes))) 100 for j0 := 0; j0 < len(m.Prefixes); j0++ { 101 var v0 IP6RaPrefixInfo // Prefixes 102 if j0 < len(m.Prefixes) { 103 v0 = m.Prefixes[j0] 104 } 105 buf.EncodeUint8(uint8(v0.Prefix.Address.Af)) 106 buf.EncodeBytes(v0.Prefix.Address.Un.XXX_UnionData[:], 16) 107 buf.EncodeUint8(v0.Prefix.Len) 108 buf.EncodeUint8(v0.Flags) 109 buf.EncodeUint32(v0.ValidTime) 110 buf.EncodeUint32(v0.PreferredTime) 111 } 112 return buf.Bytes(), nil 113 } 114 func (m *IP6RaEvent) Unmarshal(b []byte) error { 115 buf := codec.NewBuffer(b) 116 m.PID = buf.DecodeUint32() 117 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 118 copy(m.RouterAddr[:], buf.DecodeBytes(16)) 119 m.CurrentHopLimit = buf.DecodeUint8() 120 m.Flags = buf.DecodeUint8() 121 m.RouterLifetimeInSec = buf.DecodeUint16() 122 m.NeighborReachableTimeInMsec = buf.DecodeUint32() 123 m.TimeInMsecBetweenRetransmittedNeighborSolicitations = buf.DecodeUint32() 124 m.NPrefixes = buf.DecodeUint32() 125 m.Prefixes = make([]IP6RaPrefixInfo, m.NPrefixes) 126 for j0 := 0; j0 < len(m.Prefixes); j0++ { 127 m.Prefixes[j0].Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 128 copy(m.Prefixes[j0].Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 129 m.Prefixes[j0].Prefix.Len = buf.DecodeUint8() 130 m.Prefixes[j0].Flags = buf.DecodeUint8() 131 m.Prefixes[j0].ValidTime = buf.DecodeUint32() 132 m.Prefixes[j0].PreferredTime = buf.DecodeUint32() 133 } 134 return nil 135 } 136 137 // IP6ndProxyAddDel defines message 'ip6nd_proxy_add_del'. 138 type IP6ndProxyAddDel struct { 139 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 140 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 141 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"` 142 } 143 144 func (m *IP6ndProxyAddDel) Reset() { *m = IP6ndProxyAddDel{} } 145 func (*IP6ndProxyAddDel) GetMessageName() string { return "ip6nd_proxy_add_del" } 146 func (*IP6ndProxyAddDel) GetCrcString() string { return "c2e4a686" } 147 func (*IP6ndProxyAddDel) GetMessageType() api.MessageType { 148 return api.RequestMessage 149 } 150 151 func (m *IP6ndProxyAddDel) Size() (size int) { 152 if m == nil { 153 return 0 154 } 155 size += 4 // m.SwIfIndex 156 size += 1 // m.IsAdd 157 size += 1 * 16 // m.IP 158 return size 159 } 160 func (m *IP6ndProxyAddDel) Marshal(b []byte) ([]byte, error) { 161 if b == nil { 162 b = make([]byte, m.Size()) 163 } 164 buf := codec.NewBuffer(b) 165 buf.EncodeUint32(uint32(m.SwIfIndex)) 166 buf.EncodeBool(m.IsAdd) 167 buf.EncodeBytes(m.IP[:], 16) 168 return buf.Bytes(), nil 169 } 170 func (m *IP6ndProxyAddDel) Unmarshal(b []byte) error { 171 buf := codec.NewBuffer(b) 172 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 173 m.IsAdd = buf.DecodeBool() 174 copy(m.IP[:], buf.DecodeBytes(16)) 175 return nil 176 } 177 178 // IP6ndProxyAddDelReply defines message 'ip6nd_proxy_add_del_reply'. 179 type IP6ndProxyAddDelReply struct { 180 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 181 } 182 183 func (m *IP6ndProxyAddDelReply) Reset() { *m = IP6ndProxyAddDelReply{} } 184 func (*IP6ndProxyAddDelReply) GetMessageName() string { return "ip6nd_proxy_add_del_reply" } 185 func (*IP6ndProxyAddDelReply) GetCrcString() string { return "e8d4e804" } 186 func (*IP6ndProxyAddDelReply) GetMessageType() api.MessageType { 187 return api.ReplyMessage 188 } 189 190 func (m *IP6ndProxyAddDelReply) Size() (size int) { 191 if m == nil { 192 return 0 193 } 194 size += 4 // m.Retval 195 return size 196 } 197 func (m *IP6ndProxyAddDelReply) Marshal(b []byte) ([]byte, error) { 198 if b == nil { 199 b = make([]byte, m.Size()) 200 } 201 buf := codec.NewBuffer(b) 202 buf.EncodeInt32(m.Retval) 203 return buf.Bytes(), nil 204 } 205 func (m *IP6ndProxyAddDelReply) Unmarshal(b []byte) error { 206 buf := codec.NewBuffer(b) 207 m.Retval = buf.DecodeInt32() 208 return nil 209 } 210 211 // IP6ndProxyDetails defines message 'ip6nd_proxy_details'. 212 type IP6ndProxyDetails struct { 213 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 214 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"` 215 } 216 217 func (m *IP6ndProxyDetails) Reset() { *m = IP6ndProxyDetails{} } 218 func (*IP6ndProxyDetails) GetMessageName() string { return "ip6nd_proxy_details" } 219 func (*IP6ndProxyDetails) GetCrcString() string { return "30b9ff4a" } 220 func (*IP6ndProxyDetails) GetMessageType() api.MessageType { 221 return api.ReplyMessage 222 } 223 224 func (m *IP6ndProxyDetails) Size() (size int) { 225 if m == nil { 226 return 0 227 } 228 size += 4 // m.SwIfIndex 229 size += 1 * 16 // m.IP 230 return size 231 } 232 func (m *IP6ndProxyDetails) Marshal(b []byte) ([]byte, error) { 233 if b == nil { 234 b = make([]byte, m.Size()) 235 } 236 buf := codec.NewBuffer(b) 237 buf.EncodeUint32(uint32(m.SwIfIndex)) 238 buf.EncodeBytes(m.IP[:], 16) 239 return buf.Bytes(), nil 240 } 241 func (m *IP6ndProxyDetails) Unmarshal(b []byte) error { 242 buf := codec.NewBuffer(b) 243 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 244 copy(m.IP[:], buf.DecodeBytes(16)) 245 return nil 246 } 247 248 // IP6ndProxyDump defines message 'ip6nd_proxy_dump'. 249 type IP6ndProxyDump struct{} 250 251 func (m *IP6ndProxyDump) Reset() { *m = IP6ndProxyDump{} } 252 func (*IP6ndProxyDump) GetMessageName() string { return "ip6nd_proxy_dump" } 253 func (*IP6ndProxyDump) GetCrcString() string { return "51077d14" } 254 func (*IP6ndProxyDump) GetMessageType() api.MessageType { 255 return api.RequestMessage 256 } 257 258 func (m *IP6ndProxyDump) Size() (size int) { 259 if m == nil { 260 return 0 261 } 262 return size 263 } 264 func (m *IP6ndProxyDump) Marshal(b []byte) ([]byte, error) { 265 if b == nil { 266 b = make([]byte, m.Size()) 267 } 268 buf := codec.NewBuffer(b) 269 return buf.Bytes(), nil 270 } 271 func (m *IP6ndProxyDump) Unmarshal(b []byte) error { 272 return nil 273 } 274 275 // IP6ndProxyEnableDisable defines message 'ip6nd_proxy_enable_disable'. 276 type IP6ndProxyEnableDisable struct { 277 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 278 IsEnable bool `binapi:"bool,name=is_enable" json:"is_enable,omitempty"` 279 } 280 281 func (m *IP6ndProxyEnableDisable) Reset() { *m = IP6ndProxyEnableDisable{} } 282 func (*IP6ndProxyEnableDisable) GetMessageName() string { return "ip6nd_proxy_enable_disable" } 283 func (*IP6ndProxyEnableDisable) GetCrcString() string { return "7daa1e3a" } 284 func (*IP6ndProxyEnableDisable) GetMessageType() api.MessageType { 285 return api.RequestMessage 286 } 287 288 func (m *IP6ndProxyEnableDisable) Size() (size int) { 289 if m == nil { 290 return 0 291 } 292 size += 4 // m.SwIfIndex 293 size += 1 // m.IsEnable 294 return size 295 } 296 func (m *IP6ndProxyEnableDisable) Marshal(b []byte) ([]byte, error) { 297 if b == nil { 298 b = make([]byte, m.Size()) 299 } 300 buf := codec.NewBuffer(b) 301 buf.EncodeUint32(uint32(m.SwIfIndex)) 302 buf.EncodeBool(m.IsEnable) 303 return buf.Bytes(), nil 304 } 305 func (m *IP6ndProxyEnableDisable) Unmarshal(b []byte) error { 306 buf := codec.NewBuffer(b) 307 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 308 m.IsEnable = buf.DecodeBool() 309 return nil 310 } 311 312 // IP6ndProxyEnableDisableReply defines message 'ip6nd_proxy_enable_disable_reply'. 313 type IP6ndProxyEnableDisableReply struct { 314 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 315 } 316 317 func (m *IP6ndProxyEnableDisableReply) Reset() { *m = IP6ndProxyEnableDisableReply{} } 318 func (*IP6ndProxyEnableDisableReply) GetMessageName() string { 319 return "ip6nd_proxy_enable_disable_reply" 320 } 321 func (*IP6ndProxyEnableDisableReply) GetCrcString() string { return "e8d4e804" } 322 func (*IP6ndProxyEnableDisableReply) GetMessageType() api.MessageType { 323 return api.ReplyMessage 324 } 325 326 func (m *IP6ndProxyEnableDisableReply) Size() (size int) { 327 if m == nil { 328 return 0 329 } 330 size += 4 // m.Retval 331 return size 332 } 333 func (m *IP6ndProxyEnableDisableReply) Marshal(b []byte) ([]byte, error) { 334 if b == nil { 335 b = make([]byte, m.Size()) 336 } 337 buf := codec.NewBuffer(b) 338 buf.EncodeInt32(m.Retval) 339 return buf.Bytes(), nil 340 } 341 func (m *IP6ndProxyEnableDisableReply) Unmarshal(b []byte) error { 342 buf := codec.NewBuffer(b) 343 m.Retval = buf.DecodeInt32() 344 return nil 345 } 346 347 // IP6ndSendRouterSolicitation defines message 'ip6nd_send_router_solicitation'. 348 type IP6ndSendRouterSolicitation struct { 349 Irt uint32 `binapi:"u32,name=irt" json:"irt,omitempty"` 350 Mrt uint32 `binapi:"u32,name=mrt" json:"mrt,omitempty"` 351 Mrc uint32 `binapi:"u32,name=mrc" json:"mrc,omitempty"` 352 Mrd uint32 `binapi:"u32,name=mrd" json:"mrd,omitempty"` 353 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 354 Stop bool `binapi:"bool,name=stop" json:"stop,omitempty"` 355 } 356 357 func (m *IP6ndSendRouterSolicitation) Reset() { *m = IP6ndSendRouterSolicitation{} } 358 func (*IP6ndSendRouterSolicitation) GetMessageName() string { return "ip6nd_send_router_solicitation" } 359 func (*IP6ndSendRouterSolicitation) GetCrcString() string { return "e5de609c" } 360 func (*IP6ndSendRouterSolicitation) GetMessageType() api.MessageType { 361 return api.RequestMessage 362 } 363 364 func (m *IP6ndSendRouterSolicitation) Size() (size int) { 365 if m == nil { 366 return 0 367 } 368 size += 4 // m.Irt 369 size += 4 // m.Mrt 370 size += 4 // m.Mrc 371 size += 4 // m.Mrd 372 size += 4 // m.SwIfIndex 373 size += 1 // m.Stop 374 return size 375 } 376 func (m *IP6ndSendRouterSolicitation) Marshal(b []byte) ([]byte, error) { 377 if b == nil { 378 b = make([]byte, m.Size()) 379 } 380 buf := codec.NewBuffer(b) 381 buf.EncodeUint32(m.Irt) 382 buf.EncodeUint32(m.Mrt) 383 buf.EncodeUint32(m.Mrc) 384 buf.EncodeUint32(m.Mrd) 385 buf.EncodeUint32(uint32(m.SwIfIndex)) 386 buf.EncodeBool(m.Stop) 387 return buf.Bytes(), nil 388 } 389 func (m *IP6ndSendRouterSolicitation) Unmarshal(b []byte) error { 390 buf := codec.NewBuffer(b) 391 m.Irt = buf.DecodeUint32() 392 m.Mrt = buf.DecodeUint32() 393 m.Mrc = buf.DecodeUint32() 394 m.Mrd = buf.DecodeUint32() 395 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 396 m.Stop = buf.DecodeBool() 397 return nil 398 } 399 400 // IP6ndSendRouterSolicitationReply defines message 'ip6nd_send_router_solicitation_reply'. 401 type IP6ndSendRouterSolicitationReply struct { 402 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 403 } 404 405 func (m *IP6ndSendRouterSolicitationReply) Reset() { *m = IP6ndSendRouterSolicitationReply{} } 406 func (*IP6ndSendRouterSolicitationReply) GetMessageName() string { 407 return "ip6nd_send_router_solicitation_reply" 408 } 409 func (*IP6ndSendRouterSolicitationReply) GetCrcString() string { return "e8d4e804" } 410 func (*IP6ndSendRouterSolicitationReply) GetMessageType() api.MessageType { 411 return api.ReplyMessage 412 } 413 414 func (m *IP6ndSendRouterSolicitationReply) Size() (size int) { 415 if m == nil { 416 return 0 417 } 418 size += 4 // m.Retval 419 return size 420 } 421 func (m *IP6ndSendRouterSolicitationReply) Marshal(b []byte) ([]byte, error) { 422 if b == nil { 423 b = make([]byte, m.Size()) 424 } 425 buf := codec.NewBuffer(b) 426 buf.EncodeInt32(m.Retval) 427 return buf.Bytes(), nil 428 } 429 func (m *IP6ndSendRouterSolicitationReply) Unmarshal(b []byte) error { 430 buf := codec.NewBuffer(b) 431 m.Retval = buf.DecodeInt32() 432 return nil 433 } 434 435 // SwInterfaceIP6ndRaConfig defines message 'sw_interface_ip6nd_ra_config'. 436 type SwInterfaceIP6ndRaConfig struct { 437 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 438 Suppress uint8 `binapi:"u8,name=suppress" json:"suppress,omitempty"` 439 Managed uint8 `binapi:"u8,name=managed" json:"managed,omitempty"` 440 Other uint8 `binapi:"u8,name=other" json:"other,omitempty"` 441 LlOption uint8 `binapi:"u8,name=ll_option" json:"ll_option,omitempty"` 442 SendUnicast uint8 `binapi:"u8,name=send_unicast" json:"send_unicast,omitempty"` 443 Cease uint8 `binapi:"u8,name=cease" json:"cease,omitempty"` 444 IsNo bool `binapi:"bool,name=is_no" json:"is_no,omitempty"` 445 DefaultRouter uint8 `binapi:"u8,name=default_router" json:"default_router,omitempty"` 446 MaxInterval uint32 `binapi:"u32,name=max_interval" json:"max_interval,omitempty"` 447 MinInterval uint32 `binapi:"u32,name=min_interval" json:"min_interval,omitempty"` 448 Lifetime uint32 `binapi:"u32,name=lifetime" json:"lifetime,omitempty"` 449 InitialCount uint32 `binapi:"u32,name=initial_count" json:"initial_count,omitempty"` 450 InitialInterval uint32 `binapi:"u32,name=initial_interval" json:"initial_interval,omitempty"` 451 } 452 453 func (m *SwInterfaceIP6ndRaConfig) Reset() { *m = SwInterfaceIP6ndRaConfig{} } 454 func (*SwInterfaceIP6ndRaConfig) GetMessageName() string { return "sw_interface_ip6nd_ra_config" } 455 func (*SwInterfaceIP6ndRaConfig) GetCrcString() string { return "3eb00b1c" } 456 func (*SwInterfaceIP6ndRaConfig) GetMessageType() api.MessageType { 457 return api.RequestMessage 458 } 459 460 func (m *SwInterfaceIP6ndRaConfig) Size() (size int) { 461 if m == nil { 462 return 0 463 } 464 size += 4 // m.SwIfIndex 465 size += 1 // m.Suppress 466 size += 1 // m.Managed 467 size += 1 // m.Other 468 size += 1 // m.LlOption 469 size += 1 // m.SendUnicast 470 size += 1 // m.Cease 471 size += 1 // m.IsNo 472 size += 1 // m.DefaultRouter 473 size += 4 // m.MaxInterval 474 size += 4 // m.MinInterval 475 size += 4 // m.Lifetime 476 size += 4 // m.InitialCount 477 size += 4 // m.InitialInterval 478 return size 479 } 480 func (m *SwInterfaceIP6ndRaConfig) Marshal(b []byte) ([]byte, error) { 481 if b == nil { 482 b = make([]byte, m.Size()) 483 } 484 buf := codec.NewBuffer(b) 485 buf.EncodeUint32(uint32(m.SwIfIndex)) 486 buf.EncodeUint8(m.Suppress) 487 buf.EncodeUint8(m.Managed) 488 buf.EncodeUint8(m.Other) 489 buf.EncodeUint8(m.LlOption) 490 buf.EncodeUint8(m.SendUnicast) 491 buf.EncodeUint8(m.Cease) 492 buf.EncodeBool(m.IsNo) 493 buf.EncodeUint8(m.DefaultRouter) 494 buf.EncodeUint32(m.MaxInterval) 495 buf.EncodeUint32(m.MinInterval) 496 buf.EncodeUint32(m.Lifetime) 497 buf.EncodeUint32(m.InitialCount) 498 buf.EncodeUint32(m.InitialInterval) 499 return buf.Bytes(), nil 500 } 501 func (m *SwInterfaceIP6ndRaConfig) Unmarshal(b []byte) error { 502 buf := codec.NewBuffer(b) 503 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 504 m.Suppress = buf.DecodeUint8() 505 m.Managed = buf.DecodeUint8() 506 m.Other = buf.DecodeUint8() 507 m.LlOption = buf.DecodeUint8() 508 m.SendUnicast = buf.DecodeUint8() 509 m.Cease = buf.DecodeUint8() 510 m.IsNo = buf.DecodeBool() 511 m.DefaultRouter = buf.DecodeUint8() 512 m.MaxInterval = buf.DecodeUint32() 513 m.MinInterval = buf.DecodeUint32() 514 m.Lifetime = buf.DecodeUint32() 515 m.InitialCount = buf.DecodeUint32() 516 m.InitialInterval = buf.DecodeUint32() 517 return nil 518 } 519 520 // SwInterfaceIP6ndRaConfigReply defines message 'sw_interface_ip6nd_ra_config_reply'. 521 type SwInterfaceIP6ndRaConfigReply struct { 522 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 523 } 524 525 func (m *SwInterfaceIP6ndRaConfigReply) Reset() { *m = SwInterfaceIP6ndRaConfigReply{} } 526 func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string { 527 return "sw_interface_ip6nd_ra_config_reply" 528 } 529 func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { return "e8d4e804" } 530 func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType { 531 return api.ReplyMessage 532 } 533 534 func (m *SwInterfaceIP6ndRaConfigReply) Size() (size int) { 535 if m == nil { 536 return 0 537 } 538 size += 4 // m.Retval 539 return size 540 } 541 func (m *SwInterfaceIP6ndRaConfigReply) Marshal(b []byte) ([]byte, error) { 542 if b == nil { 543 b = make([]byte, m.Size()) 544 } 545 buf := codec.NewBuffer(b) 546 buf.EncodeInt32(m.Retval) 547 return buf.Bytes(), nil 548 } 549 func (m *SwInterfaceIP6ndRaConfigReply) Unmarshal(b []byte) error { 550 buf := codec.NewBuffer(b) 551 m.Retval = buf.DecodeInt32() 552 return nil 553 } 554 555 // SwInterfaceIP6ndRaPrefix defines message 'sw_interface_ip6nd_ra_prefix'. 556 type SwInterfaceIP6ndRaPrefix struct { 557 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 558 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 559 UseDefault bool `binapi:"bool,name=use_default" json:"use_default,omitempty"` 560 NoAdvertise bool `binapi:"bool,name=no_advertise" json:"no_advertise,omitempty"` 561 OffLink bool `binapi:"bool,name=off_link" json:"off_link,omitempty"` 562 NoAutoconfig bool `binapi:"bool,name=no_autoconfig" json:"no_autoconfig,omitempty"` 563 NoOnlink bool `binapi:"bool,name=no_onlink" json:"no_onlink,omitempty"` 564 IsNo bool `binapi:"bool,name=is_no" json:"is_no,omitempty"` 565 ValLifetime uint32 `binapi:"u32,name=val_lifetime" json:"val_lifetime,omitempty"` 566 PrefLifetime uint32 `binapi:"u32,name=pref_lifetime" json:"pref_lifetime,omitempty"` 567 } 568 569 func (m *SwInterfaceIP6ndRaPrefix) Reset() { *m = SwInterfaceIP6ndRaPrefix{} } 570 func (*SwInterfaceIP6ndRaPrefix) GetMessageName() string { return "sw_interface_ip6nd_ra_prefix" } 571 func (*SwInterfaceIP6ndRaPrefix) GetCrcString() string { return "82cc1b28" } 572 func (*SwInterfaceIP6ndRaPrefix) GetMessageType() api.MessageType { 573 return api.RequestMessage 574 } 575 576 func (m *SwInterfaceIP6ndRaPrefix) Size() (size int) { 577 if m == nil { 578 return 0 579 } 580 size += 4 // m.SwIfIndex 581 size += 1 // m.Prefix.Address.Af 582 size += 1 * 16 // m.Prefix.Address.Un 583 size += 1 // m.Prefix.Len 584 size += 1 // m.UseDefault 585 size += 1 // m.NoAdvertise 586 size += 1 // m.OffLink 587 size += 1 // m.NoAutoconfig 588 size += 1 // m.NoOnlink 589 size += 1 // m.IsNo 590 size += 4 // m.ValLifetime 591 size += 4 // m.PrefLifetime 592 return size 593 } 594 func (m *SwInterfaceIP6ndRaPrefix) Marshal(b []byte) ([]byte, error) { 595 if b == nil { 596 b = make([]byte, m.Size()) 597 } 598 buf := codec.NewBuffer(b) 599 buf.EncodeUint32(uint32(m.SwIfIndex)) 600 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 601 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 602 buf.EncodeUint8(m.Prefix.Len) 603 buf.EncodeBool(m.UseDefault) 604 buf.EncodeBool(m.NoAdvertise) 605 buf.EncodeBool(m.OffLink) 606 buf.EncodeBool(m.NoAutoconfig) 607 buf.EncodeBool(m.NoOnlink) 608 buf.EncodeBool(m.IsNo) 609 buf.EncodeUint32(m.ValLifetime) 610 buf.EncodeUint32(m.PrefLifetime) 611 return buf.Bytes(), nil 612 } 613 func (m *SwInterfaceIP6ndRaPrefix) Unmarshal(b []byte) error { 614 buf := codec.NewBuffer(b) 615 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 616 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 617 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 618 m.Prefix.Len = buf.DecodeUint8() 619 m.UseDefault = buf.DecodeBool() 620 m.NoAdvertise = buf.DecodeBool() 621 m.OffLink = buf.DecodeBool() 622 m.NoAutoconfig = buf.DecodeBool() 623 m.NoOnlink = buf.DecodeBool() 624 m.IsNo = buf.DecodeBool() 625 m.ValLifetime = buf.DecodeUint32() 626 m.PrefLifetime = buf.DecodeUint32() 627 return nil 628 } 629 630 // SwInterfaceIP6ndRaPrefixReply defines message 'sw_interface_ip6nd_ra_prefix_reply'. 631 type SwInterfaceIP6ndRaPrefixReply struct { 632 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 633 } 634 635 func (m *SwInterfaceIP6ndRaPrefixReply) Reset() { *m = SwInterfaceIP6ndRaPrefixReply{} } 636 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string { 637 return "sw_interface_ip6nd_ra_prefix_reply" 638 } 639 func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { return "e8d4e804" } 640 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType { 641 return api.ReplyMessage 642 } 643 644 func (m *SwInterfaceIP6ndRaPrefixReply) Size() (size int) { 645 if m == nil { 646 return 0 647 } 648 size += 4 // m.Retval 649 return size 650 } 651 func (m *SwInterfaceIP6ndRaPrefixReply) Marshal(b []byte) ([]byte, error) { 652 if b == nil { 653 b = make([]byte, m.Size()) 654 } 655 buf := codec.NewBuffer(b) 656 buf.EncodeInt32(m.Retval) 657 return buf.Bytes(), nil 658 } 659 func (m *SwInterfaceIP6ndRaPrefixReply) Unmarshal(b []byte) error { 660 buf := codec.NewBuffer(b) 661 m.Retval = buf.DecodeInt32() 662 return nil 663 } 664 665 // WantIP6RaEvents defines message 'want_ip6_ra_events'. 666 type WantIP6RaEvents struct { 667 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 668 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 669 } 670 671 func (m *WantIP6RaEvents) Reset() { *m = WantIP6RaEvents{} } 672 func (*WantIP6RaEvents) GetMessageName() string { return "want_ip6_ra_events" } 673 func (*WantIP6RaEvents) GetCrcString() string { return "3ec6d6c2" } 674 func (*WantIP6RaEvents) GetMessageType() api.MessageType { 675 return api.RequestMessage 676 } 677 678 func (m *WantIP6RaEvents) Size() (size int) { 679 if m == nil { 680 return 0 681 } 682 size += 1 // m.Enable 683 size += 4 // m.PID 684 return size 685 } 686 func (m *WantIP6RaEvents) Marshal(b []byte) ([]byte, error) { 687 if b == nil { 688 b = make([]byte, m.Size()) 689 } 690 buf := codec.NewBuffer(b) 691 buf.EncodeBool(m.Enable) 692 buf.EncodeUint32(m.PID) 693 return buf.Bytes(), nil 694 } 695 func (m *WantIP6RaEvents) Unmarshal(b []byte) error { 696 buf := codec.NewBuffer(b) 697 m.Enable = buf.DecodeBool() 698 m.PID = buf.DecodeUint32() 699 return nil 700 } 701 702 // WantIP6RaEventsReply defines message 'want_ip6_ra_events_reply'. 703 type WantIP6RaEventsReply struct { 704 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 705 } 706 707 func (m *WantIP6RaEventsReply) Reset() { *m = WantIP6RaEventsReply{} } 708 func (*WantIP6RaEventsReply) GetMessageName() string { return "want_ip6_ra_events_reply" } 709 func (*WantIP6RaEventsReply) GetCrcString() string { return "e8d4e804" } 710 func (*WantIP6RaEventsReply) GetMessageType() api.MessageType { 711 return api.ReplyMessage 712 } 713 714 func (m *WantIP6RaEventsReply) Size() (size int) { 715 if m == nil { 716 return 0 717 } 718 size += 4 // m.Retval 719 return size 720 } 721 func (m *WantIP6RaEventsReply) Marshal(b []byte) ([]byte, error) { 722 if b == nil { 723 b = make([]byte, m.Size()) 724 } 725 buf := codec.NewBuffer(b) 726 buf.EncodeInt32(m.Retval) 727 return buf.Bytes(), nil 728 } 729 func (m *WantIP6RaEventsReply) Unmarshal(b []byte) error { 730 buf := codec.NewBuffer(b) 731 m.Retval = buf.DecodeInt32() 732 return nil 733 } 734 735 func init() { file_ip6_nd_binapi_init() } 736 func file_ip6_nd_binapi_init() { 737 api.RegisterMessage((*IP6RaEvent)(nil), "ip6_ra_event_0364c1c5") 738 api.RegisterMessage((*IP6ndProxyAddDel)(nil), "ip6nd_proxy_add_del_c2e4a686") 739 api.RegisterMessage((*IP6ndProxyAddDelReply)(nil), "ip6nd_proxy_add_del_reply_e8d4e804") 740 api.RegisterMessage((*IP6ndProxyDetails)(nil), "ip6nd_proxy_details_30b9ff4a") 741 api.RegisterMessage((*IP6ndProxyDump)(nil), "ip6nd_proxy_dump_51077d14") 742 api.RegisterMessage((*IP6ndProxyEnableDisable)(nil), "ip6nd_proxy_enable_disable_7daa1e3a") 743 api.RegisterMessage((*IP6ndProxyEnableDisableReply)(nil), "ip6nd_proxy_enable_disable_reply_e8d4e804") 744 api.RegisterMessage((*IP6ndSendRouterSolicitation)(nil), "ip6nd_send_router_solicitation_e5de609c") 745 api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip6nd_send_router_solicitation_reply_e8d4e804") 746 api.RegisterMessage((*SwInterfaceIP6ndRaConfig)(nil), "sw_interface_ip6nd_ra_config_3eb00b1c") 747 api.RegisterMessage((*SwInterfaceIP6ndRaConfigReply)(nil), "sw_interface_ip6nd_ra_config_reply_e8d4e804") 748 api.RegisterMessage((*SwInterfaceIP6ndRaPrefix)(nil), "sw_interface_ip6nd_ra_prefix_82cc1b28") 749 api.RegisterMessage((*SwInterfaceIP6ndRaPrefixReply)(nil), "sw_interface_ip6nd_ra_prefix_reply_e8d4e804") 750 api.RegisterMessage((*WantIP6RaEvents)(nil), "want_ip6_ra_events_3ec6d6c2") 751 api.RegisterMessage((*WantIP6RaEventsReply)(nil), "want_ip6_ra_events_reply_e8d4e804") 752 } 753 754 // Messages returns list of all messages in this module. 755 func AllMessages() []api.Message { 756 return []api.Message{ 757 (*IP6RaEvent)(nil), 758 (*IP6ndProxyAddDel)(nil), 759 (*IP6ndProxyAddDelReply)(nil), 760 (*IP6ndProxyDetails)(nil), 761 (*IP6ndProxyDump)(nil), 762 (*IP6ndProxyEnableDisable)(nil), 763 (*IP6ndProxyEnableDisableReply)(nil), 764 (*IP6ndSendRouterSolicitation)(nil), 765 (*IP6ndSendRouterSolicitationReply)(nil), 766 (*SwInterfaceIP6ndRaConfig)(nil), 767 (*SwInterfaceIP6ndRaConfigReply)(nil), 768 (*SwInterfaceIP6ndRaPrefix)(nil), 769 (*SwInterfaceIP6ndRaPrefixReply)(nil), 770 (*WantIP6RaEvents)(nil), 771 (*WantIP6RaEventsReply)(nil), 772 } 773 }