github.com/networkservicemesh/govpp@v0.0.0-20240328101142-8a444680fbba/binapi/nat44_ei/nat44_ei.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 // versions: 3 // binapi-generator: v0.10.0-dev 4 // VPP: 23.10-rc0~170-g6f1548434 5 // source: plugins/nat44_ei.api.json 6 7 // Package nat44_ei contains generated bindings for API file nat44_ei.api. 8 // 9 // Contents: 10 // - 1 enum 11 // - 80 messages 12 package nat44_ei 13 14 import ( 15 "strconv" 16 17 interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" 18 ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" 19 nat_types "github.com/networkservicemesh/govpp/binapi/nat_types" 20 api "go.fd.io/govpp/api" 21 codec "go.fd.io/govpp/codec" 22 ) 23 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the GoVPP api package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // GoVPP api package needs to be updated. 28 const _ = api.GoVppAPIPackageIsVersion2 29 30 const ( 31 APIFile = "nat44_ei" 32 APIVersion = "1.1.1" 33 VersionCrc = 0x88c1fd79 34 ) 35 36 // Nat44EiConfigFlags defines enum 'nat44_ei_config_flags'. 37 type Nat44EiConfigFlags uint8 38 39 const ( 40 NAT44_EI_NONE Nat44EiConfigFlags = 0 41 NAT44_EI_STATIC_MAPPING_ONLY Nat44EiConfigFlags = 1 42 NAT44_EI_CONNECTION_TRACKING Nat44EiConfigFlags = 2 43 NAT44_EI_OUT2IN_DPO Nat44EiConfigFlags = 4 44 NAT44_EI_ADDR_ONLY_MAPPING Nat44EiConfigFlags = 8 45 NAT44_EI_IF_INSIDE Nat44EiConfigFlags = 16 46 NAT44_EI_IF_OUTSIDE Nat44EiConfigFlags = 32 47 NAT44_EI_STATIC_MAPPING Nat44EiConfigFlags = 64 48 ) 49 50 var ( 51 Nat44EiConfigFlags_name = map[uint8]string{ 52 0: "NAT44_EI_NONE", 53 1: "NAT44_EI_STATIC_MAPPING_ONLY", 54 2: "NAT44_EI_CONNECTION_TRACKING", 55 4: "NAT44_EI_OUT2IN_DPO", 56 8: "NAT44_EI_ADDR_ONLY_MAPPING", 57 16: "NAT44_EI_IF_INSIDE", 58 32: "NAT44_EI_IF_OUTSIDE", 59 64: "NAT44_EI_STATIC_MAPPING", 60 } 61 Nat44EiConfigFlags_value = map[string]uint8{ 62 "NAT44_EI_NONE": 0, 63 "NAT44_EI_STATIC_MAPPING_ONLY": 1, 64 "NAT44_EI_CONNECTION_TRACKING": 2, 65 "NAT44_EI_OUT2IN_DPO": 4, 66 "NAT44_EI_ADDR_ONLY_MAPPING": 8, 67 "NAT44_EI_IF_INSIDE": 16, 68 "NAT44_EI_IF_OUTSIDE": 32, 69 "NAT44_EI_STATIC_MAPPING": 64, 70 } 71 ) 72 73 func (x Nat44EiConfigFlags) String() string { 74 s, ok := Nat44EiConfigFlags_name[uint8(x)] 75 if ok { 76 return s 77 } 78 str := func(n uint8) string { 79 s, ok := Nat44EiConfigFlags_name[uint8(n)] 80 if ok { 81 return s 82 } 83 return "Nat44EiConfigFlags(" + strconv.Itoa(int(n)) + ")" 84 } 85 for i := uint8(0); i <= 8; i++ { 86 val := uint8(x) 87 if val&(1<<i) != 0 { 88 if s != "" { 89 s += "|" 90 } 91 s += str(1 << i) 92 } 93 } 94 if s == "" { 95 return str(uint8(x)) 96 } 97 return s 98 } 99 100 // Add/del NAT44 address range 101 // - first_ip_address - first IPv4 address 102 // - last_ip_address - last IPv4 address 103 // - vrf_id - VRF id of tenant, ~0 means independent of VRF 104 // - is_add - true if add, false if delete 105 // 106 // Nat44EiAddDelAddressRange defines message 'nat44_ei_add_del_address_range'. 107 // InProgress: the message form may change in the future versions 108 type Nat44EiAddDelAddressRange struct { 109 FirstIPAddress ip_types.IP4Address `binapi:"ip4_address,name=first_ip_address" json:"first_ip_address,omitempty"` 110 LastIPAddress ip_types.IP4Address `binapi:"ip4_address,name=last_ip_address" json:"last_ip_address,omitempty"` 111 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 112 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 113 } 114 115 func (m *Nat44EiAddDelAddressRange) Reset() { *m = Nat44EiAddDelAddressRange{} } 116 func (*Nat44EiAddDelAddressRange) GetMessageName() string { return "nat44_ei_add_del_address_range" } 117 func (*Nat44EiAddDelAddressRange) GetCrcString() string { return "35f21abc" } 118 func (*Nat44EiAddDelAddressRange) GetMessageType() api.MessageType { 119 return api.RequestMessage 120 } 121 122 func (m *Nat44EiAddDelAddressRange) Size() (size int) { 123 if m == nil { 124 return 0 125 } 126 size += 1 * 4 // m.FirstIPAddress 127 size += 1 * 4 // m.LastIPAddress 128 size += 4 // m.VrfID 129 size += 1 // m.IsAdd 130 return size 131 } 132 func (m *Nat44EiAddDelAddressRange) Marshal(b []byte) ([]byte, error) { 133 if b == nil { 134 b = make([]byte, m.Size()) 135 } 136 buf := codec.NewBuffer(b) 137 buf.EncodeBytes(m.FirstIPAddress[:], 4) 138 buf.EncodeBytes(m.LastIPAddress[:], 4) 139 buf.EncodeUint32(m.VrfID) 140 buf.EncodeBool(m.IsAdd) 141 return buf.Bytes(), nil 142 } 143 func (m *Nat44EiAddDelAddressRange) Unmarshal(b []byte) error { 144 buf := codec.NewBuffer(b) 145 copy(m.FirstIPAddress[:], buf.DecodeBytes(4)) 146 copy(m.LastIPAddress[:], buf.DecodeBytes(4)) 147 m.VrfID = buf.DecodeUint32() 148 m.IsAdd = buf.DecodeBool() 149 return nil 150 } 151 152 // Nat44EiAddDelAddressRangeReply defines message 'nat44_ei_add_del_address_range_reply'. 153 // InProgress: the message form may change in the future versions 154 type Nat44EiAddDelAddressRangeReply struct { 155 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 156 } 157 158 func (m *Nat44EiAddDelAddressRangeReply) Reset() { *m = Nat44EiAddDelAddressRangeReply{} } 159 func (*Nat44EiAddDelAddressRangeReply) GetMessageName() string { 160 return "nat44_ei_add_del_address_range_reply" 161 } 162 func (*Nat44EiAddDelAddressRangeReply) GetCrcString() string { return "e8d4e804" } 163 func (*Nat44EiAddDelAddressRangeReply) GetMessageType() api.MessageType { 164 return api.ReplyMessage 165 } 166 167 func (m *Nat44EiAddDelAddressRangeReply) Size() (size int) { 168 if m == nil { 169 return 0 170 } 171 size += 4 // m.Retval 172 return size 173 } 174 func (m *Nat44EiAddDelAddressRangeReply) Marshal(b []byte) ([]byte, error) { 175 if b == nil { 176 b = make([]byte, m.Size()) 177 } 178 buf := codec.NewBuffer(b) 179 buf.EncodeInt32(m.Retval) 180 return buf.Bytes(), nil 181 } 182 func (m *Nat44EiAddDelAddressRangeReply) Unmarshal(b []byte) error { 183 buf := codec.NewBuffer(b) 184 m.Retval = buf.DecodeInt32() 185 return nil 186 } 187 188 // Add/delete NAT44 identity mapping 189 // - is_add - true if add, false if delete 190 // - flags - flag NAT44_EI_IS_ADDR_ONLY if address only mapping 191 // - ip_address - IPv4 address 192 // - protocol - IP protocol 193 // - port - port number 194 // - sw_if_index - interface (if set ip_address is ignored, ~0 means not 195 // used) 196 // - vfr_id - VRF ID (if ~0 use default VRF) 197 // - tag - opaque string tag 198 // 199 // Nat44EiAddDelIdentityMapping defines message 'nat44_ei_add_del_identity_mapping'. 200 // Deprecated: the message will be removed in the future versions 201 type Nat44EiAddDelIdentityMapping struct { 202 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 203 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 204 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 205 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 206 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 207 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 208 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 209 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 210 } 211 212 func (m *Nat44EiAddDelIdentityMapping) Reset() { *m = Nat44EiAddDelIdentityMapping{} } 213 func (*Nat44EiAddDelIdentityMapping) GetMessageName() string { 214 return "nat44_ei_add_del_identity_mapping" 215 } 216 func (*Nat44EiAddDelIdentityMapping) GetCrcString() string { return "cb8606b9" } 217 func (*Nat44EiAddDelIdentityMapping) GetMessageType() api.MessageType { 218 return api.RequestMessage 219 } 220 221 func (m *Nat44EiAddDelIdentityMapping) Size() (size int) { 222 if m == nil { 223 return 0 224 } 225 size += 1 // m.IsAdd 226 size += 1 // m.Flags 227 size += 1 * 4 // m.IPAddress 228 size += 1 // m.Protocol 229 size += 2 // m.Port 230 size += 4 // m.SwIfIndex 231 size += 4 // m.VrfID 232 size += 64 // m.Tag 233 return size 234 } 235 func (m *Nat44EiAddDelIdentityMapping) Marshal(b []byte) ([]byte, error) { 236 if b == nil { 237 b = make([]byte, m.Size()) 238 } 239 buf := codec.NewBuffer(b) 240 buf.EncodeBool(m.IsAdd) 241 buf.EncodeUint8(uint8(m.Flags)) 242 buf.EncodeBytes(m.IPAddress[:], 4) 243 buf.EncodeUint8(m.Protocol) 244 buf.EncodeUint16(m.Port) 245 buf.EncodeUint32(uint32(m.SwIfIndex)) 246 buf.EncodeUint32(m.VrfID) 247 buf.EncodeString(m.Tag, 64) 248 return buf.Bytes(), nil 249 } 250 func (m *Nat44EiAddDelIdentityMapping) Unmarshal(b []byte) error { 251 buf := codec.NewBuffer(b) 252 m.IsAdd = buf.DecodeBool() 253 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 254 copy(m.IPAddress[:], buf.DecodeBytes(4)) 255 m.Protocol = buf.DecodeUint8() 256 m.Port = buf.DecodeUint16() 257 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 258 m.VrfID = buf.DecodeUint32() 259 m.Tag = buf.DecodeString(64) 260 return nil 261 } 262 263 // Nat44EiAddDelIdentityMappingReply defines message 'nat44_ei_add_del_identity_mapping_reply'. 264 // Deprecated: the message will be removed in the future versions 265 type Nat44EiAddDelIdentityMappingReply struct { 266 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 267 } 268 269 func (m *Nat44EiAddDelIdentityMappingReply) Reset() { *m = Nat44EiAddDelIdentityMappingReply{} } 270 func (*Nat44EiAddDelIdentityMappingReply) GetMessageName() string { 271 return "nat44_ei_add_del_identity_mapping_reply" 272 } 273 func (*Nat44EiAddDelIdentityMappingReply) GetCrcString() string { return "e8d4e804" } 274 func (*Nat44EiAddDelIdentityMappingReply) GetMessageType() api.MessageType { 275 return api.ReplyMessage 276 } 277 278 func (m *Nat44EiAddDelIdentityMappingReply) Size() (size int) { 279 if m == nil { 280 return 0 281 } 282 size += 4 // m.Retval 283 return size 284 } 285 func (m *Nat44EiAddDelIdentityMappingReply) Marshal(b []byte) ([]byte, error) { 286 if b == nil { 287 b = make([]byte, m.Size()) 288 } 289 buf := codec.NewBuffer(b) 290 buf.EncodeInt32(m.Retval) 291 return buf.Bytes(), nil 292 } 293 func (m *Nat44EiAddDelIdentityMappingReply) Unmarshal(b []byte) error { 294 buf := codec.NewBuffer(b) 295 m.Retval = buf.DecodeInt32() 296 return nil 297 } 298 299 // Add/delete NAT44 pool address from specific interfce 300 // - is_add - true if add, false if delete 301 // - sw_if_index - software index of the interface 302 // - flags - flag NAT_TWICE_NAT if NAT address range for external hosts 303 // 304 // Nat44EiAddDelInterfaceAddr defines message 'nat44_ei_add_del_interface_addr'. 305 // Deprecated: the message will be removed in the future versions 306 type Nat44EiAddDelInterfaceAddr struct { 307 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 308 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 309 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 310 } 311 312 func (m *Nat44EiAddDelInterfaceAddr) Reset() { *m = Nat44EiAddDelInterfaceAddr{} } 313 func (*Nat44EiAddDelInterfaceAddr) GetMessageName() string { return "nat44_ei_add_del_interface_addr" } 314 func (*Nat44EiAddDelInterfaceAddr) GetCrcString() string { return "883abbcc" } 315 func (*Nat44EiAddDelInterfaceAddr) GetMessageType() api.MessageType { 316 return api.RequestMessage 317 } 318 319 func (m *Nat44EiAddDelInterfaceAddr) Size() (size int) { 320 if m == nil { 321 return 0 322 } 323 size += 1 // m.IsAdd 324 size += 4 // m.SwIfIndex 325 size += 1 // m.Flags 326 return size 327 } 328 func (m *Nat44EiAddDelInterfaceAddr) Marshal(b []byte) ([]byte, error) { 329 if b == nil { 330 b = make([]byte, m.Size()) 331 } 332 buf := codec.NewBuffer(b) 333 buf.EncodeBool(m.IsAdd) 334 buf.EncodeUint32(uint32(m.SwIfIndex)) 335 buf.EncodeUint8(uint8(m.Flags)) 336 return buf.Bytes(), nil 337 } 338 func (m *Nat44EiAddDelInterfaceAddr) Unmarshal(b []byte) error { 339 buf := codec.NewBuffer(b) 340 m.IsAdd = buf.DecodeBool() 341 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 342 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 343 return nil 344 } 345 346 // Nat44EiAddDelInterfaceAddrReply defines message 'nat44_ei_add_del_interface_addr_reply'. 347 // Deprecated: the message will be removed in the future versions 348 type Nat44EiAddDelInterfaceAddrReply struct { 349 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 350 } 351 352 func (m *Nat44EiAddDelInterfaceAddrReply) Reset() { *m = Nat44EiAddDelInterfaceAddrReply{} } 353 func (*Nat44EiAddDelInterfaceAddrReply) GetMessageName() string { 354 return "nat44_ei_add_del_interface_addr_reply" 355 } 356 func (*Nat44EiAddDelInterfaceAddrReply) GetCrcString() string { return "e8d4e804" } 357 func (*Nat44EiAddDelInterfaceAddrReply) GetMessageType() api.MessageType { 358 return api.ReplyMessage 359 } 360 361 func (m *Nat44EiAddDelInterfaceAddrReply) Size() (size int) { 362 if m == nil { 363 return 0 364 } 365 size += 4 // m.Retval 366 return size 367 } 368 func (m *Nat44EiAddDelInterfaceAddrReply) Marshal(b []byte) ([]byte, error) { 369 if b == nil { 370 b = make([]byte, m.Size()) 371 } 372 buf := codec.NewBuffer(b) 373 buf.EncodeInt32(m.Retval) 374 return buf.Bytes(), nil 375 } 376 func (m *Nat44EiAddDelInterfaceAddrReply) Unmarshal(b []byte) error { 377 buf := codec.NewBuffer(b) 378 m.Retval = buf.DecodeInt32() 379 return nil 380 } 381 382 // add/del NAT output interface (postrouting 383 // 384 // in2out translation) 385 // - is_add - true if add, false if delete 386 // - sw_if_index - software index of the interface 387 // 388 // Nat44EiAddDelOutputInterface defines message 'nat44_ei_add_del_output_interface'. 389 type Nat44EiAddDelOutputInterface struct { 390 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 391 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 392 } 393 394 func (m *Nat44EiAddDelOutputInterface) Reset() { *m = Nat44EiAddDelOutputInterface{} } 395 func (*Nat44EiAddDelOutputInterface) GetMessageName() string { 396 return "nat44_ei_add_del_output_interface" 397 } 398 func (*Nat44EiAddDelOutputInterface) GetCrcString() string { return "47d6e753" } 399 func (*Nat44EiAddDelOutputInterface) GetMessageType() api.MessageType { 400 return api.RequestMessage 401 } 402 403 func (m *Nat44EiAddDelOutputInterface) Size() (size int) { 404 if m == nil { 405 return 0 406 } 407 size += 1 // m.IsAdd 408 size += 4 // m.SwIfIndex 409 return size 410 } 411 func (m *Nat44EiAddDelOutputInterface) Marshal(b []byte) ([]byte, error) { 412 if b == nil { 413 b = make([]byte, m.Size()) 414 } 415 buf := codec.NewBuffer(b) 416 buf.EncodeBool(m.IsAdd) 417 buf.EncodeUint32(uint32(m.SwIfIndex)) 418 return buf.Bytes(), nil 419 } 420 func (m *Nat44EiAddDelOutputInterface) Unmarshal(b []byte) error { 421 buf := codec.NewBuffer(b) 422 m.IsAdd = buf.DecodeBool() 423 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 424 return nil 425 } 426 427 // Nat44EiAddDelOutputInterfaceReply defines message 'nat44_ei_add_del_output_interface_reply'. 428 type Nat44EiAddDelOutputInterfaceReply struct { 429 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 430 } 431 432 func (m *Nat44EiAddDelOutputInterfaceReply) Reset() { *m = Nat44EiAddDelOutputInterfaceReply{} } 433 func (*Nat44EiAddDelOutputInterfaceReply) GetMessageName() string { 434 return "nat44_ei_add_del_output_interface_reply" 435 } 436 func (*Nat44EiAddDelOutputInterfaceReply) GetCrcString() string { return "e8d4e804" } 437 func (*Nat44EiAddDelOutputInterfaceReply) GetMessageType() api.MessageType { 438 return api.ReplyMessage 439 } 440 441 func (m *Nat44EiAddDelOutputInterfaceReply) Size() (size int) { 442 if m == nil { 443 return 0 444 } 445 size += 4 // m.Retval 446 return size 447 } 448 func (m *Nat44EiAddDelOutputInterfaceReply) Marshal(b []byte) ([]byte, error) { 449 if b == nil { 450 b = make([]byte, m.Size()) 451 } 452 buf := codec.NewBuffer(b) 453 buf.EncodeInt32(m.Retval) 454 return buf.Bytes(), nil 455 } 456 func (m *Nat44EiAddDelOutputInterfaceReply) Unmarshal(b []byte) error { 457 buf := codec.NewBuffer(b) 458 m.Retval = buf.DecodeInt32() 459 return nil 460 } 461 462 // Add/delete NAT44 static mapping 463 // - is_add - true if add, false if delete 464 // - flags - flag NAT44_EI_IS_ADDR_ONLY if address only mapping 465 // - local_ip_address - local IPv4 address 466 // - external_ip_address - external IPv4 address 467 // - protocol - IP protocol, used only if addr_only=0 468 // - local_port - local port number, used only if addr_only=0 469 // - external_port - external port number, used only if addr_only=0 470 // - external_sw_if_index - external interface (if set 471 // external_ip_address is ignored, ~0 means not 472 // used) 473 // - vfr_id - VRF ID 474 // - tag - opaque string tag 475 // 476 // Nat44EiAddDelStaticMapping defines message 'nat44_ei_add_del_static_mapping'. 477 // InProgress: the message form may change in the future versions 478 type Nat44EiAddDelStaticMapping struct { 479 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 480 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 481 LocalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"` 482 ExternalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"` 483 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 484 LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"` 485 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` 486 ExternalSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"` 487 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 488 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 489 } 490 491 func (m *Nat44EiAddDelStaticMapping) Reset() { *m = Nat44EiAddDelStaticMapping{} } 492 func (*Nat44EiAddDelStaticMapping) GetMessageName() string { return "nat44_ei_add_del_static_mapping" } 493 func (*Nat44EiAddDelStaticMapping) GetCrcString() string { return "b404b7fe" } 494 func (*Nat44EiAddDelStaticMapping) GetMessageType() api.MessageType { 495 return api.RequestMessage 496 } 497 498 func (m *Nat44EiAddDelStaticMapping) Size() (size int) { 499 if m == nil { 500 return 0 501 } 502 size += 1 // m.IsAdd 503 size += 1 // m.Flags 504 size += 1 * 4 // m.LocalIPAddress 505 size += 1 * 4 // m.ExternalIPAddress 506 size += 1 // m.Protocol 507 size += 2 // m.LocalPort 508 size += 2 // m.ExternalPort 509 size += 4 // m.ExternalSwIfIndex 510 size += 4 // m.VrfID 511 size += 64 // m.Tag 512 return size 513 } 514 func (m *Nat44EiAddDelStaticMapping) Marshal(b []byte) ([]byte, error) { 515 if b == nil { 516 b = make([]byte, m.Size()) 517 } 518 buf := codec.NewBuffer(b) 519 buf.EncodeBool(m.IsAdd) 520 buf.EncodeUint8(uint8(m.Flags)) 521 buf.EncodeBytes(m.LocalIPAddress[:], 4) 522 buf.EncodeBytes(m.ExternalIPAddress[:], 4) 523 buf.EncodeUint8(m.Protocol) 524 buf.EncodeUint16(m.LocalPort) 525 buf.EncodeUint16(m.ExternalPort) 526 buf.EncodeUint32(uint32(m.ExternalSwIfIndex)) 527 buf.EncodeUint32(m.VrfID) 528 buf.EncodeString(m.Tag, 64) 529 return buf.Bytes(), nil 530 } 531 func (m *Nat44EiAddDelStaticMapping) Unmarshal(b []byte) error { 532 buf := codec.NewBuffer(b) 533 m.IsAdd = buf.DecodeBool() 534 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 535 copy(m.LocalIPAddress[:], buf.DecodeBytes(4)) 536 copy(m.ExternalIPAddress[:], buf.DecodeBytes(4)) 537 m.Protocol = buf.DecodeUint8() 538 m.LocalPort = buf.DecodeUint16() 539 m.ExternalPort = buf.DecodeUint16() 540 m.ExternalSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 541 m.VrfID = buf.DecodeUint32() 542 m.Tag = buf.DecodeString(64) 543 return nil 544 } 545 546 // Nat44EiAddDelStaticMappingReply defines message 'nat44_ei_add_del_static_mapping_reply'. 547 // InProgress: the message form may change in the future versions 548 type Nat44EiAddDelStaticMappingReply struct { 549 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 550 } 551 552 func (m *Nat44EiAddDelStaticMappingReply) Reset() { *m = Nat44EiAddDelStaticMappingReply{} } 553 func (*Nat44EiAddDelStaticMappingReply) GetMessageName() string { 554 return "nat44_ei_add_del_static_mapping_reply" 555 } 556 func (*Nat44EiAddDelStaticMappingReply) GetCrcString() string { return "e8d4e804" } 557 func (*Nat44EiAddDelStaticMappingReply) GetMessageType() api.MessageType { 558 return api.ReplyMessage 559 } 560 561 func (m *Nat44EiAddDelStaticMappingReply) Size() (size int) { 562 if m == nil { 563 return 0 564 } 565 size += 4 // m.Retval 566 return size 567 } 568 func (m *Nat44EiAddDelStaticMappingReply) Marshal(b []byte) ([]byte, error) { 569 if b == nil { 570 b = make([]byte, m.Size()) 571 } 572 buf := codec.NewBuffer(b) 573 buf.EncodeInt32(m.Retval) 574 return buf.Bytes(), nil 575 } 576 func (m *Nat44EiAddDelStaticMappingReply) Unmarshal(b []byte) error { 577 buf := codec.NewBuffer(b) 578 m.Retval = buf.DecodeInt32() 579 return nil 580 } 581 582 // NAT44 address details response 583 // - ip_address - IPv4 address 584 // - vrf_id - VRF id of tenant, ~0 means independent of VRF 585 // 586 // Nat44EiAddressDetails defines message 'nat44_ei_address_details'. 587 // InProgress: the message form may change in the future versions 588 type Nat44EiAddressDetails struct { 589 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 590 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 591 } 592 593 func (m *Nat44EiAddressDetails) Reset() { *m = Nat44EiAddressDetails{} } 594 func (*Nat44EiAddressDetails) GetMessageName() string { return "nat44_ei_address_details" } 595 func (*Nat44EiAddressDetails) GetCrcString() string { return "318f1202" } 596 func (*Nat44EiAddressDetails) GetMessageType() api.MessageType { 597 return api.ReplyMessage 598 } 599 600 func (m *Nat44EiAddressDetails) Size() (size int) { 601 if m == nil { 602 return 0 603 } 604 size += 1 * 4 // m.IPAddress 605 size += 4 // m.VrfID 606 return size 607 } 608 func (m *Nat44EiAddressDetails) Marshal(b []byte) ([]byte, error) { 609 if b == nil { 610 b = make([]byte, m.Size()) 611 } 612 buf := codec.NewBuffer(b) 613 buf.EncodeBytes(m.IPAddress[:], 4) 614 buf.EncodeUint32(m.VrfID) 615 return buf.Bytes(), nil 616 } 617 func (m *Nat44EiAddressDetails) Unmarshal(b []byte) error { 618 buf := codec.NewBuffer(b) 619 copy(m.IPAddress[:], buf.DecodeBytes(4)) 620 m.VrfID = buf.DecodeUint32() 621 return nil 622 } 623 624 // Dump NAT44 addresses 625 // Nat44EiAddressDump defines message 'nat44_ei_address_dump'. 626 // InProgress: the message form may change in the future versions 627 type Nat44EiAddressDump struct{} 628 629 func (m *Nat44EiAddressDump) Reset() { *m = Nat44EiAddressDump{} } 630 func (*Nat44EiAddressDump) GetMessageName() string { return "nat44_ei_address_dump" } 631 func (*Nat44EiAddressDump) GetCrcString() string { return "51077d14" } 632 func (*Nat44EiAddressDump) GetMessageType() api.MessageType { 633 return api.RequestMessage 634 } 635 636 func (m *Nat44EiAddressDump) Size() (size int) { 637 if m == nil { 638 return 0 639 } 640 return size 641 } 642 func (m *Nat44EiAddressDump) Marshal(b []byte) ([]byte, error) { 643 if b == nil { 644 b = make([]byte, m.Size()) 645 } 646 buf := codec.NewBuffer(b) 647 return buf.Bytes(), nil 648 } 649 func (m *Nat44EiAddressDump) Unmarshal(b []byte) error { 650 return nil 651 } 652 653 // Delete NAT44 session 654 // - ip_address - IPv4 address 655 // - protocol - IP protocol 656 // - port - port number 657 // - vfr_id - VRF ID 658 // - flags - flag NAT_IS_INSIDE if interface is inside or 659 // interface is outside, 660 // flag NAT_IS_EXT_HOST_VALID if external host address and 661 // port are valid 662 // - ext_host_address - external host IPv4 address 663 // - ext_host_port - external host port 664 // 665 // Nat44EiDelSession defines message 'nat44_ei_del_session'. 666 // InProgress: the message form may change in the future versions 667 type Nat44EiDelSession struct { 668 Address ip_types.IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"` 669 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 670 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 671 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 672 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 673 ExtHostAddress ip_types.IP4Address `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"` 674 ExtHostPort uint16 `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"` 675 } 676 677 func (m *Nat44EiDelSession) Reset() { *m = Nat44EiDelSession{} } 678 func (*Nat44EiDelSession) GetMessageName() string { return "nat44_ei_del_session" } 679 func (*Nat44EiDelSession) GetCrcString() string { return "74969ffe" } 680 func (*Nat44EiDelSession) GetMessageType() api.MessageType { 681 return api.RequestMessage 682 } 683 684 func (m *Nat44EiDelSession) Size() (size int) { 685 if m == nil { 686 return 0 687 } 688 size += 1 * 4 // m.Address 689 size += 1 // m.Protocol 690 size += 2 // m.Port 691 size += 4 // m.VrfID 692 size += 1 // m.Flags 693 size += 1 * 4 // m.ExtHostAddress 694 size += 2 // m.ExtHostPort 695 return size 696 } 697 func (m *Nat44EiDelSession) Marshal(b []byte) ([]byte, error) { 698 if b == nil { 699 b = make([]byte, m.Size()) 700 } 701 buf := codec.NewBuffer(b) 702 buf.EncodeBytes(m.Address[:], 4) 703 buf.EncodeUint8(m.Protocol) 704 buf.EncodeUint16(m.Port) 705 buf.EncodeUint32(m.VrfID) 706 buf.EncodeUint8(uint8(m.Flags)) 707 buf.EncodeBytes(m.ExtHostAddress[:], 4) 708 buf.EncodeUint16(m.ExtHostPort) 709 return buf.Bytes(), nil 710 } 711 func (m *Nat44EiDelSession) Unmarshal(b []byte) error { 712 buf := codec.NewBuffer(b) 713 copy(m.Address[:], buf.DecodeBytes(4)) 714 m.Protocol = buf.DecodeUint8() 715 m.Port = buf.DecodeUint16() 716 m.VrfID = buf.DecodeUint32() 717 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 718 copy(m.ExtHostAddress[:], buf.DecodeBytes(4)) 719 m.ExtHostPort = buf.DecodeUint16() 720 return nil 721 } 722 723 // Nat44EiDelSessionReply defines message 'nat44_ei_del_session_reply'. 724 // InProgress: the message form may change in the future versions 725 type Nat44EiDelSessionReply struct { 726 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 727 } 728 729 func (m *Nat44EiDelSessionReply) Reset() { *m = Nat44EiDelSessionReply{} } 730 func (*Nat44EiDelSessionReply) GetMessageName() string { return "nat44_ei_del_session_reply" } 731 func (*Nat44EiDelSessionReply) GetCrcString() string { return "e8d4e804" } 732 func (*Nat44EiDelSessionReply) GetMessageType() api.MessageType { 733 return api.ReplyMessage 734 } 735 736 func (m *Nat44EiDelSessionReply) Size() (size int) { 737 if m == nil { 738 return 0 739 } 740 size += 4 // m.Retval 741 return size 742 } 743 func (m *Nat44EiDelSessionReply) Marshal(b []byte) ([]byte, error) { 744 if b == nil { 745 b = make([]byte, m.Size()) 746 } 747 buf := codec.NewBuffer(b) 748 buf.EncodeInt32(m.Retval) 749 return buf.Bytes(), nil 750 } 751 func (m *Nat44EiDelSessionReply) Unmarshal(b []byte) error { 752 buf := codec.NewBuffer(b) 753 m.Retval = buf.DecodeInt32() 754 return nil 755 } 756 757 // Del NAT44 user 758 // - ip_address - IPv4 address 759 // - fib_index - FIB index 760 // 761 // Nat44EiDelUser defines message 'nat44_ei_del_user'. 762 // InProgress: the message form may change in the future versions 763 type Nat44EiDelUser struct { 764 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 765 FibIndex uint32 `binapi:"u32,name=fib_index" json:"fib_index,omitempty"` 766 } 767 768 func (m *Nat44EiDelUser) Reset() { *m = Nat44EiDelUser{} } 769 func (*Nat44EiDelUser) GetMessageName() string { return "nat44_ei_del_user" } 770 func (*Nat44EiDelUser) GetCrcString() string { return "99a9f998" } 771 func (*Nat44EiDelUser) GetMessageType() api.MessageType { 772 return api.RequestMessage 773 } 774 775 func (m *Nat44EiDelUser) Size() (size int) { 776 if m == nil { 777 return 0 778 } 779 size += 1 * 4 // m.IPAddress 780 size += 4 // m.FibIndex 781 return size 782 } 783 func (m *Nat44EiDelUser) Marshal(b []byte) ([]byte, error) { 784 if b == nil { 785 b = make([]byte, m.Size()) 786 } 787 buf := codec.NewBuffer(b) 788 buf.EncodeBytes(m.IPAddress[:], 4) 789 buf.EncodeUint32(m.FibIndex) 790 return buf.Bytes(), nil 791 } 792 func (m *Nat44EiDelUser) Unmarshal(b []byte) error { 793 buf := codec.NewBuffer(b) 794 copy(m.IPAddress[:], buf.DecodeBytes(4)) 795 m.FibIndex = buf.DecodeUint32() 796 return nil 797 } 798 799 // Nat44EiDelUserReply defines message 'nat44_ei_del_user_reply'. 800 // InProgress: the message form may change in the future versions 801 type Nat44EiDelUserReply struct { 802 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 803 } 804 805 func (m *Nat44EiDelUserReply) Reset() { *m = Nat44EiDelUserReply{} } 806 func (*Nat44EiDelUserReply) GetMessageName() string { return "nat44_ei_del_user_reply" } 807 func (*Nat44EiDelUserReply) GetCrcString() string { return "e8d4e804" } 808 func (*Nat44EiDelUserReply) GetMessageType() api.MessageType { 809 return api.ReplyMessage 810 } 811 812 func (m *Nat44EiDelUserReply) Size() (size int) { 813 if m == nil { 814 return 0 815 } 816 size += 4 // m.Retval 817 return size 818 } 819 func (m *Nat44EiDelUserReply) Marshal(b []byte) ([]byte, error) { 820 if b == nil { 821 b = make([]byte, m.Size()) 822 } 823 buf := codec.NewBuffer(b) 824 buf.EncodeInt32(m.Retval) 825 return buf.Bytes(), nil 826 } 827 func (m *Nat44EiDelUserReply) Unmarshal(b []byte) error { 828 buf := codec.NewBuffer(b) 829 m.Retval = buf.DecodeInt32() 830 return nil 831 } 832 833 // Enable/disable forwarding for NAT44 834 // 835 // Forward packets which don't match existing translation 836 // or static mapping instead of dropping them. 837 // - enable - true for enable, false for disable 838 // 839 // Nat44EiForwardingEnableDisable defines message 'nat44_ei_forwarding_enable_disable'. 840 // InProgress: the message form may change in the future versions 841 type Nat44EiForwardingEnableDisable struct { 842 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 843 } 844 845 func (m *Nat44EiForwardingEnableDisable) Reset() { *m = Nat44EiForwardingEnableDisable{} } 846 func (*Nat44EiForwardingEnableDisable) GetMessageName() string { 847 return "nat44_ei_forwarding_enable_disable" 848 } 849 func (*Nat44EiForwardingEnableDisable) GetCrcString() string { return "b3e225d2" } 850 func (*Nat44EiForwardingEnableDisable) GetMessageType() api.MessageType { 851 return api.RequestMessage 852 } 853 854 func (m *Nat44EiForwardingEnableDisable) Size() (size int) { 855 if m == nil { 856 return 0 857 } 858 size += 1 // m.Enable 859 return size 860 } 861 func (m *Nat44EiForwardingEnableDisable) Marshal(b []byte) ([]byte, error) { 862 if b == nil { 863 b = make([]byte, m.Size()) 864 } 865 buf := codec.NewBuffer(b) 866 buf.EncodeBool(m.Enable) 867 return buf.Bytes(), nil 868 } 869 func (m *Nat44EiForwardingEnableDisable) Unmarshal(b []byte) error { 870 buf := codec.NewBuffer(b) 871 m.Enable = buf.DecodeBool() 872 return nil 873 } 874 875 // Nat44EiForwardingEnableDisableReply defines message 'nat44_ei_forwarding_enable_disable_reply'. 876 // InProgress: the message form may change in the future versions 877 type Nat44EiForwardingEnableDisableReply struct { 878 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 879 } 880 881 func (m *Nat44EiForwardingEnableDisableReply) Reset() { *m = Nat44EiForwardingEnableDisableReply{} } 882 func (*Nat44EiForwardingEnableDisableReply) GetMessageName() string { 883 return "nat44_ei_forwarding_enable_disable_reply" 884 } 885 func (*Nat44EiForwardingEnableDisableReply) GetCrcString() string { return "e8d4e804" } 886 func (*Nat44EiForwardingEnableDisableReply) GetMessageType() api.MessageType { 887 return api.ReplyMessage 888 } 889 890 func (m *Nat44EiForwardingEnableDisableReply) Size() (size int) { 891 if m == nil { 892 return 0 893 } 894 size += 4 // m.Retval 895 return size 896 } 897 func (m *Nat44EiForwardingEnableDisableReply) Marshal(b []byte) ([]byte, error) { 898 if b == nil { 899 b = make([]byte, m.Size()) 900 } 901 buf := codec.NewBuffer(b) 902 buf.EncodeInt32(m.Retval) 903 return buf.Bytes(), nil 904 } 905 func (m *Nat44EiForwardingEnableDisableReply) Unmarshal(b []byte) error { 906 buf := codec.NewBuffer(b) 907 m.Retval = buf.DecodeInt32() 908 return nil 909 } 910 911 // Get address and port assignment algorithm 912 // Nat44EiGetAddrAndPortAllocAlg defines message 'nat44_ei_get_addr_and_port_alloc_alg'. 913 // Deprecated: the message will be removed in the future versions 914 type Nat44EiGetAddrAndPortAllocAlg struct{} 915 916 func (m *Nat44EiGetAddrAndPortAllocAlg) Reset() { *m = Nat44EiGetAddrAndPortAllocAlg{} } 917 func (*Nat44EiGetAddrAndPortAllocAlg) GetMessageName() string { 918 return "nat44_ei_get_addr_and_port_alloc_alg" 919 } 920 func (*Nat44EiGetAddrAndPortAllocAlg) GetCrcString() string { return "51077d14" } 921 func (*Nat44EiGetAddrAndPortAllocAlg) GetMessageType() api.MessageType { 922 return api.RequestMessage 923 } 924 925 func (m *Nat44EiGetAddrAndPortAllocAlg) Size() (size int) { 926 if m == nil { 927 return 0 928 } 929 return size 930 } 931 func (m *Nat44EiGetAddrAndPortAllocAlg) Marshal(b []byte) ([]byte, error) { 932 if b == nil { 933 b = make([]byte, m.Size()) 934 } 935 buf := codec.NewBuffer(b) 936 return buf.Bytes(), nil 937 } 938 func (m *Nat44EiGetAddrAndPortAllocAlg) Unmarshal(b []byte) error { 939 return nil 940 } 941 942 // Get address and port assignment algorithm reply 943 // - retval - return code 944 // - alg - address and port assignment algorithm: 945 // 0 - default, 1 - MAP-E, 2 - port range 946 // (see nat44_ei_addr_and_port_alloc_alg_t in nat.h) 947 // - psid_offset - number of offset bits (valid only for MAP-E alg) 948 // - psid_length - length of PSID (valid only for MAP-E alg) 949 // - psid - Port Set Identifier (PSID) value (valid only for MAP-E alg) 950 // - start_port - beginning of the port range 951 // - end_port - end of the port range 952 // 953 // Nat44EiGetAddrAndPortAllocAlgReply defines message 'nat44_ei_get_addr_and_port_alloc_alg_reply'. 954 // Deprecated: the message will be removed in the future versions 955 type Nat44EiGetAddrAndPortAllocAlgReply struct { 956 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 957 Alg uint8 `binapi:"u8,name=alg" json:"alg,omitempty"` 958 PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"` 959 PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"` 960 Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"` 961 StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"` 962 EndPort uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"` 963 } 964 965 func (m *Nat44EiGetAddrAndPortAllocAlgReply) Reset() { *m = Nat44EiGetAddrAndPortAllocAlgReply{} } 966 func (*Nat44EiGetAddrAndPortAllocAlgReply) GetMessageName() string { 967 return "nat44_ei_get_addr_and_port_alloc_alg_reply" 968 } 969 func (*Nat44EiGetAddrAndPortAllocAlgReply) GetCrcString() string { return "3607a7d0" } 970 func (*Nat44EiGetAddrAndPortAllocAlgReply) GetMessageType() api.MessageType { 971 return api.ReplyMessage 972 } 973 974 func (m *Nat44EiGetAddrAndPortAllocAlgReply) Size() (size int) { 975 if m == nil { 976 return 0 977 } 978 size += 4 // m.Retval 979 size += 1 // m.Alg 980 size += 1 // m.PsidOffset 981 size += 1 // m.PsidLength 982 size += 2 // m.Psid 983 size += 2 // m.StartPort 984 size += 2 // m.EndPort 985 return size 986 } 987 func (m *Nat44EiGetAddrAndPortAllocAlgReply) Marshal(b []byte) ([]byte, error) { 988 if b == nil { 989 b = make([]byte, m.Size()) 990 } 991 buf := codec.NewBuffer(b) 992 buf.EncodeInt32(m.Retval) 993 buf.EncodeUint8(m.Alg) 994 buf.EncodeUint8(m.PsidOffset) 995 buf.EncodeUint8(m.PsidLength) 996 buf.EncodeUint16(m.Psid) 997 buf.EncodeUint16(m.StartPort) 998 buf.EncodeUint16(m.EndPort) 999 return buf.Bytes(), nil 1000 } 1001 func (m *Nat44EiGetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error { 1002 buf := codec.NewBuffer(b) 1003 m.Retval = buf.DecodeInt32() 1004 m.Alg = buf.DecodeUint8() 1005 m.PsidOffset = buf.DecodeUint8() 1006 m.PsidLength = buf.DecodeUint8() 1007 m.Psid = buf.DecodeUint16() 1008 m.StartPort = buf.DecodeUint16() 1009 m.EndPort = buf.DecodeUint16() 1010 return nil 1011 } 1012 1013 // Get TCP MSS rewriting configuration 1014 // Nat44EiGetMssClamping defines message 'nat44_ei_get_mss_clamping'. 1015 // Deprecated: the message will be removed in the future versions 1016 type Nat44EiGetMssClamping struct{} 1017 1018 func (m *Nat44EiGetMssClamping) Reset() { *m = Nat44EiGetMssClamping{} } 1019 func (*Nat44EiGetMssClamping) GetMessageName() string { return "nat44_ei_get_mss_clamping" } 1020 func (*Nat44EiGetMssClamping) GetCrcString() string { return "51077d14" } 1021 func (*Nat44EiGetMssClamping) GetMessageType() api.MessageType { 1022 return api.RequestMessage 1023 } 1024 1025 func (m *Nat44EiGetMssClamping) Size() (size int) { 1026 if m == nil { 1027 return 0 1028 } 1029 return size 1030 } 1031 func (m *Nat44EiGetMssClamping) Marshal(b []byte) ([]byte, error) { 1032 if b == nil { 1033 b = make([]byte, m.Size()) 1034 } 1035 buf := codec.NewBuffer(b) 1036 return buf.Bytes(), nil 1037 } 1038 func (m *Nat44EiGetMssClamping) Unmarshal(b []byte) error { 1039 return nil 1040 } 1041 1042 // Get TCP MSS rewriting configuration reply 1043 // - retval - return code 1044 // - mss_value - MSS value to be used for MSS rewriting 1045 // - enable - if true enable MSS rewriting feature else disable 1046 // 1047 // Nat44EiGetMssClampingReply defines message 'nat44_ei_get_mss_clamping_reply'. 1048 // Deprecated: the message will be removed in the future versions 1049 type Nat44EiGetMssClampingReply struct { 1050 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1051 MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"` 1052 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 1053 } 1054 1055 func (m *Nat44EiGetMssClampingReply) Reset() { *m = Nat44EiGetMssClampingReply{} } 1056 func (*Nat44EiGetMssClampingReply) GetMessageName() string { return "nat44_ei_get_mss_clamping_reply" } 1057 func (*Nat44EiGetMssClampingReply) GetCrcString() string { return "1c0b2a78" } 1058 func (*Nat44EiGetMssClampingReply) GetMessageType() api.MessageType { 1059 return api.ReplyMessage 1060 } 1061 1062 func (m *Nat44EiGetMssClampingReply) Size() (size int) { 1063 if m == nil { 1064 return 0 1065 } 1066 size += 4 // m.Retval 1067 size += 2 // m.MssValue 1068 size += 1 // m.Enable 1069 return size 1070 } 1071 func (m *Nat44EiGetMssClampingReply) Marshal(b []byte) ([]byte, error) { 1072 if b == nil { 1073 b = make([]byte, m.Size()) 1074 } 1075 buf := codec.NewBuffer(b) 1076 buf.EncodeInt32(m.Retval) 1077 buf.EncodeUint16(m.MssValue) 1078 buf.EncodeBool(m.Enable) 1079 return buf.Bytes(), nil 1080 } 1081 func (m *Nat44EiGetMssClampingReply) Unmarshal(b []byte) error { 1082 buf := codec.NewBuffer(b) 1083 m.Retval = buf.DecodeInt32() 1084 m.MssValue = buf.DecodeUint16() 1085 m.Enable = buf.DecodeBool() 1086 return nil 1087 } 1088 1089 // Flush the current HA data (for testing) 1090 // Nat44EiHaFlush defines message 'nat44_ei_ha_flush'. 1091 // InProgress: the message form may change in the future versions 1092 type Nat44EiHaFlush struct{} 1093 1094 func (m *Nat44EiHaFlush) Reset() { *m = Nat44EiHaFlush{} } 1095 func (*Nat44EiHaFlush) GetMessageName() string { return "nat44_ei_ha_flush" } 1096 func (*Nat44EiHaFlush) GetCrcString() string { return "51077d14" } 1097 func (*Nat44EiHaFlush) GetMessageType() api.MessageType { 1098 return api.RequestMessage 1099 } 1100 1101 func (m *Nat44EiHaFlush) Size() (size int) { 1102 if m == nil { 1103 return 0 1104 } 1105 return size 1106 } 1107 func (m *Nat44EiHaFlush) Marshal(b []byte) ([]byte, error) { 1108 if b == nil { 1109 b = make([]byte, m.Size()) 1110 } 1111 buf := codec.NewBuffer(b) 1112 return buf.Bytes(), nil 1113 } 1114 func (m *Nat44EiHaFlush) Unmarshal(b []byte) error { 1115 return nil 1116 } 1117 1118 // Nat44EiHaFlushReply defines message 'nat44_ei_ha_flush_reply'. 1119 // InProgress: the message form may change in the future versions 1120 type Nat44EiHaFlushReply struct { 1121 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1122 } 1123 1124 func (m *Nat44EiHaFlushReply) Reset() { *m = Nat44EiHaFlushReply{} } 1125 func (*Nat44EiHaFlushReply) GetMessageName() string { return "nat44_ei_ha_flush_reply" } 1126 func (*Nat44EiHaFlushReply) GetCrcString() string { return "e8d4e804" } 1127 func (*Nat44EiHaFlushReply) GetMessageType() api.MessageType { 1128 return api.ReplyMessage 1129 } 1130 1131 func (m *Nat44EiHaFlushReply) Size() (size int) { 1132 if m == nil { 1133 return 0 1134 } 1135 size += 4 // m.Retval 1136 return size 1137 } 1138 func (m *Nat44EiHaFlushReply) Marshal(b []byte) ([]byte, error) { 1139 if b == nil { 1140 b = make([]byte, m.Size()) 1141 } 1142 buf := codec.NewBuffer(b) 1143 buf.EncodeInt32(m.Retval) 1144 return buf.Bytes(), nil 1145 } 1146 func (m *Nat44EiHaFlushReply) Unmarshal(b []byte) error { 1147 buf := codec.NewBuffer(b) 1148 m.Retval = buf.DecodeInt32() 1149 return nil 1150 } 1151 1152 // Get HA failover/remote settings 1153 // Nat44EiHaGetFailover defines message 'nat44_ei_ha_get_failover'. 1154 // Deprecated: the message will be removed in the future versions 1155 type Nat44EiHaGetFailover struct{} 1156 1157 func (m *Nat44EiHaGetFailover) Reset() { *m = Nat44EiHaGetFailover{} } 1158 func (*Nat44EiHaGetFailover) GetMessageName() string { return "nat44_ei_ha_get_failover" } 1159 func (*Nat44EiHaGetFailover) GetCrcString() string { return "51077d14" } 1160 func (*Nat44EiHaGetFailover) GetMessageType() api.MessageType { 1161 return api.RequestMessage 1162 } 1163 1164 func (m *Nat44EiHaGetFailover) Size() (size int) { 1165 if m == nil { 1166 return 0 1167 } 1168 return size 1169 } 1170 func (m *Nat44EiHaGetFailover) Marshal(b []byte) ([]byte, error) { 1171 if b == nil { 1172 b = make([]byte, m.Size()) 1173 } 1174 buf := codec.NewBuffer(b) 1175 return buf.Bytes(), nil 1176 } 1177 func (m *Nat44EiHaGetFailover) Unmarshal(b []byte) error { 1178 return nil 1179 } 1180 1181 // Get HA failover/remote settings reply 1182 // - retval - return code 1183 // - ip_address - failover IP4 address 1184 // - port - failvoer UDP port number 1185 // - session_refresh_interval - number of seconds after which to send 1186 // session counters refresh 1187 // 1188 // Nat44EiHaGetFailoverReply defines message 'nat44_ei_ha_get_failover_reply'. 1189 // Deprecated: the message will be removed in the future versions 1190 type Nat44EiHaGetFailoverReply struct { 1191 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1192 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 1193 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 1194 SessionRefreshInterval uint32 `binapi:"u32,name=session_refresh_interval" json:"session_refresh_interval,omitempty"` 1195 } 1196 1197 func (m *Nat44EiHaGetFailoverReply) Reset() { *m = Nat44EiHaGetFailoverReply{} } 1198 func (*Nat44EiHaGetFailoverReply) GetMessageName() string { return "nat44_ei_ha_get_failover_reply" } 1199 func (*Nat44EiHaGetFailoverReply) GetCrcString() string { return "a67d8752" } 1200 func (*Nat44EiHaGetFailoverReply) GetMessageType() api.MessageType { 1201 return api.ReplyMessage 1202 } 1203 1204 func (m *Nat44EiHaGetFailoverReply) Size() (size int) { 1205 if m == nil { 1206 return 0 1207 } 1208 size += 4 // m.Retval 1209 size += 1 * 4 // m.IPAddress 1210 size += 2 // m.Port 1211 size += 4 // m.SessionRefreshInterval 1212 return size 1213 } 1214 func (m *Nat44EiHaGetFailoverReply) Marshal(b []byte) ([]byte, error) { 1215 if b == nil { 1216 b = make([]byte, m.Size()) 1217 } 1218 buf := codec.NewBuffer(b) 1219 buf.EncodeInt32(m.Retval) 1220 buf.EncodeBytes(m.IPAddress[:], 4) 1221 buf.EncodeUint16(m.Port) 1222 buf.EncodeUint32(m.SessionRefreshInterval) 1223 return buf.Bytes(), nil 1224 } 1225 func (m *Nat44EiHaGetFailoverReply) Unmarshal(b []byte) error { 1226 buf := codec.NewBuffer(b) 1227 m.Retval = buf.DecodeInt32() 1228 copy(m.IPAddress[:], buf.DecodeBytes(4)) 1229 m.Port = buf.DecodeUint16() 1230 m.SessionRefreshInterval = buf.DecodeUint32() 1231 return nil 1232 } 1233 1234 // Get HA listener/local configuration 1235 // Nat44EiHaGetListener defines message 'nat44_ei_ha_get_listener'. 1236 // Deprecated: the message will be removed in the future versions 1237 type Nat44EiHaGetListener struct{} 1238 1239 func (m *Nat44EiHaGetListener) Reset() { *m = Nat44EiHaGetListener{} } 1240 func (*Nat44EiHaGetListener) GetMessageName() string { return "nat44_ei_ha_get_listener" } 1241 func (*Nat44EiHaGetListener) GetCrcString() string { return "51077d14" } 1242 func (*Nat44EiHaGetListener) GetMessageType() api.MessageType { 1243 return api.RequestMessage 1244 } 1245 1246 func (m *Nat44EiHaGetListener) Size() (size int) { 1247 if m == nil { 1248 return 0 1249 } 1250 return size 1251 } 1252 func (m *Nat44EiHaGetListener) Marshal(b []byte) ([]byte, error) { 1253 if b == nil { 1254 b = make([]byte, m.Size()) 1255 } 1256 buf := codec.NewBuffer(b) 1257 return buf.Bytes(), nil 1258 } 1259 func (m *Nat44EiHaGetListener) Unmarshal(b []byte) error { 1260 return nil 1261 } 1262 1263 // Get HA listener/local configuration reply 1264 // - retval - return code 1265 // - ip_address - local IP4 address 1266 // - port - local UDP port number 1267 // - path_mtu - Path MTU between local and failover 1268 // 1269 // Nat44EiHaGetListenerReply defines message 'nat44_ei_ha_get_listener_reply'. 1270 // Deprecated: the message will be removed in the future versions 1271 type Nat44EiHaGetListenerReply struct { 1272 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1273 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 1274 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 1275 PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"` 1276 } 1277 1278 func (m *Nat44EiHaGetListenerReply) Reset() { *m = Nat44EiHaGetListenerReply{} } 1279 func (*Nat44EiHaGetListenerReply) GetMessageName() string { return "nat44_ei_ha_get_listener_reply" } 1280 func (*Nat44EiHaGetListenerReply) GetCrcString() string { return "123ea41f" } 1281 func (*Nat44EiHaGetListenerReply) GetMessageType() api.MessageType { 1282 return api.ReplyMessage 1283 } 1284 1285 func (m *Nat44EiHaGetListenerReply) Size() (size int) { 1286 if m == nil { 1287 return 0 1288 } 1289 size += 4 // m.Retval 1290 size += 1 * 4 // m.IPAddress 1291 size += 2 // m.Port 1292 size += 4 // m.PathMtu 1293 return size 1294 } 1295 func (m *Nat44EiHaGetListenerReply) Marshal(b []byte) ([]byte, error) { 1296 if b == nil { 1297 b = make([]byte, m.Size()) 1298 } 1299 buf := codec.NewBuffer(b) 1300 buf.EncodeInt32(m.Retval) 1301 buf.EncodeBytes(m.IPAddress[:], 4) 1302 buf.EncodeUint16(m.Port) 1303 buf.EncodeUint32(m.PathMtu) 1304 return buf.Bytes(), nil 1305 } 1306 func (m *Nat44EiHaGetListenerReply) Unmarshal(b []byte) error { 1307 buf := codec.NewBuffer(b) 1308 m.Retval = buf.DecodeInt32() 1309 copy(m.IPAddress[:], buf.DecodeBytes(4)) 1310 m.Port = buf.DecodeUint16() 1311 m.PathMtu = buf.DecodeUint32() 1312 return nil 1313 } 1314 1315 // Resync HA (resend existing sessions to new failover) 1316 // - want_resync_event - resync completed event sent to the sender via 1317 // nat44_ei_ha_resync_completed_event API message if 1318 // non-zero 1319 // - pid - sender's pid 1320 // 1321 // Nat44EiHaResync defines message 'nat44_ei_ha_resync'. 1322 // InProgress: the message form may change in the future versions 1323 type Nat44EiHaResync struct { 1324 WantResyncEvent uint8 `binapi:"u8,name=want_resync_event" json:"want_resync_event,omitempty"` 1325 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 1326 } 1327 1328 func (m *Nat44EiHaResync) Reset() { *m = Nat44EiHaResync{} } 1329 func (*Nat44EiHaResync) GetMessageName() string { return "nat44_ei_ha_resync" } 1330 func (*Nat44EiHaResync) GetCrcString() string { return "c8ab9e03" } 1331 func (*Nat44EiHaResync) GetMessageType() api.MessageType { 1332 return api.RequestMessage 1333 } 1334 1335 func (m *Nat44EiHaResync) Size() (size int) { 1336 if m == nil { 1337 return 0 1338 } 1339 size += 1 // m.WantResyncEvent 1340 size += 4 // m.PID 1341 return size 1342 } 1343 func (m *Nat44EiHaResync) Marshal(b []byte) ([]byte, error) { 1344 if b == nil { 1345 b = make([]byte, m.Size()) 1346 } 1347 buf := codec.NewBuffer(b) 1348 buf.EncodeUint8(m.WantResyncEvent) 1349 buf.EncodeUint32(m.PID) 1350 return buf.Bytes(), nil 1351 } 1352 func (m *Nat44EiHaResync) Unmarshal(b []byte) error { 1353 buf := codec.NewBuffer(b) 1354 m.WantResyncEvent = buf.DecodeUint8() 1355 m.PID = buf.DecodeUint32() 1356 return nil 1357 } 1358 1359 // Tell client about a HA resync completion event 1360 // - pid - client pid registered to receive notification 1361 // - missed_count - number of missed (not ACKed) messages 1362 // 1363 // Nat44EiHaResyncCompletedEvent defines message 'nat44_ei_ha_resync_completed_event'. 1364 // InProgress: the message form may change in the future versions 1365 type Nat44EiHaResyncCompletedEvent struct { 1366 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 1367 MissedCount uint32 `binapi:"u32,name=missed_count" json:"missed_count,omitempty"` 1368 } 1369 1370 func (m *Nat44EiHaResyncCompletedEvent) Reset() { *m = Nat44EiHaResyncCompletedEvent{} } 1371 func (*Nat44EiHaResyncCompletedEvent) GetMessageName() string { 1372 return "nat44_ei_ha_resync_completed_event" 1373 } 1374 func (*Nat44EiHaResyncCompletedEvent) GetCrcString() string { return "fdc598fb" } 1375 func (*Nat44EiHaResyncCompletedEvent) GetMessageType() api.MessageType { 1376 return api.EventMessage 1377 } 1378 1379 func (m *Nat44EiHaResyncCompletedEvent) Size() (size int) { 1380 if m == nil { 1381 return 0 1382 } 1383 size += 4 // m.PID 1384 size += 4 // m.MissedCount 1385 return size 1386 } 1387 func (m *Nat44EiHaResyncCompletedEvent) Marshal(b []byte) ([]byte, error) { 1388 if b == nil { 1389 b = make([]byte, m.Size()) 1390 } 1391 buf := codec.NewBuffer(b) 1392 buf.EncodeUint32(m.PID) 1393 buf.EncodeUint32(m.MissedCount) 1394 return buf.Bytes(), nil 1395 } 1396 func (m *Nat44EiHaResyncCompletedEvent) Unmarshal(b []byte) error { 1397 buf := codec.NewBuffer(b) 1398 m.PID = buf.DecodeUint32() 1399 m.MissedCount = buf.DecodeUint32() 1400 return nil 1401 } 1402 1403 // Nat44EiHaResyncReply defines message 'nat44_ei_ha_resync_reply'. 1404 // InProgress: the message form may change in the future versions 1405 type Nat44EiHaResyncReply struct { 1406 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1407 } 1408 1409 func (m *Nat44EiHaResyncReply) Reset() { *m = Nat44EiHaResyncReply{} } 1410 func (*Nat44EiHaResyncReply) GetMessageName() string { return "nat44_ei_ha_resync_reply" } 1411 func (*Nat44EiHaResyncReply) GetCrcString() string { return "e8d4e804" } 1412 func (*Nat44EiHaResyncReply) GetMessageType() api.MessageType { 1413 return api.ReplyMessage 1414 } 1415 1416 func (m *Nat44EiHaResyncReply) Size() (size int) { 1417 if m == nil { 1418 return 0 1419 } 1420 size += 4 // m.Retval 1421 return size 1422 } 1423 func (m *Nat44EiHaResyncReply) Marshal(b []byte) ([]byte, error) { 1424 if b == nil { 1425 b = make([]byte, m.Size()) 1426 } 1427 buf := codec.NewBuffer(b) 1428 buf.EncodeInt32(m.Retval) 1429 return buf.Bytes(), nil 1430 } 1431 func (m *Nat44EiHaResyncReply) Unmarshal(b []byte) error { 1432 buf := codec.NewBuffer(b) 1433 m.Retval = buf.DecodeInt32() 1434 return nil 1435 } 1436 1437 // Set HA failover (remote settings) 1438 // - ip_address - failover IP4 address 1439 // - port - failvoer UDP port number 1440 // - session_refresh_interval - number of seconds after which to send 1441 // session counters refresh 1442 // 1443 // Nat44EiHaSetFailover defines message 'nat44_ei_ha_set_failover'. 1444 // InProgress: the message form may change in the future versions 1445 type Nat44EiHaSetFailover struct { 1446 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 1447 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 1448 SessionRefreshInterval uint32 `binapi:"u32,name=session_refresh_interval" json:"session_refresh_interval,omitempty"` 1449 } 1450 1451 func (m *Nat44EiHaSetFailover) Reset() { *m = Nat44EiHaSetFailover{} } 1452 func (*Nat44EiHaSetFailover) GetMessageName() string { return "nat44_ei_ha_set_failover" } 1453 func (*Nat44EiHaSetFailover) GetCrcString() string { return "718246af" } 1454 func (*Nat44EiHaSetFailover) GetMessageType() api.MessageType { 1455 return api.RequestMessage 1456 } 1457 1458 func (m *Nat44EiHaSetFailover) Size() (size int) { 1459 if m == nil { 1460 return 0 1461 } 1462 size += 1 * 4 // m.IPAddress 1463 size += 2 // m.Port 1464 size += 4 // m.SessionRefreshInterval 1465 return size 1466 } 1467 func (m *Nat44EiHaSetFailover) Marshal(b []byte) ([]byte, error) { 1468 if b == nil { 1469 b = make([]byte, m.Size()) 1470 } 1471 buf := codec.NewBuffer(b) 1472 buf.EncodeBytes(m.IPAddress[:], 4) 1473 buf.EncodeUint16(m.Port) 1474 buf.EncodeUint32(m.SessionRefreshInterval) 1475 return buf.Bytes(), nil 1476 } 1477 func (m *Nat44EiHaSetFailover) Unmarshal(b []byte) error { 1478 buf := codec.NewBuffer(b) 1479 copy(m.IPAddress[:], buf.DecodeBytes(4)) 1480 m.Port = buf.DecodeUint16() 1481 m.SessionRefreshInterval = buf.DecodeUint32() 1482 return nil 1483 } 1484 1485 // Nat44EiHaSetFailoverReply defines message 'nat44_ei_ha_set_failover_reply'. 1486 // InProgress: the message form may change in the future versions 1487 type Nat44EiHaSetFailoverReply struct { 1488 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1489 } 1490 1491 func (m *Nat44EiHaSetFailoverReply) Reset() { *m = Nat44EiHaSetFailoverReply{} } 1492 func (*Nat44EiHaSetFailoverReply) GetMessageName() string { return "nat44_ei_ha_set_failover_reply" } 1493 func (*Nat44EiHaSetFailoverReply) GetCrcString() string { return "e8d4e804" } 1494 func (*Nat44EiHaSetFailoverReply) GetMessageType() api.MessageType { 1495 return api.ReplyMessage 1496 } 1497 1498 func (m *Nat44EiHaSetFailoverReply) Size() (size int) { 1499 if m == nil { 1500 return 0 1501 } 1502 size += 4 // m.Retval 1503 return size 1504 } 1505 func (m *Nat44EiHaSetFailoverReply) Marshal(b []byte) ([]byte, error) { 1506 if b == nil { 1507 b = make([]byte, m.Size()) 1508 } 1509 buf := codec.NewBuffer(b) 1510 buf.EncodeInt32(m.Retval) 1511 return buf.Bytes(), nil 1512 } 1513 func (m *Nat44EiHaSetFailoverReply) Unmarshal(b []byte) error { 1514 buf := codec.NewBuffer(b) 1515 m.Retval = buf.DecodeInt32() 1516 return nil 1517 } 1518 1519 // Set HA listener (local settings) 1520 // - ip_address - local IP4 address 1521 // - port - local UDP port number 1522 // - path_mtu - path MTU between local and failover 1523 // 1524 // Nat44EiHaSetListener defines message 'nat44_ei_ha_set_listener'. 1525 // InProgress: the message form may change in the future versions 1526 type Nat44EiHaSetListener struct { 1527 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 1528 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 1529 PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"` 1530 } 1531 1532 func (m *Nat44EiHaSetListener) Reset() { *m = Nat44EiHaSetListener{} } 1533 func (*Nat44EiHaSetListener) GetMessageName() string { return "nat44_ei_ha_set_listener" } 1534 func (*Nat44EiHaSetListener) GetCrcString() string { return "e4a8cb4e" } 1535 func (*Nat44EiHaSetListener) GetMessageType() api.MessageType { 1536 return api.RequestMessage 1537 } 1538 1539 func (m *Nat44EiHaSetListener) Size() (size int) { 1540 if m == nil { 1541 return 0 1542 } 1543 size += 1 * 4 // m.IPAddress 1544 size += 2 // m.Port 1545 size += 4 // m.PathMtu 1546 return size 1547 } 1548 func (m *Nat44EiHaSetListener) Marshal(b []byte) ([]byte, error) { 1549 if b == nil { 1550 b = make([]byte, m.Size()) 1551 } 1552 buf := codec.NewBuffer(b) 1553 buf.EncodeBytes(m.IPAddress[:], 4) 1554 buf.EncodeUint16(m.Port) 1555 buf.EncodeUint32(m.PathMtu) 1556 return buf.Bytes(), nil 1557 } 1558 func (m *Nat44EiHaSetListener) Unmarshal(b []byte) error { 1559 buf := codec.NewBuffer(b) 1560 copy(m.IPAddress[:], buf.DecodeBytes(4)) 1561 m.Port = buf.DecodeUint16() 1562 m.PathMtu = buf.DecodeUint32() 1563 return nil 1564 } 1565 1566 // Nat44EiHaSetListenerReply defines message 'nat44_ei_ha_set_listener_reply'. 1567 // InProgress: the message form may change in the future versions 1568 type Nat44EiHaSetListenerReply struct { 1569 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1570 } 1571 1572 func (m *Nat44EiHaSetListenerReply) Reset() { *m = Nat44EiHaSetListenerReply{} } 1573 func (*Nat44EiHaSetListenerReply) GetMessageName() string { return "nat44_ei_ha_set_listener_reply" } 1574 func (*Nat44EiHaSetListenerReply) GetCrcString() string { return "e8d4e804" } 1575 func (*Nat44EiHaSetListenerReply) GetMessageType() api.MessageType { 1576 return api.ReplyMessage 1577 } 1578 1579 func (m *Nat44EiHaSetListenerReply) Size() (size int) { 1580 if m == nil { 1581 return 0 1582 } 1583 size += 4 // m.Retval 1584 return size 1585 } 1586 func (m *Nat44EiHaSetListenerReply) Marshal(b []byte) ([]byte, error) { 1587 if b == nil { 1588 b = make([]byte, m.Size()) 1589 } 1590 buf := codec.NewBuffer(b) 1591 buf.EncodeInt32(m.Retval) 1592 return buf.Bytes(), nil 1593 } 1594 func (m *Nat44EiHaSetListenerReply) Unmarshal(b []byte) error { 1595 buf := codec.NewBuffer(b) 1596 m.Retval = buf.DecodeInt32() 1597 return nil 1598 } 1599 1600 // NAT44 identity mapping details response 1601 // - flags - flag NAT44_EI_ADDR_ONLY if address only mapping 1602 // - ip_address - IPv4 address 1603 // - protocol - IP protocol 1604 // - port - port number 1605 // - sw_if_index - interface 1606 // - vfr_id - VRF ID 1607 // - tag - opaque string tag 1608 // 1609 // Nat44EiIdentityMappingDetails defines message 'nat44_ei_identity_mapping_details'. 1610 // Deprecated: the message will be removed in the future versions 1611 type Nat44EiIdentityMappingDetails struct { 1612 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 1613 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 1614 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 1615 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` 1616 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1617 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 1618 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 1619 } 1620 1621 func (m *Nat44EiIdentityMappingDetails) Reset() { *m = Nat44EiIdentityMappingDetails{} } 1622 func (*Nat44EiIdentityMappingDetails) GetMessageName() string { 1623 return "nat44_ei_identity_mapping_details" 1624 } 1625 func (*Nat44EiIdentityMappingDetails) GetCrcString() string { return "30d53e26" } 1626 func (*Nat44EiIdentityMappingDetails) GetMessageType() api.MessageType { 1627 return api.ReplyMessage 1628 } 1629 1630 func (m *Nat44EiIdentityMappingDetails) Size() (size int) { 1631 if m == nil { 1632 return 0 1633 } 1634 size += 1 // m.Flags 1635 size += 1 * 4 // m.IPAddress 1636 size += 1 // m.Protocol 1637 size += 2 // m.Port 1638 size += 4 // m.SwIfIndex 1639 size += 4 // m.VrfID 1640 size += 64 // m.Tag 1641 return size 1642 } 1643 func (m *Nat44EiIdentityMappingDetails) Marshal(b []byte) ([]byte, error) { 1644 if b == nil { 1645 b = make([]byte, m.Size()) 1646 } 1647 buf := codec.NewBuffer(b) 1648 buf.EncodeUint8(uint8(m.Flags)) 1649 buf.EncodeBytes(m.IPAddress[:], 4) 1650 buf.EncodeUint8(m.Protocol) 1651 buf.EncodeUint16(m.Port) 1652 buf.EncodeUint32(uint32(m.SwIfIndex)) 1653 buf.EncodeUint32(m.VrfID) 1654 buf.EncodeString(m.Tag, 64) 1655 return buf.Bytes(), nil 1656 } 1657 func (m *Nat44EiIdentityMappingDetails) Unmarshal(b []byte) error { 1658 buf := codec.NewBuffer(b) 1659 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 1660 copy(m.IPAddress[:], buf.DecodeBytes(4)) 1661 m.Protocol = buf.DecodeUint8() 1662 m.Port = buf.DecodeUint16() 1663 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1664 m.VrfID = buf.DecodeUint32() 1665 m.Tag = buf.DecodeString(64) 1666 return nil 1667 } 1668 1669 // Dump NAT44 identity mappings 1670 // Nat44EiIdentityMappingDump defines message 'nat44_ei_identity_mapping_dump'. 1671 // Deprecated: the message will be removed in the future versions 1672 type Nat44EiIdentityMappingDump struct{} 1673 1674 func (m *Nat44EiIdentityMappingDump) Reset() { *m = Nat44EiIdentityMappingDump{} } 1675 func (*Nat44EiIdentityMappingDump) GetMessageName() string { return "nat44_ei_identity_mapping_dump" } 1676 func (*Nat44EiIdentityMappingDump) GetCrcString() string { return "51077d14" } 1677 func (*Nat44EiIdentityMappingDump) GetMessageType() api.MessageType { 1678 return api.RequestMessage 1679 } 1680 1681 func (m *Nat44EiIdentityMappingDump) Size() (size int) { 1682 if m == nil { 1683 return 0 1684 } 1685 return size 1686 } 1687 func (m *Nat44EiIdentityMappingDump) Marshal(b []byte) ([]byte, error) { 1688 if b == nil { 1689 b = make([]byte, m.Size()) 1690 } 1691 buf := codec.NewBuffer(b) 1692 return buf.Bytes(), nil 1693 } 1694 func (m *Nat44EiIdentityMappingDump) Unmarshal(b []byte) error { 1695 return nil 1696 } 1697 1698 // Enable/disable NAT44 feature on the interface 1699 // - is_add - true if add, false if delete 1700 // - flags - flag NAT_IS_INSIDE if interface is inside else 1701 // interface is outside 1702 // - sw_if_index - software index of the interface 1703 // 1704 // Nat44EiInterfaceAddDelFeature defines message 'nat44_ei_interface_add_del_feature'. 1705 // InProgress: the message form may change in the future versions 1706 type Nat44EiInterfaceAddDelFeature struct { 1707 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 1708 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 1709 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1710 } 1711 1712 func (m *Nat44EiInterfaceAddDelFeature) Reset() { *m = Nat44EiInterfaceAddDelFeature{} } 1713 func (*Nat44EiInterfaceAddDelFeature) GetMessageName() string { 1714 return "nat44_ei_interface_add_del_feature" 1715 } 1716 func (*Nat44EiInterfaceAddDelFeature) GetCrcString() string { return "63a2db8b" } 1717 func (*Nat44EiInterfaceAddDelFeature) GetMessageType() api.MessageType { 1718 return api.RequestMessage 1719 } 1720 1721 func (m *Nat44EiInterfaceAddDelFeature) Size() (size int) { 1722 if m == nil { 1723 return 0 1724 } 1725 size += 1 // m.IsAdd 1726 size += 1 // m.Flags 1727 size += 4 // m.SwIfIndex 1728 return size 1729 } 1730 func (m *Nat44EiInterfaceAddDelFeature) Marshal(b []byte) ([]byte, error) { 1731 if b == nil { 1732 b = make([]byte, m.Size()) 1733 } 1734 buf := codec.NewBuffer(b) 1735 buf.EncodeBool(m.IsAdd) 1736 buf.EncodeUint8(uint8(m.Flags)) 1737 buf.EncodeUint32(uint32(m.SwIfIndex)) 1738 return buf.Bytes(), nil 1739 } 1740 func (m *Nat44EiInterfaceAddDelFeature) Unmarshal(b []byte) error { 1741 buf := codec.NewBuffer(b) 1742 m.IsAdd = buf.DecodeBool() 1743 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 1744 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1745 return nil 1746 } 1747 1748 // Nat44EiInterfaceAddDelFeatureReply defines message 'nat44_ei_interface_add_del_feature_reply'. 1749 // InProgress: the message form may change in the future versions 1750 type Nat44EiInterfaceAddDelFeatureReply struct { 1751 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1752 } 1753 1754 func (m *Nat44EiInterfaceAddDelFeatureReply) Reset() { *m = Nat44EiInterfaceAddDelFeatureReply{} } 1755 func (*Nat44EiInterfaceAddDelFeatureReply) GetMessageName() string { 1756 return "nat44_ei_interface_add_del_feature_reply" 1757 } 1758 func (*Nat44EiInterfaceAddDelFeatureReply) GetCrcString() string { return "e8d4e804" } 1759 func (*Nat44EiInterfaceAddDelFeatureReply) GetMessageType() api.MessageType { 1760 return api.ReplyMessage 1761 } 1762 1763 func (m *Nat44EiInterfaceAddDelFeatureReply) Size() (size int) { 1764 if m == nil { 1765 return 0 1766 } 1767 size += 4 // m.Retval 1768 return size 1769 } 1770 func (m *Nat44EiInterfaceAddDelFeatureReply) Marshal(b []byte) ([]byte, error) { 1771 if b == nil { 1772 b = make([]byte, m.Size()) 1773 } 1774 buf := codec.NewBuffer(b) 1775 buf.EncodeInt32(m.Retval) 1776 return buf.Bytes(), nil 1777 } 1778 func (m *Nat44EiInterfaceAddDelFeatureReply) Unmarshal(b []byte) error { 1779 buf := codec.NewBuffer(b) 1780 m.Retval = buf.DecodeInt32() 1781 return nil 1782 } 1783 1784 // Enable/disbale NAT44 as an interface output feature (postrouting 1785 // 1786 // in2out translation) 1787 // - is_add - true if add, false if delete 1788 // - flags - flag NAT_IS_INSIDE if interface is inside else 1789 // interface is outside 1790 // - sw_if_index - software index of the interface 1791 // 1792 // Nat44EiInterfaceAddDelOutputFeature defines message 'nat44_ei_interface_add_del_output_feature'. 1793 // Deprecated: the message will be removed in the future versions 1794 type Nat44EiInterfaceAddDelOutputFeature struct { 1795 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 1796 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 1797 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1798 } 1799 1800 func (m *Nat44EiInterfaceAddDelOutputFeature) Reset() { *m = Nat44EiInterfaceAddDelOutputFeature{} } 1801 func (*Nat44EiInterfaceAddDelOutputFeature) GetMessageName() string { 1802 return "nat44_ei_interface_add_del_output_feature" 1803 } 1804 func (*Nat44EiInterfaceAddDelOutputFeature) GetCrcString() string { return "63a2db8b" } 1805 func (*Nat44EiInterfaceAddDelOutputFeature) GetMessageType() api.MessageType { 1806 return api.RequestMessage 1807 } 1808 1809 func (m *Nat44EiInterfaceAddDelOutputFeature) Size() (size int) { 1810 if m == nil { 1811 return 0 1812 } 1813 size += 1 // m.IsAdd 1814 size += 1 // m.Flags 1815 size += 4 // m.SwIfIndex 1816 return size 1817 } 1818 func (m *Nat44EiInterfaceAddDelOutputFeature) Marshal(b []byte) ([]byte, error) { 1819 if b == nil { 1820 b = make([]byte, m.Size()) 1821 } 1822 buf := codec.NewBuffer(b) 1823 buf.EncodeBool(m.IsAdd) 1824 buf.EncodeUint8(uint8(m.Flags)) 1825 buf.EncodeUint32(uint32(m.SwIfIndex)) 1826 return buf.Bytes(), nil 1827 } 1828 func (m *Nat44EiInterfaceAddDelOutputFeature) Unmarshal(b []byte) error { 1829 buf := codec.NewBuffer(b) 1830 m.IsAdd = buf.DecodeBool() 1831 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 1832 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1833 return nil 1834 } 1835 1836 // Nat44EiInterfaceAddDelOutputFeatureReply defines message 'nat44_ei_interface_add_del_output_feature_reply'. 1837 // Deprecated: the message will be removed in the future versions 1838 type Nat44EiInterfaceAddDelOutputFeatureReply struct { 1839 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1840 } 1841 1842 func (m *Nat44EiInterfaceAddDelOutputFeatureReply) Reset() { 1843 *m = Nat44EiInterfaceAddDelOutputFeatureReply{} 1844 } 1845 func (*Nat44EiInterfaceAddDelOutputFeatureReply) GetMessageName() string { 1846 return "nat44_ei_interface_add_del_output_feature_reply" 1847 } 1848 func (*Nat44EiInterfaceAddDelOutputFeatureReply) GetCrcString() string { return "e8d4e804" } 1849 func (*Nat44EiInterfaceAddDelOutputFeatureReply) GetMessageType() api.MessageType { 1850 return api.ReplyMessage 1851 } 1852 1853 func (m *Nat44EiInterfaceAddDelOutputFeatureReply) Size() (size int) { 1854 if m == nil { 1855 return 0 1856 } 1857 size += 4 // m.Retval 1858 return size 1859 } 1860 func (m *Nat44EiInterfaceAddDelOutputFeatureReply) Marshal(b []byte) ([]byte, error) { 1861 if b == nil { 1862 b = make([]byte, m.Size()) 1863 } 1864 buf := codec.NewBuffer(b) 1865 buf.EncodeInt32(m.Retval) 1866 return buf.Bytes(), nil 1867 } 1868 func (m *Nat44EiInterfaceAddDelOutputFeatureReply) Unmarshal(b []byte) error { 1869 buf := codec.NewBuffer(b) 1870 m.Retval = buf.DecodeInt32() 1871 return nil 1872 } 1873 1874 // NAT44 pool addresses interfaces details response 1875 // - sw_if_index - software index of the interface 1876 // 1877 // Nat44EiInterfaceAddrDetails defines message 'nat44_ei_interface_addr_details'. 1878 // Deprecated: the message will be removed in the future versions 1879 type Nat44EiInterfaceAddrDetails struct { 1880 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1881 } 1882 1883 func (m *Nat44EiInterfaceAddrDetails) Reset() { *m = Nat44EiInterfaceAddrDetails{} } 1884 func (*Nat44EiInterfaceAddrDetails) GetMessageName() string { return "nat44_ei_interface_addr_details" } 1885 func (*Nat44EiInterfaceAddrDetails) GetCrcString() string { return "0b45011c" } 1886 func (*Nat44EiInterfaceAddrDetails) GetMessageType() api.MessageType { 1887 return api.ReplyMessage 1888 } 1889 1890 func (m *Nat44EiInterfaceAddrDetails) Size() (size int) { 1891 if m == nil { 1892 return 0 1893 } 1894 size += 4 // m.SwIfIndex 1895 return size 1896 } 1897 func (m *Nat44EiInterfaceAddrDetails) Marshal(b []byte) ([]byte, error) { 1898 if b == nil { 1899 b = make([]byte, m.Size()) 1900 } 1901 buf := codec.NewBuffer(b) 1902 buf.EncodeUint32(uint32(m.SwIfIndex)) 1903 return buf.Bytes(), nil 1904 } 1905 func (m *Nat44EiInterfaceAddrDetails) Unmarshal(b []byte) error { 1906 buf := codec.NewBuffer(b) 1907 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1908 return nil 1909 } 1910 1911 // Dump NAT44 pool addresses interfaces 1912 // Nat44EiInterfaceAddrDump defines message 'nat44_ei_interface_addr_dump'. 1913 // Deprecated: the message will be removed in the future versions 1914 type Nat44EiInterfaceAddrDump struct{} 1915 1916 func (m *Nat44EiInterfaceAddrDump) Reset() { *m = Nat44EiInterfaceAddrDump{} } 1917 func (*Nat44EiInterfaceAddrDump) GetMessageName() string { return "nat44_ei_interface_addr_dump" } 1918 func (*Nat44EiInterfaceAddrDump) GetCrcString() string { return "51077d14" } 1919 func (*Nat44EiInterfaceAddrDump) GetMessageType() api.MessageType { 1920 return api.RequestMessage 1921 } 1922 1923 func (m *Nat44EiInterfaceAddrDump) Size() (size int) { 1924 if m == nil { 1925 return 0 1926 } 1927 return size 1928 } 1929 func (m *Nat44EiInterfaceAddrDump) Marshal(b []byte) ([]byte, error) { 1930 if b == nil { 1931 b = make([]byte, m.Size()) 1932 } 1933 buf := codec.NewBuffer(b) 1934 return buf.Bytes(), nil 1935 } 1936 func (m *Nat44EiInterfaceAddrDump) Unmarshal(b []byte) error { 1937 return nil 1938 } 1939 1940 // NAT44 interface details response 1941 // - sw_if_index - software index of the interface 1942 // - flags - flag NAT_IS_INSIDE if interface is inside, 1943 // flag NAT_IS_OUTSIDE if interface is outside 1944 // and if both flags are set the interface is 1945 // both inside and outside 1946 // 1947 // Nat44EiInterfaceDetails defines message 'nat44_ei_interface_details'. 1948 // InProgress: the message form may change in the future versions 1949 type Nat44EiInterfaceDetails struct { 1950 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 1951 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1952 } 1953 1954 func (m *Nat44EiInterfaceDetails) Reset() { *m = Nat44EiInterfaceDetails{} } 1955 func (*Nat44EiInterfaceDetails) GetMessageName() string { return "nat44_ei_interface_details" } 1956 func (*Nat44EiInterfaceDetails) GetCrcString() string { return "f446e508" } 1957 func (*Nat44EiInterfaceDetails) GetMessageType() api.MessageType { 1958 return api.ReplyMessage 1959 } 1960 1961 func (m *Nat44EiInterfaceDetails) Size() (size int) { 1962 if m == nil { 1963 return 0 1964 } 1965 size += 1 // m.Flags 1966 size += 4 // m.SwIfIndex 1967 return size 1968 } 1969 func (m *Nat44EiInterfaceDetails) Marshal(b []byte) ([]byte, error) { 1970 if b == nil { 1971 b = make([]byte, m.Size()) 1972 } 1973 buf := codec.NewBuffer(b) 1974 buf.EncodeUint8(uint8(m.Flags)) 1975 buf.EncodeUint32(uint32(m.SwIfIndex)) 1976 return buf.Bytes(), nil 1977 } 1978 func (m *Nat44EiInterfaceDetails) Unmarshal(b []byte) error { 1979 buf := codec.NewBuffer(b) 1980 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 1981 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1982 return nil 1983 } 1984 1985 // Dump interfaces with NAT44 feature 1986 // Nat44EiInterfaceDump defines message 'nat44_ei_interface_dump'. 1987 // InProgress: the message form may change in the future versions 1988 type Nat44EiInterfaceDump struct{} 1989 1990 func (m *Nat44EiInterfaceDump) Reset() { *m = Nat44EiInterfaceDump{} } 1991 func (*Nat44EiInterfaceDump) GetMessageName() string { return "nat44_ei_interface_dump" } 1992 func (*Nat44EiInterfaceDump) GetCrcString() string { return "51077d14" } 1993 func (*Nat44EiInterfaceDump) GetMessageType() api.MessageType { 1994 return api.RequestMessage 1995 } 1996 1997 func (m *Nat44EiInterfaceDump) Size() (size int) { 1998 if m == nil { 1999 return 0 2000 } 2001 return size 2002 } 2003 func (m *Nat44EiInterfaceDump) Marshal(b []byte) ([]byte, error) { 2004 if b == nil { 2005 b = make([]byte, m.Size()) 2006 } 2007 buf := codec.NewBuffer(b) 2008 return buf.Bytes(), nil 2009 } 2010 func (m *Nat44EiInterfaceDump) Unmarshal(b []byte) error { 2011 return nil 2012 } 2013 2014 // NAT44 interface with output feature details response 2015 // - flags - flag NAT_IS_INSIDE if interface is inside else 2016 // interface is outside 2017 // - sw_if_index - software index of the interface 2018 // 2019 // Nat44EiInterfaceOutputFeatureDetails defines message 'nat44_ei_interface_output_feature_details'. 2020 // Deprecated: the message will be removed in the future versions 2021 type Nat44EiInterfaceOutputFeatureDetails struct { 2022 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 2023 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2024 } 2025 2026 func (m *Nat44EiInterfaceOutputFeatureDetails) Reset() { *m = Nat44EiInterfaceOutputFeatureDetails{} } 2027 func (*Nat44EiInterfaceOutputFeatureDetails) GetMessageName() string { 2028 return "nat44_ei_interface_output_feature_details" 2029 } 2030 func (*Nat44EiInterfaceOutputFeatureDetails) GetCrcString() string { return "f446e508" } 2031 func (*Nat44EiInterfaceOutputFeatureDetails) GetMessageType() api.MessageType { 2032 return api.ReplyMessage 2033 } 2034 2035 func (m *Nat44EiInterfaceOutputFeatureDetails) Size() (size int) { 2036 if m == nil { 2037 return 0 2038 } 2039 size += 1 // m.Flags 2040 size += 4 // m.SwIfIndex 2041 return size 2042 } 2043 func (m *Nat44EiInterfaceOutputFeatureDetails) Marshal(b []byte) ([]byte, error) { 2044 if b == nil { 2045 b = make([]byte, m.Size()) 2046 } 2047 buf := codec.NewBuffer(b) 2048 buf.EncodeUint8(uint8(m.Flags)) 2049 buf.EncodeUint32(uint32(m.SwIfIndex)) 2050 return buf.Bytes(), nil 2051 } 2052 func (m *Nat44EiInterfaceOutputFeatureDetails) Unmarshal(b []byte) error { 2053 buf := codec.NewBuffer(b) 2054 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 2055 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2056 return nil 2057 } 2058 2059 // Dump interfaces with NAT44 output feature 2060 // Nat44EiInterfaceOutputFeatureDump defines message 'nat44_ei_interface_output_feature_dump'. 2061 // Deprecated: the message will be removed in the future versions 2062 type Nat44EiInterfaceOutputFeatureDump struct{} 2063 2064 func (m *Nat44EiInterfaceOutputFeatureDump) Reset() { *m = Nat44EiInterfaceOutputFeatureDump{} } 2065 func (*Nat44EiInterfaceOutputFeatureDump) GetMessageName() string { 2066 return "nat44_ei_interface_output_feature_dump" 2067 } 2068 func (*Nat44EiInterfaceOutputFeatureDump) GetCrcString() string { return "51077d14" } 2069 func (*Nat44EiInterfaceOutputFeatureDump) GetMessageType() api.MessageType { 2070 return api.RequestMessage 2071 } 2072 2073 func (m *Nat44EiInterfaceOutputFeatureDump) Size() (size int) { 2074 if m == nil { 2075 return 0 2076 } 2077 return size 2078 } 2079 func (m *Nat44EiInterfaceOutputFeatureDump) Marshal(b []byte) ([]byte, error) { 2080 if b == nil { 2081 b = make([]byte, m.Size()) 2082 } 2083 buf := codec.NewBuffer(b) 2084 return buf.Bytes(), nil 2085 } 2086 func (m *Nat44EiInterfaceOutputFeatureDump) Unmarshal(b []byte) error { 2087 return nil 2088 } 2089 2090 // Enable/disable NAT IPFIX logging 2091 // - domain_id - observation domain ID 2092 // - src_port - source port number 2093 // - enable - true if enable, false if disable 2094 // 2095 // Nat44EiIpfixEnableDisable defines message 'nat44_ei_ipfix_enable_disable'. 2096 // InProgress: the message form may change in the future versions 2097 type Nat44EiIpfixEnableDisable struct { 2098 DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"` 2099 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"` 2100 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 2101 } 2102 2103 func (m *Nat44EiIpfixEnableDisable) Reset() { *m = Nat44EiIpfixEnableDisable{} } 2104 func (*Nat44EiIpfixEnableDisable) GetMessageName() string { return "nat44_ei_ipfix_enable_disable" } 2105 func (*Nat44EiIpfixEnableDisable) GetCrcString() string { return "9af4a2d2" } 2106 func (*Nat44EiIpfixEnableDisable) GetMessageType() api.MessageType { 2107 return api.RequestMessage 2108 } 2109 2110 func (m *Nat44EiIpfixEnableDisable) Size() (size int) { 2111 if m == nil { 2112 return 0 2113 } 2114 size += 4 // m.DomainID 2115 size += 2 // m.SrcPort 2116 size += 1 // m.Enable 2117 return size 2118 } 2119 func (m *Nat44EiIpfixEnableDisable) Marshal(b []byte) ([]byte, error) { 2120 if b == nil { 2121 b = make([]byte, m.Size()) 2122 } 2123 buf := codec.NewBuffer(b) 2124 buf.EncodeUint32(m.DomainID) 2125 buf.EncodeUint16(m.SrcPort) 2126 buf.EncodeBool(m.Enable) 2127 return buf.Bytes(), nil 2128 } 2129 func (m *Nat44EiIpfixEnableDisable) Unmarshal(b []byte) error { 2130 buf := codec.NewBuffer(b) 2131 m.DomainID = buf.DecodeUint32() 2132 m.SrcPort = buf.DecodeUint16() 2133 m.Enable = buf.DecodeBool() 2134 return nil 2135 } 2136 2137 // Nat44EiIpfixEnableDisableReply defines message 'nat44_ei_ipfix_enable_disable_reply'. 2138 // InProgress: the message form may change in the future versions 2139 type Nat44EiIpfixEnableDisableReply struct { 2140 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2141 } 2142 2143 func (m *Nat44EiIpfixEnableDisableReply) Reset() { *m = Nat44EiIpfixEnableDisableReply{} } 2144 func (*Nat44EiIpfixEnableDisableReply) GetMessageName() string { 2145 return "nat44_ei_ipfix_enable_disable_reply" 2146 } 2147 func (*Nat44EiIpfixEnableDisableReply) GetCrcString() string { return "e8d4e804" } 2148 func (*Nat44EiIpfixEnableDisableReply) GetMessageType() api.MessageType { 2149 return api.ReplyMessage 2150 } 2151 2152 func (m *Nat44EiIpfixEnableDisableReply) Size() (size int) { 2153 if m == nil { 2154 return 0 2155 } 2156 size += 4 // m.Retval 2157 return size 2158 } 2159 func (m *Nat44EiIpfixEnableDisableReply) Marshal(b []byte) ([]byte, error) { 2160 if b == nil { 2161 b = make([]byte, m.Size()) 2162 } 2163 buf := codec.NewBuffer(b) 2164 buf.EncodeInt32(m.Retval) 2165 return buf.Bytes(), nil 2166 } 2167 func (m *Nat44EiIpfixEnableDisableReply) Unmarshal(b []byte) error { 2168 buf := codec.NewBuffer(b) 2169 m.Retval = buf.DecodeInt32() 2170 return nil 2171 } 2172 2173 // Nat44EiOutputInterfaceDetails defines message 'nat44_ei_output_interface_details'. 2174 type Nat44EiOutputInterfaceDetails struct { 2175 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2176 } 2177 2178 func (m *Nat44EiOutputInterfaceDetails) Reset() { *m = Nat44EiOutputInterfaceDetails{} } 2179 func (*Nat44EiOutputInterfaceDetails) GetMessageName() string { 2180 return "nat44_ei_output_interface_details" 2181 } 2182 func (*Nat44EiOutputInterfaceDetails) GetCrcString() string { return "0b45011c" } 2183 func (*Nat44EiOutputInterfaceDetails) GetMessageType() api.MessageType { 2184 return api.ReplyMessage 2185 } 2186 2187 func (m *Nat44EiOutputInterfaceDetails) Size() (size int) { 2188 if m == nil { 2189 return 0 2190 } 2191 size += 4 // m.SwIfIndex 2192 return size 2193 } 2194 func (m *Nat44EiOutputInterfaceDetails) Marshal(b []byte) ([]byte, error) { 2195 if b == nil { 2196 b = make([]byte, m.Size()) 2197 } 2198 buf := codec.NewBuffer(b) 2199 buf.EncodeUint32(uint32(m.SwIfIndex)) 2200 return buf.Bytes(), nil 2201 } 2202 func (m *Nat44EiOutputInterfaceDetails) Unmarshal(b []byte) error { 2203 buf := codec.NewBuffer(b) 2204 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2205 return nil 2206 } 2207 2208 // Nat44EiOutputInterfaceGet defines message 'nat44_ei_output_interface_get'. 2209 type Nat44EiOutputInterfaceGet struct { 2210 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` 2211 } 2212 2213 func (m *Nat44EiOutputInterfaceGet) Reset() { *m = Nat44EiOutputInterfaceGet{} } 2214 func (*Nat44EiOutputInterfaceGet) GetMessageName() string { return "nat44_ei_output_interface_get" } 2215 func (*Nat44EiOutputInterfaceGet) GetCrcString() string { return "f75ba505" } 2216 func (*Nat44EiOutputInterfaceGet) GetMessageType() api.MessageType { 2217 return api.RequestMessage 2218 } 2219 2220 func (m *Nat44EiOutputInterfaceGet) Size() (size int) { 2221 if m == nil { 2222 return 0 2223 } 2224 size += 4 // m.Cursor 2225 return size 2226 } 2227 func (m *Nat44EiOutputInterfaceGet) Marshal(b []byte) ([]byte, error) { 2228 if b == nil { 2229 b = make([]byte, m.Size()) 2230 } 2231 buf := codec.NewBuffer(b) 2232 buf.EncodeUint32(m.Cursor) 2233 return buf.Bytes(), nil 2234 } 2235 func (m *Nat44EiOutputInterfaceGet) Unmarshal(b []byte) error { 2236 buf := codec.NewBuffer(b) 2237 m.Cursor = buf.DecodeUint32() 2238 return nil 2239 } 2240 2241 // Nat44EiOutputInterfaceGetReply defines message 'nat44_ei_output_interface_get_reply'. 2242 type Nat44EiOutputInterfaceGetReply struct { 2243 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2244 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` 2245 } 2246 2247 func (m *Nat44EiOutputInterfaceGetReply) Reset() { *m = Nat44EiOutputInterfaceGetReply{} } 2248 func (*Nat44EiOutputInterfaceGetReply) GetMessageName() string { 2249 return "nat44_ei_output_interface_get_reply" 2250 } 2251 func (*Nat44EiOutputInterfaceGetReply) GetCrcString() string { return "53b48f5d" } 2252 func (*Nat44EiOutputInterfaceGetReply) GetMessageType() api.MessageType { 2253 return api.ReplyMessage 2254 } 2255 2256 func (m *Nat44EiOutputInterfaceGetReply) Size() (size int) { 2257 if m == nil { 2258 return 0 2259 } 2260 size += 4 // m.Retval 2261 size += 4 // m.Cursor 2262 return size 2263 } 2264 func (m *Nat44EiOutputInterfaceGetReply) Marshal(b []byte) ([]byte, error) { 2265 if b == nil { 2266 b = make([]byte, m.Size()) 2267 } 2268 buf := codec.NewBuffer(b) 2269 buf.EncodeInt32(m.Retval) 2270 buf.EncodeUint32(m.Cursor) 2271 return buf.Bytes(), nil 2272 } 2273 func (m *Nat44EiOutputInterfaceGetReply) Unmarshal(b []byte) error { 2274 buf := codec.NewBuffer(b) 2275 m.Retval = buf.DecodeInt32() 2276 m.Cursor = buf.DecodeUint32() 2277 return nil 2278 } 2279 2280 // Enable/disable NAT44 plugin 2281 // - inside_vrf - inside vrf id 2282 // - outside_vrf - outside vrf id 2283 // - users - maximum number of users per thread 2284 // - user_memory - overwrite hash allocation parameter 2285 // - sessions - maximum number of sessions per thread 2286 // - session_memory - overwrite hash allocation parameter 2287 // - user_sessions - maximum number of sessions per user 2288 // - enable - true if enable, false if disable 2289 // - flags - flag NAT44_EI_IS_STATIC_MAPPING_ONLY, 2290 // NAT44_EI_IS_CONNECTION_TRACKING, 2291 // NAT44_EI_IS_OUT2IN_DPO 2292 // 2293 // Nat44EiPluginEnableDisable defines message 'nat44_ei_plugin_enable_disable'. 2294 // InProgress: the message form may change in the future versions 2295 type Nat44EiPluginEnableDisable struct { 2296 InsideVrf uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"` 2297 OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"` 2298 Users uint32 `binapi:"u32,name=users" json:"users,omitempty"` 2299 UserMemory uint32 `binapi:"u32,name=user_memory" json:"user_memory,omitempty"` 2300 Sessions uint32 `binapi:"u32,name=sessions" json:"sessions,omitempty"` 2301 SessionMemory uint32 `binapi:"u32,name=session_memory" json:"session_memory,omitempty"` 2302 UserSessions uint32 `binapi:"u32,name=user_sessions" json:"user_sessions,omitempty"` 2303 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 2304 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 2305 } 2306 2307 func (m *Nat44EiPluginEnableDisable) Reset() { *m = Nat44EiPluginEnableDisable{} } 2308 func (*Nat44EiPluginEnableDisable) GetMessageName() string { return "nat44_ei_plugin_enable_disable" } 2309 func (*Nat44EiPluginEnableDisable) GetCrcString() string { return "bf692144" } 2310 func (*Nat44EiPluginEnableDisable) GetMessageType() api.MessageType { 2311 return api.RequestMessage 2312 } 2313 2314 func (m *Nat44EiPluginEnableDisable) Size() (size int) { 2315 if m == nil { 2316 return 0 2317 } 2318 size += 4 // m.InsideVrf 2319 size += 4 // m.OutsideVrf 2320 size += 4 // m.Users 2321 size += 4 // m.UserMemory 2322 size += 4 // m.Sessions 2323 size += 4 // m.SessionMemory 2324 size += 4 // m.UserSessions 2325 size += 1 // m.Enable 2326 size += 1 // m.Flags 2327 return size 2328 } 2329 func (m *Nat44EiPluginEnableDisable) Marshal(b []byte) ([]byte, error) { 2330 if b == nil { 2331 b = make([]byte, m.Size()) 2332 } 2333 buf := codec.NewBuffer(b) 2334 buf.EncodeUint32(m.InsideVrf) 2335 buf.EncodeUint32(m.OutsideVrf) 2336 buf.EncodeUint32(m.Users) 2337 buf.EncodeUint32(m.UserMemory) 2338 buf.EncodeUint32(m.Sessions) 2339 buf.EncodeUint32(m.SessionMemory) 2340 buf.EncodeUint32(m.UserSessions) 2341 buf.EncodeBool(m.Enable) 2342 buf.EncodeUint8(uint8(m.Flags)) 2343 return buf.Bytes(), nil 2344 } 2345 func (m *Nat44EiPluginEnableDisable) Unmarshal(b []byte) error { 2346 buf := codec.NewBuffer(b) 2347 m.InsideVrf = buf.DecodeUint32() 2348 m.OutsideVrf = buf.DecodeUint32() 2349 m.Users = buf.DecodeUint32() 2350 m.UserMemory = buf.DecodeUint32() 2351 m.Sessions = buf.DecodeUint32() 2352 m.SessionMemory = buf.DecodeUint32() 2353 m.UserSessions = buf.DecodeUint32() 2354 m.Enable = buf.DecodeBool() 2355 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 2356 return nil 2357 } 2358 2359 // Nat44EiPluginEnableDisableReply defines message 'nat44_ei_plugin_enable_disable_reply'. 2360 // InProgress: the message form may change in the future versions 2361 type Nat44EiPluginEnableDisableReply struct { 2362 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2363 } 2364 2365 func (m *Nat44EiPluginEnableDisableReply) Reset() { *m = Nat44EiPluginEnableDisableReply{} } 2366 func (*Nat44EiPluginEnableDisableReply) GetMessageName() string { 2367 return "nat44_ei_plugin_enable_disable_reply" 2368 } 2369 func (*Nat44EiPluginEnableDisableReply) GetCrcString() string { return "e8d4e804" } 2370 func (*Nat44EiPluginEnableDisableReply) GetMessageType() api.MessageType { 2371 return api.ReplyMessage 2372 } 2373 2374 func (m *Nat44EiPluginEnableDisableReply) Size() (size int) { 2375 if m == nil { 2376 return 0 2377 } 2378 size += 4 // m.Retval 2379 return size 2380 } 2381 func (m *Nat44EiPluginEnableDisableReply) Marshal(b []byte) ([]byte, error) { 2382 if b == nil { 2383 b = make([]byte, m.Size()) 2384 } 2385 buf := codec.NewBuffer(b) 2386 buf.EncodeInt32(m.Retval) 2387 return buf.Bytes(), nil 2388 } 2389 func (m *Nat44EiPluginEnableDisableReply) Unmarshal(b []byte) error { 2390 buf := codec.NewBuffer(b) 2391 m.Retval = buf.DecodeInt32() 2392 return nil 2393 } 2394 2395 // Set address and port assignment algorithm 2396 // - alg - address and port assignment algorithm: 2397 // 0 - default, 1 - MAP-E, 2 - port range 2398 // (see nat44_ei_addr_and_port_alloc_alg_t in nat.h) 2399 // - psid_offset - number of offset bits (valid only for MAP-E alg) 2400 // - psid_length - length of PSID (valid only for MAP-E alg) 2401 // - psid - Port Set Identifier (PSID) value (valid only for MAP-E alg) 2402 // - start_port - beginning of the port range 2403 // - end_port - end of the port range 2404 // 2405 // Nat44EiSetAddrAndPortAllocAlg defines message 'nat44_ei_set_addr_and_port_alloc_alg'. 2406 // InProgress: the message form may change in the future versions 2407 type Nat44EiSetAddrAndPortAllocAlg struct { 2408 Alg uint8 `binapi:"u8,name=alg" json:"alg,omitempty"` 2409 PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"` 2410 PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"` 2411 Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"` 2412 StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"` 2413 EndPort uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"` 2414 } 2415 2416 func (m *Nat44EiSetAddrAndPortAllocAlg) Reset() { *m = Nat44EiSetAddrAndPortAllocAlg{} } 2417 func (*Nat44EiSetAddrAndPortAllocAlg) GetMessageName() string { 2418 return "nat44_ei_set_addr_and_port_alloc_alg" 2419 } 2420 func (*Nat44EiSetAddrAndPortAllocAlg) GetCrcString() string { return "deeb746f" } 2421 func (*Nat44EiSetAddrAndPortAllocAlg) GetMessageType() api.MessageType { 2422 return api.RequestMessage 2423 } 2424 2425 func (m *Nat44EiSetAddrAndPortAllocAlg) Size() (size int) { 2426 if m == nil { 2427 return 0 2428 } 2429 size += 1 // m.Alg 2430 size += 1 // m.PsidOffset 2431 size += 1 // m.PsidLength 2432 size += 2 // m.Psid 2433 size += 2 // m.StartPort 2434 size += 2 // m.EndPort 2435 return size 2436 } 2437 func (m *Nat44EiSetAddrAndPortAllocAlg) Marshal(b []byte) ([]byte, error) { 2438 if b == nil { 2439 b = make([]byte, m.Size()) 2440 } 2441 buf := codec.NewBuffer(b) 2442 buf.EncodeUint8(m.Alg) 2443 buf.EncodeUint8(m.PsidOffset) 2444 buf.EncodeUint8(m.PsidLength) 2445 buf.EncodeUint16(m.Psid) 2446 buf.EncodeUint16(m.StartPort) 2447 buf.EncodeUint16(m.EndPort) 2448 return buf.Bytes(), nil 2449 } 2450 func (m *Nat44EiSetAddrAndPortAllocAlg) Unmarshal(b []byte) error { 2451 buf := codec.NewBuffer(b) 2452 m.Alg = buf.DecodeUint8() 2453 m.PsidOffset = buf.DecodeUint8() 2454 m.PsidLength = buf.DecodeUint8() 2455 m.Psid = buf.DecodeUint16() 2456 m.StartPort = buf.DecodeUint16() 2457 m.EndPort = buf.DecodeUint16() 2458 return nil 2459 } 2460 2461 // Nat44EiSetAddrAndPortAllocAlgReply defines message 'nat44_ei_set_addr_and_port_alloc_alg_reply'. 2462 // InProgress: the message form may change in the future versions 2463 type Nat44EiSetAddrAndPortAllocAlgReply struct { 2464 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2465 } 2466 2467 func (m *Nat44EiSetAddrAndPortAllocAlgReply) Reset() { *m = Nat44EiSetAddrAndPortAllocAlgReply{} } 2468 func (*Nat44EiSetAddrAndPortAllocAlgReply) GetMessageName() string { 2469 return "nat44_ei_set_addr_and_port_alloc_alg_reply" 2470 } 2471 func (*Nat44EiSetAddrAndPortAllocAlgReply) GetCrcString() string { return "e8d4e804" } 2472 func (*Nat44EiSetAddrAndPortAllocAlgReply) GetMessageType() api.MessageType { 2473 return api.ReplyMessage 2474 } 2475 2476 func (m *Nat44EiSetAddrAndPortAllocAlgReply) Size() (size int) { 2477 if m == nil { 2478 return 0 2479 } 2480 size += 4 // m.Retval 2481 return size 2482 } 2483 func (m *Nat44EiSetAddrAndPortAllocAlgReply) Marshal(b []byte) ([]byte, error) { 2484 if b == nil { 2485 b = make([]byte, m.Size()) 2486 } 2487 buf := codec.NewBuffer(b) 2488 buf.EncodeInt32(m.Retval) 2489 return buf.Bytes(), nil 2490 } 2491 func (m *Nat44EiSetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error { 2492 buf := codec.NewBuffer(b) 2493 m.Retval = buf.DecodeInt32() 2494 return nil 2495 } 2496 2497 // Set NAT handoff frame queue options 2498 // - frame_queue_nelts - number of worker handoff frame queue elements 2499 // 2500 // Nat44EiSetFqOptions defines message 'nat44_ei_set_fq_options'. 2501 // InProgress: the message form may change in the future versions 2502 type Nat44EiSetFqOptions struct { 2503 FrameQueueNelts uint32 `binapi:"u32,name=frame_queue_nelts" json:"frame_queue_nelts,omitempty"` 2504 } 2505 2506 func (m *Nat44EiSetFqOptions) Reset() { *m = Nat44EiSetFqOptions{} } 2507 func (*Nat44EiSetFqOptions) GetMessageName() string { return "nat44_ei_set_fq_options" } 2508 func (*Nat44EiSetFqOptions) GetCrcString() string { return "2399bd71" } 2509 func (*Nat44EiSetFqOptions) GetMessageType() api.MessageType { 2510 return api.RequestMessage 2511 } 2512 2513 func (m *Nat44EiSetFqOptions) Size() (size int) { 2514 if m == nil { 2515 return 0 2516 } 2517 size += 4 // m.FrameQueueNelts 2518 return size 2519 } 2520 func (m *Nat44EiSetFqOptions) Marshal(b []byte) ([]byte, error) { 2521 if b == nil { 2522 b = make([]byte, m.Size()) 2523 } 2524 buf := codec.NewBuffer(b) 2525 buf.EncodeUint32(m.FrameQueueNelts) 2526 return buf.Bytes(), nil 2527 } 2528 func (m *Nat44EiSetFqOptions) Unmarshal(b []byte) error { 2529 buf := codec.NewBuffer(b) 2530 m.FrameQueueNelts = buf.DecodeUint32() 2531 return nil 2532 } 2533 2534 // Nat44EiSetFqOptionsReply defines message 'nat44_ei_set_fq_options_reply'. 2535 // InProgress: the message form may change in the future versions 2536 type Nat44EiSetFqOptionsReply struct { 2537 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2538 } 2539 2540 func (m *Nat44EiSetFqOptionsReply) Reset() { *m = Nat44EiSetFqOptionsReply{} } 2541 func (*Nat44EiSetFqOptionsReply) GetMessageName() string { return "nat44_ei_set_fq_options_reply" } 2542 func (*Nat44EiSetFqOptionsReply) GetCrcString() string { return "e8d4e804" } 2543 func (*Nat44EiSetFqOptionsReply) GetMessageType() api.MessageType { 2544 return api.ReplyMessage 2545 } 2546 2547 func (m *Nat44EiSetFqOptionsReply) Size() (size int) { 2548 if m == nil { 2549 return 0 2550 } 2551 size += 4 // m.Retval 2552 return size 2553 } 2554 func (m *Nat44EiSetFqOptionsReply) Marshal(b []byte) ([]byte, error) { 2555 if b == nil { 2556 b = make([]byte, m.Size()) 2557 } 2558 buf := codec.NewBuffer(b) 2559 buf.EncodeInt32(m.Retval) 2560 return buf.Bytes(), nil 2561 } 2562 func (m *Nat44EiSetFqOptionsReply) Unmarshal(b []byte) error { 2563 buf := codec.NewBuffer(b) 2564 m.Retval = buf.DecodeInt32() 2565 return nil 2566 } 2567 2568 // Set NAT44 logging level 2569 // - log_level - logging level 2570 // 2571 // Nat44EiSetLogLevel defines message 'nat44_ei_set_log_level'. 2572 // Deprecated: the message will be removed in the future versions 2573 type Nat44EiSetLogLevel struct { 2574 LogLevel nat_types.NatLogLevel `binapi:"nat_log_level,name=log_level" json:"log_level,omitempty"` 2575 } 2576 2577 func (m *Nat44EiSetLogLevel) Reset() { *m = Nat44EiSetLogLevel{} } 2578 func (*Nat44EiSetLogLevel) GetMessageName() string { return "nat44_ei_set_log_level" } 2579 func (*Nat44EiSetLogLevel) GetCrcString() string { return "70076bfe" } 2580 func (*Nat44EiSetLogLevel) GetMessageType() api.MessageType { 2581 return api.RequestMessage 2582 } 2583 2584 func (m *Nat44EiSetLogLevel) Size() (size int) { 2585 if m == nil { 2586 return 0 2587 } 2588 size += 1 // m.LogLevel 2589 return size 2590 } 2591 func (m *Nat44EiSetLogLevel) Marshal(b []byte) ([]byte, error) { 2592 if b == nil { 2593 b = make([]byte, m.Size()) 2594 } 2595 buf := codec.NewBuffer(b) 2596 buf.EncodeUint8(uint8(m.LogLevel)) 2597 return buf.Bytes(), nil 2598 } 2599 func (m *Nat44EiSetLogLevel) Unmarshal(b []byte) error { 2600 buf := codec.NewBuffer(b) 2601 m.LogLevel = nat_types.NatLogLevel(buf.DecodeUint8()) 2602 return nil 2603 } 2604 2605 // Nat44EiSetLogLevelReply defines message 'nat44_ei_set_log_level_reply'. 2606 // Deprecated: the message will be removed in the future versions 2607 type Nat44EiSetLogLevelReply struct { 2608 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2609 } 2610 2611 func (m *Nat44EiSetLogLevelReply) Reset() { *m = Nat44EiSetLogLevelReply{} } 2612 func (*Nat44EiSetLogLevelReply) GetMessageName() string { return "nat44_ei_set_log_level_reply" } 2613 func (*Nat44EiSetLogLevelReply) GetCrcString() string { return "e8d4e804" } 2614 func (*Nat44EiSetLogLevelReply) GetMessageType() api.MessageType { 2615 return api.ReplyMessage 2616 } 2617 2618 func (m *Nat44EiSetLogLevelReply) Size() (size int) { 2619 if m == nil { 2620 return 0 2621 } 2622 size += 4 // m.Retval 2623 return size 2624 } 2625 func (m *Nat44EiSetLogLevelReply) Marshal(b []byte) ([]byte, error) { 2626 if b == nil { 2627 b = make([]byte, m.Size()) 2628 } 2629 buf := codec.NewBuffer(b) 2630 buf.EncodeInt32(m.Retval) 2631 return buf.Bytes(), nil 2632 } 2633 func (m *Nat44EiSetLogLevelReply) Unmarshal(b []byte) error { 2634 buf := codec.NewBuffer(b) 2635 m.Retval = buf.DecodeInt32() 2636 return nil 2637 } 2638 2639 // Set TCP MSS rewriting configuration 2640 // - mss_value - MSS value to be used for MSS rewriting 2641 // - enable - if true enable MSS rewriting feature else disable 2642 // 2643 // Nat44EiSetMssClamping defines message 'nat44_ei_set_mss_clamping'. 2644 // InProgress: the message form may change in the future versions 2645 type Nat44EiSetMssClamping struct { 2646 MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"` 2647 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 2648 } 2649 2650 func (m *Nat44EiSetMssClamping) Reset() { *m = Nat44EiSetMssClamping{} } 2651 func (*Nat44EiSetMssClamping) GetMessageName() string { return "nat44_ei_set_mss_clamping" } 2652 func (*Nat44EiSetMssClamping) GetCrcString() string { return "25e90abb" } 2653 func (*Nat44EiSetMssClamping) GetMessageType() api.MessageType { 2654 return api.RequestMessage 2655 } 2656 2657 func (m *Nat44EiSetMssClamping) Size() (size int) { 2658 if m == nil { 2659 return 0 2660 } 2661 size += 2 // m.MssValue 2662 size += 1 // m.Enable 2663 return size 2664 } 2665 func (m *Nat44EiSetMssClamping) Marshal(b []byte) ([]byte, error) { 2666 if b == nil { 2667 b = make([]byte, m.Size()) 2668 } 2669 buf := codec.NewBuffer(b) 2670 buf.EncodeUint16(m.MssValue) 2671 buf.EncodeBool(m.Enable) 2672 return buf.Bytes(), nil 2673 } 2674 func (m *Nat44EiSetMssClamping) Unmarshal(b []byte) error { 2675 buf := codec.NewBuffer(b) 2676 m.MssValue = buf.DecodeUint16() 2677 m.Enable = buf.DecodeBool() 2678 return nil 2679 } 2680 2681 // Nat44EiSetMssClampingReply defines message 'nat44_ei_set_mss_clamping_reply'. 2682 // InProgress: the message form may change in the future versions 2683 type Nat44EiSetMssClampingReply struct { 2684 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2685 } 2686 2687 func (m *Nat44EiSetMssClampingReply) Reset() { *m = Nat44EiSetMssClampingReply{} } 2688 func (*Nat44EiSetMssClampingReply) GetMessageName() string { return "nat44_ei_set_mss_clamping_reply" } 2689 func (*Nat44EiSetMssClampingReply) GetCrcString() string { return "e8d4e804" } 2690 func (*Nat44EiSetMssClampingReply) GetMessageType() api.MessageType { 2691 return api.ReplyMessage 2692 } 2693 2694 func (m *Nat44EiSetMssClampingReply) Size() (size int) { 2695 if m == nil { 2696 return 0 2697 } 2698 size += 4 // m.Retval 2699 return size 2700 } 2701 func (m *Nat44EiSetMssClampingReply) Marshal(b []byte) ([]byte, error) { 2702 if b == nil { 2703 b = make([]byte, m.Size()) 2704 } 2705 buf := codec.NewBuffer(b) 2706 buf.EncodeInt32(m.Retval) 2707 return buf.Bytes(), nil 2708 } 2709 func (m *Nat44EiSetMssClampingReply) Unmarshal(b []byte) error { 2710 buf := codec.NewBuffer(b) 2711 m.Retval = buf.DecodeInt32() 2712 return nil 2713 } 2714 2715 // Set values of timeouts for NAT sessions (seconds) 2716 // - udp - UDP timeout (default 300sec) 2717 // - tcp_established - TCP established timeout (default 7440sec) 2718 // - tcp_transitory - TCP transitory timeout (default 240sec) 2719 // - icmp - ICMP timeout (default 60sec) 2720 // 2721 // Nat44EiSetTimeouts defines message 'nat44_ei_set_timeouts'. 2722 // InProgress: the message form may change in the future versions 2723 type Nat44EiSetTimeouts struct { 2724 UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"` 2725 TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"` 2726 TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"` 2727 ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"` 2728 } 2729 2730 func (m *Nat44EiSetTimeouts) Reset() { *m = Nat44EiSetTimeouts{} } 2731 func (*Nat44EiSetTimeouts) GetMessageName() string { return "nat44_ei_set_timeouts" } 2732 func (*Nat44EiSetTimeouts) GetCrcString() string { return "d4746b16" } 2733 func (*Nat44EiSetTimeouts) GetMessageType() api.MessageType { 2734 return api.RequestMessage 2735 } 2736 2737 func (m *Nat44EiSetTimeouts) Size() (size int) { 2738 if m == nil { 2739 return 0 2740 } 2741 size += 4 // m.UDP 2742 size += 4 // m.TCPEstablished 2743 size += 4 // m.TCPTransitory 2744 size += 4 // m.ICMP 2745 return size 2746 } 2747 func (m *Nat44EiSetTimeouts) Marshal(b []byte) ([]byte, error) { 2748 if b == nil { 2749 b = make([]byte, m.Size()) 2750 } 2751 buf := codec.NewBuffer(b) 2752 buf.EncodeUint32(m.UDP) 2753 buf.EncodeUint32(m.TCPEstablished) 2754 buf.EncodeUint32(m.TCPTransitory) 2755 buf.EncodeUint32(m.ICMP) 2756 return buf.Bytes(), nil 2757 } 2758 func (m *Nat44EiSetTimeouts) Unmarshal(b []byte) error { 2759 buf := codec.NewBuffer(b) 2760 m.UDP = buf.DecodeUint32() 2761 m.TCPEstablished = buf.DecodeUint32() 2762 m.TCPTransitory = buf.DecodeUint32() 2763 m.ICMP = buf.DecodeUint32() 2764 return nil 2765 } 2766 2767 // Nat44EiSetTimeoutsReply defines message 'nat44_ei_set_timeouts_reply'. 2768 // InProgress: the message form may change in the future versions 2769 type Nat44EiSetTimeoutsReply struct { 2770 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2771 } 2772 2773 func (m *Nat44EiSetTimeoutsReply) Reset() { *m = Nat44EiSetTimeoutsReply{} } 2774 func (*Nat44EiSetTimeoutsReply) GetMessageName() string { return "nat44_ei_set_timeouts_reply" } 2775 func (*Nat44EiSetTimeoutsReply) GetCrcString() string { return "e8d4e804" } 2776 func (*Nat44EiSetTimeoutsReply) GetMessageType() api.MessageType { 2777 return api.ReplyMessage 2778 } 2779 2780 func (m *Nat44EiSetTimeoutsReply) Size() (size int) { 2781 if m == nil { 2782 return 0 2783 } 2784 size += 4 // m.Retval 2785 return size 2786 } 2787 func (m *Nat44EiSetTimeoutsReply) Marshal(b []byte) ([]byte, error) { 2788 if b == nil { 2789 b = make([]byte, m.Size()) 2790 } 2791 buf := codec.NewBuffer(b) 2792 buf.EncodeInt32(m.Retval) 2793 return buf.Bytes(), nil 2794 } 2795 func (m *Nat44EiSetTimeoutsReply) Unmarshal(b []byte) error { 2796 buf := codec.NewBuffer(b) 2797 m.Retval = buf.DecodeInt32() 2798 return nil 2799 } 2800 2801 // Set NAT workers 2802 // - worker_mask - NAT workers mask 2803 // 2804 // Nat44EiSetWorkers defines message 'nat44_ei_set_workers'. 2805 // InProgress: the message form may change in the future versions 2806 type Nat44EiSetWorkers struct { 2807 WorkerMask uint64 `binapi:"u64,name=worker_mask" json:"worker_mask,omitempty"` 2808 } 2809 2810 func (m *Nat44EiSetWorkers) Reset() { *m = Nat44EiSetWorkers{} } 2811 func (*Nat44EiSetWorkers) GetMessageName() string { return "nat44_ei_set_workers" } 2812 func (*Nat44EiSetWorkers) GetCrcString() string { return "da926638" } 2813 func (*Nat44EiSetWorkers) GetMessageType() api.MessageType { 2814 return api.RequestMessage 2815 } 2816 2817 func (m *Nat44EiSetWorkers) Size() (size int) { 2818 if m == nil { 2819 return 0 2820 } 2821 size += 8 // m.WorkerMask 2822 return size 2823 } 2824 func (m *Nat44EiSetWorkers) Marshal(b []byte) ([]byte, error) { 2825 if b == nil { 2826 b = make([]byte, m.Size()) 2827 } 2828 buf := codec.NewBuffer(b) 2829 buf.EncodeUint64(m.WorkerMask) 2830 return buf.Bytes(), nil 2831 } 2832 func (m *Nat44EiSetWorkers) Unmarshal(b []byte) error { 2833 buf := codec.NewBuffer(b) 2834 m.WorkerMask = buf.DecodeUint64() 2835 return nil 2836 } 2837 2838 // Nat44EiSetWorkersReply defines message 'nat44_ei_set_workers_reply'. 2839 // InProgress: the message form may change in the future versions 2840 type Nat44EiSetWorkersReply struct { 2841 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2842 } 2843 2844 func (m *Nat44EiSetWorkersReply) Reset() { *m = Nat44EiSetWorkersReply{} } 2845 func (*Nat44EiSetWorkersReply) GetMessageName() string { return "nat44_ei_set_workers_reply" } 2846 func (*Nat44EiSetWorkersReply) GetCrcString() string { return "e8d4e804" } 2847 func (*Nat44EiSetWorkersReply) GetMessageType() api.MessageType { 2848 return api.ReplyMessage 2849 } 2850 2851 func (m *Nat44EiSetWorkersReply) Size() (size int) { 2852 if m == nil { 2853 return 0 2854 } 2855 size += 4 // m.Retval 2856 return size 2857 } 2858 func (m *Nat44EiSetWorkersReply) Marshal(b []byte) ([]byte, error) { 2859 if b == nil { 2860 b = make([]byte, m.Size()) 2861 } 2862 buf := codec.NewBuffer(b) 2863 buf.EncodeInt32(m.Retval) 2864 return buf.Bytes(), nil 2865 } 2866 func (m *Nat44EiSetWorkersReply) Unmarshal(b []byte) error { 2867 buf := codec.NewBuffer(b) 2868 m.Retval = buf.DecodeInt32() 2869 return nil 2870 } 2871 2872 // Show NAT handoff frame queue options 2873 // Nat44EiShowFqOptions defines message 'nat44_ei_show_fq_options'. 2874 // InProgress: the message form may change in the future versions 2875 type Nat44EiShowFqOptions struct{} 2876 2877 func (m *Nat44EiShowFqOptions) Reset() { *m = Nat44EiShowFqOptions{} } 2878 func (*Nat44EiShowFqOptions) GetMessageName() string { return "nat44_ei_show_fq_options" } 2879 func (*Nat44EiShowFqOptions) GetCrcString() string { return "51077d14" } 2880 func (*Nat44EiShowFqOptions) GetMessageType() api.MessageType { 2881 return api.RequestMessage 2882 } 2883 2884 func (m *Nat44EiShowFqOptions) Size() (size int) { 2885 if m == nil { 2886 return 0 2887 } 2888 return size 2889 } 2890 func (m *Nat44EiShowFqOptions) Marshal(b []byte) ([]byte, error) { 2891 if b == nil { 2892 b = make([]byte, m.Size()) 2893 } 2894 buf := codec.NewBuffer(b) 2895 return buf.Bytes(), nil 2896 } 2897 func (m *Nat44EiShowFqOptions) Unmarshal(b []byte) error { 2898 return nil 2899 } 2900 2901 // Show NAT handoff frame queue options reply 2902 // - retval - return code for the request 2903 // - frame_queue_nelts - number of worker handoff frame queue elements 2904 // 2905 // Nat44EiShowFqOptionsReply defines message 'nat44_ei_show_fq_options_reply'. 2906 // InProgress: the message form may change in the future versions 2907 type Nat44EiShowFqOptionsReply struct { 2908 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2909 FrameQueueNelts uint32 `binapi:"u32,name=frame_queue_nelts" json:"frame_queue_nelts,omitempty"` 2910 } 2911 2912 func (m *Nat44EiShowFqOptionsReply) Reset() { *m = Nat44EiShowFqOptionsReply{} } 2913 func (*Nat44EiShowFqOptionsReply) GetMessageName() string { return "nat44_ei_show_fq_options_reply" } 2914 func (*Nat44EiShowFqOptionsReply) GetCrcString() string { return "7213b545" } 2915 func (*Nat44EiShowFqOptionsReply) GetMessageType() api.MessageType { 2916 return api.ReplyMessage 2917 } 2918 2919 func (m *Nat44EiShowFqOptionsReply) Size() (size int) { 2920 if m == nil { 2921 return 0 2922 } 2923 size += 4 // m.Retval 2924 size += 4 // m.FrameQueueNelts 2925 return size 2926 } 2927 func (m *Nat44EiShowFqOptionsReply) Marshal(b []byte) ([]byte, error) { 2928 if b == nil { 2929 b = make([]byte, m.Size()) 2930 } 2931 buf := codec.NewBuffer(b) 2932 buf.EncodeInt32(m.Retval) 2933 buf.EncodeUint32(m.FrameQueueNelts) 2934 return buf.Bytes(), nil 2935 } 2936 func (m *Nat44EiShowFqOptionsReply) Unmarshal(b []byte) error { 2937 buf := codec.NewBuffer(b) 2938 m.Retval = buf.DecodeInt32() 2939 m.FrameQueueNelts = buf.DecodeUint32() 2940 return nil 2941 } 2942 2943 // Show NAT44 plugin running config 2944 // Nat44EiShowRunningConfig defines message 'nat44_ei_show_running_config'. 2945 // InProgress: the message form may change in the future versions 2946 type Nat44EiShowRunningConfig struct{} 2947 2948 func (m *Nat44EiShowRunningConfig) Reset() { *m = Nat44EiShowRunningConfig{} } 2949 func (*Nat44EiShowRunningConfig) GetMessageName() string { return "nat44_ei_show_running_config" } 2950 func (*Nat44EiShowRunningConfig) GetCrcString() string { return "51077d14" } 2951 func (*Nat44EiShowRunningConfig) GetMessageType() api.MessageType { 2952 return api.RequestMessage 2953 } 2954 2955 func (m *Nat44EiShowRunningConfig) Size() (size int) { 2956 if m == nil { 2957 return 0 2958 } 2959 return size 2960 } 2961 func (m *Nat44EiShowRunningConfig) Marshal(b []byte) ([]byte, error) { 2962 if b == nil { 2963 b = make([]byte, m.Size()) 2964 } 2965 buf := codec.NewBuffer(b) 2966 return buf.Bytes(), nil 2967 } 2968 func (m *Nat44EiShowRunningConfig) Unmarshal(b []byte) error { 2969 return nil 2970 } 2971 2972 // Show NAT44 plugin running config reply 2973 // - retval - return code for the request 2974 // - inside_vrf - default inside VRF id 2975 // - outside_vrf - outside VRF id 2976 // - users - maximum number of users per worker thread 2977 // - sessions - maximum number of sessions per worker thread 2978 // - user_sessions - maximum number of sessions per user 2979 // - user_buckets - number of user hash buckets 2980 // - translation_buckets - number of translation hash buckets 2981 // - flags - flag NAT44_EI_IS_STATIC_MAPPING_ONLY, 2982 // NAT44_EI_IS_CONNECTION_TRACKING, 2983 // NAT44_EI_IS_OUT2IN_DPO 2984 // 2985 // Nat44EiShowRunningConfigReply defines message 'nat44_ei_show_running_config_reply'. 2986 // InProgress: the message form may change in the future versions 2987 type Nat44EiShowRunningConfigReply struct { 2988 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2989 InsideVrf uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"` 2990 OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"` 2991 Users uint32 `binapi:"u32,name=users" json:"users,omitempty"` 2992 Sessions uint32 `binapi:"u32,name=sessions" json:"sessions,omitempty"` 2993 UserSessions uint32 `binapi:"u32,name=user_sessions" json:"user_sessions,omitempty"` 2994 UserBuckets uint32 `binapi:"u32,name=user_buckets" json:"user_buckets,omitempty"` 2995 TranslationBuckets uint32 `binapi:"u32,name=translation_buckets" json:"translation_buckets,omitempty"` 2996 ForwardingEnabled bool `binapi:"bool,name=forwarding_enabled" json:"forwarding_enabled,omitempty"` 2997 IpfixLoggingEnabled bool `binapi:"bool,name=ipfix_logging_enabled" json:"ipfix_logging_enabled,omitempty"` 2998 Timeouts nat_types.NatTimeouts `binapi:"nat_timeouts,name=timeouts" json:"timeouts,omitempty"` 2999 LogLevel nat_types.NatLogLevel `binapi:"nat_log_level,name=log_level" json:"log_level,omitempty"` 3000 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 3001 } 3002 3003 func (m *Nat44EiShowRunningConfigReply) Reset() { *m = Nat44EiShowRunningConfigReply{} } 3004 func (*Nat44EiShowRunningConfigReply) GetMessageName() string { 3005 return "nat44_ei_show_running_config_reply" 3006 } 3007 func (*Nat44EiShowRunningConfigReply) GetCrcString() string { return "41b66a81" } 3008 func (*Nat44EiShowRunningConfigReply) GetMessageType() api.MessageType { 3009 return api.ReplyMessage 3010 } 3011 3012 func (m *Nat44EiShowRunningConfigReply) Size() (size int) { 3013 if m == nil { 3014 return 0 3015 } 3016 size += 4 // m.Retval 3017 size += 4 // m.InsideVrf 3018 size += 4 // m.OutsideVrf 3019 size += 4 // m.Users 3020 size += 4 // m.Sessions 3021 size += 4 // m.UserSessions 3022 size += 4 // m.UserBuckets 3023 size += 4 // m.TranslationBuckets 3024 size += 1 // m.ForwardingEnabled 3025 size += 1 // m.IpfixLoggingEnabled 3026 size += 4 // m.Timeouts.UDP 3027 size += 4 // m.Timeouts.TCPEstablished 3028 size += 4 // m.Timeouts.TCPTransitory 3029 size += 4 // m.Timeouts.ICMP 3030 size += 1 // m.LogLevel 3031 size += 1 // m.Flags 3032 return size 3033 } 3034 func (m *Nat44EiShowRunningConfigReply) Marshal(b []byte) ([]byte, error) { 3035 if b == nil { 3036 b = make([]byte, m.Size()) 3037 } 3038 buf := codec.NewBuffer(b) 3039 buf.EncodeInt32(m.Retval) 3040 buf.EncodeUint32(m.InsideVrf) 3041 buf.EncodeUint32(m.OutsideVrf) 3042 buf.EncodeUint32(m.Users) 3043 buf.EncodeUint32(m.Sessions) 3044 buf.EncodeUint32(m.UserSessions) 3045 buf.EncodeUint32(m.UserBuckets) 3046 buf.EncodeUint32(m.TranslationBuckets) 3047 buf.EncodeBool(m.ForwardingEnabled) 3048 buf.EncodeBool(m.IpfixLoggingEnabled) 3049 buf.EncodeUint32(m.Timeouts.UDP) 3050 buf.EncodeUint32(m.Timeouts.TCPEstablished) 3051 buf.EncodeUint32(m.Timeouts.TCPTransitory) 3052 buf.EncodeUint32(m.Timeouts.ICMP) 3053 buf.EncodeUint8(uint8(m.LogLevel)) 3054 buf.EncodeUint8(uint8(m.Flags)) 3055 return buf.Bytes(), nil 3056 } 3057 func (m *Nat44EiShowRunningConfigReply) Unmarshal(b []byte) error { 3058 buf := codec.NewBuffer(b) 3059 m.Retval = buf.DecodeInt32() 3060 m.InsideVrf = buf.DecodeUint32() 3061 m.OutsideVrf = buf.DecodeUint32() 3062 m.Users = buf.DecodeUint32() 3063 m.Sessions = buf.DecodeUint32() 3064 m.UserSessions = buf.DecodeUint32() 3065 m.UserBuckets = buf.DecodeUint32() 3066 m.TranslationBuckets = buf.DecodeUint32() 3067 m.ForwardingEnabled = buf.DecodeBool() 3068 m.IpfixLoggingEnabled = buf.DecodeBool() 3069 m.Timeouts.UDP = buf.DecodeUint32() 3070 m.Timeouts.TCPEstablished = buf.DecodeUint32() 3071 m.Timeouts.TCPTransitory = buf.DecodeUint32() 3072 m.Timeouts.ICMP = buf.DecodeUint32() 3073 m.LogLevel = nat_types.NatLogLevel(buf.DecodeUint8()) 3074 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 3075 return nil 3076 } 3077 3078 // NAT44 static mapping details response 3079 // - flags - flag NAT44_EI_IS_ADDR_ONLY if address only mapping, 3080 // - local_ip_address - local IPv4 address 3081 // - external_ip_address - external IPv4 address 3082 // - protocol - IP protocol, valid only if no NAT_ADDR_ONLY flag 3083 // - local_port - local port number, valid only if no NAT_ADDR_ONLY flag 3084 // - external_port - external port number, valid only if no NAT_ADDR_ONLY flag 3085 // - external_sw_if_index - external interface 3086 // - vfr_id - VRF ID 3087 // - tag - opaque string tag 3088 // 3089 // Nat44EiStaticMappingDetails defines message 'nat44_ei_static_mapping_details'. 3090 // InProgress: the message form may change in the future versions 3091 type Nat44EiStaticMappingDetails struct { 3092 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 3093 LocalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"` 3094 ExternalIPAddress ip_types.IP4Address `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"` 3095 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` 3096 LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"` 3097 ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` 3098 ExternalSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"` 3099 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 3100 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 3101 } 3102 3103 func (m *Nat44EiStaticMappingDetails) Reset() { *m = Nat44EiStaticMappingDetails{} } 3104 func (*Nat44EiStaticMappingDetails) GetMessageName() string { return "nat44_ei_static_mapping_details" } 3105 func (*Nat44EiStaticMappingDetails) GetCrcString() string { return "6b51ca6e" } 3106 func (*Nat44EiStaticMappingDetails) GetMessageType() api.MessageType { 3107 return api.ReplyMessage 3108 } 3109 3110 func (m *Nat44EiStaticMappingDetails) Size() (size int) { 3111 if m == nil { 3112 return 0 3113 } 3114 size += 1 // m.Flags 3115 size += 1 * 4 // m.LocalIPAddress 3116 size += 1 * 4 // m.ExternalIPAddress 3117 size += 1 // m.Protocol 3118 size += 2 // m.LocalPort 3119 size += 2 // m.ExternalPort 3120 size += 4 // m.ExternalSwIfIndex 3121 size += 4 // m.VrfID 3122 size += 64 // m.Tag 3123 return size 3124 } 3125 func (m *Nat44EiStaticMappingDetails) Marshal(b []byte) ([]byte, error) { 3126 if b == nil { 3127 b = make([]byte, m.Size()) 3128 } 3129 buf := codec.NewBuffer(b) 3130 buf.EncodeUint8(uint8(m.Flags)) 3131 buf.EncodeBytes(m.LocalIPAddress[:], 4) 3132 buf.EncodeBytes(m.ExternalIPAddress[:], 4) 3133 buf.EncodeUint8(m.Protocol) 3134 buf.EncodeUint16(m.LocalPort) 3135 buf.EncodeUint16(m.ExternalPort) 3136 buf.EncodeUint32(uint32(m.ExternalSwIfIndex)) 3137 buf.EncodeUint32(m.VrfID) 3138 buf.EncodeString(m.Tag, 64) 3139 return buf.Bytes(), nil 3140 } 3141 func (m *Nat44EiStaticMappingDetails) Unmarshal(b []byte) error { 3142 buf := codec.NewBuffer(b) 3143 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 3144 copy(m.LocalIPAddress[:], buf.DecodeBytes(4)) 3145 copy(m.ExternalIPAddress[:], buf.DecodeBytes(4)) 3146 m.Protocol = buf.DecodeUint8() 3147 m.LocalPort = buf.DecodeUint16() 3148 m.ExternalPort = buf.DecodeUint16() 3149 m.ExternalSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 3150 m.VrfID = buf.DecodeUint32() 3151 m.Tag = buf.DecodeString(64) 3152 return nil 3153 } 3154 3155 // Dump NAT44 static mappings 3156 // Nat44EiStaticMappingDump defines message 'nat44_ei_static_mapping_dump'. 3157 // InProgress: the message form may change in the future versions 3158 type Nat44EiStaticMappingDump struct{} 3159 3160 func (m *Nat44EiStaticMappingDump) Reset() { *m = Nat44EiStaticMappingDump{} } 3161 func (*Nat44EiStaticMappingDump) GetMessageName() string { return "nat44_ei_static_mapping_dump" } 3162 func (*Nat44EiStaticMappingDump) GetCrcString() string { return "51077d14" } 3163 func (*Nat44EiStaticMappingDump) GetMessageType() api.MessageType { 3164 return api.RequestMessage 3165 } 3166 3167 func (m *Nat44EiStaticMappingDump) Size() (size int) { 3168 if m == nil { 3169 return 0 3170 } 3171 return size 3172 } 3173 func (m *Nat44EiStaticMappingDump) Marshal(b []byte) ([]byte, error) { 3174 if b == nil { 3175 b = make([]byte, m.Size()) 3176 } 3177 buf := codec.NewBuffer(b) 3178 return buf.Bytes(), nil 3179 } 3180 func (m *Nat44EiStaticMappingDump) Unmarshal(b []byte) error { 3181 return nil 3182 } 3183 3184 // NAT44 users response 3185 // 3186 // @vrf_id - VRF ID 3187 // - ip_address - IPv4 address 3188 // - nsessions - number of dynamic sessions 3189 // - nstaticsessions - number of static sessions 3190 // 3191 // Nat44EiUserDetails defines message 'nat44_ei_user_details'. 3192 // InProgress: the message form may change in the future versions 3193 type Nat44EiUserDetails struct { 3194 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 3195 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 3196 Nsessions uint32 `binapi:"u32,name=nsessions" json:"nsessions,omitempty"` 3197 Nstaticsessions uint32 `binapi:"u32,name=nstaticsessions" json:"nstaticsessions,omitempty"` 3198 } 3199 3200 func (m *Nat44EiUserDetails) Reset() { *m = Nat44EiUserDetails{} } 3201 func (*Nat44EiUserDetails) GetMessageName() string { return "nat44_ei_user_details" } 3202 func (*Nat44EiUserDetails) GetCrcString() string { return "355896c2" } 3203 func (*Nat44EiUserDetails) GetMessageType() api.MessageType { 3204 return api.ReplyMessage 3205 } 3206 3207 func (m *Nat44EiUserDetails) Size() (size int) { 3208 if m == nil { 3209 return 0 3210 } 3211 size += 4 // m.VrfID 3212 size += 1 * 4 // m.IPAddress 3213 size += 4 // m.Nsessions 3214 size += 4 // m.Nstaticsessions 3215 return size 3216 } 3217 func (m *Nat44EiUserDetails) Marshal(b []byte) ([]byte, error) { 3218 if b == nil { 3219 b = make([]byte, m.Size()) 3220 } 3221 buf := codec.NewBuffer(b) 3222 buf.EncodeUint32(m.VrfID) 3223 buf.EncodeBytes(m.IPAddress[:], 4) 3224 buf.EncodeUint32(m.Nsessions) 3225 buf.EncodeUint32(m.Nstaticsessions) 3226 return buf.Bytes(), nil 3227 } 3228 func (m *Nat44EiUserDetails) Unmarshal(b []byte) error { 3229 buf := codec.NewBuffer(b) 3230 m.VrfID = buf.DecodeUint32() 3231 copy(m.IPAddress[:], buf.DecodeBytes(4)) 3232 m.Nsessions = buf.DecodeUint32() 3233 m.Nstaticsessions = buf.DecodeUint32() 3234 return nil 3235 } 3236 3237 // Dump NAT44 users 3238 // Nat44EiUserDump defines message 'nat44_ei_user_dump'. 3239 // InProgress: the message form may change in the future versions 3240 type Nat44EiUserDump struct{} 3241 3242 func (m *Nat44EiUserDump) Reset() { *m = Nat44EiUserDump{} } 3243 func (*Nat44EiUserDump) GetMessageName() string { return "nat44_ei_user_dump" } 3244 func (*Nat44EiUserDump) GetCrcString() string { return "51077d14" } 3245 func (*Nat44EiUserDump) GetMessageType() api.MessageType { 3246 return api.RequestMessage 3247 } 3248 3249 func (m *Nat44EiUserDump) Size() (size int) { 3250 if m == nil { 3251 return 0 3252 } 3253 return size 3254 } 3255 func (m *Nat44EiUserDump) Marshal(b []byte) ([]byte, error) { 3256 if b == nil { 3257 b = make([]byte, m.Size()) 3258 } 3259 buf := codec.NewBuffer(b) 3260 return buf.Bytes(), nil 3261 } 3262 func (m *Nat44EiUserDump) Unmarshal(b []byte) error { 3263 return nil 3264 } 3265 3266 // NAT44 user's sessions response 3267 // - outside_ip_address - outside IPv4 address 3268 // - outside_port - outside port 3269 // - inside_ip_address - inside IPv4 address 3270 // - inside_port - inside port 3271 // - protocol - protocol 3272 // - flags - flag NAT_IS_STATIC if session is static 3273 // - last_heard - last heard timer 3274 // - total_bytes - count of bytes sent through session 3275 // - total_pkts - count of pakets sent through session 3276 // - ext_host_address - external host IPv4 address 3277 // - ext_host_port - external host port 3278 // 3279 // Nat44EiUserSessionDetails defines message 'nat44_ei_user_session_details'. 3280 // InProgress: the message form may change in the future versions 3281 type Nat44EiUserSessionDetails struct { 3282 OutsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=outside_ip_address" json:"outside_ip_address,omitempty"` 3283 OutsidePort uint16 `binapi:"u16,name=outside_port" json:"outside_port,omitempty"` 3284 InsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=inside_ip_address" json:"inside_ip_address,omitempty"` 3285 InsidePort uint16 `binapi:"u16,name=inside_port" json:"inside_port,omitempty"` 3286 Protocol uint16 `binapi:"u16,name=protocol" json:"protocol,omitempty"` 3287 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 3288 LastHeard uint64 `binapi:"u64,name=last_heard" json:"last_heard,omitempty"` 3289 TotalBytes uint64 `binapi:"u64,name=total_bytes" json:"total_bytes,omitempty"` 3290 TotalPkts uint32 `binapi:"u32,name=total_pkts" json:"total_pkts,omitempty"` 3291 ExtHostAddress ip_types.IP4Address `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"` 3292 ExtHostPort uint16 `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"` 3293 } 3294 3295 func (m *Nat44EiUserSessionDetails) Reset() { *m = Nat44EiUserSessionDetails{} } 3296 func (*Nat44EiUserSessionDetails) GetMessageName() string { return "nat44_ei_user_session_details" } 3297 func (*Nat44EiUserSessionDetails) GetCrcString() string { return "19b7c0ac" } 3298 func (*Nat44EiUserSessionDetails) GetMessageType() api.MessageType { 3299 return api.ReplyMessage 3300 } 3301 3302 func (m *Nat44EiUserSessionDetails) Size() (size int) { 3303 if m == nil { 3304 return 0 3305 } 3306 size += 1 * 4 // m.OutsideIPAddress 3307 size += 2 // m.OutsidePort 3308 size += 1 * 4 // m.InsideIPAddress 3309 size += 2 // m.InsidePort 3310 size += 2 // m.Protocol 3311 size += 1 // m.Flags 3312 size += 8 // m.LastHeard 3313 size += 8 // m.TotalBytes 3314 size += 4 // m.TotalPkts 3315 size += 1 * 4 // m.ExtHostAddress 3316 size += 2 // m.ExtHostPort 3317 return size 3318 } 3319 func (m *Nat44EiUserSessionDetails) Marshal(b []byte) ([]byte, error) { 3320 if b == nil { 3321 b = make([]byte, m.Size()) 3322 } 3323 buf := codec.NewBuffer(b) 3324 buf.EncodeBytes(m.OutsideIPAddress[:], 4) 3325 buf.EncodeUint16(m.OutsidePort) 3326 buf.EncodeBytes(m.InsideIPAddress[:], 4) 3327 buf.EncodeUint16(m.InsidePort) 3328 buf.EncodeUint16(m.Protocol) 3329 buf.EncodeUint8(uint8(m.Flags)) 3330 buf.EncodeUint64(m.LastHeard) 3331 buf.EncodeUint64(m.TotalBytes) 3332 buf.EncodeUint32(m.TotalPkts) 3333 buf.EncodeBytes(m.ExtHostAddress[:], 4) 3334 buf.EncodeUint16(m.ExtHostPort) 3335 return buf.Bytes(), nil 3336 } 3337 func (m *Nat44EiUserSessionDetails) Unmarshal(b []byte) error { 3338 buf := codec.NewBuffer(b) 3339 copy(m.OutsideIPAddress[:], buf.DecodeBytes(4)) 3340 m.OutsidePort = buf.DecodeUint16() 3341 copy(m.InsideIPAddress[:], buf.DecodeBytes(4)) 3342 m.InsidePort = buf.DecodeUint16() 3343 m.Protocol = buf.DecodeUint16() 3344 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 3345 m.LastHeard = buf.DecodeUint64() 3346 m.TotalBytes = buf.DecodeUint64() 3347 m.TotalPkts = buf.DecodeUint32() 3348 copy(m.ExtHostAddress[:], buf.DecodeBytes(4)) 3349 m.ExtHostPort = buf.DecodeUint16() 3350 return nil 3351 } 3352 3353 // NAT44 user's sessions 3354 // - ip_address - IPv4 address of the user to dump 3355 // - vrf_id - VRF_ID 3356 // 3357 // Nat44EiUserSessionDump defines message 'nat44_ei_user_session_dump'. 3358 // InProgress: the message form may change in the future versions 3359 type Nat44EiUserSessionDump struct { 3360 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 3361 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 3362 } 3363 3364 func (m *Nat44EiUserSessionDump) Reset() { *m = Nat44EiUserSessionDump{} } 3365 func (*Nat44EiUserSessionDump) GetMessageName() string { return "nat44_ei_user_session_dump" } 3366 func (*Nat44EiUserSessionDump) GetCrcString() string { return "e1899c98" } 3367 func (*Nat44EiUserSessionDump) GetMessageType() api.MessageType { 3368 return api.RequestMessage 3369 } 3370 3371 func (m *Nat44EiUserSessionDump) Size() (size int) { 3372 if m == nil { 3373 return 0 3374 } 3375 size += 1 * 4 // m.IPAddress 3376 size += 4 // m.VrfID 3377 return size 3378 } 3379 func (m *Nat44EiUserSessionDump) Marshal(b []byte) ([]byte, error) { 3380 if b == nil { 3381 b = make([]byte, m.Size()) 3382 } 3383 buf := codec.NewBuffer(b) 3384 buf.EncodeBytes(m.IPAddress[:], 4) 3385 buf.EncodeUint32(m.VrfID) 3386 return buf.Bytes(), nil 3387 } 3388 func (m *Nat44EiUserSessionDump) Unmarshal(b []byte) error { 3389 buf := codec.NewBuffer(b) 3390 copy(m.IPAddress[:], buf.DecodeBytes(4)) 3391 m.VrfID = buf.DecodeUint32() 3392 return nil 3393 } 3394 3395 // NAT44 user's sessions response 3396 // - outside_ip_address - outside IPv4 address 3397 // - outside_port - outside port 3398 // - inside_ip_address - inside IPv4 address 3399 // - inside_port - inside port 3400 // - protocol - protocol 3401 // - flags - flag NAT_IS_STATIC if session is static 3402 // - last_heard - last heard timer since VPP start 3403 // - time_since_last_heard - difference between current vpp time and last_heard value 3404 // - total_bytes - count of bytes sent through session 3405 // - total_pkts - count of pakets sent through session 3406 // - ext_host_address - external host IPv4 address 3407 // - ext_host_port - external host port 3408 // 3409 // Nat44EiUserSessionV2Details defines message 'nat44_ei_user_session_v2_details'. 3410 // InProgress: the message form may change in the future versions 3411 type Nat44EiUserSessionV2Details struct { 3412 OutsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=outside_ip_address" json:"outside_ip_address,omitempty"` 3413 OutsidePort uint16 `binapi:"u16,name=outside_port" json:"outside_port,omitempty"` 3414 InsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=inside_ip_address" json:"inside_ip_address,omitempty"` 3415 InsidePort uint16 `binapi:"u16,name=inside_port" json:"inside_port,omitempty"` 3416 Protocol uint16 `binapi:"u16,name=protocol" json:"protocol,omitempty"` 3417 Flags Nat44EiConfigFlags `binapi:"nat44_ei_config_flags,name=flags" json:"flags,omitempty"` 3418 LastHeard uint64 `binapi:"u64,name=last_heard" json:"last_heard,omitempty"` 3419 TimeSinceLastHeard uint64 `binapi:"u64,name=time_since_last_heard" json:"time_since_last_heard,omitempty"` 3420 TotalBytes uint64 `binapi:"u64,name=total_bytes" json:"total_bytes,omitempty"` 3421 TotalPkts uint32 `binapi:"u32,name=total_pkts" json:"total_pkts,omitempty"` 3422 ExtHostAddress ip_types.IP4Address `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"` 3423 ExtHostPort uint16 `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"` 3424 } 3425 3426 func (m *Nat44EiUserSessionV2Details) Reset() { *m = Nat44EiUserSessionV2Details{} } 3427 func (*Nat44EiUserSessionV2Details) GetMessageName() string { 3428 return "nat44_ei_user_session_v2_details" 3429 } 3430 func (*Nat44EiUserSessionV2Details) GetCrcString() string { return "5bd3e9d6" } 3431 func (*Nat44EiUserSessionV2Details) GetMessageType() api.MessageType { 3432 return api.ReplyMessage 3433 } 3434 3435 func (m *Nat44EiUserSessionV2Details) Size() (size int) { 3436 if m == nil { 3437 return 0 3438 } 3439 size += 1 * 4 // m.OutsideIPAddress 3440 size += 2 // m.OutsidePort 3441 size += 1 * 4 // m.InsideIPAddress 3442 size += 2 // m.InsidePort 3443 size += 2 // m.Protocol 3444 size += 1 // m.Flags 3445 size += 8 // m.LastHeard 3446 size += 8 // m.TimeSinceLastHeard 3447 size += 8 // m.TotalBytes 3448 size += 4 // m.TotalPkts 3449 size += 1 * 4 // m.ExtHostAddress 3450 size += 2 // m.ExtHostPort 3451 return size 3452 } 3453 func (m *Nat44EiUserSessionV2Details) Marshal(b []byte) ([]byte, error) { 3454 if b == nil { 3455 b = make([]byte, m.Size()) 3456 } 3457 buf := codec.NewBuffer(b) 3458 buf.EncodeBytes(m.OutsideIPAddress[:], 4) 3459 buf.EncodeUint16(m.OutsidePort) 3460 buf.EncodeBytes(m.InsideIPAddress[:], 4) 3461 buf.EncodeUint16(m.InsidePort) 3462 buf.EncodeUint16(m.Protocol) 3463 buf.EncodeUint8(uint8(m.Flags)) 3464 buf.EncodeUint64(m.LastHeard) 3465 buf.EncodeUint64(m.TimeSinceLastHeard) 3466 buf.EncodeUint64(m.TotalBytes) 3467 buf.EncodeUint32(m.TotalPkts) 3468 buf.EncodeBytes(m.ExtHostAddress[:], 4) 3469 buf.EncodeUint16(m.ExtHostPort) 3470 return buf.Bytes(), nil 3471 } 3472 func (m *Nat44EiUserSessionV2Details) Unmarshal(b []byte) error { 3473 buf := codec.NewBuffer(b) 3474 copy(m.OutsideIPAddress[:], buf.DecodeBytes(4)) 3475 m.OutsidePort = buf.DecodeUint16() 3476 copy(m.InsideIPAddress[:], buf.DecodeBytes(4)) 3477 m.InsidePort = buf.DecodeUint16() 3478 m.Protocol = buf.DecodeUint16() 3479 m.Flags = Nat44EiConfigFlags(buf.DecodeUint8()) 3480 m.LastHeard = buf.DecodeUint64() 3481 m.TimeSinceLastHeard = buf.DecodeUint64() 3482 m.TotalBytes = buf.DecodeUint64() 3483 m.TotalPkts = buf.DecodeUint32() 3484 copy(m.ExtHostAddress[:], buf.DecodeBytes(4)) 3485 m.ExtHostPort = buf.DecodeUint16() 3486 return nil 3487 } 3488 3489 // NAT44 user's sessions 3490 // - ip_address - IPv4 address of the user to dump 3491 // - vrf_id - VRF_ID 3492 // 3493 // Nat44EiUserSessionV2Dump defines message 'nat44_ei_user_session_v2_dump'. 3494 // InProgress: the message form may change in the future versions 3495 type Nat44EiUserSessionV2Dump struct { 3496 IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` 3497 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 3498 } 3499 3500 func (m *Nat44EiUserSessionV2Dump) Reset() { *m = Nat44EiUserSessionV2Dump{} } 3501 func (*Nat44EiUserSessionV2Dump) GetMessageName() string { return "nat44_ei_user_session_v2_dump" } 3502 func (*Nat44EiUserSessionV2Dump) GetCrcString() string { return "e1899c98" } 3503 func (*Nat44EiUserSessionV2Dump) GetMessageType() api.MessageType { 3504 return api.RequestMessage 3505 } 3506 3507 func (m *Nat44EiUserSessionV2Dump) Size() (size int) { 3508 if m == nil { 3509 return 0 3510 } 3511 size += 1 * 4 // m.IPAddress 3512 size += 4 // m.VrfID 3513 return size 3514 } 3515 func (m *Nat44EiUserSessionV2Dump) Marshal(b []byte) ([]byte, error) { 3516 if b == nil { 3517 b = make([]byte, m.Size()) 3518 } 3519 buf := codec.NewBuffer(b) 3520 buf.EncodeBytes(m.IPAddress[:], 4) 3521 buf.EncodeUint32(m.VrfID) 3522 return buf.Bytes(), nil 3523 } 3524 func (m *Nat44EiUserSessionV2Dump) Unmarshal(b []byte) error { 3525 buf := codec.NewBuffer(b) 3526 copy(m.IPAddress[:], buf.DecodeBytes(4)) 3527 m.VrfID = buf.DecodeUint32() 3528 return nil 3529 } 3530 3531 // NAT workers details response 3532 // - worker_index - worker index 3533 // - lcore_id - lcore ID 3534 // - name - worker name 3535 // 3536 // Nat44EiWorkerDetails defines message 'nat44_ei_worker_details'. 3537 // InProgress: the message form may change in the future versions 3538 type Nat44EiWorkerDetails struct { 3539 WorkerIndex uint32 `binapi:"u32,name=worker_index" json:"worker_index,omitempty"` 3540 LcoreID uint32 `binapi:"u32,name=lcore_id" json:"lcore_id,omitempty"` 3541 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 3542 } 3543 3544 func (m *Nat44EiWorkerDetails) Reset() { *m = Nat44EiWorkerDetails{} } 3545 func (*Nat44EiWorkerDetails) GetMessageName() string { return "nat44_ei_worker_details" } 3546 func (*Nat44EiWorkerDetails) GetCrcString() string { return "84bf06fc" } 3547 func (*Nat44EiWorkerDetails) GetMessageType() api.MessageType { 3548 return api.ReplyMessage 3549 } 3550 3551 func (m *Nat44EiWorkerDetails) Size() (size int) { 3552 if m == nil { 3553 return 0 3554 } 3555 size += 4 // m.WorkerIndex 3556 size += 4 // m.LcoreID 3557 size += 64 // m.Name 3558 return size 3559 } 3560 func (m *Nat44EiWorkerDetails) Marshal(b []byte) ([]byte, error) { 3561 if b == nil { 3562 b = make([]byte, m.Size()) 3563 } 3564 buf := codec.NewBuffer(b) 3565 buf.EncodeUint32(m.WorkerIndex) 3566 buf.EncodeUint32(m.LcoreID) 3567 buf.EncodeString(m.Name, 64) 3568 return buf.Bytes(), nil 3569 } 3570 func (m *Nat44EiWorkerDetails) Unmarshal(b []byte) error { 3571 buf := codec.NewBuffer(b) 3572 m.WorkerIndex = buf.DecodeUint32() 3573 m.LcoreID = buf.DecodeUint32() 3574 m.Name = buf.DecodeString(64) 3575 return nil 3576 } 3577 3578 // Dump NAT workers 3579 // Nat44EiWorkerDump defines message 'nat44_ei_worker_dump'. 3580 // InProgress: the message form may change in the future versions 3581 type Nat44EiWorkerDump struct{} 3582 3583 func (m *Nat44EiWorkerDump) Reset() { *m = Nat44EiWorkerDump{} } 3584 func (*Nat44EiWorkerDump) GetMessageName() string { return "nat44_ei_worker_dump" } 3585 func (*Nat44EiWorkerDump) GetCrcString() string { return "51077d14" } 3586 func (*Nat44EiWorkerDump) GetMessageType() api.MessageType { 3587 return api.RequestMessage 3588 } 3589 3590 func (m *Nat44EiWorkerDump) Size() (size int) { 3591 if m == nil { 3592 return 0 3593 } 3594 return size 3595 } 3596 func (m *Nat44EiWorkerDump) Marshal(b []byte) ([]byte, error) { 3597 if b == nil { 3598 b = make([]byte, m.Size()) 3599 } 3600 buf := codec.NewBuffer(b) 3601 return buf.Bytes(), nil 3602 } 3603 func (m *Nat44EiWorkerDump) Unmarshal(b []byte) error { 3604 return nil 3605 } 3606 3607 func init() { file_nat44_ei_binapi_init() } 3608 func file_nat44_ei_binapi_init() { 3609 api.RegisterMessage((*Nat44EiAddDelAddressRange)(nil), "nat44_ei_add_del_address_range_35f21abc") 3610 api.RegisterMessage((*Nat44EiAddDelAddressRangeReply)(nil), "nat44_ei_add_del_address_range_reply_e8d4e804") 3611 api.RegisterMessage((*Nat44EiAddDelIdentityMapping)(nil), "nat44_ei_add_del_identity_mapping_cb8606b9") 3612 api.RegisterMessage((*Nat44EiAddDelIdentityMappingReply)(nil), "nat44_ei_add_del_identity_mapping_reply_e8d4e804") 3613 api.RegisterMessage((*Nat44EiAddDelInterfaceAddr)(nil), "nat44_ei_add_del_interface_addr_883abbcc") 3614 api.RegisterMessage((*Nat44EiAddDelInterfaceAddrReply)(nil), "nat44_ei_add_del_interface_addr_reply_e8d4e804") 3615 api.RegisterMessage((*Nat44EiAddDelOutputInterface)(nil), "nat44_ei_add_del_output_interface_47d6e753") 3616 api.RegisterMessage((*Nat44EiAddDelOutputInterfaceReply)(nil), "nat44_ei_add_del_output_interface_reply_e8d4e804") 3617 api.RegisterMessage((*Nat44EiAddDelStaticMapping)(nil), "nat44_ei_add_del_static_mapping_b404b7fe") 3618 api.RegisterMessage((*Nat44EiAddDelStaticMappingReply)(nil), "nat44_ei_add_del_static_mapping_reply_e8d4e804") 3619 api.RegisterMessage((*Nat44EiAddressDetails)(nil), "nat44_ei_address_details_318f1202") 3620 api.RegisterMessage((*Nat44EiAddressDump)(nil), "nat44_ei_address_dump_51077d14") 3621 api.RegisterMessage((*Nat44EiDelSession)(nil), "nat44_ei_del_session_74969ffe") 3622 api.RegisterMessage((*Nat44EiDelSessionReply)(nil), "nat44_ei_del_session_reply_e8d4e804") 3623 api.RegisterMessage((*Nat44EiDelUser)(nil), "nat44_ei_del_user_99a9f998") 3624 api.RegisterMessage((*Nat44EiDelUserReply)(nil), "nat44_ei_del_user_reply_e8d4e804") 3625 api.RegisterMessage((*Nat44EiForwardingEnableDisable)(nil), "nat44_ei_forwarding_enable_disable_b3e225d2") 3626 api.RegisterMessage((*Nat44EiForwardingEnableDisableReply)(nil), "nat44_ei_forwarding_enable_disable_reply_e8d4e804") 3627 api.RegisterMessage((*Nat44EiGetAddrAndPortAllocAlg)(nil), "nat44_ei_get_addr_and_port_alloc_alg_51077d14") 3628 api.RegisterMessage((*Nat44EiGetAddrAndPortAllocAlgReply)(nil), "nat44_ei_get_addr_and_port_alloc_alg_reply_3607a7d0") 3629 api.RegisterMessage((*Nat44EiGetMssClamping)(nil), "nat44_ei_get_mss_clamping_51077d14") 3630 api.RegisterMessage((*Nat44EiGetMssClampingReply)(nil), "nat44_ei_get_mss_clamping_reply_1c0b2a78") 3631 api.RegisterMessage((*Nat44EiHaFlush)(nil), "nat44_ei_ha_flush_51077d14") 3632 api.RegisterMessage((*Nat44EiHaFlushReply)(nil), "nat44_ei_ha_flush_reply_e8d4e804") 3633 api.RegisterMessage((*Nat44EiHaGetFailover)(nil), "nat44_ei_ha_get_failover_51077d14") 3634 api.RegisterMessage((*Nat44EiHaGetFailoverReply)(nil), "nat44_ei_ha_get_failover_reply_a67d8752") 3635 api.RegisterMessage((*Nat44EiHaGetListener)(nil), "nat44_ei_ha_get_listener_51077d14") 3636 api.RegisterMessage((*Nat44EiHaGetListenerReply)(nil), "nat44_ei_ha_get_listener_reply_123ea41f") 3637 api.RegisterMessage((*Nat44EiHaResync)(nil), "nat44_ei_ha_resync_c8ab9e03") 3638 api.RegisterMessage((*Nat44EiHaResyncCompletedEvent)(nil), "nat44_ei_ha_resync_completed_event_fdc598fb") 3639 api.RegisterMessage((*Nat44EiHaResyncReply)(nil), "nat44_ei_ha_resync_reply_e8d4e804") 3640 api.RegisterMessage((*Nat44EiHaSetFailover)(nil), "nat44_ei_ha_set_failover_718246af") 3641 api.RegisterMessage((*Nat44EiHaSetFailoverReply)(nil), "nat44_ei_ha_set_failover_reply_e8d4e804") 3642 api.RegisterMessage((*Nat44EiHaSetListener)(nil), "nat44_ei_ha_set_listener_e4a8cb4e") 3643 api.RegisterMessage((*Nat44EiHaSetListenerReply)(nil), "nat44_ei_ha_set_listener_reply_e8d4e804") 3644 api.RegisterMessage((*Nat44EiIdentityMappingDetails)(nil), "nat44_ei_identity_mapping_details_30d53e26") 3645 api.RegisterMessage((*Nat44EiIdentityMappingDump)(nil), "nat44_ei_identity_mapping_dump_51077d14") 3646 api.RegisterMessage((*Nat44EiInterfaceAddDelFeature)(nil), "nat44_ei_interface_add_del_feature_63a2db8b") 3647 api.RegisterMessage((*Nat44EiInterfaceAddDelFeatureReply)(nil), "nat44_ei_interface_add_del_feature_reply_e8d4e804") 3648 api.RegisterMessage((*Nat44EiInterfaceAddDelOutputFeature)(nil), "nat44_ei_interface_add_del_output_feature_63a2db8b") 3649 api.RegisterMessage((*Nat44EiInterfaceAddDelOutputFeatureReply)(nil), "nat44_ei_interface_add_del_output_feature_reply_e8d4e804") 3650 api.RegisterMessage((*Nat44EiInterfaceAddrDetails)(nil), "nat44_ei_interface_addr_details_0b45011c") 3651 api.RegisterMessage((*Nat44EiInterfaceAddrDump)(nil), "nat44_ei_interface_addr_dump_51077d14") 3652 api.RegisterMessage((*Nat44EiInterfaceDetails)(nil), "nat44_ei_interface_details_f446e508") 3653 api.RegisterMessage((*Nat44EiInterfaceDump)(nil), "nat44_ei_interface_dump_51077d14") 3654 api.RegisterMessage((*Nat44EiInterfaceOutputFeatureDetails)(nil), "nat44_ei_interface_output_feature_details_f446e508") 3655 api.RegisterMessage((*Nat44EiInterfaceOutputFeatureDump)(nil), "nat44_ei_interface_output_feature_dump_51077d14") 3656 api.RegisterMessage((*Nat44EiIpfixEnableDisable)(nil), "nat44_ei_ipfix_enable_disable_9af4a2d2") 3657 api.RegisterMessage((*Nat44EiIpfixEnableDisableReply)(nil), "nat44_ei_ipfix_enable_disable_reply_e8d4e804") 3658 api.RegisterMessage((*Nat44EiOutputInterfaceDetails)(nil), "nat44_ei_output_interface_details_0b45011c") 3659 api.RegisterMessage((*Nat44EiOutputInterfaceGet)(nil), "nat44_ei_output_interface_get_f75ba505") 3660 api.RegisterMessage((*Nat44EiOutputInterfaceGetReply)(nil), "nat44_ei_output_interface_get_reply_53b48f5d") 3661 api.RegisterMessage((*Nat44EiPluginEnableDisable)(nil), "nat44_ei_plugin_enable_disable_bf692144") 3662 api.RegisterMessage((*Nat44EiPluginEnableDisableReply)(nil), "nat44_ei_plugin_enable_disable_reply_e8d4e804") 3663 api.RegisterMessage((*Nat44EiSetAddrAndPortAllocAlg)(nil), "nat44_ei_set_addr_and_port_alloc_alg_deeb746f") 3664 api.RegisterMessage((*Nat44EiSetAddrAndPortAllocAlgReply)(nil), "nat44_ei_set_addr_and_port_alloc_alg_reply_e8d4e804") 3665 api.RegisterMessage((*Nat44EiSetFqOptions)(nil), "nat44_ei_set_fq_options_2399bd71") 3666 api.RegisterMessage((*Nat44EiSetFqOptionsReply)(nil), "nat44_ei_set_fq_options_reply_e8d4e804") 3667 api.RegisterMessage((*Nat44EiSetLogLevel)(nil), "nat44_ei_set_log_level_70076bfe") 3668 api.RegisterMessage((*Nat44EiSetLogLevelReply)(nil), "nat44_ei_set_log_level_reply_e8d4e804") 3669 api.RegisterMessage((*Nat44EiSetMssClamping)(nil), "nat44_ei_set_mss_clamping_25e90abb") 3670 api.RegisterMessage((*Nat44EiSetMssClampingReply)(nil), "nat44_ei_set_mss_clamping_reply_e8d4e804") 3671 api.RegisterMessage((*Nat44EiSetTimeouts)(nil), "nat44_ei_set_timeouts_d4746b16") 3672 api.RegisterMessage((*Nat44EiSetTimeoutsReply)(nil), "nat44_ei_set_timeouts_reply_e8d4e804") 3673 api.RegisterMessage((*Nat44EiSetWorkers)(nil), "nat44_ei_set_workers_da926638") 3674 api.RegisterMessage((*Nat44EiSetWorkersReply)(nil), "nat44_ei_set_workers_reply_e8d4e804") 3675 api.RegisterMessage((*Nat44EiShowFqOptions)(nil), "nat44_ei_show_fq_options_51077d14") 3676 api.RegisterMessage((*Nat44EiShowFqOptionsReply)(nil), "nat44_ei_show_fq_options_reply_7213b545") 3677 api.RegisterMessage((*Nat44EiShowRunningConfig)(nil), "nat44_ei_show_running_config_51077d14") 3678 api.RegisterMessage((*Nat44EiShowRunningConfigReply)(nil), "nat44_ei_show_running_config_reply_41b66a81") 3679 api.RegisterMessage((*Nat44EiStaticMappingDetails)(nil), "nat44_ei_static_mapping_details_6b51ca6e") 3680 api.RegisterMessage((*Nat44EiStaticMappingDump)(nil), "nat44_ei_static_mapping_dump_51077d14") 3681 api.RegisterMessage((*Nat44EiUserDetails)(nil), "nat44_ei_user_details_355896c2") 3682 api.RegisterMessage((*Nat44EiUserDump)(nil), "nat44_ei_user_dump_51077d14") 3683 api.RegisterMessage((*Nat44EiUserSessionDetails)(nil), "nat44_ei_user_session_details_19b7c0ac") 3684 api.RegisterMessage((*Nat44EiUserSessionDump)(nil), "nat44_ei_user_session_dump_e1899c98") 3685 api.RegisterMessage((*Nat44EiUserSessionV2Details)(nil), "nat44_ei_user_session_v2_details_5bd3e9d6") 3686 api.RegisterMessage((*Nat44EiUserSessionV2Dump)(nil), "nat44_ei_user_session_v2_dump_e1899c98") 3687 api.RegisterMessage((*Nat44EiWorkerDetails)(nil), "nat44_ei_worker_details_84bf06fc") 3688 api.RegisterMessage((*Nat44EiWorkerDump)(nil), "nat44_ei_worker_dump_51077d14") 3689 } 3690 3691 // Messages returns list of all messages in this module. 3692 func AllMessages() []api.Message { 3693 return []api.Message{ 3694 (*Nat44EiAddDelAddressRange)(nil), 3695 (*Nat44EiAddDelAddressRangeReply)(nil), 3696 (*Nat44EiAddDelIdentityMapping)(nil), 3697 (*Nat44EiAddDelIdentityMappingReply)(nil), 3698 (*Nat44EiAddDelInterfaceAddr)(nil), 3699 (*Nat44EiAddDelInterfaceAddrReply)(nil), 3700 (*Nat44EiAddDelOutputInterface)(nil), 3701 (*Nat44EiAddDelOutputInterfaceReply)(nil), 3702 (*Nat44EiAddDelStaticMapping)(nil), 3703 (*Nat44EiAddDelStaticMappingReply)(nil), 3704 (*Nat44EiAddressDetails)(nil), 3705 (*Nat44EiAddressDump)(nil), 3706 (*Nat44EiDelSession)(nil), 3707 (*Nat44EiDelSessionReply)(nil), 3708 (*Nat44EiDelUser)(nil), 3709 (*Nat44EiDelUserReply)(nil), 3710 (*Nat44EiForwardingEnableDisable)(nil), 3711 (*Nat44EiForwardingEnableDisableReply)(nil), 3712 (*Nat44EiGetAddrAndPortAllocAlg)(nil), 3713 (*Nat44EiGetAddrAndPortAllocAlgReply)(nil), 3714 (*Nat44EiGetMssClamping)(nil), 3715 (*Nat44EiGetMssClampingReply)(nil), 3716 (*Nat44EiHaFlush)(nil), 3717 (*Nat44EiHaFlushReply)(nil), 3718 (*Nat44EiHaGetFailover)(nil), 3719 (*Nat44EiHaGetFailoverReply)(nil), 3720 (*Nat44EiHaGetListener)(nil), 3721 (*Nat44EiHaGetListenerReply)(nil), 3722 (*Nat44EiHaResync)(nil), 3723 (*Nat44EiHaResyncCompletedEvent)(nil), 3724 (*Nat44EiHaResyncReply)(nil), 3725 (*Nat44EiHaSetFailover)(nil), 3726 (*Nat44EiHaSetFailoverReply)(nil), 3727 (*Nat44EiHaSetListener)(nil), 3728 (*Nat44EiHaSetListenerReply)(nil), 3729 (*Nat44EiIdentityMappingDetails)(nil), 3730 (*Nat44EiIdentityMappingDump)(nil), 3731 (*Nat44EiInterfaceAddDelFeature)(nil), 3732 (*Nat44EiInterfaceAddDelFeatureReply)(nil), 3733 (*Nat44EiInterfaceAddDelOutputFeature)(nil), 3734 (*Nat44EiInterfaceAddDelOutputFeatureReply)(nil), 3735 (*Nat44EiInterfaceAddrDetails)(nil), 3736 (*Nat44EiInterfaceAddrDump)(nil), 3737 (*Nat44EiInterfaceDetails)(nil), 3738 (*Nat44EiInterfaceDump)(nil), 3739 (*Nat44EiInterfaceOutputFeatureDetails)(nil), 3740 (*Nat44EiInterfaceOutputFeatureDump)(nil), 3741 (*Nat44EiIpfixEnableDisable)(nil), 3742 (*Nat44EiIpfixEnableDisableReply)(nil), 3743 (*Nat44EiOutputInterfaceDetails)(nil), 3744 (*Nat44EiOutputInterfaceGet)(nil), 3745 (*Nat44EiOutputInterfaceGetReply)(nil), 3746 (*Nat44EiPluginEnableDisable)(nil), 3747 (*Nat44EiPluginEnableDisableReply)(nil), 3748 (*Nat44EiSetAddrAndPortAllocAlg)(nil), 3749 (*Nat44EiSetAddrAndPortAllocAlgReply)(nil), 3750 (*Nat44EiSetFqOptions)(nil), 3751 (*Nat44EiSetFqOptionsReply)(nil), 3752 (*Nat44EiSetLogLevel)(nil), 3753 (*Nat44EiSetLogLevelReply)(nil), 3754 (*Nat44EiSetMssClamping)(nil), 3755 (*Nat44EiSetMssClampingReply)(nil), 3756 (*Nat44EiSetTimeouts)(nil), 3757 (*Nat44EiSetTimeoutsReply)(nil), 3758 (*Nat44EiSetWorkers)(nil), 3759 (*Nat44EiSetWorkersReply)(nil), 3760 (*Nat44EiShowFqOptions)(nil), 3761 (*Nat44EiShowFqOptionsReply)(nil), 3762 (*Nat44EiShowRunningConfig)(nil), 3763 (*Nat44EiShowRunningConfigReply)(nil), 3764 (*Nat44EiStaticMappingDetails)(nil), 3765 (*Nat44EiStaticMappingDump)(nil), 3766 (*Nat44EiUserDetails)(nil), 3767 (*Nat44EiUserDump)(nil), 3768 (*Nat44EiUserSessionDetails)(nil), 3769 (*Nat44EiUserSessionDump)(nil), 3770 (*Nat44EiUserSessionV2Details)(nil), 3771 (*Nat44EiUserSessionV2Dump)(nil), 3772 (*Nat44EiWorkerDetails)(nil), 3773 (*Nat44EiWorkerDump)(nil), 3774 } 3775 }