go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2202/acl/acl.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 // Package acl contains generated bindings for API file acl.api. 4 // 5 // Contents: 6 // - 42 messages 7 package acl 8 9 import ( 10 api "go.fd.io/govpp/api" 11 codec "go.fd.io/govpp/codec" 12 acl_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2202/acl_types" 13 _ "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2202/ethernet_types" 14 interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2202/interface_types" 15 ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2202/ip_types" 16 ) 17 18 // This is a compile-time assertion to ensure that this generated file 19 // is compatible with the GoVPP api package it is being compiled against. 20 // A compilation error at this line likely means your copy of the 21 // GoVPP api package needs to be updated. 22 const _ = api.GoVppAPIPackageIsVersion2 23 24 const ( 25 APIFile = "acl" 26 APIVersion = "2.0.1" 27 VersionCrc = 0x5133bba0 28 ) 29 30 // ACLAddReplace defines message 'acl_add_replace'. 31 type ACLAddReplace struct { 32 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` 33 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 34 Count uint32 `binapi:"u32,name=count" json:"-"` 35 R []acl_types.ACLRule `binapi:"acl_rule[count],name=r" json:"r,omitempty"` 36 } 37 38 func (m *ACLAddReplace) Reset() { *m = ACLAddReplace{} } 39 func (*ACLAddReplace) GetMessageName() string { return "acl_add_replace" } 40 func (*ACLAddReplace) GetCrcString() string { return "ee5c2f18" } 41 func (*ACLAddReplace) GetMessageType() api.MessageType { 42 return api.RequestMessage 43 } 44 45 func (m *ACLAddReplace) Size() (size int) { 46 if m == nil { 47 return 0 48 } 49 size += 4 // m.ACLIndex 50 size += 64 // m.Tag 51 size += 4 // m.Count 52 for j1 := 0; j1 < len(m.R); j1++ { 53 var s1 acl_types.ACLRule 54 _ = s1 55 if j1 < len(m.R) { 56 s1 = m.R[j1] 57 } 58 size += 1 // s1.IsPermit 59 size += 1 // s1.SrcPrefix.Address.Af 60 size += 1 * 16 // s1.SrcPrefix.Address.Un 61 size += 1 // s1.SrcPrefix.Len 62 size += 1 // s1.DstPrefix.Address.Af 63 size += 1 * 16 // s1.DstPrefix.Address.Un 64 size += 1 // s1.DstPrefix.Len 65 size += 1 // s1.Proto 66 size += 2 // s1.SrcportOrIcmptypeFirst 67 size += 2 // s1.SrcportOrIcmptypeLast 68 size += 2 // s1.DstportOrIcmpcodeFirst 69 size += 2 // s1.DstportOrIcmpcodeLast 70 size += 1 // s1.TCPFlagsMask 71 size += 1 // s1.TCPFlagsValue 72 } 73 return size 74 } 75 func (m *ACLAddReplace) Marshal(b []byte) ([]byte, error) { 76 if b == nil { 77 b = make([]byte, m.Size()) 78 } 79 buf := codec.NewBuffer(b) 80 buf.EncodeUint32(m.ACLIndex) 81 buf.EncodeString(m.Tag, 64) 82 buf.EncodeUint32(uint32(len(m.R))) 83 for j0 := 0; j0 < len(m.R); j0++ { 84 var v0 acl_types.ACLRule // R 85 if j0 < len(m.R) { 86 v0 = m.R[j0] 87 } 88 buf.EncodeUint8(uint8(v0.IsPermit)) 89 buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af)) 90 buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 16) 91 buf.EncodeUint8(v0.SrcPrefix.Len) 92 buf.EncodeUint8(uint8(v0.DstPrefix.Address.Af)) 93 buf.EncodeBytes(v0.DstPrefix.Address.Un.XXX_UnionData[:], 16) 94 buf.EncodeUint8(v0.DstPrefix.Len) 95 buf.EncodeUint8(uint8(v0.Proto)) 96 buf.EncodeUint16(v0.SrcportOrIcmptypeFirst) 97 buf.EncodeUint16(v0.SrcportOrIcmptypeLast) 98 buf.EncodeUint16(v0.DstportOrIcmpcodeFirst) 99 buf.EncodeUint16(v0.DstportOrIcmpcodeLast) 100 buf.EncodeUint8(v0.TCPFlagsMask) 101 buf.EncodeUint8(v0.TCPFlagsValue) 102 } 103 return buf.Bytes(), nil 104 } 105 func (m *ACLAddReplace) Unmarshal(b []byte) error { 106 buf := codec.NewBuffer(b) 107 m.ACLIndex = buf.DecodeUint32() 108 m.Tag = buf.DecodeString(64) 109 m.Count = buf.DecodeUint32() 110 m.R = make([]acl_types.ACLRule, m.Count) 111 for j0 := 0; j0 < len(m.R); j0++ { 112 m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8()) 113 m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 114 copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 115 m.R[j0].SrcPrefix.Len = buf.DecodeUint8() 116 m.R[j0].DstPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 117 copy(m.R[j0].DstPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 118 m.R[j0].DstPrefix.Len = buf.DecodeUint8() 119 m.R[j0].Proto = ip_types.IPProto(buf.DecodeUint8()) 120 m.R[j0].SrcportOrIcmptypeFirst = buf.DecodeUint16() 121 m.R[j0].SrcportOrIcmptypeLast = buf.DecodeUint16() 122 m.R[j0].DstportOrIcmpcodeFirst = buf.DecodeUint16() 123 m.R[j0].DstportOrIcmpcodeLast = buf.DecodeUint16() 124 m.R[j0].TCPFlagsMask = buf.DecodeUint8() 125 m.R[j0].TCPFlagsValue = buf.DecodeUint8() 126 } 127 return nil 128 } 129 130 // ACLAddReplaceReply defines message 'acl_add_replace_reply'. 131 type ACLAddReplaceReply struct { 132 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` 133 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 134 } 135 136 func (m *ACLAddReplaceReply) Reset() { *m = ACLAddReplaceReply{} } 137 func (*ACLAddReplaceReply) GetMessageName() string { return "acl_add_replace_reply" } 138 func (*ACLAddReplaceReply) GetCrcString() string { return "ac407b0c" } 139 func (*ACLAddReplaceReply) GetMessageType() api.MessageType { 140 return api.ReplyMessage 141 } 142 143 func (m *ACLAddReplaceReply) Size() (size int) { 144 if m == nil { 145 return 0 146 } 147 size += 4 // m.ACLIndex 148 size += 4 // m.Retval 149 return size 150 } 151 func (m *ACLAddReplaceReply) Marshal(b []byte) ([]byte, error) { 152 if b == nil { 153 b = make([]byte, m.Size()) 154 } 155 buf := codec.NewBuffer(b) 156 buf.EncodeUint32(m.ACLIndex) 157 buf.EncodeInt32(m.Retval) 158 return buf.Bytes(), nil 159 } 160 func (m *ACLAddReplaceReply) Unmarshal(b []byte) error { 161 buf := codec.NewBuffer(b) 162 m.ACLIndex = buf.DecodeUint32() 163 m.Retval = buf.DecodeInt32() 164 return nil 165 } 166 167 // ACLDel defines message 'acl_del'. 168 type ACLDel struct { 169 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` 170 } 171 172 func (m *ACLDel) Reset() { *m = ACLDel{} } 173 func (*ACLDel) GetMessageName() string { return "acl_del" } 174 func (*ACLDel) GetCrcString() string { return "ef34fea4" } 175 func (*ACLDel) GetMessageType() api.MessageType { 176 return api.RequestMessage 177 } 178 179 func (m *ACLDel) Size() (size int) { 180 if m == nil { 181 return 0 182 } 183 size += 4 // m.ACLIndex 184 return size 185 } 186 func (m *ACLDel) Marshal(b []byte) ([]byte, error) { 187 if b == nil { 188 b = make([]byte, m.Size()) 189 } 190 buf := codec.NewBuffer(b) 191 buf.EncodeUint32(m.ACLIndex) 192 return buf.Bytes(), nil 193 } 194 func (m *ACLDel) Unmarshal(b []byte) error { 195 buf := codec.NewBuffer(b) 196 m.ACLIndex = buf.DecodeUint32() 197 return nil 198 } 199 200 // ACLDelReply defines message 'acl_del_reply'. 201 type ACLDelReply struct { 202 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 203 } 204 205 func (m *ACLDelReply) Reset() { *m = ACLDelReply{} } 206 func (*ACLDelReply) GetMessageName() string { return "acl_del_reply" } 207 func (*ACLDelReply) GetCrcString() string { return "e8d4e804" } 208 func (*ACLDelReply) GetMessageType() api.MessageType { 209 return api.ReplyMessage 210 } 211 212 func (m *ACLDelReply) Size() (size int) { 213 if m == nil { 214 return 0 215 } 216 size += 4 // m.Retval 217 return size 218 } 219 func (m *ACLDelReply) Marshal(b []byte) ([]byte, error) { 220 if b == nil { 221 b = make([]byte, m.Size()) 222 } 223 buf := codec.NewBuffer(b) 224 buf.EncodeInt32(m.Retval) 225 return buf.Bytes(), nil 226 } 227 func (m *ACLDelReply) Unmarshal(b []byte) error { 228 buf := codec.NewBuffer(b) 229 m.Retval = buf.DecodeInt32() 230 return nil 231 } 232 233 // ACLDetails defines message 'acl_details'. 234 type ACLDetails struct { 235 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` 236 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 237 Count uint32 `binapi:"u32,name=count" json:"-"` 238 R []acl_types.ACLRule `binapi:"acl_rule[count],name=r" json:"r,omitempty"` 239 } 240 241 func (m *ACLDetails) Reset() { *m = ACLDetails{} } 242 func (*ACLDetails) GetMessageName() string { return "acl_details" } 243 func (*ACLDetails) GetCrcString() string { return "95babae0" } 244 func (*ACLDetails) GetMessageType() api.MessageType { 245 return api.ReplyMessage 246 } 247 248 func (m *ACLDetails) Size() (size int) { 249 if m == nil { 250 return 0 251 } 252 size += 4 // m.ACLIndex 253 size += 64 // m.Tag 254 size += 4 // m.Count 255 for j1 := 0; j1 < len(m.R); j1++ { 256 var s1 acl_types.ACLRule 257 _ = s1 258 if j1 < len(m.R) { 259 s1 = m.R[j1] 260 } 261 size += 1 // s1.IsPermit 262 size += 1 // s1.SrcPrefix.Address.Af 263 size += 1 * 16 // s1.SrcPrefix.Address.Un 264 size += 1 // s1.SrcPrefix.Len 265 size += 1 // s1.DstPrefix.Address.Af 266 size += 1 * 16 // s1.DstPrefix.Address.Un 267 size += 1 // s1.DstPrefix.Len 268 size += 1 // s1.Proto 269 size += 2 // s1.SrcportOrIcmptypeFirst 270 size += 2 // s1.SrcportOrIcmptypeLast 271 size += 2 // s1.DstportOrIcmpcodeFirst 272 size += 2 // s1.DstportOrIcmpcodeLast 273 size += 1 // s1.TCPFlagsMask 274 size += 1 // s1.TCPFlagsValue 275 } 276 return size 277 } 278 func (m *ACLDetails) Marshal(b []byte) ([]byte, error) { 279 if b == nil { 280 b = make([]byte, m.Size()) 281 } 282 buf := codec.NewBuffer(b) 283 buf.EncodeUint32(m.ACLIndex) 284 buf.EncodeString(m.Tag, 64) 285 buf.EncodeUint32(uint32(len(m.R))) 286 for j0 := 0; j0 < len(m.R); j0++ { 287 var v0 acl_types.ACLRule // R 288 if j0 < len(m.R) { 289 v0 = m.R[j0] 290 } 291 buf.EncodeUint8(uint8(v0.IsPermit)) 292 buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af)) 293 buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 16) 294 buf.EncodeUint8(v0.SrcPrefix.Len) 295 buf.EncodeUint8(uint8(v0.DstPrefix.Address.Af)) 296 buf.EncodeBytes(v0.DstPrefix.Address.Un.XXX_UnionData[:], 16) 297 buf.EncodeUint8(v0.DstPrefix.Len) 298 buf.EncodeUint8(uint8(v0.Proto)) 299 buf.EncodeUint16(v0.SrcportOrIcmptypeFirst) 300 buf.EncodeUint16(v0.SrcportOrIcmptypeLast) 301 buf.EncodeUint16(v0.DstportOrIcmpcodeFirst) 302 buf.EncodeUint16(v0.DstportOrIcmpcodeLast) 303 buf.EncodeUint8(v0.TCPFlagsMask) 304 buf.EncodeUint8(v0.TCPFlagsValue) 305 } 306 return buf.Bytes(), nil 307 } 308 func (m *ACLDetails) Unmarshal(b []byte) error { 309 buf := codec.NewBuffer(b) 310 m.ACLIndex = buf.DecodeUint32() 311 m.Tag = buf.DecodeString(64) 312 m.Count = buf.DecodeUint32() 313 m.R = make([]acl_types.ACLRule, m.Count) 314 for j0 := 0; j0 < len(m.R); j0++ { 315 m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8()) 316 m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 317 copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 318 m.R[j0].SrcPrefix.Len = buf.DecodeUint8() 319 m.R[j0].DstPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 320 copy(m.R[j0].DstPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 321 m.R[j0].DstPrefix.Len = buf.DecodeUint8() 322 m.R[j0].Proto = ip_types.IPProto(buf.DecodeUint8()) 323 m.R[j0].SrcportOrIcmptypeFirst = buf.DecodeUint16() 324 m.R[j0].SrcportOrIcmptypeLast = buf.DecodeUint16() 325 m.R[j0].DstportOrIcmpcodeFirst = buf.DecodeUint16() 326 m.R[j0].DstportOrIcmpcodeLast = buf.DecodeUint16() 327 m.R[j0].TCPFlagsMask = buf.DecodeUint8() 328 m.R[j0].TCPFlagsValue = buf.DecodeUint8() 329 } 330 return nil 331 } 332 333 // ACLDump defines message 'acl_dump'. 334 type ACLDump struct { 335 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` 336 } 337 338 func (m *ACLDump) Reset() { *m = ACLDump{} } 339 func (*ACLDump) GetMessageName() string { return "acl_dump" } 340 func (*ACLDump) GetCrcString() string { return "ef34fea4" } 341 func (*ACLDump) GetMessageType() api.MessageType { 342 return api.RequestMessage 343 } 344 345 func (m *ACLDump) Size() (size int) { 346 if m == nil { 347 return 0 348 } 349 size += 4 // m.ACLIndex 350 return size 351 } 352 func (m *ACLDump) Marshal(b []byte) ([]byte, error) { 353 if b == nil { 354 b = make([]byte, m.Size()) 355 } 356 buf := codec.NewBuffer(b) 357 buf.EncodeUint32(m.ACLIndex) 358 return buf.Bytes(), nil 359 } 360 func (m *ACLDump) Unmarshal(b []byte) error { 361 buf := codec.NewBuffer(b) 362 m.ACLIndex = buf.DecodeUint32() 363 return nil 364 } 365 366 // ACLInterfaceAddDel defines message 'acl_interface_add_del'. 367 type ACLInterfaceAddDel struct { 368 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 369 IsInput bool `binapi:"bool,name=is_input" json:"is_input,omitempty"` 370 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 371 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` 372 } 373 374 func (m *ACLInterfaceAddDel) Reset() { *m = ACLInterfaceAddDel{} } 375 func (*ACLInterfaceAddDel) GetMessageName() string { return "acl_interface_add_del" } 376 func (*ACLInterfaceAddDel) GetCrcString() string { return "4b54bebd" } 377 func (*ACLInterfaceAddDel) GetMessageType() api.MessageType { 378 return api.RequestMessage 379 } 380 381 func (m *ACLInterfaceAddDel) Size() (size int) { 382 if m == nil { 383 return 0 384 } 385 size += 1 // m.IsAdd 386 size += 1 // m.IsInput 387 size += 4 // m.SwIfIndex 388 size += 4 // m.ACLIndex 389 return size 390 } 391 func (m *ACLInterfaceAddDel) Marshal(b []byte) ([]byte, error) { 392 if b == nil { 393 b = make([]byte, m.Size()) 394 } 395 buf := codec.NewBuffer(b) 396 buf.EncodeBool(m.IsAdd) 397 buf.EncodeBool(m.IsInput) 398 buf.EncodeUint32(uint32(m.SwIfIndex)) 399 buf.EncodeUint32(m.ACLIndex) 400 return buf.Bytes(), nil 401 } 402 func (m *ACLInterfaceAddDel) Unmarshal(b []byte) error { 403 buf := codec.NewBuffer(b) 404 m.IsAdd = buf.DecodeBool() 405 m.IsInput = buf.DecodeBool() 406 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 407 m.ACLIndex = buf.DecodeUint32() 408 return nil 409 } 410 411 // ACLInterfaceAddDelReply defines message 'acl_interface_add_del_reply'. 412 type ACLInterfaceAddDelReply struct { 413 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 414 } 415 416 func (m *ACLInterfaceAddDelReply) Reset() { *m = ACLInterfaceAddDelReply{} } 417 func (*ACLInterfaceAddDelReply) GetMessageName() string { return "acl_interface_add_del_reply" } 418 func (*ACLInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" } 419 func (*ACLInterfaceAddDelReply) GetMessageType() api.MessageType { 420 return api.ReplyMessage 421 } 422 423 func (m *ACLInterfaceAddDelReply) Size() (size int) { 424 if m == nil { 425 return 0 426 } 427 size += 4 // m.Retval 428 return size 429 } 430 func (m *ACLInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) { 431 if b == nil { 432 b = make([]byte, m.Size()) 433 } 434 buf := codec.NewBuffer(b) 435 buf.EncodeInt32(m.Retval) 436 return buf.Bytes(), nil 437 } 438 func (m *ACLInterfaceAddDelReply) Unmarshal(b []byte) error { 439 buf := codec.NewBuffer(b) 440 m.Retval = buf.DecodeInt32() 441 return nil 442 } 443 444 // ACLInterfaceEtypeWhitelistDetails defines message 'acl_interface_etype_whitelist_details'. 445 type ACLInterfaceEtypeWhitelistDetails struct { 446 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 447 Count uint8 `binapi:"u8,name=count" json:"-"` 448 NInput uint8 `binapi:"u8,name=n_input" json:"n_input,omitempty"` 449 Whitelist []uint16 `binapi:"u16[count],name=whitelist" json:"whitelist,omitempty"` 450 } 451 452 func (m *ACLInterfaceEtypeWhitelistDetails) Reset() { *m = ACLInterfaceEtypeWhitelistDetails{} } 453 func (*ACLInterfaceEtypeWhitelistDetails) GetMessageName() string { 454 return "acl_interface_etype_whitelist_details" 455 } 456 func (*ACLInterfaceEtypeWhitelistDetails) GetCrcString() string { return "cc2bfded" } 457 func (*ACLInterfaceEtypeWhitelistDetails) GetMessageType() api.MessageType { 458 return api.ReplyMessage 459 } 460 461 func (m *ACLInterfaceEtypeWhitelistDetails) Size() (size int) { 462 if m == nil { 463 return 0 464 } 465 size += 4 // m.SwIfIndex 466 size += 1 // m.Count 467 size += 1 // m.NInput 468 size += 2 * len(m.Whitelist) // m.Whitelist 469 return size 470 } 471 func (m *ACLInterfaceEtypeWhitelistDetails) Marshal(b []byte) ([]byte, error) { 472 if b == nil { 473 b = make([]byte, m.Size()) 474 } 475 buf := codec.NewBuffer(b) 476 buf.EncodeUint32(uint32(m.SwIfIndex)) 477 buf.EncodeUint8(uint8(len(m.Whitelist))) 478 buf.EncodeUint8(m.NInput) 479 for i := 0; i < len(m.Whitelist); i++ { 480 var x uint16 481 if i < len(m.Whitelist) { 482 x = uint16(m.Whitelist[i]) 483 } 484 buf.EncodeUint16(x) 485 } 486 return buf.Bytes(), nil 487 } 488 func (m *ACLInterfaceEtypeWhitelistDetails) Unmarshal(b []byte) error { 489 buf := codec.NewBuffer(b) 490 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 491 m.Count = buf.DecodeUint8() 492 m.NInput = buf.DecodeUint8() 493 m.Whitelist = make([]uint16, m.Count) 494 for i := 0; i < len(m.Whitelist); i++ { 495 m.Whitelist[i] = buf.DecodeUint16() 496 } 497 return nil 498 } 499 500 // ACLInterfaceEtypeWhitelistDump defines message 'acl_interface_etype_whitelist_dump'. 501 type ACLInterfaceEtypeWhitelistDump struct { 502 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 503 } 504 505 func (m *ACLInterfaceEtypeWhitelistDump) Reset() { *m = ACLInterfaceEtypeWhitelistDump{} } 506 func (*ACLInterfaceEtypeWhitelistDump) GetMessageName() string { 507 return "acl_interface_etype_whitelist_dump" 508 } 509 func (*ACLInterfaceEtypeWhitelistDump) GetCrcString() string { return "f9e6675e" } 510 func (*ACLInterfaceEtypeWhitelistDump) GetMessageType() api.MessageType { 511 return api.RequestMessage 512 } 513 514 func (m *ACLInterfaceEtypeWhitelistDump) Size() (size int) { 515 if m == nil { 516 return 0 517 } 518 size += 4 // m.SwIfIndex 519 return size 520 } 521 func (m *ACLInterfaceEtypeWhitelistDump) Marshal(b []byte) ([]byte, error) { 522 if b == nil { 523 b = make([]byte, m.Size()) 524 } 525 buf := codec.NewBuffer(b) 526 buf.EncodeUint32(uint32(m.SwIfIndex)) 527 return buf.Bytes(), nil 528 } 529 func (m *ACLInterfaceEtypeWhitelistDump) Unmarshal(b []byte) error { 530 buf := codec.NewBuffer(b) 531 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 532 return nil 533 } 534 535 // ACLInterfaceListDetails defines message 'acl_interface_list_details'. 536 type ACLInterfaceListDetails struct { 537 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 538 Count uint8 `binapi:"u8,name=count" json:"-"` 539 NInput uint8 `binapi:"u8,name=n_input" json:"n_input,omitempty"` 540 Acls []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"` 541 } 542 543 func (m *ACLInterfaceListDetails) Reset() { *m = ACLInterfaceListDetails{} } 544 func (*ACLInterfaceListDetails) GetMessageName() string { return "acl_interface_list_details" } 545 func (*ACLInterfaceListDetails) GetCrcString() string { return "e695d256" } 546 func (*ACLInterfaceListDetails) GetMessageType() api.MessageType { 547 return api.ReplyMessage 548 } 549 550 func (m *ACLInterfaceListDetails) Size() (size int) { 551 if m == nil { 552 return 0 553 } 554 size += 4 // m.SwIfIndex 555 size += 1 // m.Count 556 size += 1 // m.NInput 557 size += 4 * len(m.Acls) // m.Acls 558 return size 559 } 560 func (m *ACLInterfaceListDetails) Marshal(b []byte) ([]byte, error) { 561 if b == nil { 562 b = make([]byte, m.Size()) 563 } 564 buf := codec.NewBuffer(b) 565 buf.EncodeUint32(uint32(m.SwIfIndex)) 566 buf.EncodeUint8(uint8(len(m.Acls))) 567 buf.EncodeUint8(m.NInput) 568 for i := 0; i < len(m.Acls); i++ { 569 var x uint32 570 if i < len(m.Acls) { 571 x = uint32(m.Acls[i]) 572 } 573 buf.EncodeUint32(x) 574 } 575 return buf.Bytes(), nil 576 } 577 func (m *ACLInterfaceListDetails) Unmarshal(b []byte) error { 578 buf := codec.NewBuffer(b) 579 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 580 m.Count = buf.DecodeUint8() 581 m.NInput = buf.DecodeUint8() 582 m.Acls = make([]uint32, m.Count) 583 for i := 0; i < len(m.Acls); i++ { 584 m.Acls[i] = buf.DecodeUint32() 585 } 586 return nil 587 } 588 589 // ACLInterfaceListDump defines message 'acl_interface_list_dump'. 590 type ACLInterfaceListDump struct { 591 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` 592 } 593 594 func (m *ACLInterfaceListDump) Reset() { *m = ACLInterfaceListDump{} } 595 func (*ACLInterfaceListDump) GetMessageName() string { return "acl_interface_list_dump" } 596 func (*ACLInterfaceListDump) GetCrcString() string { return "f9e6675e" } 597 func (*ACLInterfaceListDump) GetMessageType() api.MessageType { 598 return api.RequestMessage 599 } 600 601 func (m *ACLInterfaceListDump) Size() (size int) { 602 if m == nil { 603 return 0 604 } 605 size += 4 // m.SwIfIndex 606 return size 607 } 608 func (m *ACLInterfaceListDump) Marshal(b []byte) ([]byte, error) { 609 if b == nil { 610 b = make([]byte, m.Size()) 611 } 612 buf := codec.NewBuffer(b) 613 buf.EncodeUint32(uint32(m.SwIfIndex)) 614 return buf.Bytes(), nil 615 } 616 func (m *ACLInterfaceListDump) Unmarshal(b []byte) error { 617 buf := codec.NewBuffer(b) 618 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 619 return nil 620 } 621 622 // ACLInterfaceSetACLList defines message 'acl_interface_set_acl_list'. 623 type ACLInterfaceSetACLList struct { 624 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 625 Count uint8 `binapi:"u8,name=count" json:"-"` 626 NInput uint8 `binapi:"u8,name=n_input" json:"n_input,omitempty"` 627 Acls []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"` 628 } 629 630 func (m *ACLInterfaceSetACLList) Reset() { *m = ACLInterfaceSetACLList{} } 631 func (*ACLInterfaceSetACLList) GetMessageName() string { return "acl_interface_set_acl_list" } 632 func (*ACLInterfaceSetACLList) GetCrcString() string { return "473982bd" } 633 func (*ACLInterfaceSetACLList) GetMessageType() api.MessageType { 634 return api.RequestMessage 635 } 636 637 func (m *ACLInterfaceSetACLList) Size() (size int) { 638 if m == nil { 639 return 0 640 } 641 size += 4 // m.SwIfIndex 642 size += 1 // m.Count 643 size += 1 // m.NInput 644 size += 4 * len(m.Acls) // m.Acls 645 return size 646 } 647 func (m *ACLInterfaceSetACLList) Marshal(b []byte) ([]byte, error) { 648 if b == nil { 649 b = make([]byte, m.Size()) 650 } 651 buf := codec.NewBuffer(b) 652 buf.EncodeUint32(uint32(m.SwIfIndex)) 653 buf.EncodeUint8(uint8(len(m.Acls))) 654 buf.EncodeUint8(m.NInput) 655 for i := 0; i < len(m.Acls); i++ { 656 var x uint32 657 if i < len(m.Acls) { 658 x = uint32(m.Acls[i]) 659 } 660 buf.EncodeUint32(x) 661 } 662 return buf.Bytes(), nil 663 } 664 func (m *ACLInterfaceSetACLList) Unmarshal(b []byte) error { 665 buf := codec.NewBuffer(b) 666 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 667 m.Count = buf.DecodeUint8() 668 m.NInput = buf.DecodeUint8() 669 m.Acls = make([]uint32, m.Count) 670 for i := 0; i < len(m.Acls); i++ { 671 m.Acls[i] = buf.DecodeUint32() 672 } 673 return nil 674 } 675 676 // ACLInterfaceSetACLListReply defines message 'acl_interface_set_acl_list_reply'. 677 type ACLInterfaceSetACLListReply struct { 678 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 679 } 680 681 func (m *ACLInterfaceSetACLListReply) Reset() { *m = ACLInterfaceSetACLListReply{} } 682 func (*ACLInterfaceSetACLListReply) GetMessageName() string { 683 return "acl_interface_set_acl_list_reply" 684 } 685 func (*ACLInterfaceSetACLListReply) GetCrcString() string { return "e8d4e804" } 686 func (*ACLInterfaceSetACLListReply) GetMessageType() api.MessageType { 687 return api.ReplyMessage 688 } 689 690 func (m *ACLInterfaceSetACLListReply) Size() (size int) { 691 if m == nil { 692 return 0 693 } 694 size += 4 // m.Retval 695 return size 696 } 697 func (m *ACLInterfaceSetACLListReply) Marshal(b []byte) ([]byte, error) { 698 if b == nil { 699 b = make([]byte, m.Size()) 700 } 701 buf := codec.NewBuffer(b) 702 buf.EncodeInt32(m.Retval) 703 return buf.Bytes(), nil 704 } 705 func (m *ACLInterfaceSetACLListReply) Unmarshal(b []byte) error { 706 buf := codec.NewBuffer(b) 707 m.Retval = buf.DecodeInt32() 708 return nil 709 } 710 711 // ACLInterfaceSetEtypeWhitelist defines message 'acl_interface_set_etype_whitelist'. 712 type ACLInterfaceSetEtypeWhitelist struct { 713 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 714 Count uint8 `binapi:"u8,name=count" json:"-"` 715 NInput uint8 `binapi:"u8,name=n_input" json:"n_input,omitempty"` 716 Whitelist []uint16 `binapi:"u16[count],name=whitelist" json:"whitelist,omitempty"` 717 } 718 719 func (m *ACLInterfaceSetEtypeWhitelist) Reset() { *m = ACLInterfaceSetEtypeWhitelist{} } 720 func (*ACLInterfaceSetEtypeWhitelist) GetMessageName() string { 721 return "acl_interface_set_etype_whitelist" 722 } 723 func (*ACLInterfaceSetEtypeWhitelist) GetCrcString() string { return "3f5c2d2d" } 724 func (*ACLInterfaceSetEtypeWhitelist) GetMessageType() api.MessageType { 725 return api.RequestMessage 726 } 727 728 func (m *ACLInterfaceSetEtypeWhitelist) Size() (size int) { 729 if m == nil { 730 return 0 731 } 732 size += 4 // m.SwIfIndex 733 size += 1 // m.Count 734 size += 1 // m.NInput 735 size += 2 * len(m.Whitelist) // m.Whitelist 736 return size 737 } 738 func (m *ACLInterfaceSetEtypeWhitelist) Marshal(b []byte) ([]byte, error) { 739 if b == nil { 740 b = make([]byte, m.Size()) 741 } 742 buf := codec.NewBuffer(b) 743 buf.EncodeUint32(uint32(m.SwIfIndex)) 744 buf.EncodeUint8(uint8(len(m.Whitelist))) 745 buf.EncodeUint8(m.NInput) 746 for i := 0; i < len(m.Whitelist); i++ { 747 var x uint16 748 if i < len(m.Whitelist) { 749 x = uint16(m.Whitelist[i]) 750 } 751 buf.EncodeUint16(x) 752 } 753 return buf.Bytes(), nil 754 } 755 func (m *ACLInterfaceSetEtypeWhitelist) Unmarshal(b []byte) error { 756 buf := codec.NewBuffer(b) 757 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 758 m.Count = buf.DecodeUint8() 759 m.NInput = buf.DecodeUint8() 760 m.Whitelist = make([]uint16, m.Count) 761 for i := 0; i < len(m.Whitelist); i++ { 762 m.Whitelist[i] = buf.DecodeUint16() 763 } 764 return nil 765 } 766 767 // ACLInterfaceSetEtypeWhitelistReply defines message 'acl_interface_set_etype_whitelist_reply'. 768 type ACLInterfaceSetEtypeWhitelistReply struct { 769 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 770 } 771 772 func (m *ACLInterfaceSetEtypeWhitelistReply) Reset() { *m = ACLInterfaceSetEtypeWhitelistReply{} } 773 func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageName() string { 774 return "acl_interface_set_etype_whitelist_reply" 775 } 776 func (*ACLInterfaceSetEtypeWhitelistReply) GetCrcString() string { return "e8d4e804" } 777 func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageType() api.MessageType { 778 return api.ReplyMessage 779 } 780 781 func (m *ACLInterfaceSetEtypeWhitelistReply) Size() (size int) { 782 if m == nil { 783 return 0 784 } 785 size += 4 // m.Retval 786 return size 787 } 788 func (m *ACLInterfaceSetEtypeWhitelistReply) Marshal(b []byte) ([]byte, error) { 789 if b == nil { 790 b = make([]byte, m.Size()) 791 } 792 buf := codec.NewBuffer(b) 793 buf.EncodeInt32(m.Retval) 794 return buf.Bytes(), nil 795 } 796 func (m *ACLInterfaceSetEtypeWhitelistReply) Unmarshal(b []byte) error { 797 buf := codec.NewBuffer(b) 798 m.Retval = buf.DecodeInt32() 799 return nil 800 } 801 802 // ACLPluginControlPing defines message 'acl_plugin_control_ping'. 803 type ACLPluginControlPing struct{} 804 805 func (m *ACLPluginControlPing) Reset() { *m = ACLPluginControlPing{} } 806 func (*ACLPluginControlPing) GetMessageName() string { return "acl_plugin_control_ping" } 807 func (*ACLPluginControlPing) GetCrcString() string { return "51077d14" } 808 func (*ACLPluginControlPing) GetMessageType() api.MessageType { 809 return api.RequestMessage 810 } 811 812 func (m *ACLPluginControlPing) Size() (size int) { 813 if m == nil { 814 return 0 815 } 816 return size 817 } 818 func (m *ACLPluginControlPing) Marshal(b []byte) ([]byte, error) { 819 if b == nil { 820 b = make([]byte, m.Size()) 821 } 822 buf := codec.NewBuffer(b) 823 return buf.Bytes(), nil 824 } 825 func (m *ACLPluginControlPing) Unmarshal(b []byte) error { 826 return nil 827 } 828 829 // ACLPluginControlPingReply defines message 'acl_plugin_control_ping_reply'. 830 type ACLPluginControlPingReply struct { 831 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 832 ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"` 833 VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"` 834 } 835 836 func (m *ACLPluginControlPingReply) Reset() { *m = ACLPluginControlPingReply{} } 837 func (*ACLPluginControlPingReply) GetMessageName() string { return "acl_plugin_control_ping_reply" } 838 func (*ACLPluginControlPingReply) GetCrcString() string { return "f6b0b8ca" } 839 func (*ACLPluginControlPingReply) GetMessageType() api.MessageType { 840 return api.ReplyMessage 841 } 842 843 func (m *ACLPluginControlPingReply) Size() (size int) { 844 if m == nil { 845 return 0 846 } 847 size += 4 // m.Retval 848 size += 4 // m.ClientIndex 849 size += 4 // m.VpePID 850 return size 851 } 852 func (m *ACLPluginControlPingReply) Marshal(b []byte) ([]byte, error) { 853 if b == nil { 854 b = make([]byte, m.Size()) 855 } 856 buf := codec.NewBuffer(b) 857 buf.EncodeInt32(m.Retval) 858 buf.EncodeUint32(m.ClientIndex) 859 buf.EncodeUint32(m.VpePID) 860 return buf.Bytes(), nil 861 } 862 func (m *ACLPluginControlPingReply) Unmarshal(b []byte) error { 863 buf := codec.NewBuffer(b) 864 m.Retval = buf.DecodeInt32() 865 m.ClientIndex = buf.DecodeUint32() 866 m.VpePID = buf.DecodeUint32() 867 return nil 868 } 869 870 // ACLPluginGetConnTableMaxEntries defines message 'acl_plugin_get_conn_table_max_entries'. 871 type ACLPluginGetConnTableMaxEntries struct{} 872 873 func (m *ACLPluginGetConnTableMaxEntries) Reset() { *m = ACLPluginGetConnTableMaxEntries{} } 874 func (*ACLPluginGetConnTableMaxEntries) GetMessageName() string { 875 return "acl_plugin_get_conn_table_max_entries" 876 } 877 func (*ACLPluginGetConnTableMaxEntries) GetCrcString() string { return "51077d14" } 878 func (*ACLPluginGetConnTableMaxEntries) GetMessageType() api.MessageType { 879 return api.RequestMessage 880 } 881 882 func (m *ACLPluginGetConnTableMaxEntries) Size() (size int) { 883 if m == nil { 884 return 0 885 } 886 return size 887 } 888 func (m *ACLPluginGetConnTableMaxEntries) Marshal(b []byte) ([]byte, error) { 889 if b == nil { 890 b = make([]byte, m.Size()) 891 } 892 buf := codec.NewBuffer(b) 893 return buf.Bytes(), nil 894 } 895 func (m *ACLPluginGetConnTableMaxEntries) Unmarshal(b []byte) error { 896 return nil 897 } 898 899 // ACLPluginGetConnTableMaxEntriesReply defines message 'acl_plugin_get_conn_table_max_entries_reply'. 900 type ACLPluginGetConnTableMaxEntriesReply struct { 901 ConnTableMaxEntries uint64 `binapi:"u64,name=conn_table_max_entries" json:"conn_table_max_entries,omitempty"` 902 } 903 904 func (m *ACLPluginGetConnTableMaxEntriesReply) Reset() { *m = ACLPluginGetConnTableMaxEntriesReply{} } 905 func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageName() string { 906 return "acl_plugin_get_conn_table_max_entries_reply" 907 } 908 func (*ACLPluginGetConnTableMaxEntriesReply) GetCrcString() string { return "7a096d3d" } 909 func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageType() api.MessageType { 910 return api.ReplyMessage 911 } 912 913 func (m *ACLPluginGetConnTableMaxEntriesReply) Size() (size int) { 914 if m == nil { 915 return 0 916 } 917 size += 8 // m.ConnTableMaxEntries 918 return size 919 } 920 func (m *ACLPluginGetConnTableMaxEntriesReply) Marshal(b []byte) ([]byte, error) { 921 if b == nil { 922 b = make([]byte, m.Size()) 923 } 924 buf := codec.NewBuffer(b) 925 buf.EncodeUint64(m.ConnTableMaxEntries) 926 return buf.Bytes(), nil 927 } 928 func (m *ACLPluginGetConnTableMaxEntriesReply) Unmarshal(b []byte) error { 929 buf := codec.NewBuffer(b) 930 m.ConnTableMaxEntries = buf.DecodeUint64() 931 return nil 932 } 933 934 // ACLPluginGetVersion defines message 'acl_plugin_get_version'. 935 type ACLPluginGetVersion struct{} 936 937 func (m *ACLPluginGetVersion) Reset() { *m = ACLPluginGetVersion{} } 938 func (*ACLPluginGetVersion) GetMessageName() string { return "acl_plugin_get_version" } 939 func (*ACLPluginGetVersion) GetCrcString() string { return "51077d14" } 940 func (*ACLPluginGetVersion) GetMessageType() api.MessageType { 941 return api.RequestMessage 942 } 943 944 func (m *ACLPluginGetVersion) Size() (size int) { 945 if m == nil { 946 return 0 947 } 948 return size 949 } 950 func (m *ACLPluginGetVersion) Marshal(b []byte) ([]byte, error) { 951 if b == nil { 952 b = make([]byte, m.Size()) 953 } 954 buf := codec.NewBuffer(b) 955 return buf.Bytes(), nil 956 } 957 func (m *ACLPluginGetVersion) Unmarshal(b []byte) error { 958 return nil 959 } 960 961 // ACLPluginGetVersionReply defines message 'acl_plugin_get_version_reply'. 962 type ACLPluginGetVersionReply struct { 963 Major uint32 `binapi:"u32,name=major" json:"major,omitempty"` 964 Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"` 965 } 966 967 func (m *ACLPluginGetVersionReply) Reset() { *m = ACLPluginGetVersionReply{} } 968 func (*ACLPluginGetVersionReply) GetMessageName() string { return "acl_plugin_get_version_reply" } 969 func (*ACLPluginGetVersionReply) GetCrcString() string { return "9b32cf86" } 970 func (*ACLPluginGetVersionReply) GetMessageType() api.MessageType { 971 return api.ReplyMessage 972 } 973 974 func (m *ACLPluginGetVersionReply) Size() (size int) { 975 if m == nil { 976 return 0 977 } 978 size += 4 // m.Major 979 size += 4 // m.Minor 980 return size 981 } 982 func (m *ACLPluginGetVersionReply) Marshal(b []byte) ([]byte, error) { 983 if b == nil { 984 b = make([]byte, m.Size()) 985 } 986 buf := codec.NewBuffer(b) 987 buf.EncodeUint32(m.Major) 988 buf.EncodeUint32(m.Minor) 989 return buf.Bytes(), nil 990 } 991 func (m *ACLPluginGetVersionReply) Unmarshal(b []byte) error { 992 buf := codec.NewBuffer(b) 993 m.Major = buf.DecodeUint32() 994 m.Minor = buf.DecodeUint32() 995 return nil 996 } 997 998 // ACLPluginUseHashLookupGet defines message 'acl_plugin_use_hash_lookup_get'. 999 // InProgress: the message form may change in the future versions 1000 type ACLPluginUseHashLookupGet struct{} 1001 1002 func (m *ACLPluginUseHashLookupGet) Reset() { *m = ACLPluginUseHashLookupGet{} } 1003 func (*ACLPluginUseHashLookupGet) GetMessageName() string { return "acl_plugin_use_hash_lookup_get" } 1004 func (*ACLPluginUseHashLookupGet) GetCrcString() string { return "51077d14" } 1005 func (*ACLPluginUseHashLookupGet) GetMessageType() api.MessageType { 1006 return api.RequestMessage 1007 } 1008 1009 func (m *ACLPluginUseHashLookupGet) Size() (size int) { 1010 if m == nil { 1011 return 0 1012 } 1013 return size 1014 } 1015 func (m *ACLPluginUseHashLookupGet) Marshal(b []byte) ([]byte, error) { 1016 if b == nil { 1017 b = make([]byte, m.Size()) 1018 } 1019 buf := codec.NewBuffer(b) 1020 return buf.Bytes(), nil 1021 } 1022 func (m *ACLPluginUseHashLookupGet) Unmarshal(b []byte) error { 1023 return nil 1024 } 1025 1026 // ACLPluginUseHashLookupGetReply defines message 'acl_plugin_use_hash_lookup_get_reply'. 1027 // InProgress: the message form may change in the future versions 1028 type ACLPluginUseHashLookupGetReply struct { 1029 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 1030 } 1031 1032 func (m *ACLPluginUseHashLookupGetReply) Reset() { *m = ACLPluginUseHashLookupGetReply{} } 1033 func (*ACLPluginUseHashLookupGetReply) GetMessageName() string { 1034 return "acl_plugin_use_hash_lookup_get_reply" 1035 } 1036 func (*ACLPluginUseHashLookupGetReply) GetCrcString() string { return "5392ad31" } 1037 func (*ACLPluginUseHashLookupGetReply) GetMessageType() api.MessageType { 1038 return api.ReplyMessage 1039 } 1040 1041 func (m *ACLPluginUseHashLookupGetReply) Size() (size int) { 1042 if m == nil { 1043 return 0 1044 } 1045 size += 1 // m.Enable 1046 return size 1047 } 1048 func (m *ACLPluginUseHashLookupGetReply) Marshal(b []byte) ([]byte, error) { 1049 if b == nil { 1050 b = make([]byte, m.Size()) 1051 } 1052 buf := codec.NewBuffer(b) 1053 buf.EncodeBool(m.Enable) 1054 return buf.Bytes(), nil 1055 } 1056 func (m *ACLPluginUseHashLookupGetReply) Unmarshal(b []byte) error { 1057 buf := codec.NewBuffer(b) 1058 m.Enable = buf.DecodeBool() 1059 return nil 1060 } 1061 1062 // ACLPluginUseHashLookupSet defines message 'acl_plugin_use_hash_lookup_set'. 1063 // InProgress: the message form may change in the future versions 1064 type ACLPluginUseHashLookupSet struct { 1065 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 1066 } 1067 1068 func (m *ACLPluginUseHashLookupSet) Reset() { *m = ACLPluginUseHashLookupSet{} } 1069 func (*ACLPluginUseHashLookupSet) GetMessageName() string { return "acl_plugin_use_hash_lookup_set" } 1070 func (*ACLPluginUseHashLookupSet) GetCrcString() string { return "b3e225d2" } 1071 func (*ACLPluginUseHashLookupSet) GetMessageType() api.MessageType { 1072 return api.RequestMessage 1073 } 1074 1075 func (m *ACLPluginUseHashLookupSet) Size() (size int) { 1076 if m == nil { 1077 return 0 1078 } 1079 size += 1 // m.Enable 1080 return size 1081 } 1082 func (m *ACLPluginUseHashLookupSet) Marshal(b []byte) ([]byte, error) { 1083 if b == nil { 1084 b = make([]byte, m.Size()) 1085 } 1086 buf := codec.NewBuffer(b) 1087 buf.EncodeBool(m.Enable) 1088 return buf.Bytes(), nil 1089 } 1090 func (m *ACLPluginUseHashLookupSet) Unmarshal(b []byte) error { 1091 buf := codec.NewBuffer(b) 1092 m.Enable = buf.DecodeBool() 1093 return nil 1094 } 1095 1096 // ACLPluginUseHashLookupSetReply defines message 'acl_plugin_use_hash_lookup_set_reply'. 1097 // InProgress: the message form may change in the future versions 1098 type ACLPluginUseHashLookupSetReply struct { 1099 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1100 } 1101 1102 func (m *ACLPluginUseHashLookupSetReply) Reset() { *m = ACLPluginUseHashLookupSetReply{} } 1103 func (*ACLPluginUseHashLookupSetReply) GetMessageName() string { 1104 return "acl_plugin_use_hash_lookup_set_reply" 1105 } 1106 func (*ACLPluginUseHashLookupSetReply) GetCrcString() string { return "e8d4e804" } 1107 func (*ACLPluginUseHashLookupSetReply) GetMessageType() api.MessageType { 1108 return api.ReplyMessage 1109 } 1110 1111 func (m *ACLPluginUseHashLookupSetReply) Size() (size int) { 1112 if m == nil { 1113 return 0 1114 } 1115 size += 4 // m.Retval 1116 return size 1117 } 1118 func (m *ACLPluginUseHashLookupSetReply) Marshal(b []byte) ([]byte, error) { 1119 if b == nil { 1120 b = make([]byte, m.Size()) 1121 } 1122 buf := codec.NewBuffer(b) 1123 buf.EncodeInt32(m.Retval) 1124 return buf.Bytes(), nil 1125 } 1126 func (m *ACLPluginUseHashLookupSetReply) Unmarshal(b []byte) error { 1127 buf := codec.NewBuffer(b) 1128 m.Retval = buf.DecodeInt32() 1129 return nil 1130 } 1131 1132 // ACLStatsIntfCountersEnable defines message 'acl_stats_intf_counters_enable'. 1133 type ACLStatsIntfCountersEnable struct { 1134 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 1135 } 1136 1137 func (m *ACLStatsIntfCountersEnable) Reset() { *m = ACLStatsIntfCountersEnable{} } 1138 func (*ACLStatsIntfCountersEnable) GetMessageName() string { return "acl_stats_intf_counters_enable" } 1139 func (*ACLStatsIntfCountersEnable) GetCrcString() string { return "b3e225d2" } 1140 func (*ACLStatsIntfCountersEnable) GetMessageType() api.MessageType { 1141 return api.RequestMessage 1142 } 1143 1144 func (m *ACLStatsIntfCountersEnable) Size() (size int) { 1145 if m == nil { 1146 return 0 1147 } 1148 size += 1 // m.Enable 1149 return size 1150 } 1151 func (m *ACLStatsIntfCountersEnable) Marshal(b []byte) ([]byte, error) { 1152 if b == nil { 1153 b = make([]byte, m.Size()) 1154 } 1155 buf := codec.NewBuffer(b) 1156 buf.EncodeBool(m.Enable) 1157 return buf.Bytes(), nil 1158 } 1159 func (m *ACLStatsIntfCountersEnable) Unmarshal(b []byte) error { 1160 buf := codec.NewBuffer(b) 1161 m.Enable = buf.DecodeBool() 1162 return nil 1163 } 1164 1165 // ACLStatsIntfCountersEnableReply defines message 'acl_stats_intf_counters_enable_reply'. 1166 type ACLStatsIntfCountersEnableReply struct { 1167 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1168 } 1169 1170 func (m *ACLStatsIntfCountersEnableReply) Reset() { *m = ACLStatsIntfCountersEnableReply{} } 1171 func (*ACLStatsIntfCountersEnableReply) GetMessageName() string { 1172 return "acl_stats_intf_counters_enable_reply" 1173 } 1174 func (*ACLStatsIntfCountersEnableReply) GetCrcString() string { return "e8d4e804" } 1175 func (*ACLStatsIntfCountersEnableReply) GetMessageType() api.MessageType { 1176 return api.ReplyMessage 1177 } 1178 1179 func (m *ACLStatsIntfCountersEnableReply) Size() (size int) { 1180 if m == nil { 1181 return 0 1182 } 1183 size += 4 // m.Retval 1184 return size 1185 } 1186 func (m *ACLStatsIntfCountersEnableReply) Marshal(b []byte) ([]byte, error) { 1187 if b == nil { 1188 b = make([]byte, m.Size()) 1189 } 1190 buf := codec.NewBuffer(b) 1191 buf.EncodeInt32(m.Retval) 1192 return buf.Bytes(), nil 1193 } 1194 func (m *ACLStatsIntfCountersEnableReply) Unmarshal(b []byte) error { 1195 buf := codec.NewBuffer(b) 1196 m.Retval = buf.DecodeInt32() 1197 return nil 1198 } 1199 1200 // MacipACLAdd defines message 'macip_acl_add'. 1201 type MacipACLAdd struct { 1202 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 1203 Count uint32 `binapi:"u32,name=count" json:"-"` 1204 R []acl_types.MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"` 1205 } 1206 1207 func (m *MacipACLAdd) Reset() { *m = MacipACLAdd{} } 1208 func (*MacipACLAdd) GetMessageName() string { return "macip_acl_add" } 1209 func (*MacipACLAdd) GetCrcString() string { return "ce6fbad0" } 1210 func (*MacipACLAdd) GetMessageType() api.MessageType { 1211 return api.RequestMessage 1212 } 1213 1214 func (m *MacipACLAdd) Size() (size int) { 1215 if m == nil { 1216 return 0 1217 } 1218 size += 64 // m.Tag 1219 size += 4 // m.Count 1220 for j1 := 0; j1 < len(m.R); j1++ { 1221 var s1 acl_types.MacipACLRule 1222 _ = s1 1223 if j1 < len(m.R) { 1224 s1 = m.R[j1] 1225 } 1226 size += 1 // s1.IsPermit 1227 size += 1 * 6 // s1.SrcMac 1228 size += 1 * 6 // s1.SrcMacMask 1229 size += 1 // s1.SrcPrefix.Address.Af 1230 size += 1 * 16 // s1.SrcPrefix.Address.Un 1231 size += 1 // s1.SrcPrefix.Len 1232 } 1233 return size 1234 } 1235 func (m *MacipACLAdd) Marshal(b []byte) ([]byte, error) { 1236 if b == nil { 1237 b = make([]byte, m.Size()) 1238 } 1239 buf := codec.NewBuffer(b) 1240 buf.EncodeString(m.Tag, 64) 1241 buf.EncodeUint32(uint32(len(m.R))) 1242 for j0 := 0; j0 < len(m.R); j0++ { 1243 var v0 acl_types.MacipACLRule // R 1244 if j0 < len(m.R) { 1245 v0 = m.R[j0] 1246 } 1247 buf.EncodeUint8(uint8(v0.IsPermit)) 1248 buf.EncodeBytes(v0.SrcMac[:], 6) 1249 buf.EncodeBytes(v0.SrcMacMask[:], 6) 1250 buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af)) 1251 buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 16) 1252 buf.EncodeUint8(v0.SrcPrefix.Len) 1253 } 1254 return buf.Bytes(), nil 1255 } 1256 func (m *MacipACLAdd) Unmarshal(b []byte) error { 1257 buf := codec.NewBuffer(b) 1258 m.Tag = buf.DecodeString(64) 1259 m.Count = buf.DecodeUint32() 1260 m.R = make([]acl_types.MacipACLRule, m.Count) 1261 for j0 := 0; j0 < len(m.R); j0++ { 1262 m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8()) 1263 copy(m.R[j0].SrcMac[:], buf.DecodeBytes(6)) 1264 copy(m.R[j0].SrcMacMask[:], buf.DecodeBytes(6)) 1265 m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1266 copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1267 m.R[j0].SrcPrefix.Len = buf.DecodeUint8() 1268 } 1269 return nil 1270 } 1271 1272 // MacipACLAddReplace defines message 'macip_acl_add_replace'. 1273 type MacipACLAddReplace struct { 1274 ACLIndex uint32 `binapi:"u32,name=acl_index,default=4294967295" json:"acl_index,omitempty"` 1275 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 1276 Count uint32 `binapi:"u32,name=count" json:"-"` 1277 R []acl_types.MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"` 1278 } 1279 1280 func (m *MacipACLAddReplace) Reset() { *m = MacipACLAddReplace{} } 1281 func (*MacipACLAddReplace) GetMessageName() string { return "macip_acl_add_replace" } 1282 func (*MacipACLAddReplace) GetCrcString() string { return "2a461dd4" } 1283 func (*MacipACLAddReplace) GetMessageType() api.MessageType { 1284 return api.RequestMessage 1285 } 1286 1287 func (m *MacipACLAddReplace) Size() (size int) { 1288 if m == nil { 1289 return 0 1290 } 1291 size += 4 // m.ACLIndex 1292 size += 64 // m.Tag 1293 size += 4 // m.Count 1294 for j1 := 0; j1 < len(m.R); j1++ { 1295 var s1 acl_types.MacipACLRule 1296 _ = s1 1297 if j1 < len(m.R) { 1298 s1 = m.R[j1] 1299 } 1300 size += 1 // s1.IsPermit 1301 size += 1 * 6 // s1.SrcMac 1302 size += 1 * 6 // s1.SrcMacMask 1303 size += 1 // s1.SrcPrefix.Address.Af 1304 size += 1 * 16 // s1.SrcPrefix.Address.Un 1305 size += 1 // s1.SrcPrefix.Len 1306 } 1307 return size 1308 } 1309 func (m *MacipACLAddReplace) Marshal(b []byte) ([]byte, error) { 1310 if b == nil { 1311 b = make([]byte, m.Size()) 1312 } 1313 buf := codec.NewBuffer(b) 1314 buf.EncodeUint32(m.ACLIndex) 1315 buf.EncodeString(m.Tag, 64) 1316 buf.EncodeUint32(uint32(len(m.R))) 1317 for j0 := 0; j0 < len(m.R); j0++ { 1318 var v0 acl_types.MacipACLRule // R 1319 if j0 < len(m.R) { 1320 v0 = m.R[j0] 1321 } 1322 buf.EncodeUint8(uint8(v0.IsPermit)) 1323 buf.EncodeBytes(v0.SrcMac[:], 6) 1324 buf.EncodeBytes(v0.SrcMacMask[:], 6) 1325 buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af)) 1326 buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 16) 1327 buf.EncodeUint8(v0.SrcPrefix.Len) 1328 } 1329 return buf.Bytes(), nil 1330 } 1331 func (m *MacipACLAddReplace) Unmarshal(b []byte) error { 1332 buf := codec.NewBuffer(b) 1333 m.ACLIndex = buf.DecodeUint32() 1334 m.Tag = buf.DecodeString(64) 1335 m.Count = buf.DecodeUint32() 1336 m.R = make([]acl_types.MacipACLRule, m.Count) 1337 for j0 := 0; j0 < len(m.R); j0++ { 1338 m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8()) 1339 copy(m.R[j0].SrcMac[:], buf.DecodeBytes(6)) 1340 copy(m.R[j0].SrcMacMask[:], buf.DecodeBytes(6)) 1341 m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1342 copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1343 m.R[j0].SrcPrefix.Len = buf.DecodeUint8() 1344 } 1345 return nil 1346 } 1347 1348 // MacipACLAddReplaceReply defines message 'macip_acl_add_replace_reply'. 1349 type MacipACLAddReplaceReply struct { 1350 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` 1351 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1352 } 1353 1354 func (m *MacipACLAddReplaceReply) Reset() { *m = MacipACLAddReplaceReply{} } 1355 func (*MacipACLAddReplaceReply) GetMessageName() string { return "macip_acl_add_replace_reply" } 1356 func (*MacipACLAddReplaceReply) GetCrcString() string { return "ac407b0c" } 1357 func (*MacipACLAddReplaceReply) GetMessageType() api.MessageType { 1358 return api.ReplyMessage 1359 } 1360 1361 func (m *MacipACLAddReplaceReply) Size() (size int) { 1362 if m == nil { 1363 return 0 1364 } 1365 size += 4 // m.ACLIndex 1366 size += 4 // m.Retval 1367 return size 1368 } 1369 func (m *MacipACLAddReplaceReply) Marshal(b []byte) ([]byte, error) { 1370 if b == nil { 1371 b = make([]byte, m.Size()) 1372 } 1373 buf := codec.NewBuffer(b) 1374 buf.EncodeUint32(m.ACLIndex) 1375 buf.EncodeInt32(m.Retval) 1376 return buf.Bytes(), nil 1377 } 1378 func (m *MacipACLAddReplaceReply) Unmarshal(b []byte) error { 1379 buf := codec.NewBuffer(b) 1380 m.ACLIndex = buf.DecodeUint32() 1381 m.Retval = buf.DecodeInt32() 1382 return nil 1383 } 1384 1385 // MacipACLAddReply defines message 'macip_acl_add_reply'. 1386 type MacipACLAddReply struct { 1387 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` 1388 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1389 } 1390 1391 func (m *MacipACLAddReply) Reset() { *m = MacipACLAddReply{} } 1392 func (*MacipACLAddReply) GetMessageName() string { return "macip_acl_add_reply" } 1393 func (*MacipACLAddReply) GetCrcString() string { return "ac407b0c" } 1394 func (*MacipACLAddReply) GetMessageType() api.MessageType { 1395 return api.ReplyMessage 1396 } 1397 1398 func (m *MacipACLAddReply) Size() (size int) { 1399 if m == nil { 1400 return 0 1401 } 1402 size += 4 // m.ACLIndex 1403 size += 4 // m.Retval 1404 return size 1405 } 1406 func (m *MacipACLAddReply) Marshal(b []byte) ([]byte, error) { 1407 if b == nil { 1408 b = make([]byte, m.Size()) 1409 } 1410 buf := codec.NewBuffer(b) 1411 buf.EncodeUint32(m.ACLIndex) 1412 buf.EncodeInt32(m.Retval) 1413 return buf.Bytes(), nil 1414 } 1415 func (m *MacipACLAddReply) Unmarshal(b []byte) error { 1416 buf := codec.NewBuffer(b) 1417 m.ACLIndex = buf.DecodeUint32() 1418 m.Retval = buf.DecodeInt32() 1419 return nil 1420 } 1421 1422 // MacipACLDel defines message 'macip_acl_del'. 1423 type MacipACLDel struct { 1424 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` 1425 } 1426 1427 func (m *MacipACLDel) Reset() { *m = MacipACLDel{} } 1428 func (*MacipACLDel) GetMessageName() string { return "macip_acl_del" } 1429 func (*MacipACLDel) GetCrcString() string { return "ef34fea4" } 1430 func (*MacipACLDel) GetMessageType() api.MessageType { 1431 return api.RequestMessage 1432 } 1433 1434 func (m *MacipACLDel) Size() (size int) { 1435 if m == nil { 1436 return 0 1437 } 1438 size += 4 // m.ACLIndex 1439 return size 1440 } 1441 func (m *MacipACLDel) Marshal(b []byte) ([]byte, error) { 1442 if b == nil { 1443 b = make([]byte, m.Size()) 1444 } 1445 buf := codec.NewBuffer(b) 1446 buf.EncodeUint32(m.ACLIndex) 1447 return buf.Bytes(), nil 1448 } 1449 func (m *MacipACLDel) Unmarshal(b []byte) error { 1450 buf := codec.NewBuffer(b) 1451 m.ACLIndex = buf.DecodeUint32() 1452 return nil 1453 } 1454 1455 // MacipACLDelReply defines message 'macip_acl_del_reply'. 1456 type MacipACLDelReply struct { 1457 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1458 } 1459 1460 func (m *MacipACLDelReply) Reset() { *m = MacipACLDelReply{} } 1461 func (*MacipACLDelReply) GetMessageName() string { return "macip_acl_del_reply" } 1462 func (*MacipACLDelReply) GetCrcString() string { return "e8d4e804" } 1463 func (*MacipACLDelReply) GetMessageType() api.MessageType { 1464 return api.ReplyMessage 1465 } 1466 1467 func (m *MacipACLDelReply) Size() (size int) { 1468 if m == nil { 1469 return 0 1470 } 1471 size += 4 // m.Retval 1472 return size 1473 } 1474 func (m *MacipACLDelReply) Marshal(b []byte) ([]byte, error) { 1475 if b == nil { 1476 b = make([]byte, m.Size()) 1477 } 1478 buf := codec.NewBuffer(b) 1479 buf.EncodeInt32(m.Retval) 1480 return buf.Bytes(), nil 1481 } 1482 func (m *MacipACLDelReply) Unmarshal(b []byte) error { 1483 buf := codec.NewBuffer(b) 1484 m.Retval = buf.DecodeInt32() 1485 return nil 1486 } 1487 1488 // MacipACLDetails defines message 'macip_acl_details'. 1489 type MacipACLDetails struct { 1490 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` 1491 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 1492 Count uint32 `binapi:"u32,name=count" json:"-"` 1493 R []acl_types.MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"` 1494 } 1495 1496 func (m *MacipACLDetails) Reset() { *m = MacipACLDetails{} } 1497 func (*MacipACLDetails) GetMessageName() string { return "macip_acl_details" } 1498 func (*MacipACLDetails) GetCrcString() string { return "27135b59" } 1499 func (*MacipACLDetails) GetMessageType() api.MessageType { 1500 return api.ReplyMessage 1501 } 1502 1503 func (m *MacipACLDetails) Size() (size int) { 1504 if m == nil { 1505 return 0 1506 } 1507 size += 4 // m.ACLIndex 1508 size += 64 // m.Tag 1509 size += 4 // m.Count 1510 for j1 := 0; j1 < len(m.R); j1++ { 1511 var s1 acl_types.MacipACLRule 1512 _ = s1 1513 if j1 < len(m.R) { 1514 s1 = m.R[j1] 1515 } 1516 size += 1 // s1.IsPermit 1517 size += 1 * 6 // s1.SrcMac 1518 size += 1 * 6 // s1.SrcMacMask 1519 size += 1 // s1.SrcPrefix.Address.Af 1520 size += 1 * 16 // s1.SrcPrefix.Address.Un 1521 size += 1 // s1.SrcPrefix.Len 1522 } 1523 return size 1524 } 1525 func (m *MacipACLDetails) Marshal(b []byte) ([]byte, error) { 1526 if b == nil { 1527 b = make([]byte, m.Size()) 1528 } 1529 buf := codec.NewBuffer(b) 1530 buf.EncodeUint32(m.ACLIndex) 1531 buf.EncodeString(m.Tag, 64) 1532 buf.EncodeUint32(uint32(len(m.R))) 1533 for j0 := 0; j0 < len(m.R); j0++ { 1534 var v0 acl_types.MacipACLRule // R 1535 if j0 < len(m.R) { 1536 v0 = m.R[j0] 1537 } 1538 buf.EncodeUint8(uint8(v0.IsPermit)) 1539 buf.EncodeBytes(v0.SrcMac[:], 6) 1540 buf.EncodeBytes(v0.SrcMacMask[:], 6) 1541 buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af)) 1542 buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 16) 1543 buf.EncodeUint8(v0.SrcPrefix.Len) 1544 } 1545 return buf.Bytes(), nil 1546 } 1547 func (m *MacipACLDetails) Unmarshal(b []byte) error { 1548 buf := codec.NewBuffer(b) 1549 m.ACLIndex = buf.DecodeUint32() 1550 m.Tag = buf.DecodeString(64) 1551 m.Count = buf.DecodeUint32() 1552 m.R = make([]acl_types.MacipACLRule, m.Count) 1553 for j0 := 0; j0 < len(m.R); j0++ { 1554 m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8()) 1555 copy(m.R[j0].SrcMac[:], buf.DecodeBytes(6)) 1556 copy(m.R[j0].SrcMacMask[:], buf.DecodeBytes(6)) 1557 m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1558 copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1559 m.R[j0].SrcPrefix.Len = buf.DecodeUint8() 1560 } 1561 return nil 1562 } 1563 1564 // MacipACLDump defines message 'macip_acl_dump'. 1565 type MacipACLDump struct { 1566 ACLIndex uint32 `binapi:"u32,name=acl_index,default=4294967295" json:"acl_index,omitempty"` 1567 } 1568 1569 func (m *MacipACLDump) Reset() { *m = MacipACLDump{} } 1570 func (*MacipACLDump) GetMessageName() string { return "macip_acl_dump" } 1571 func (*MacipACLDump) GetCrcString() string { return "ef34fea4" } 1572 func (*MacipACLDump) GetMessageType() api.MessageType { 1573 return api.RequestMessage 1574 } 1575 1576 func (m *MacipACLDump) Size() (size int) { 1577 if m == nil { 1578 return 0 1579 } 1580 size += 4 // m.ACLIndex 1581 return size 1582 } 1583 func (m *MacipACLDump) Marshal(b []byte) ([]byte, error) { 1584 if b == nil { 1585 b = make([]byte, m.Size()) 1586 } 1587 buf := codec.NewBuffer(b) 1588 buf.EncodeUint32(m.ACLIndex) 1589 return buf.Bytes(), nil 1590 } 1591 func (m *MacipACLDump) Unmarshal(b []byte) error { 1592 buf := codec.NewBuffer(b) 1593 m.ACLIndex = buf.DecodeUint32() 1594 return nil 1595 } 1596 1597 // MacipACLInterfaceAddDel defines message 'macip_acl_interface_add_del'. 1598 type MacipACLInterfaceAddDel struct { 1599 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 1600 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1601 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` 1602 } 1603 1604 func (m *MacipACLInterfaceAddDel) Reset() { *m = MacipACLInterfaceAddDel{} } 1605 func (*MacipACLInterfaceAddDel) GetMessageName() string { return "macip_acl_interface_add_del" } 1606 func (*MacipACLInterfaceAddDel) GetCrcString() string { return "4b8690b1" } 1607 func (*MacipACLInterfaceAddDel) GetMessageType() api.MessageType { 1608 return api.RequestMessage 1609 } 1610 1611 func (m *MacipACLInterfaceAddDel) Size() (size int) { 1612 if m == nil { 1613 return 0 1614 } 1615 size += 1 // m.IsAdd 1616 size += 4 // m.SwIfIndex 1617 size += 4 // m.ACLIndex 1618 return size 1619 } 1620 func (m *MacipACLInterfaceAddDel) Marshal(b []byte) ([]byte, error) { 1621 if b == nil { 1622 b = make([]byte, m.Size()) 1623 } 1624 buf := codec.NewBuffer(b) 1625 buf.EncodeBool(m.IsAdd) 1626 buf.EncodeUint32(uint32(m.SwIfIndex)) 1627 buf.EncodeUint32(m.ACLIndex) 1628 return buf.Bytes(), nil 1629 } 1630 func (m *MacipACLInterfaceAddDel) Unmarshal(b []byte) error { 1631 buf := codec.NewBuffer(b) 1632 m.IsAdd = buf.DecodeBool() 1633 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1634 m.ACLIndex = buf.DecodeUint32() 1635 return nil 1636 } 1637 1638 // MacipACLInterfaceAddDelReply defines message 'macip_acl_interface_add_del_reply'. 1639 type MacipACLInterfaceAddDelReply struct { 1640 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1641 } 1642 1643 func (m *MacipACLInterfaceAddDelReply) Reset() { *m = MacipACLInterfaceAddDelReply{} } 1644 func (*MacipACLInterfaceAddDelReply) GetMessageName() string { 1645 return "macip_acl_interface_add_del_reply" 1646 } 1647 func (*MacipACLInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" } 1648 func (*MacipACLInterfaceAddDelReply) GetMessageType() api.MessageType { 1649 return api.ReplyMessage 1650 } 1651 1652 func (m *MacipACLInterfaceAddDelReply) Size() (size int) { 1653 if m == nil { 1654 return 0 1655 } 1656 size += 4 // m.Retval 1657 return size 1658 } 1659 func (m *MacipACLInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) { 1660 if b == nil { 1661 b = make([]byte, m.Size()) 1662 } 1663 buf := codec.NewBuffer(b) 1664 buf.EncodeInt32(m.Retval) 1665 return buf.Bytes(), nil 1666 } 1667 func (m *MacipACLInterfaceAddDelReply) Unmarshal(b []byte) error { 1668 buf := codec.NewBuffer(b) 1669 m.Retval = buf.DecodeInt32() 1670 return nil 1671 } 1672 1673 // MacipACLInterfaceGet defines message 'macip_acl_interface_get'. 1674 type MacipACLInterfaceGet struct{} 1675 1676 func (m *MacipACLInterfaceGet) Reset() { *m = MacipACLInterfaceGet{} } 1677 func (*MacipACLInterfaceGet) GetMessageName() string { return "macip_acl_interface_get" } 1678 func (*MacipACLInterfaceGet) GetCrcString() string { return "51077d14" } 1679 func (*MacipACLInterfaceGet) GetMessageType() api.MessageType { 1680 return api.RequestMessage 1681 } 1682 1683 func (m *MacipACLInterfaceGet) Size() (size int) { 1684 if m == nil { 1685 return 0 1686 } 1687 return size 1688 } 1689 func (m *MacipACLInterfaceGet) Marshal(b []byte) ([]byte, error) { 1690 if b == nil { 1691 b = make([]byte, m.Size()) 1692 } 1693 buf := codec.NewBuffer(b) 1694 return buf.Bytes(), nil 1695 } 1696 func (m *MacipACLInterfaceGet) Unmarshal(b []byte) error { 1697 return nil 1698 } 1699 1700 // MacipACLInterfaceGetReply defines message 'macip_acl_interface_get_reply'. 1701 type MacipACLInterfaceGetReply struct { 1702 Count uint32 `binapi:"u32,name=count" json:"-"` 1703 Acls []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"` 1704 } 1705 1706 func (m *MacipACLInterfaceGetReply) Reset() { *m = MacipACLInterfaceGetReply{} } 1707 func (*MacipACLInterfaceGetReply) GetMessageName() string { return "macip_acl_interface_get_reply" } 1708 func (*MacipACLInterfaceGetReply) GetCrcString() string { return "accf9b05" } 1709 func (*MacipACLInterfaceGetReply) GetMessageType() api.MessageType { 1710 return api.ReplyMessage 1711 } 1712 1713 func (m *MacipACLInterfaceGetReply) Size() (size int) { 1714 if m == nil { 1715 return 0 1716 } 1717 size += 4 // m.Count 1718 size += 4 * len(m.Acls) // m.Acls 1719 return size 1720 } 1721 func (m *MacipACLInterfaceGetReply) Marshal(b []byte) ([]byte, error) { 1722 if b == nil { 1723 b = make([]byte, m.Size()) 1724 } 1725 buf := codec.NewBuffer(b) 1726 buf.EncodeUint32(uint32(len(m.Acls))) 1727 for i := 0; i < len(m.Acls); i++ { 1728 var x uint32 1729 if i < len(m.Acls) { 1730 x = uint32(m.Acls[i]) 1731 } 1732 buf.EncodeUint32(x) 1733 } 1734 return buf.Bytes(), nil 1735 } 1736 func (m *MacipACLInterfaceGetReply) Unmarshal(b []byte) error { 1737 buf := codec.NewBuffer(b) 1738 m.Count = buf.DecodeUint32() 1739 m.Acls = make([]uint32, m.Count) 1740 for i := 0; i < len(m.Acls); i++ { 1741 m.Acls[i] = buf.DecodeUint32() 1742 } 1743 return nil 1744 } 1745 1746 // MacipACLInterfaceListDetails defines message 'macip_acl_interface_list_details'. 1747 type MacipACLInterfaceListDetails struct { 1748 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1749 Count uint8 `binapi:"u8,name=count" json:"-"` 1750 Acls []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"` 1751 } 1752 1753 func (m *MacipACLInterfaceListDetails) Reset() { *m = MacipACLInterfaceListDetails{} } 1754 func (*MacipACLInterfaceListDetails) GetMessageName() string { 1755 return "macip_acl_interface_list_details" 1756 } 1757 func (*MacipACLInterfaceListDetails) GetCrcString() string { return "a0c5d56d" } 1758 func (*MacipACLInterfaceListDetails) GetMessageType() api.MessageType { 1759 return api.ReplyMessage 1760 } 1761 1762 func (m *MacipACLInterfaceListDetails) Size() (size int) { 1763 if m == nil { 1764 return 0 1765 } 1766 size += 4 // m.SwIfIndex 1767 size += 1 // m.Count 1768 size += 4 * len(m.Acls) // m.Acls 1769 return size 1770 } 1771 func (m *MacipACLInterfaceListDetails) Marshal(b []byte) ([]byte, error) { 1772 if b == nil { 1773 b = make([]byte, m.Size()) 1774 } 1775 buf := codec.NewBuffer(b) 1776 buf.EncodeUint32(uint32(m.SwIfIndex)) 1777 buf.EncodeUint8(uint8(len(m.Acls))) 1778 for i := 0; i < len(m.Acls); i++ { 1779 var x uint32 1780 if i < len(m.Acls) { 1781 x = uint32(m.Acls[i]) 1782 } 1783 buf.EncodeUint32(x) 1784 } 1785 return buf.Bytes(), nil 1786 } 1787 func (m *MacipACLInterfaceListDetails) Unmarshal(b []byte) error { 1788 buf := codec.NewBuffer(b) 1789 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1790 m.Count = buf.DecodeUint8() 1791 m.Acls = make([]uint32, m.Count) 1792 for i := 0; i < len(m.Acls); i++ { 1793 m.Acls[i] = buf.DecodeUint32() 1794 } 1795 return nil 1796 } 1797 1798 // MacipACLInterfaceListDump defines message 'macip_acl_interface_list_dump'. 1799 type MacipACLInterfaceListDump struct { 1800 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1801 } 1802 1803 func (m *MacipACLInterfaceListDump) Reset() { *m = MacipACLInterfaceListDump{} } 1804 func (*MacipACLInterfaceListDump) GetMessageName() string { return "macip_acl_interface_list_dump" } 1805 func (*MacipACLInterfaceListDump) GetCrcString() string { return "f9e6675e" } 1806 func (*MacipACLInterfaceListDump) GetMessageType() api.MessageType { 1807 return api.RequestMessage 1808 } 1809 1810 func (m *MacipACLInterfaceListDump) Size() (size int) { 1811 if m == nil { 1812 return 0 1813 } 1814 size += 4 // m.SwIfIndex 1815 return size 1816 } 1817 func (m *MacipACLInterfaceListDump) Marshal(b []byte) ([]byte, error) { 1818 if b == nil { 1819 b = make([]byte, m.Size()) 1820 } 1821 buf := codec.NewBuffer(b) 1822 buf.EncodeUint32(uint32(m.SwIfIndex)) 1823 return buf.Bytes(), nil 1824 } 1825 func (m *MacipACLInterfaceListDump) Unmarshal(b []byte) error { 1826 buf := codec.NewBuffer(b) 1827 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1828 return nil 1829 } 1830 1831 func init() { file_acl_binapi_init() } 1832 func file_acl_binapi_init() { 1833 api.RegisterMessage((*ACLAddReplace)(nil), "acl_add_replace_ee5c2f18") 1834 api.RegisterMessage((*ACLAddReplaceReply)(nil), "acl_add_replace_reply_ac407b0c") 1835 api.RegisterMessage((*ACLDel)(nil), "acl_del_ef34fea4") 1836 api.RegisterMessage((*ACLDelReply)(nil), "acl_del_reply_e8d4e804") 1837 api.RegisterMessage((*ACLDetails)(nil), "acl_details_95babae0") 1838 api.RegisterMessage((*ACLDump)(nil), "acl_dump_ef34fea4") 1839 api.RegisterMessage((*ACLInterfaceAddDel)(nil), "acl_interface_add_del_4b54bebd") 1840 api.RegisterMessage((*ACLInterfaceAddDelReply)(nil), "acl_interface_add_del_reply_e8d4e804") 1841 api.RegisterMessage((*ACLInterfaceEtypeWhitelistDetails)(nil), "acl_interface_etype_whitelist_details_cc2bfded") 1842 api.RegisterMessage((*ACLInterfaceEtypeWhitelistDump)(nil), "acl_interface_etype_whitelist_dump_f9e6675e") 1843 api.RegisterMessage((*ACLInterfaceListDetails)(nil), "acl_interface_list_details_e695d256") 1844 api.RegisterMessage((*ACLInterfaceListDump)(nil), "acl_interface_list_dump_f9e6675e") 1845 api.RegisterMessage((*ACLInterfaceSetACLList)(nil), "acl_interface_set_acl_list_473982bd") 1846 api.RegisterMessage((*ACLInterfaceSetACLListReply)(nil), "acl_interface_set_acl_list_reply_e8d4e804") 1847 api.RegisterMessage((*ACLInterfaceSetEtypeWhitelist)(nil), "acl_interface_set_etype_whitelist_3f5c2d2d") 1848 api.RegisterMessage((*ACLInterfaceSetEtypeWhitelistReply)(nil), "acl_interface_set_etype_whitelist_reply_e8d4e804") 1849 api.RegisterMessage((*ACLPluginControlPing)(nil), "acl_plugin_control_ping_51077d14") 1850 api.RegisterMessage((*ACLPluginControlPingReply)(nil), "acl_plugin_control_ping_reply_f6b0b8ca") 1851 api.RegisterMessage((*ACLPluginGetConnTableMaxEntries)(nil), "acl_plugin_get_conn_table_max_entries_51077d14") 1852 api.RegisterMessage((*ACLPluginGetConnTableMaxEntriesReply)(nil), "acl_plugin_get_conn_table_max_entries_reply_7a096d3d") 1853 api.RegisterMessage((*ACLPluginGetVersion)(nil), "acl_plugin_get_version_51077d14") 1854 api.RegisterMessage((*ACLPluginGetVersionReply)(nil), "acl_plugin_get_version_reply_9b32cf86") 1855 api.RegisterMessage((*ACLPluginUseHashLookupGet)(nil), "acl_plugin_use_hash_lookup_get_51077d14") 1856 api.RegisterMessage((*ACLPluginUseHashLookupGetReply)(nil), "acl_plugin_use_hash_lookup_get_reply_5392ad31") 1857 api.RegisterMessage((*ACLPluginUseHashLookupSet)(nil), "acl_plugin_use_hash_lookup_set_b3e225d2") 1858 api.RegisterMessage((*ACLPluginUseHashLookupSetReply)(nil), "acl_plugin_use_hash_lookup_set_reply_e8d4e804") 1859 api.RegisterMessage((*ACLStatsIntfCountersEnable)(nil), "acl_stats_intf_counters_enable_b3e225d2") 1860 api.RegisterMessage((*ACLStatsIntfCountersEnableReply)(nil), "acl_stats_intf_counters_enable_reply_e8d4e804") 1861 api.RegisterMessage((*MacipACLAdd)(nil), "macip_acl_add_ce6fbad0") 1862 api.RegisterMessage((*MacipACLAddReplace)(nil), "macip_acl_add_replace_2a461dd4") 1863 api.RegisterMessage((*MacipACLAddReplaceReply)(nil), "macip_acl_add_replace_reply_ac407b0c") 1864 api.RegisterMessage((*MacipACLAddReply)(nil), "macip_acl_add_reply_ac407b0c") 1865 api.RegisterMessage((*MacipACLDel)(nil), "macip_acl_del_ef34fea4") 1866 api.RegisterMessage((*MacipACLDelReply)(nil), "macip_acl_del_reply_e8d4e804") 1867 api.RegisterMessage((*MacipACLDetails)(nil), "macip_acl_details_27135b59") 1868 api.RegisterMessage((*MacipACLDump)(nil), "macip_acl_dump_ef34fea4") 1869 api.RegisterMessage((*MacipACLInterfaceAddDel)(nil), "macip_acl_interface_add_del_4b8690b1") 1870 api.RegisterMessage((*MacipACLInterfaceAddDelReply)(nil), "macip_acl_interface_add_del_reply_e8d4e804") 1871 api.RegisterMessage((*MacipACLInterfaceGet)(nil), "macip_acl_interface_get_51077d14") 1872 api.RegisterMessage((*MacipACLInterfaceGetReply)(nil), "macip_acl_interface_get_reply_accf9b05") 1873 api.RegisterMessage((*MacipACLInterfaceListDetails)(nil), "macip_acl_interface_list_details_a0c5d56d") 1874 api.RegisterMessage((*MacipACLInterfaceListDump)(nil), "macip_acl_interface_list_dump_f9e6675e") 1875 } 1876 1877 // Messages returns list of all messages in this module. 1878 func AllMessages() []api.Message { 1879 return []api.Message{ 1880 (*ACLAddReplace)(nil), 1881 (*ACLAddReplaceReply)(nil), 1882 (*ACLDel)(nil), 1883 (*ACLDelReply)(nil), 1884 (*ACLDetails)(nil), 1885 (*ACLDump)(nil), 1886 (*ACLInterfaceAddDel)(nil), 1887 (*ACLInterfaceAddDelReply)(nil), 1888 (*ACLInterfaceEtypeWhitelistDetails)(nil), 1889 (*ACLInterfaceEtypeWhitelistDump)(nil), 1890 (*ACLInterfaceListDetails)(nil), 1891 (*ACLInterfaceListDump)(nil), 1892 (*ACLInterfaceSetACLList)(nil), 1893 (*ACLInterfaceSetACLListReply)(nil), 1894 (*ACLInterfaceSetEtypeWhitelist)(nil), 1895 (*ACLInterfaceSetEtypeWhitelistReply)(nil), 1896 (*ACLPluginControlPing)(nil), 1897 (*ACLPluginControlPingReply)(nil), 1898 (*ACLPluginGetConnTableMaxEntries)(nil), 1899 (*ACLPluginGetConnTableMaxEntriesReply)(nil), 1900 (*ACLPluginGetVersion)(nil), 1901 (*ACLPluginGetVersionReply)(nil), 1902 (*ACLPluginUseHashLookupGet)(nil), 1903 (*ACLPluginUseHashLookupGetReply)(nil), 1904 (*ACLPluginUseHashLookupSet)(nil), 1905 (*ACLPluginUseHashLookupSetReply)(nil), 1906 (*ACLStatsIntfCountersEnable)(nil), 1907 (*ACLStatsIntfCountersEnableReply)(nil), 1908 (*MacipACLAdd)(nil), 1909 (*MacipACLAddReplace)(nil), 1910 (*MacipACLAddReplaceReply)(nil), 1911 (*MacipACLAddReply)(nil), 1912 (*MacipACLDel)(nil), 1913 (*MacipACLDelReply)(nil), 1914 (*MacipACLDetails)(nil), 1915 (*MacipACLDump)(nil), 1916 (*MacipACLInterfaceAddDel)(nil), 1917 (*MacipACLInterfaceAddDelReply)(nil), 1918 (*MacipACLInterfaceGet)(nil), 1919 (*MacipACLInterfaceGetReply)(nil), 1920 (*MacipACLInterfaceListDetails)(nil), 1921 (*MacipACLInterfaceListDump)(nil), 1922 } 1923 }