Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University |
| 3 | * Copyright (c) 2011, 2012 Open Networking Foundation |
| 4 | * Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler. |
| 5 | * Copyright 2018, Red Hat, Inc. |
| 6 | */ |
| 7 | // Automatically generated by LOXI from template module.go |
| 8 | // Do not modify |
| 9 | |
| 10 | package of13 |
| 11 | |
| 12 | import ( |
| 13 | "bytes" |
| 14 | "encoding/binary" |
| 15 | "fmt" |
| 16 | "net" |
| 17 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 18 | "github.com/donNewtonAlpha/goloxi" |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 19 | ) |
| 20 | |
| 21 | type OxmId struct { |
| 22 | TypeLen uint32 |
| 23 | } |
| 24 | |
| 25 | type IOxmId interface { |
| 26 | goloxi.Serializable |
| 27 | GetTypeLen() uint32 |
| 28 | GetOXMName() string |
| 29 | } |
| 30 | |
| 31 | func (self *OxmId) GetTypeLen() uint32 { |
| 32 | return self.TypeLen |
| 33 | } |
| 34 | |
| 35 | func (self *OxmId) SetTypeLen(v uint32) { |
| 36 | self.TypeLen = v |
| 37 | } |
| 38 | |
| 39 | func (self *OxmId) Serialize(encoder *goloxi.Encoder) error { |
| 40 | |
| 41 | encoder.PutUint32(uint32(self.TypeLen)) |
| 42 | |
| 43 | return nil |
| 44 | } |
| 45 | |
| 46 | func DecodeOxmId(decoder *goloxi.Decoder) (IOxmId, error) { |
| 47 | _oxmid := &OxmId{} |
| 48 | if decoder.Length() < 4 { |
| 49 | return nil, fmt.Errorf("OxmId packet too short: %d < 4", decoder.Length()) |
| 50 | } |
| 51 | _oxmid.TypeLen = uint32(decoder.ReadUint32()) |
| 52 | |
| 53 | switch _oxmid.TypeLen { |
| 54 | case 110204: |
| 55 | return DecodeOxmIdTunMetadata47(_oxmid, decoder) |
| 56 | case 129026: |
| 57 | return DecodeOxmIdConnTrackingTpSrc(_oxmid, decoder) |
| 58 | case 2147489796: |
| 59 | return DecodeOxmIdIpv4Dst(_oxmid, decoder) |
| 60 | case 77830: |
| 61 | return DecodeOxmIdNdSll(_oxmid, decoder) |
| 62 | case 80897: |
| 63 | return DecodeOxmIdMplsTtl(_oxmid, decoder) |
| 64 | case 73736: |
| 65 | return DecodeOxmIdTunId(_oxmid, decoder) |
| 66 | case 2: |
| 67 | return DecodeOxmIdInPort(_oxmid, decoder) |
| 68 | case 120848: |
| 69 | return DecodeOxmIdConnTrackingLabel(_oxmid, decoder) |
| 70 | case 65540: |
| 71 | return DecodeOxmIdReg0(_oxmid, decoder) |
| 72 | case 111228: |
| 73 | return DecodeOxmIdTunMetadata49(_oxmid, decoder) |
| 74 | case 74758: |
| 75 | return DecodeOxmIdArpTha(_oxmid, decoder) |
| 76 | case 2147499266: |
| 77 | return DecodeOxmIdIcmpv6CodeMasked(_oxmid, decoder) |
| 78 | case 2147503112: |
| 79 | return DecodeOxmIdTunnelId(_oxmid, decoder) |
| 80 | case 112252: |
| 81 | return DecodeOxmIdTunMetadata51(_oxmid, decoder) |
| 82 | case 108024: |
| 83 | return DecodeOxmIdTunMetadata42Masked(_oxmid, decoder) |
| 84 | case 113276: |
| 85 | return DecodeOxmIdTunMetadata53(_oxmid, decoder) |
| 86 | case 109048: |
| 87 | return DecodeOxmIdTunMetadata44Masked(_oxmid, decoder) |
| 88 | case 94332: |
| 89 | return DecodeOxmIdTunMetadata16(_oxmid, decoder) |
| 90 | case 114300: |
| 91 | return DecodeOxmIdTunMetadata55(_oxmid, decoder) |
| 92 | case 2050: |
| 93 | return DecodeOxmIdVlanTci(_oxmid, decoder) |
| 94 | case 3073: |
| 95 | return DecodeOxmIdNwProto(_oxmid, decoder) |
| 96 | case 110072: |
| 97 | return DecodeOxmIdTunMetadata46Masked(_oxmid, decoder) |
| 98 | case 2147502338: |
| 99 | return DecodeOxmIdMplsBosMasked(_oxmid, decoder) |
| 100 | case 66564: |
| 101 | return DecodeOxmIdReg2(_oxmid, decoder) |
| 102 | case 115324: |
| 103 | return DecodeOxmIdTunMetadata57(_oxmid, decoder) |
| 104 | case 2147486722: |
| 105 | return DecodeOxmIdVlanVid(_oxmid, decoder) |
| 106 | case 2147487745: |
| 107 | return DecodeOxmIdIpDscp(_oxmid, decoder) |
| 108 | case 111096: |
| 109 | return DecodeOxmIdTunMetadata48Masked(_oxmid, decoder) |
| 110 | case 83204: |
| 111 | return DecodeOxmIdTcpFlagsMasked(_oxmid, decoder) |
| 112 | case 3588: |
| 113 | return DecodeOxmIdIpSrc(_oxmid, decoder) |
| 114 | case 198660: |
| 115 | return DecodeOxmIdBsnL3InterfaceClassId(_oxmid, decoder) |
| 116 | case 2147488769: |
| 117 | return DecodeOxmIdIpProto(_oxmid, decoder) |
| 118 | case 112120: |
| 119 | return DecodeOxmIdTunMetadata50Masked(_oxmid, decoder) |
| 120 | case 121872: |
| 121 | return DecodeOxmIdTunIpv6Dst(_oxmid, decoder) |
| 122 | case 199172: |
| 123 | return DecodeOxmIdBsnL3SrcClassId(_oxmid, decoder) |
| 124 | case 1030: |
| 125 | return DecodeOxmIdEthSrc(_oxmid, decoder) |
| 126 | case 68612: |
| 127 | return DecodeOxmIdReg6(_oxmid, decoder) |
| 128 | case 117372: |
| 129 | return DecodeOxmIdTunMetadata61(_oxmid, decoder) |
| 130 | case 5122: |
| 131 | return DecodeOxmIdTcpDst(_oxmid, decoder) |
| 132 | case 113144: |
| 133 | return DecodeOxmIdTunMetadata52Masked(_oxmid, decoder) |
| 134 | case 122896: |
| 135 | return DecodeOxmIdXxreg1(_oxmid, decoder) |
| 136 | case 209156: |
| 137 | return DecodeOxmIdBsnInnerVlanVidMasked(_oxmid, decoder) |
| 138 | case 124192: |
| 139 | return DecodeOxmIdXxreg3Masked(_oxmid, decoder) |
| 140 | case 81672: |
| 141 | return DecodeOxmIdTunnelIpv4SrcMasked(_oxmid, decoder) |
| 142 | case 4100: |
| 143 | return DecodeOxmIdIpDst(_oxmid, decoder) |
| 144 | case 118396: |
| 145 | return DecodeOxmIdTunMetadata63(_oxmid, decoder) |
| 146 | case 2147494146: |
| 147 | return DecodeOxmIdIcmpv4CodeMasked(_oxmid, decoder) |
| 148 | case 129284: |
| 149 | return DecodeOxmIdConnTrackingTpSrcMasked(_oxmid, decoder) |
| 150 | case 114168: |
| 151 | return DecodeOxmIdTunMetadata54Masked(_oxmid, decoder) |
| 152 | case 123920: |
| 153 | return DecodeOxmIdXxreg3(_oxmid, decoder) |
| 154 | case 200968: |
| 155 | return DecodeOxmIdBsnUdf0Masked(_oxmid, decoder) |
| 156 | case 78091: |
| 157 | return DecodeOxmIdNdSllMasked(_oxmid, decoder) |
| 158 | case 2147500300: |
| 159 | return DecodeOxmIdIpv6NdSllMasked(_oxmid, decoder) |
| 160 | case 74000: |
| 161 | return DecodeOxmIdTunIdMasked(_oxmid, decoder) |
| 162 | case 86140: |
| 163 | return DecodeOxmIdTunMetadata0(_oxmid, decoder) |
| 164 | case 70660: |
| 165 | return DecodeOxmIdReg10(_oxmid, decoder) |
| 166 | case 121120: |
| 167 | return DecodeOxmIdConnTrackingLabelMasked(_oxmid, decoder) |
| 168 | case 107000: |
| 169 | return DecodeOxmIdTunMetadata40Masked(_oxmid, decoder) |
| 170 | case 3848: |
| 171 | return DecodeOxmIdIpSrcMasked(_oxmid, decoder) |
| 172 | case 87164: |
| 173 | return DecodeOxmIdTunMetadata2(_oxmid, decoder) |
| 174 | case 202756: |
| 175 | return DecodeOxmIdBsnUdf4(_oxmid, decoder) |
| 176 | case 204802: |
| 177 | return DecodeOxmIdBsnTcpFlags(_oxmid, decoder) |
| 178 | case 205825: |
| 179 | return DecodeOxmIdBsnL2CacheHit(_oxmid, decoder) |
| 180 | case 116216: |
| 181 | return DecodeOxmIdTunMetadata58Masked(_oxmid, decoder) |
| 182 | case 199432: |
| 183 | return DecodeOxmIdBsnL3SrcClassIdMasked(_oxmid, decoder) |
| 184 | case 88188: |
| 185 | return DecodeOxmIdTunMetadata4(_oxmid, decoder) |
| 186 | case 203780: |
| 187 | return DecodeOxmIdBsnUdf6(_oxmid, decoder) |
| 188 | case 2147492866: |
| 189 | return DecodeOxmIdSctpDst(_oxmid, decoder) |
| 190 | case 2147493889: |
| 191 | return DecodeOxmIdIcmpv4Code(_oxmid, decoder) |
| 192 | case 117240: |
| 193 | return DecodeOxmIdTunMetadata60Masked(_oxmid, decoder) |
| 194 | case 200196: |
| 195 | return DecodeOxmIdBsnEgrPortGroupId(_oxmid, decoder) |
| 196 | case 128288: |
| 197 | return DecodeOxmIdConnTrackingIpv6SrcMasked(_oxmid, decoder) |
| 198 | case 89212: |
| 199 | return DecodeOxmIdTunMetadata6(_oxmid, decoder) |
| 200 | case 8196: |
| 201 | return DecodeOxmIdArpSpa(_oxmid, decoder) |
| 202 | case 76801: |
| 203 | return DecodeOxmIdIcmpv6Code(_oxmid, decoder) |
| 204 | case 118264: |
| 205 | return DecodeOxmIdTunMetadata62Masked(_oxmid, decoder) |
| 206 | case 70148: |
| 207 | return DecodeOxmIdReg9(_oxmid, decoder) |
| 208 | case 119560: |
| 209 | return DecodeOxmIdConnTrackingStateMasked(_oxmid, decoder) |
| 210 | case 90236: |
| 211 | return DecodeOxmIdTunMetadata8(_oxmid, decoder) |
| 212 | case 119044: |
| 213 | return DecodeOxmIdTunFlagsMasked(_oxmid, decoder) |
| 214 | case 82696: |
| 215 | return DecodeOxmIdPktMarkMasked(_oxmid, decoder) |
| 216 | case 4294923528: |
| 217 | return DecodeOxmIdOvsTcpFlagsMasked(_oxmid, decoder) |
| 218 | case 120584: |
| 219 | return DecodeOxmIdConnTrackingMarkMasked(_oxmid, decoder) |
| 220 | case 91260: |
| 221 | return DecodeOxmIdTunMetadata10(_oxmid, decoder) |
| 222 | case 87032: |
| 223 | return DecodeOxmIdTunMetadata1Masked(_oxmid, decoder) |
| 224 | case 126722: |
| 225 | return DecodeOxmIdConnTrackingNwProtoMasked(_oxmid, decoder) |
| 226 | case 206852: |
| 227 | return DecodeOxmIdBsnIngressPortGroupId(_oxmid, decoder) |
| 228 | case 208898: |
| 229 | return DecodeOxmIdBsnInnerVlanVid(_oxmid, decoder) |
| 230 | case 209921: |
| 231 | return DecodeOxmIdBsnIpFragmentation(_oxmid, decoder) |
| 232 | case 196896: |
| 233 | return DecodeOxmIdBsnInPorts128Masked(_oxmid, decoder) |
| 234 | case 92284: |
| 235 | return DecodeOxmIdTunMetadata12(_oxmid, decoder) |
| 236 | case 88056: |
| 237 | return DecodeOxmIdTunMetadata3Masked(_oxmid, decoder) |
| 238 | case 79873: |
| 239 | return DecodeOxmIdNwEcn(_oxmid, decoder) |
| 240 | case 196624: |
| 241 | return DecodeOxmIdBsnInPorts128(_oxmid, decoder) |
| 242 | case 200456: |
| 243 | return DecodeOxmIdBsnEgrPortGroupIdMasked(_oxmid, decoder) |
| 244 | case 2147489284: |
| 245 | return DecodeOxmIdIpv4Src(_oxmid, decoder) |
| 246 | case 93308: |
| 247 | return DecodeOxmIdTunMetadata14(_oxmid, decoder) |
| 248 | case 115192: |
| 249 | return DecodeOxmIdTunMetadata56Masked(_oxmid, decoder) |
| 250 | case 2561: |
| 251 | return DecodeOxmIdNwTos(_oxmid, decoder) |
| 252 | case 129538: |
| 253 | return DecodeOxmIdConnTrackingTpDst(_oxmid, decoder) |
| 254 | case 2147500550: |
| 255 | return DecodeOxmIdIpv6NdTll(_oxmid, decoder) |
| 256 | case 84484: |
| 257 | return DecodeOxmIdConjId(_oxmid, decoder) |
| 258 | case 74246: |
| 259 | return DecodeOxmIdArpSha(_oxmid, decoder) |
| 260 | case 85762: |
| 261 | return DecodeOxmIdTunGbpFlagsMasked(_oxmid, decoder) |
| 262 | case 123408: |
| 263 | return DecodeOxmIdXxreg2(_oxmid, decoder) |
| 264 | case 90104: |
| 265 | return DecodeOxmIdTunMetadata7Masked(_oxmid, decoder) |
| 266 | case 2147486468: |
| 267 | return DecodeOxmIdEthTypeMasked(_oxmid, decoder) |
| 268 | case 70408: |
| 269 | return DecodeOxmIdReg9Masked(_oxmid, decoder) |
| 270 | case 91128: |
| 271 | return DecodeOxmIdTunMetadata9Masked(_oxmid, decoder) |
| 272 | case 83720: |
| 273 | return DecodeOxmIdDpHashMasked(_oxmid, decoder) |
| 274 | case 2147497988: |
| 275 | return DecodeOxmIdIpv6Flabel(_oxmid, decoder) |
| 276 | case 78603: |
| 277 | return DecodeOxmIdNdTllMasked(_oxmid, decoder) |
| 278 | case 2147503376: |
| 279 | return DecodeOxmIdTunnelIdMasked(_oxmid, decoder) |
| 280 | case 96380: |
| 281 | return DecodeOxmIdTunMetadata20(_oxmid, decoder) |
| 282 | case 92152: |
| 283 | return DecodeOxmIdTunMetadata11Masked(_oxmid, decoder) |
| 284 | case 129796: |
| 285 | return DecodeOxmIdConnTrackingTpDstMasked(_oxmid, decoder) |
| 286 | case 2147502081: |
| 287 | return DecodeOxmIdMplsBos(_oxmid, decoder) |
| 288 | case 97404: |
| 289 | return DecodeOxmIdTunMetadata22(_oxmid, decoder) |
| 290 | case 93176: |
| 291 | return DecodeOxmIdTunMetadata13Masked(_oxmid, decoder) |
| 292 | case 94844: |
| 293 | return DecodeOxmIdTunMetadata17(_oxmid, decoder) |
| 294 | case 81924: |
| 295 | return DecodeOxmIdTunnelIpv4Dst(_oxmid, decoder) |
| 296 | case 127752: |
| 297 | return DecodeOxmIdConnTrackingNwDstMasked(_oxmid, decoder) |
| 298 | case 98428: |
| 299 | return DecodeOxmIdTunMetadata24(_oxmid, decoder) |
| 300 | case 94200: |
| 301 | return DecodeOxmIdTunMetadata15Masked(_oxmid, decoder) |
| 302 | case 2147501060: |
| 303 | return DecodeOxmIdMplsLabel(_oxmid, decoder) |
| 304 | case 84994: |
| 305 | return DecodeOxmIdTunGbpId(_oxmid, decoder) |
| 306 | case 71432: |
| 307 | return DecodeOxmIdReg11Masked(_oxmid, decoder) |
| 308 | case 99452: |
| 309 | return DecodeOxmIdTunMetadata26(_oxmid, decoder) |
| 310 | case 95224: |
| 311 | return DecodeOxmIdTunMetadata17Masked(_oxmid, decoder) |
| 312 | case 2147500038: |
| 313 | return DecodeOxmIdIpv6NdSll(_oxmid, decoder) |
| 314 | case 83972: |
| 315 | return DecodeOxmIdRecircId(_oxmid, decoder) |
| 316 | case 128800: |
| 317 | return DecodeOxmIdConnTrackingIpv6DstMasked(_oxmid, decoder) |
| 318 | case 72196: |
| 319 | return DecodeOxmIdReg13(_oxmid, decoder) |
| 320 | case 100476: |
| 321 | return DecodeOxmIdTunMetadata28(_oxmid, decoder) |
| 322 | case 96248: |
| 323 | return DecodeOxmIdTunMetadata19Masked(_oxmid, decoder) |
| 324 | case 2147488514: |
| 325 | return DecodeOxmIdIpEcnMasked(_oxmid, decoder) |
| 326 | case 112764: |
| 327 | return DecodeOxmIdTunMetadata52(_oxmid, decoder) |
| 328 | case 101500: |
| 329 | return DecodeOxmIdTunMetadata30(_oxmid, decoder) |
| 330 | case 97272: |
| 331 | return DecodeOxmIdTunMetadata21Masked(_oxmid, decoder) |
| 332 | case 2147498754: |
| 333 | return DecodeOxmIdIcmpv6TypeMasked(_oxmid, decoder) |
| 334 | case 209668: |
| 335 | return DecodeOxmIdBsnVfiMasked(_oxmid, decoder) |
| 336 | case 2147484424: |
| 337 | return DecodeOxmIdInPhyPortMasked(_oxmid, decoder) |
| 338 | case 74507: |
| 339 | return DecodeOxmIdArpShaMasked(_oxmid, decoder) |
| 340 | case 2147500812: |
| 341 | return DecodeOxmIdIpv6NdTllMasked(_oxmid, decoder) |
| 342 | case 197384: |
| 343 | return DecodeOxmIdBsnLagIdMasked(_oxmid, decoder) |
| 344 | case 76064: |
| 345 | return DecodeOxmIdIpv6DstMasked(_oxmid, decoder) |
| 346 | case 102524: |
| 347 | return DecodeOxmIdTunMetadata32(_oxmid, decoder) |
| 348 | case 98296: |
| 349 | return DecodeOxmIdTunMetadata23Masked(_oxmid, decoder) |
| 350 | case 4868: |
| 351 | return DecodeOxmIdTcpSrcMasked(_oxmid, decoder) |
| 352 | case 121632: |
| 353 | return DecodeOxmIdTunIpv6SrcMasked(_oxmid, decoder) |
| 354 | case 75792: |
| 355 | return DecodeOxmIdIpv6Dst(_oxmid, decoder) |
| 356 | case 202504: |
| 357 | return DecodeOxmIdBsnUdf3Masked(_oxmid, decoder) |
| 358 | case 120324: |
| 359 | return DecodeOxmIdConnTrackingMark(_oxmid, decoder) |
| 360 | case 99320: |
| 361 | return DecodeOxmIdTunMetadata25Masked(_oxmid, decoder) |
| 362 | case 65800: |
| 363 | return DecodeOxmIdReg0Masked(_oxmid, decoder) |
| 364 | case 66824: |
| 365 | return DecodeOxmIdReg2Masked(_oxmid, decoder) |
| 366 | case 72456: |
| 367 | return DecodeOxmIdReg13Masked(_oxmid, decoder) |
| 368 | case 68360: |
| 369 | return DecodeOxmIdReg5Masked(_oxmid, decoder) |
| 370 | case 104572: |
| 371 | return DecodeOxmIdTunMetadata36(_oxmid, decoder) |
| 372 | case 95356: |
| 373 | return DecodeOxmIdTunMetadata18(_oxmid, decoder) |
| 374 | case 100344: |
| 375 | return DecodeOxmIdTunMetadata27Masked(_oxmid, decoder) |
| 376 | case 4294923270: |
| 377 | return DecodeOxmIdOvsTcpFlags(_oxmid, decoder) |
| 378 | case 779: |
| 379 | return DecodeOxmIdEthDstMasked(_oxmid, decoder) |
| 380 | case 69384: |
| 381 | return DecodeOxmIdReg7Masked(_oxmid, decoder) |
| 382 | case 105596: |
| 383 | return DecodeOxmIdTunMetadata38(_oxmid, decoder) |
| 384 | case 101368: |
| 385 | return DecodeOxmIdTunMetadata29Masked(_oxmid, decoder) |
| 386 | case 2147493634: |
| 387 | return DecodeOxmIdIcmpv4TypeMasked(_oxmid, decoder) |
| 388 | case 108668: |
| 389 | return DecodeOxmIdTunMetadata44(_oxmid, decoder) |
| 390 | case 201480: |
| 391 | return DecodeOxmIdBsnUdf1Masked(_oxmid, decoder) |
| 392 | case 106620: |
| 393 | return DecodeOxmIdTunMetadata40(_oxmid, decoder) |
| 394 | case 102392: |
| 395 | return DecodeOxmIdTunMetadata31Masked(_oxmid, decoder) |
| 396 | case 2147492612: |
| 397 | return DecodeOxmIdSctpSrcMasked(_oxmid, decoder) |
| 398 | case 72708: |
| 399 | return DecodeOxmIdReg14(_oxmid, decoder) |
| 400 | case 73480: |
| 401 | return DecodeOxmIdReg15Masked(_oxmid, decoder) |
| 402 | case 204292: |
| 403 | return DecodeOxmIdBsnUdf7(_oxmid, decoder) |
| 404 | case 2147489544: |
| 405 | return DecodeOxmIdIpv4SrcMasked(_oxmid, decoder) |
| 406 | case 107644: |
| 407 | return DecodeOxmIdTunMetadata42(_oxmid, decoder) |
| 408 | case 103416: |
| 409 | return DecodeOxmIdTunMetadata33Masked(_oxmid, decoder) |
| 410 | case 2147498248: |
| 411 | return DecodeOxmIdIpv6FlabelMasked(_oxmid, decoder) |
| 412 | case 203528: |
| 413 | return DecodeOxmIdBsnUdf5Masked(_oxmid, decoder) |
| 414 | case 89592: |
| 415 | return DecodeOxmIdTunMetadata6Masked(_oxmid, decoder) |
| 416 | case 104440: |
| 417 | return DecodeOxmIdTunMetadata35Masked(_oxmid, decoder) |
| 418 | case 2147494660: |
| 419 | return DecodeOxmIdArpOpMasked(_oxmid, decoder) |
| 420 | case 197636: |
| 421 | return DecodeOxmIdBsnVrf(_oxmid, decoder) |
| 422 | case 204552: |
| 423 | return DecodeOxmIdBsnUdf7Masked(_oxmid, decoder) |
| 424 | case 109692: |
| 425 | return DecodeOxmIdTunMetadata46(_oxmid, decoder) |
| 426 | case 105464: |
| 427 | return DecodeOxmIdTunMetadata37Masked(_oxmid, decoder) |
| 428 | case 89080: |
| 429 | return DecodeOxmIdTunMetadata5Masked(_oxmid, decoder) |
| 430 | case 67588: |
| 431 | return DecodeOxmIdReg4(_oxmid, decoder) |
| 432 | case 7169: |
| 433 | return DecodeOxmIdIcmpCode(_oxmid, decoder) |
| 434 | case 82946: |
| 435 | return DecodeOxmIdTcpFlags(_oxmid, decoder) |
| 436 | case 199684: |
| 437 | return DecodeOxmIdBsnL3DstClassId(_oxmid, decoder) |
| 438 | case 207878: |
| 439 | return DecodeOxmIdBsnInnerEthDst(_oxmid, decoder) |
| 440 | case 198145: |
| 441 | return DecodeOxmIdBsnGlobalVrfAllowed(_oxmid, decoder) |
| 442 | case 2147484680: |
| 443 | return DecodeOxmIdMetadata(_oxmid, decoder) |
| 444 | case 1538: |
| 445 | return DecodeOxmIdEthType(_oxmid, decoder) |
| 446 | case 8968: |
| 447 | return DecodeOxmIdArpTpaMasked(_oxmid, decoder) |
| 448 | case 128016: |
| 449 | return DecodeOxmIdConnTrackingIpv6Src(_oxmid, decoder) |
| 450 | case 110716: |
| 451 | return DecodeOxmIdTunMetadata48(_oxmid, decoder) |
| 452 | case 127492: |
| 453 | return DecodeOxmIdConnTrackingNwDst(_oxmid, decoder) |
| 454 | case 78342: |
| 455 | return DecodeOxmIdNdTll(_oxmid, decoder) |
| 456 | case 111740: |
| 457 | return DecodeOxmIdTunMetadata50(_oxmid, decoder) |
| 458 | case 107512: |
| 459 | return DecodeOxmIdTunMetadata41Masked(_oxmid, decoder) |
| 460 | case 207624: |
| 461 | return DecodeOxmIdBsnVxlanNetworkIdMasked(_oxmid, decoder) |
| 462 | case 121360: |
| 463 | return DecodeOxmIdTunIpv6Src(_oxmid, decoder) |
| 464 | case 113788: |
| 465 | return DecodeOxmIdTunMetadata54(_oxmid, decoder) |
| 466 | case 109560: |
| 467 | return DecodeOxmIdTunMetadata45Masked(_oxmid, decoder) |
| 468 | case 2147501826: |
| 469 | return DecodeOxmIdMplsTcMasked(_oxmid, decoder) |
| 470 | case 103548: |
| 471 | return DecodeOxmIdTunMetadata34(_oxmid, decoder) |
| 472 | case 2147484164: |
| 473 | return DecodeOxmIdInPhyPort(_oxmid, decoder) |
| 474 | case 205316: |
| 475 | return DecodeOxmIdBsnVlanXlatePortGroupId(_oxmid, decoder) |
| 476 | case 114812: |
| 477 | return DecodeOxmIdTunMetadata56(_oxmid, decoder) |
| 478 | case 2147487233: |
| 479 | return DecodeOxmIdVlanPcp(_oxmid, decoder) |
| 480 | case 110584: |
| 481 | return DecodeOxmIdTunMetadata47Masked(_oxmid, decoder) |
| 482 | case 79624: |
| 483 | return DecodeOxmIdIpv6LabelMasked(_oxmid, decoder) |
| 484 | case 115836: |
| 485 | return DecodeOxmIdTunMetadata58(_oxmid, decoder) |
| 486 | case 2147488257: |
| 487 | return DecodeOxmIdIpEcn(_oxmid, decoder) |
| 488 | case 111608: |
| 489 | return DecodeOxmIdTunMetadata49Masked(_oxmid, decoder) |
| 490 | case 518: |
| 491 | return DecodeOxmIdEthDst(_oxmid, decoder) |
| 492 | case 68100: |
| 493 | return DecodeOxmIdReg5(_oxmid, decoder) |
| 494 | case 116860: |
| 495 | return DecodeOxmIdTunMetadata60(_oxmid, decoder) |
| 496 | case 4610: |
| 497 | return DecodeOxmIdTcpSrc(_oxmid, decoder) |
| 498 | case 112632: |
| 499 | return DecodeOxmIdTunMetadata51Masked(_oxmid, decoder) |
| 500 | case 122384: |
| 501 | return DecodeOxmIdXxreg0(_oxmid, decoder) |
| 502 | case 123680: |
| 503 | return DecodeOxmIdXxreg2Masked(_oxmid, decoder) |
| 504 | case 69124: |
| 505 | return DecodeOxmIdReg7(_oxmid, decoder) |
| 506 | case 117884: |
| 507 | return DecodeOxmIdTunMetadata62(_oxmid, decoder) |
| 508 | case 5634: |
| 509 | return DecodeOxmIdUdpSrc(_oxmid, decoder) |
| 510 | case 6657: |
| 511 | return DecodeOxmIdIcmpType(_oxmid, decoder) |
| 512 | case 113656: |
| 513 | return DecodeOxmIdTunMetadata53Masked(_oxmid, decoder) |
| 514 | case 2147503876: |
| 515 | return DecodeOxmIdIpv6ExthdrMasked(_oxmid, decoder) |
| 516 | case 198920: |
| 517 | return DecodeOxmIdBsnL3InterfaceClassIdMasked(_oxmid, decoder) |
| 518 | case 2147489026: |
| 519 | return DecodeOxmIdIpProtoMasked(_oxmid, decoder) |
| 520 | case 120068: |
| 521 | return DecodeOxmIdConnTrackingZoneMasked(_oxmid, decoder) |
| 522 | case 1286: |
| 523 | return DecodeOxmIdEthSrcMasked(_oxmid, decoder) |
| 524 | case 204040: |
| 525 | return DecodeOxmIdBsnUdf6Masked(_oxmid, decoder) |
| 526 | case 75019: |
| 527 | return DecodeOxmIdArpThaMasked(_oxmid, decoder) |
| 528 | case 208140: |
| 529 | return DecodeOxmIdBsnInnerEthDstMasked(_oxmid, decoder) |
| 530 | case 201220: |
| 531 | return DecodeOxmIdBsnUdf1(_oxmid, decoder) |
| 532 | case 205576: |
| 533 | return DecodeOxmIdBsnVlanXlatePortGroupIdMasked(_oxmid, decoder) |
| 534 | case 2147484944: |
| 535 | return DecodeOxmIdMetadataMasked(_oxmid, decoder) |
| 536 | case 6146: |
| 537 | return DecodeOxmIdUdpDst(_oxmid, decoder) |
| 538 | case 114680: |
| 539 | return DecodeOxmIdTunMetadata55Masked(_oxmid, decoder) |
| 540 | case 122144: |
| 541 | return DecodeOxmIdTunIpv6DstMasked(_oxmid, decoder) |
| 542 | case 86652: |
| 543 | return DecodeOxmIdTunMetadata1(_oxmid, decoder) |
| 544 | case 202244: |
| 545 | return DecodeOxmIdBsnUdf3(_oxmid, decoder) |
| 546 | case 115704: |
| 547 | return DecodeOxmIdTunMetadata57Masked(_oxmid, decoder) |
| 548 | case 69636: |
| 549 | return DecodeOxmIdReg8(_oxmid, decoder) |
| 550 | case 87676: |
| 551 | return DecodeOxmIdTunMetadata3(_oxmid, decoder) |
| 552 | case 82184: |
| 553 | return DecodeOxmIdTunnelIpv4DstMasked(_oxmid, decoder) |
| 554 | case 203268: |
| 555 | return DecodeOxmIdBsnUdf5(_oxmid, decoder) |
| 556 | case 2147492354: |
| 557 | return DecodeOxmIdSctpSrc(_oxmid, decoder) |
| 558 | case 2147493377: |
| 559 | return DecodeOxmIdIcmpv4Type(_oxmid, decoder) |
| 560 | case 116728: |
| 561 | return DecodeOxmIdTunMetadata59Masked(_oxmid, decoder) |
| 562 | case 88700: |
| 563 | return DecodeOxmIdTunMetadata5(_oxmid, decoder) |
| 564 | case 73220: |
| 565 | return DecodeOxmIdReg15(_oxmid, decoder) |
| 566 | case 76289: |
| 567 | return DecodeOxmIdIcmpv6Type(_oxmid, decoder) |
| 568 | case 117752: |
| 569 | return DecodeOxmIdTunMetadata61Masked(_oxmid, decoder) |
| 570 | case 4360: |
| 571 | return DecodeOxmIdIpDstMasked(_oxmid, decoder) |
| 572 | case 89724: |
| 573 | return DecodeOxmIdTunMetadata7(_oxmid, decoder) |
| 574 | case 8708: |
| 575 | return DecodeOxmIdArpTpa(_oxmid, decoder) |
| 576 | case 118776: |
| 577 | return DecodeOxmIdTunMetadata63Masked(_oxmid, decoder) |
| 578 | case 199944: |
| 579 | return DecodeOxmIdBsnL3DstClassIdMasked(_oxmid, decoder) |
| 580 | case 90748: |
| 581 | return DecodeOxmIdTunMetadata9(_oxmid, decoder) |
| 582 | case 86520: |
| 583 | return DecodeOxmIdTunMetadata0Masked(_oxmid, decoder) |
| 584 | case 2147487490: |
| 585 | return DecodeOxmIdVlanPcpMasked(_oxmid, decoder) |
| 586 | case 2147501320: |
| 587 | return DecodeOxmIdMplsLabelMasked(_oxmid, decoder) |
| 588 | case 197124: |
| 589 | return DecodeOxmIdBsnLagId(_oxmid, decoder) |
| 590 | case 78849: |
| 591 | return DecodeOxmIdIpFrag(_oxmid, decoder) |
| 592 | case 200708: |
| 593 | return DecodeOxmIdBsnUdf0(_oxmid, decoder) |
| 594 | case 91772: |
| 595 | return DecodeOxmIdTunMetadata11(_oxmid, decoder) |
| 596 | case 87544: |
| 597 | return DecodeOxmIdTunMetadata2Masked(_oxmid, decoder) |
| 598 | case 207364: |
| 599 | return DecodeOxmIdBsnVxlanNetworkId(_oxmid, decoder) |
| 600 | case 209410: |
| 601 | return DecodeOxmIdBsnVfi(_oxmid, decoder) |
| 602 | case 92796: |
| 603 | return DecodeOxmIdTunMetadata13(_oxmid, decoder) |
| 604 | case 88568: |
| 605 | return DecodeOxmIdTunMetadata4Masked(_oxmid, decoder) |
| 606 | case 80385: |
| 607 | return DecodeOxmIdNwTtl(_oxmid, decoder) |
| 608 | case 105976: |
| 609 | return DecodeOxmIdTunMetadata38Masked(_oxmid, decoder) |
| 610 | case 126465: |
| 611 | return DecodeOxmIdConnTrackingNwProto(_oxmid, decoder) |
| 612 | case 7682: |
| 613 | return DecodeOxmIdArpOp(_oxmid, decoder) |
| 614 | case 71172: |
| 615 | return DecodeOxmIdReg11(_oxmid, decoder) |
| 616 | case 208390: |
| 617 | return DecodeOxmIdBsnInnerEthSrc(_oxmid, decoder) |
| 618 | case 210178: |
| 619 | return DecodeOxmIdBsnIpFragmentationMasked(_oxmid, decoder) |
| 620 | case 128528: |
| 621 | return DecodeOxmIdConnTrackingIpv6Dst(_oxmid, decoder) |
| 622 | case 85252: |
| 623 | return DecodeOxmIdTunGbpIdMasked(_oxmid, decoder) |
| 624 | case 90616: |
| 625 | return DecodeOxmIdTunMetadata8Masked(_oxmid, decoder) |
| 626 | case 79364: |
| 627 | return DecodeOxmIdIpv6Label(_oxmid, decoder) |
| 628 | case 207112: |
| 629 | return DecodeOxmIdBsnIngressPortGroupIdMasked(_oxmid, decoder) |
| 630 | case 206400: |
| 631 | return DecodeOxmIdBsnInPorts512(_oxmid, decoder) |
| 632 | case 95868: |
| 633 | return DecodeOxmIdTunMetadata19(_oxmid, decoder) |
| 634 | case 91640: |
| 635 | return DecodeOxmIdTunMetadata10Masked(_oxmid, decoder) |
| 636 | case 2147501569: |
| 637 | return DecodeOxmIdMplsTc(_oxmid, decoder) |
| 638 | case 70920: |
| 639 | return DecodeOxmIdReg10Masked(_oxmid, decoder) |
| 640 | case 96892: |
| 641 | return DecodeOxmIdTunMetadata21(_oxmid, decoder) |
| 642 | case 92664: |
| 643 | return DecodeOxmIdTunMetadata12Masked(_oxmid, decoder) |
| 644 | case 205060: |
| 645 | return DecodeOxmIdBsnTcpFlagsMasked(_oxmid, decoder) |
| 646 | case 81412: |
| 647 | return DecodeOxmIdTunnelIpv4Src(_oxmid, decoder) |
| 648 | case 99964: |
| 649 | return DecodeOxmIdTunMetadata27(_oxmid, decoder) |
| 650 | case 71684: |
| 651 | return DecodeOxmIdReg12(_oxmid, decoder) |
| 652 | case 127240: |
| 653 | return DecodeOxmIdConnTrackingNwSrcMasked(_oxmid, decoder) |
| 654 | case 97916: |
| 655 | return DecodeOxmIdTunMetadata23(_oxmid, decoder) |
| 656 | case 93688: |
| 657 | return DecodeOxmIdTunMetadata14Masked(_oxmid, decoder) |
| 658 | case 82436: |
| 659 | return DecodeOxmIdPktMark(_oxmid, decoder) |
| 660 | case 85505: |
| 661 | return DecodeOxmIdTunGbpFlags(_oxmid, decoder) |
| 662 | case 98940: |
| 663 | return DecodeOxmIdTunMetadata25(_oxmid, decoder) |
| 664 | case 94712: |
| 665 | return DecodeOxmIdTunMetadata16Masked(_oxmid, decoder) |
| 666 | case 83460: |
| 667 | return DecodeOxmIdDpHash(_oxmid, decoder) |
| 668 | case 2147503618: |
| 669 | return DecodeOxmIdIpv6Exthdr(_oxmid, decoder) |
| 670 | case 123168: |
| 671 | return DecodeOxmIdXxreg1Masked(_oxmid, decoder) |
| 672 | case 118786: |
| 673 | return DecodeOxmIdTunFlags(_oxmid, decoder) |
| 674 | case 95736: |
| 675 | return DecodeOxmIdTunMetadata18Masked(_oxmid, decoder) |
| 676 | case 2308: |
| 677 | return DecodeOxmIdVlanTciMasked(_oxmid, decoder) |
| 678 | case 2147488002: |
| 679 | return DecodeOxmIdIpDscpMasked(_oxmid, decoder) |
| 680 | case 100988: |
| 681 | return DecodeOxmIdTunMetadata29(_oxmid, decoder) |
| 682 | case 119810: |
| 683 | return DecodeOxmIdConnTrackingZone(_oxmid, decoder) |
| 684 | case 96760: |
| 685 | return DecodeOxmIdTunMetadata20Masked(_oxmid, decoder) |
| 686 | case 2147486980: |
| 687 | return DecodeOxmIdVlanVidMasked(_oxmid, decoder) |
| 688 | case 116348: |
| 689 | return DecodeOxmIdTunMetadata59(_oxmid, decoder) |
| 690 | case 5378: |
| 691 | return DecodeOxmIdTcpDstMasked(_oxmid, decoder) |
| 692 | case 71944: |
| 693 | return DecodeOxmIdReg12Masked(_oxmid, decoder) |
| 694 | case 2147483912: |
| 695 | return DecodeOxmIdInPortMasked(_oxmid, decoder) |
| 696 | case 75552: |
| 697 | return DecodeOxmIdIpv6SrcMasked(_oxmid, decoder) |
| 698 | case 102012: |
| 699 | return DecodeOxmIdTunMetadata31(_oxmid, decoder) |
| 700 | case 198402: |
| 701 | return DecodeOxmIdBsnGlobalVrfAllowedMasked(_oxmid, decoder) |
| 702 | case 5892: |
| 703 | return DecodeOxmIdUdpSrcMasked(_oxmid, decoder) |
| 704 | case 97784: |
| 705 | return DecodeOxmIdTunMetadata22Masked(_oxmid, decoder) |
| 706 | case 66052: |
| 707 | return DecodeOxmIdReg1(_oxmid, decoder) |
| 708 | case 67336: |
| 709 | return DecodeOxmIdReg3Masked(_oxmid, decoder) |
| 710 | case 208652: |
| 711 | return DecodeOxmIdBsnInnerEthSrcMasked(_oxmid, decoder) |
| 712 | case 75280: |
| 713 | return DecodeOxmIdIpv6Src(_oxmid, decoder) |
| 714 | case 197896: |
| 715 | return DecodeOxmIdBsnVrfMasked(_oxmid, decoder) |
| 716 | case 122656: |
| 717 | return DecodeOxmIdXxreg0Masked(_oxmid, decoder) |
| 718 | case 103036: |
| 719 | return DecodeOxmIdTunMetadata33(_oxmid, decoder) |
| 720 | case 98808: |
| 721 | return DecodeOxmIdTunMetadata24Masked(_oxmid, decoder) |
| 722 | case 67848: |
| 723 | return DecodeOxmIdReg4Masked(_oxmid, decoder) |
| 724 | case 77600: |
| 725 | return DecodeOxmIdNdTargetMasked(_oxmid, decoder) |
| 726 | case 104060: |
| 727 | return DecodeOxmIdTunMetadata35(_oxmid, decoder) |
| 728 | case 99832: |
| 729 | return DecodeOxmIdTunMetadata26Masked(_oxmid, decoder) |
| 730 | case 6404: |
| 731 | return DecodeOxmIdUdpDstMasked(_oxmid, decoder) |
| 732 | case 77328: |
| 733 | return DecodeOxmIdNdTarget(_oxmid, decoder) |
| 734 | case 68872: |
| 735 | return DecodeOxmIdReg6Masked(_oxmid, decoder) |
| 736 | case 105084: |
| 737 | return DecodeOxmIdTunMetadata37(_oxmid, decoder) |
| 738 | case 100856: |
| 739 | return DecodeOxmIdTunMetadata28Masked(_oxmid, decoder) |
| 740 | case 206082: |
| 741 | return DecodeOxmIdBsnL2CacheHitMasked(_oxmid, decoder) |
| 742 | case 203016: |
| 743 | return DecodeOxmIdBsnUdf4Masked(_oxmid, decoder) |
| 744 | case 69896: |
| 745 | return DecodeOxmIdReg8Masked(_oxmid, decoder) |
| 746 | case 206720: |
| 747 | return DecodeOxmIdBsnInPorts512Masked(_oxmid, decoder) |
| 748 | case 106108: |
| 749 | return DecodeOxmIdTunMetadata39(_oxmid, decoder) |
| 750 | case 101880: |
| 751 | return DecodeOxmIdTunMetadata30Masked(_oxmid, decoder) |
| 752 | case 8452: |
| 753 | return DecodeOxmIdArpSpaMasked(_oxmid, decoder) |
| 754 | case 66312: |
| 755 | return DecodeOxmIdReg1Masked(_oxmid, decoder) |
| 756 | case 201992: |
| 757 | return DecodeOxmIdBsnUdf2Masked(_oxmid, decoder) |
| 758 | case 107132: |
| 759 | return DecodeOxmIdTunMetadata41(_oxmid, decoder) |
| 760 | case 102904: |
| 761 | return DecodeOxmIdTunMetadata32Masked(_oxmid, decoder) |
| 762 | case 2147493124: |
| 763 | return DecodeOxmIdSctpDstMasked(_oxmid, decoder) |
| 764 | case 67076: |
| 765 | return DecodeOxmIdReg3(_oxmid, decoder) |
| 766 | case 119300: |
| 767 | return DecodeOxmIdConnTrackingState(_oxmid, decoder) |
| 768 | case 2147490056: |
| 769 | return DecodeOxmIdIpv4DstMasked(_oxmid, decoder) |
| 770 | case 2147499808: |
| 771 | return DecodeOxmIdIpv6NdTargetMasked(_oxmid, decoder) |
| 772 | case 108156: |
| 773 | return DecodeOxmIdTunMetadata43(_oxmid, decoder) |
| 774 | case 103928: |
| 775 | return DecodeOxmIdTunMetadata34Masked(_oxmid, decoder) |
| 776 | case 106488: |
| 777 | return DecodeOxmIdTunMetadata39Masked(_oxmid, decoder) |
| 778 | case 201732: |
| 779 | return DecodeOxmIdBsnUdf2(_oxmid, decoder) |
| 780 | case 2147499536: |
| 781 | return DecodeOxmIdIpv6NdTarget(_oxmid, decoder) |
| 782 | case 72968: |
| 783 | return DecodeOxmIdReg14Masked(_oxmid, decoder) |
| 784 | case 109180: |
| 785 | return DecodeOxmIdTunMetadata45(_oxmid, decoder) |
| 786 | case 104952: |
| 787 | return DecodeOxmIdTunMetadata36Masked(_oxmid, decoder) |
| 788 | case 93820: |
| 789 | return DecodeOxmIdTunMetadata15(_oxmid, decoder) |
| 790 | case 79106: |
| 791 | return DecodeOxmIdIpFragMasked(_oxmid, decoder) |
| 792 | case 108536: |
| 793 | return DecodeOxmIdTunMetadata43Masked(_oxmid, decoder) |
| 794 | case 126980: |
| 795 | return DecodeOxmIdConnTrackingNwSrc(_oxmid, decoder) |
| 796 | default: |
| 797 | return _oxmid, nil |
| 798 | } |
| 799 | } |
| 800 | |
| 801 | func NewOxmId(_type_len uint32) *OxmId { |
| 802 | obj := &OxmId{} |
| 803 | obj.TypeLen = _type_len |
| 804 | return obj |
| 805 | } |
| 806 | func (self *OxmId) GetOXMName() string { |
| 807 | return "" |
| 808 | } |
| 809 | |
| 810 | func (self *OxmId) MarshalJSON() ([]byte, error) { |
| 811 | if self.TypeLen == 0 { |
| 812 | return []byte("\"\""), nil |
| 813 | } else { |
| 814 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 815 | } |
| 816 | } |
| 817 | |
| 818 | type ActionNxBundleLoadSlave struct { |
| 819 | Port Port |
| 820 | } |
| 821 | |
| 822 | type IActionNxBundleLoadSlave interface { |
| 823 | goloxi.Serializable |
| 824 | GetPort() Port |
| 825 | } |
| 826 | |
| 827 | func (self *ActionNxBundleLoadSlave) GetPort() Port { |
| 828 | return self.Port |
| 829 | } |
| 830 | |
| 831 | func (self *ActionNxBundleLoadSlave) SetPort(v Port) { |
| 832 | self.Port = v |
| 833 | } |
| 834 | |
| 835 | func (self *ActionNxBundleLoadSlave) Serialize(encoder *goloxi.Encoder) error { |
| 836 | |
| 837 | encoder.PutUint32(uint32(self.Port)) |
| 838 | |
| 839 | return nil |
| 840 | } |
| 841 | |
| 842 | func DecodeActionNxBundleLoadSlave(decoder *goloxi.Decoder) (*ActionNxBundleLoadSlave, error) { |
| 843 | _actionnxbundleloadslave := &ActionNxBundleLoadSlave{} |
| 844 | if decoder.Length() < 4 { |
| 845 | return nil, fmt.Errorf("ActionNxBundleLoadSlave packet too short: %d < 4", decoder.Length()) |
| 846 | } |
| 847 | _actionnxbundleloadslave.Port = Port(decoder.ReadUint32()) |
| 848 | return _actionnxbundleloadslave, nil |
| 849 | } |
| 850 | |
| 851 | func NewActionNxBundleLoadSlave() *ActionNxBundleLoadSlave { |
| 852 | obj := &ActionNxBundleLoadSlave{} |
| 853 | return obj |
| 854 | } |
| 855 | |
| 856 | type ActionNxController2Property struct { |
| 857 | Type NxActionController2PropType |
| 858 | } |
| 859 | |
| 860 | type IActionNxController2Property interface { |
| 861 | goloxi.Serializable |
| 862 | GetType() NxActionController2PropType |
| 863 | } |
| 864 | |
| 865 | func (self *ActionNxController2Property) GetType() NxActionController2PropType { |
| 866 | return self.Type |
| 867 | } |
| 868 | |
| 869 | func (self *ActionNxController2Property) SetType(v NxActionController2PropType) { |
| 870 | self.Type = v |
| 871 | } |
| 872 | |
| 873 | func (self *ActionNxController2Property) Serialize(encoder *goloxi.Encoder) error { |
| 874 | |
| 875 | encoder.PutUint16(uint16(self.Type)) |
| 876 | |
| 877 | return nil |
| 878 | } |
| 879 | |
| 880 | func DecodeActionNxController2Property(decoder *goloxi.Decoder) (IActionNxController2Property, error) { |
| 881 | _actionnxcontroller2property := &ActionNxController2Property{} |
| 882 | if decoder.Length() < 2 { |
| 883 | return nil, fmt.Errorf("ActionNxController2Property packet too short: %d < 2", decoder.Length()) |
| 884 | } |
| 885 | _actionnxcontroller2property.Type = NxActionController2PropType(decoder.ReadUint16()) |
| 886 | |
| 887 | switch _actionnxcontroller2property.Type { |
| 888 | case 0: |
| 889 | return DecodeActionNxController2PropertyMaxLen(_actionnxcontroller2property, decoder) |
| 890 | case 1: |
| 891 | return DecodeActionNxController2PropertyControllerId(_actionnxcontroller2property, decoder) |
| 892 | case 2: |
| 893 | return DecodeActionNxController2PropertyReason(_actionnxcontroller2property, decoder) |
| 894 | case 3: |
| 895 | return DecodeActionNxController2PropertyUserdata(_actionnxcontroller2property, decoder) |
| 896 | case 4: |
| 897 | return DecodeActionNxController2PropertyPause(_actionnxcontroller2property, decoder) |
| 898 | case 5: |
| 899 | return DecodeActionNxController2PropertyMeterId(_actionnxcontroller2property, decoder) |
| 900 | default: |
| 901 | return nil, fmt.Errorf("Invalid type '%d' for 'ActionNxController2Property'", _actionnxcontroller2property.Type) |
| 902 | } |
| 903 | } |
| 904 | |
| 905 | func NewActionNxController2Property(_type NxActionController2PropType) *ActionNxController2Property { |
| 906 | obj := &ActionNxController2Property{} |
| 907 | obj.Type = _type |
| 908 | return obj |
| 909 | } |
| 910 | |
| 911 | type ActionNxController2PropertyControllerId struct { |
| 912 | *ActionNxController2Property |
| 913 | ControllerId uint16 |
| 914 | } |
| 915 | |
| 916 | type IActionNxController2PropertyControllerId interface { |
| 917 | IActionNxController2Property |
| 918 | GetControllerId() uint16 |
| 919 | } |
| 920 | |
| 921 | func (self *ActionNxController2PropertyControllerId) GetControllerId() uint16 { |
| 922 | return self.ControllerId |
| 923 | } |
| 924 | |
| 925 | func (self *ActionNxController2PropertyControllerId) SetControllerId(v uint16) { |
| 926 | self.ControllerId = v |
| 927 | } |
| 928 | |
| 929 | func (self *ActionNxController2PropertyControllerId) Serialize(encoder *goloxi.Encoder) error { |
| 930 | if err := self.ActionNxController2Property.Serialize(encoder); err != nil { |
| 931 | return err |
| 932 | } |
| 933 | |
| 934 | encoder.PutUint16(uint16(self.ControllerId)) |
| 935 | |
| 936 | encoder.SkipAlign() |
| 937 | |
| 938 | return nil |
| 939 | } |
| 940 | |
| 941 | func DecodeActionNxController2PropertyControllerId(parent *ActionNxController2Property, decoder *goloxi.Decoder) (*ActionNxController2PropertyControllerId, error) { |
| 942 | _actionnxcontroller2propertycontrollerid := &ActionNxController2PropertyControllerId{ActionNxController2Property: parent} |
| 943 | if decoder.Length() < 2 { |
| 944 | return nil, fmt.Errorf("ActionNxController2PropertyControllerId packet too short: %d < 2", decoder.Length()) |
| 945 | } |
| 946 | defer decoder.SkipAlign() |
| 947 | |
| 948 | _actionnxcontroller2propertycontrollerid.ControllerId = uint16(decoder.ReadUint16()) |
| 949 | return _actionnxcontroller2propertycontrollerid, nil |
| 950 | } |
| 951 | |
| 952 | func NewActionNxController2PropertyControllerId() *ActionNxController2PropertyControllerId { |
| 953 | obj := &ActionNxController2PropertyControllerId{ |
| 954 | ActionNxController2Property: NewActionNxController2Property(1), |
| 955 | } |
| 956 | return obj |
| 957 | } |
| 958 | |
| 959 | type ActionNxController2PropertyMaxLen struct { |
| 960 | *ActionNxController2Property |
| 961 | MaxLen uint16 |
| 962 | } |
| 963 | |
| 964 | type IActionNxController2PropertyMaxLen interface { |
| 965 | IActionNxController2Property |
| 966 | GetMaxLen() uint16 |
| 967 | } |
| 968 | |
| 969 | func (self *ActionNxController2PropertyMaxLen) GetMaxLen() uint16 { |
| 970 | return self.MaxLen |
| 971 | } |
| 972 | |
| 973 | func (self *ActionNxController2PropertyMaxLen) SetMaxLen(v uint16) { |
| 974 | self.MaxLen = v |
| 975 | } |
| 976 | |
| 977 | func (self *ActionNxController2PropertyMaxLen) Serialize(encoder *goloxi.Encoder) error { |
| 978 | if err := self.ActionNxController2Property.Serialize(encoder); err != nil { |
| 979 | return err |
| 980 | } |
| 981 | |
| 982 | encoder.PutUint16(uint16(self.MaxLen)) |
| 983 | |
| 984 | encoder.SkipAlign() |
| 985 | |
| 986 | return nil |
| 987 | } |
| 988 | |
| 989 | func DecodeActionNxController2PropertyMaxLen(parent *ActionNxController2Property, decoder *goloxi.Decoder) (*ActionNxController2PropertyMaxLen, error) { |
| 990 | _actionnxcontroller2propertymaxlen := &ActionNxController2PropertyMaxLen{ActionNxController2Property: parent} |
| 991 | if decoder.Length() < 2 { |
| 992 | return nil, fmt.Errorf("ActionNxController2PropertyMaxLen packet too short: %d < 2", decoder.Length()) |
| 993 | } |
| 994 | defer decoder.SkipAlign() |
| 995 | |
| 996 | _actionnxcontroller2propertymaxlen.MaxLen = uint16(decoder.ReadUint16()) |
| 997 | return _actionnxcontroller2propertymaxlen, nil |
| 998 | } |
| 999 | |
| 1000 | func NewActionNxController2PropertyMaxLen() *ActionNxController2PropertyMaxLen { |
| 1001 | obj := &ActionNxController2PropertyMaxLen{ |
| 1002 | ActionNxController2Property: NewActionNxController2Property(0), |
| 1003 | } |
| 1004 | return obj |
| 1005 | } |
| 1006 | |
| 1007 | type ActionNxController2PropertyMeterId struct { |
| 1008 | *ActionNxController2Property |
| 1009 | MeterId uint32 |
| 1010 | } |
| 1011 | |
| 1012 | type IActionNxController2PropertyMeterId interface { |
| 1013 | IActionNxController2Property |
| 1014 | GetMeterId() uint32 |
| 1015 | } |
| 1016 | |
| 1017 | func (self *ActionNxController2PropertyMeterId) GetMeterId() uint32 { |
| 1018 | return self.MeterId |
| 1019 | } |
| 1020 | |
| 1021 | func (self *ActionNxController2PropertyMeterId) SetMeterId(v uint32) { |
| 1022 | self.MeterId = v |
| 1023 | } |
| 1024 | |
| 1025 | func (self *ActionNxController2PropertyMeterId) Serialize(encoder *goloxi.Encoder) error { |
| 1026 | if err := self.ActionNxController2Property.Serialize(encoder); err != nil { |
| 1027 | return err |
| 1028 | } |
| 1029 | |
| 1030 | encoder.PutUint32(uint32(self.MeterId)) |
| 1031 | |
| 1032 | encoder.SkipAlign() |
| 1033 | |
| 1034 | return nil |
| 1035 | } |
| 1036 | |
| 1037 | func DecodeActionNxController2PropertyMeterId(parent *ActionNxController2Property, decoder *goloxi.Decoder) (*ActionNxController2PropertyMeterId, error) { |
| 1038 | _actionnxcontroller2propertymeterid := &ActionNxController2PropertyMeterId{ActionNxController2Property: parent} |
| 1039 | if decoder.Length() < 4 { |
| 1040 | return nil, fmt.Errorf("ActionNxController2PropertyMeterId packet too short: %d < 4", decoder.Length()) |
| 1041 | } |
| 1042 | defer decoder.SkipAlign() |
| 1043 | |
| 1044 | _actionnxcontroller2propertymeterid.MeterId = uint32(decoder.ReadUint32()) |
| 1045 | return _actionnxcontroller2propertymeterid, nil |
| 1046 | } |
| 1047 | |
| 1048 | func NewActionNxController2PropertyMeterId() *ActionNxController2PropertyMeterId { |
| 1049 | obj := &ActionNxController2PropertyMeterId{ |
| 1050 | ActionNxController2Property: NewActionNxController2Property(5), |
| 1051 | } |
| 1052 | return obj |
| 1053 | } |
| 1054 | |
| 1055 | type ActionNxController2PropertyPause struct { |
| 1056 | *ActionNxController2Property |
| 1057 | } |
| 1058 | |
| 1059 | type IActionNxController2PropertyPause interface { |
| 1060 | IActionNxController2Property |
| 1061 | } |
| 1062 | |
| 1063 | func (self *ActionNxController2PropertyPause) Serialize(encoder *goloxi.Encoder) error { |
| 1064 | if err := self.ActionNxController2Property.Serialize(encoder); err != nil { |
| 1065 | return err |
| 1066 | } |
| 1067 | |
| 1068 | encoder.SkipAlign() |
| 1069 | |
| 1070 | return nil |
| 1071 | } |
| 1072 | |
| 1073 | func DecodeActionNxController2PropertyPause(parent *ActionNxController2Property, decoder *goloxi.Decoder) (*ActionNxController2PropertyPause, error) { |
| 1074 | _actionnxcontroller2propertypause := &ActionNxController2PropertyPause{ActionNxController2Property: parent} |
| 1075 | defer decoder.SkipAlign() |
| 1076 | |
| 1077 | return _actionnxcontroller2propertypause, nil |
| 1078 | } |
| 1079 | |
| 1080 | func NewActionNxController2PropertyPause() *ActionNxController2PropertyPause { |
| 1081 | obj := &ActionNxController2PropertyPause{ |
| 1082 | ActionNxController2Property: NewActionNxController2Property(4), |
| 1083 | } |
| 1084 | return obj |
| 1085 | } |
| 1086 | |
| 1087 | type ActionNxController2PropertyReason struct { |
| 1088 | *ActionNxController2Property |
| 1089 | Reason PacketInReason |
| 1090 | } |
| 1091 | |
| 1092 | type IActionNxController2PropertyReason interface { |
| 1093 | IActionNxController2Property |
| 1094 | GetReason() PacketInReason |
| 1095 | } |
| 1096 | |
| 1097 | func (self *ActionNxController2PropertyReason) GetReason() PacketInReason { |
| 1098 | return self.Reason |
| 1099 | } |
| 1100 | |
| 1101 | func (self *ActionNxController2PropertyReason) SetReason(v PacketInReason) { |
| 1102 | self.Reason = v |
| 1103 | } |
| 1104 | |
| 1105 | func (self *ActionNxController2PropertyReason) Serialize(encoder *goloxi.Encoder) error { |
| 1106 | if err := self.ActionNxController2Property.Serialize(encoder); err != nil { |
| 1107 | return err |
| 1108 | } |
| 1109 | |
| 1110 | encoder.PutUint8(uint8(self.Reason)) |
| 1111 | |
| 1112 | encoder.SkipAlign() |
| 1113 | |
| 1114 | return nil |
| 1115 | } |
| 1116 | |
| 1117 | func DecodeActionNxController2PropertyReason(parent *ActionNxController2Property, decoder *goloxi.Decoder) (*ActionNxController2PropertyReason, error) { |
| 1118 | _actionnxcontroller2propertyreason := &ActionNxController2PropertyReason{ActionNxController2Property: parent} |
| 1119 | if decoder.Length() < 1 { |
| 1120 | return nil, fmt.Errorf("ActionNxController2PropertyReason packet too short: %d < 1", decoder.Length()) |
| 1121 | } |
| 1122 | defer decoder.SkipAlign() |
| 1123 | |
| 1124 | _actionnxcontroller2propertyreason.Reason = PacketInReason(decoder.ReadByte()) |
| 1125 | return _actionnxcontroller2propertyreason, nil |
| 1126 | } |
| 1127 | |
| 1128 | func NewActionNxController2PropertyReason() *ActionNxController2PropertyReason { |
| 1129 | obj := &ActionNxController2PropertyReason{ |
| 1130 | ActionNxController2Property: NewActionNxController2Property(2), |
| 1131 | } |
| 1132 | return obj |
| 1133 | } |
| 1134 | |
| 1135 | type ActionNxController2PropertyUserdata struct { |
| 1136 | *ActionNxController2Property |
| 1137 | Length uint16 |
| 1138 | Userdata []byte |
| 1139 | } |
| 1140 | |
| 1141 | type IActionNxController2PropertyUserdata interface { |
| 1142 | IActionNxController2Property |
| 1143 | GetLength() uint16 |
| 1144 | GetUserdata() []byte |
| 1145 | } |
| 1146 | |
| 1147 | func (self *ActionNxController2PropertyUserdata) GetLength() uint16 { |
| 1148 | return self.Length |
| 1149 | } |
| 1150 | |
| 1151 | func (self *ActionNxController2PropertyUserdata) SetLength(v uint16) { |
| 1152 | self.Length = v |
| 1153 | } |
| 1154 | |
| 1155 | func (self *ActionNxController2PropertyUserdata) GetUserdata() []byte { |
| 1156 | return self.Userdata |
| 1157 | } |
| 1158 | |
| 1159 | func (self *ActionNxController2PropertyUserdata) SetUserdata(v []byte) { |
| 1160 | self.Userdata = v |
| 1161 | } |
| 1162 | |
| 1163 | func (self *ActionNxController2PropertyUserdata) Serialize(encoder *goloxi.Encoder) error { |
| 1164 | if err := self.ActionNxController2Property.Serialize(encoder); err != nil { |
| 1165 | return err |
| 1166 | } |
| 1167 | |
| 1168 | encoder.PutUint16(uint16(self.Length)) |
| 1169 | encoder.Write(self.Userdata) |
| 1170 | |
| 1171 | encoder.SkipAlign() |
| 1172 | |
| 1173 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 1174 | |
| 1175 | return nil |
| 1176 | } |
| 1177 | |
| 1178 | func DecodeActionNxController2PropertyUserdata(parent *ActionNxController2Property, decoder *goloxi.Decoder) (*ActionNxController2PropertyUserdata, error) { |
| 1179 | _actionnxcontroller2propertyuserdata := &ActionNxController2PropertyUserdata{ActionNxController2Property: parent} |
| 1180 | if decoder.Length() < 2 { |
| 1181 | return nil, fmt.Errorf("ActionNxController2PropertyUserdata packet too short: %d < 2", decoder.Length()) |
| 1182 | } |
| 1183 | defer decoder.SkipAlign() |
| 1184 | |
| 1185 | _actionnxcontroller2propertyuserdata.Length = uint16(decoder.ReadUint16()) |
| 1186 | oldDecoder := decoder |
| 1187 | defer func() { decoder = oldDecoder }() |
| 1188 | decoder = decoder.SliceDecoder(int(((_actionnxcontroller2propertyuserdata.Length)+7)/8*8), 2+2) |
| 1189 | _actionnxcontroller2propertyuserdata.Userdata = decoder.Read(int(decoder.Length())) |
| 1190 | return _actionnxcontroller2propertyuserdata, nil |
| 1191 | } |
| 1192 | |
| 1193 | func NewActionNxController2PropertyUserdata() *ActionNxController2PropertyUserdata { |
| 1194 | obj := &ActionNxController2PropertyUserdata{ |
| 1195 | ActionNxController2Property: NewActionNxController2Property(3), |
| 1196 | } |
| 1197 | return obj |
| 1198 | } |
| 1199 | |
| 1200 | type BsnControllerConnection struct { |
| 1201 | State BsnControllerConnectionState |
| 1202 | AuxiliaryId uint8 |
| 1203 | Role ControllerRole |
| 1204 | Uri string |
| 1205 | } |
| 1206 | |
| 1207 | type IBsnControllerConnection interface { |
| 1208 | goloxi.Serializable |
| 1209 | GetState() BsnControllerConnectionState |
| 1210 | GetAuxiliaryId() uint8 |
| 1211 | GetRole() ControllerRole |
| 1212 | GetUri() string |
| 1213 | } |
| 1214 | |
| 1215 | func (self *BsnControllerConnection) GetState() BsnControllerConnectionState { |
| 1216 | return self.State |
| 1217 | } |
| 1218 | |
| 1219 | func (self *BsnControllerConnection) SetState(v BsnControllerConnectionState) { |
| 1220 | self.State = v |
| 1221 | } |
| 1222 | |
| 1223 | func (self *BsnControllerConnection) GetAuxiliaryId() uint8 { |
| 1224 | return self.AuxiliaryId |
| 1225 | } |
| 1226 | |
| 1227 | func (self *BsnControllerConnection) SetAuxiliaryId(v uint8) { |
| 1228 | self.AuxiliaryId = v |
| 1229 | } |
| 1230 | |
| 1231 | func (self *BsnControllerConnection) GetRole() ControllerRole { |
| 1232 | return self.Role |
| 1233 | } |
| 1234 | |
| 1235 | func (self *BsnControllerConnection) SetRole(v ControllerRole) { |
| 1236 | self.Role = v |
| 1237 | } |
| 1238 | |
| 1239 | func (self *BsnControllerConnection) GetUri() string { |
| 1240 | return self.Uri |
| 1241 | } |
| 1242 | |
| 1243 | func (self *BsnControllerConnection) SetUri(v string) { |
| 1244 | self.Uri = v |
| 1245 | } |
| 1246 | |
| 1247 | func (self *BsnControllerConnection) Serialize(encoder *goloxi.Encoder) error { |
| 1248 | |
| 1249 | encoder.PutUint8(uint8(self.State)) |
| 1250 | encoder.PutUint8(uint8(self.AuxiliaryId)) |
| 1251 | encoder.Write(bytes.Repeat([]byte{0}, 2)) |
| 1252 | encoder.PutUint32(uint32(self.Role)) |
| 1253 | encoder.Write([]byte(self.Uri)) |
| 1254 | |
| 1255 | return nil |
| 1256 | } |
| 1257 | |
| 1258 | func DecodeBsnControllerConnection(decoder *goloxi.Decoder) (*BsnControllerConnection, error) { |
| 1259 | _bsncontrollerconnection := &BsnControllerConnection{} |
| 1260 | if decoder.Length() < 264 { |
| 1261 | return nil, fmt.Errorf("BsnControllerConnection packet too short: %d < 264", decoder.Length()) |
| 1262 | } |
| 1263 | _bsncontrollerconnection.State = BsnControllerConnectionState(decoder.ReadByte()) |
| 1264 | _bsncontrollerconnection.AuxiliaryId = uint8(decoder.ReadByte()) |
| 1265 | decoder.Skip(2) |
| 1266 | _bsncontrollerconnection.Role = ControllerRole(decoder.ReadUint32()) |
| 1267 | _bsncontrollerconnection.Uri = string(bytes.Trim(decoder.Read(256), "\x00")) |
| 1268 | return _bsncontrollerconnection, nil |
| 1269 | } |
| 1270 | |
| 1271 | func NewBsnControllerConnection() *BsnControllerConnection { |
| 1272 | obj := &BsnControllerConnection{} |
| 1273 | return obj |
| 1274 | } |
| 1275 | |
| 1276 | type BsnDebugCounterDescStatsEntry struct { |
| 1277 | CounterId uint64 |
| 1278 | Name string |
| 1279 | Description string |
| 1280 | } |
| 1281 | |
| 1282 | type IBsnDebugCounterDescStatsEntry interface { |
| 1283 | goloxi.Serializable |
| 1284 | GetCounterId() uint64 |
| 1285 | GetName() string |
| 1286 | GetDescription() string |
| 1287 | } |
| 1288 | |
| 1289 | func (self *BsnDebugCounterDescStatsEntry) GetCounterId() uint64 { |
| 1290 | return self.CounterId |
| 1291 | } |
| 1292 | |
| 1293 | func (self *BsnDebugCounterDescStatsEntry) SetCounterId(v uint64) { |
| 1294 | self.CounterId = v |
| 1295 | } |
| 1296 | |
| 1297 | func (self *BsnDebugCounterDescStatsEntry) GetName() string { |
| 1298 | return self.Name |
| 1299 | } |
| 1300 | |
| 1301 | func (self *BsnDebugCounterDescStatsEntry) SetName(v string) { |
| 1302 | self.Name = v |
| 1303 | } |
| 1304 | |
| 1305 | func (self *BsnDebugCounterDescStatsEntry) GetDescription() string { |
| 1306 | return self.Description |
| 1307 | } |
| 1308 | |
| 1309 | func (self *BsnDebugCounterDescStatsEntry) SetDescription(v string) { |
| 1310 | self.Description = v |
| 1311 | } |
| 1312 | |
| 1313 | func (self *BsnDebugCounterDescStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 1314 | |
| 1315 | encoder.PutUint64(uint64(self.CounterId)) |
| 1316 | encoder.Write([]byte(self.Name)) |
| 1317 | encoder.Write([]byte(self.Description)) |
| 1318 | |
| 1319 | return nil |
| 1320 | } |
| 1321 | |
| 1322 | func DecodeBsnDebugCounterDescStatsEntry(decoder *goloxi.Decoder) (*BsnDebugCounterDescStatsEntry, error) { |
| 1323 | _bsndebugcounterdescstatsentry := &BsnDebugCounterDescStatsEntry{} |
| 1324 | if decoder.Length() < 328 { |
| 1325 | return nil, fmt.Errorf("BsnDebugCounterDescStatsEntry packet too short: %d < 328", decoder.Length()) |
| 1326 | } |
| 1327 | _bsndebugcounterdescstatsentry.CounterId = uint64(decoder.ReadUint64()) |
| 1328 | _bsndebugcounterdescstatsentry.Name = string(bytes.Trim(decoder.Read(64), "\x00")) |
| 1329 | _bsndebugcounterdescstatsentry.Description = string(bytes.Trim(decoder.Read(256), "\x00")) |
| 1330 | return _bsndebugcounterdescstatsentry, nil |
| 1331 | } |
| 1332 | |
| 1333 | func NewBsnDebugCounterDescStatsEntry() *BsnDebugCounterDescStatsEntry { |
| 1334 | obj := &BsnDebugCounterDescStatsEntry{} |
| 1335 | return obj |
| 1336 | } |
| 1337 | |
| 1338 | type BsnDebugCounterStatsEntry struct { |
| 1339 | CounterId uint64 |
| 1340 | Value uint64 |
| 1341 | } |
| 1342 | |
| 1343 | type IBsnDebugCounterStatsEntry interface { |
| 1344 | goloxi.Serializable |
| 1345 | GetCounterId() uint64 |
| 1346 | GetValue() uint64 |
| 1347 | } |
| 1348 | |
| 1349 | func (self *BsnDebugCounterStatsEntry) GetCounterId() uint64 { |
| 1350 | return self.CounterId |
| 1351 | } |
| 1352 | |
| 1353 | func (self *BsnDebugCounterStatsEntry) SetCounterId(v uint64) { |
| 1354 | self.CounterId = v |
| 1355 | } |
| 1356 | |
| 1357 | func (self *BsnDebugCounterStatsEntry) GetValue() uint64 { |
| 1358 | return self.Value |
| 1359 | } |
| 1360 | |
| 1361 | func (self *BsnDebugCounterStatsEntry) SetValue(v uint64) { |
| 1362 | self.Value = v |
| 1363 | } |
| 1364 | |
| 1365 | func (self *BsnDebugCounterStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 1366 | |
| 1367 | encoder.PutUint64(uint64(self.CounterId)) |
| 1368 | encoder.PutUint64(uint64(self.Value)) |
| 1369 | |
| 1370 | return nil |
| 1371 | } |
| 1372 | |
| 1373 | func DecodeBsnDebugCounterStatsEntry(decoder *goloxi.Decoder) (*BsnDebugCounterStatsEntry, error) { |
| 1374 | _bsndebugcounterstatsentry := &BsnDebugCounterStatsEntry{} |
| 1375 | if decoder.Length() < 16 { |
| 1376 | return nil, fmt.Errorf("BsnDebugCounterStatsEntry packet too short: %d < 16", decoder.Length()) |
| 1377 | } |
| 1378 | _bsndebugcounterstatsentry.CounterId = uint64(decoder.ReadUint64()) |
| 1379 | _bsndebugcounterstatsentry.Value = uint64(decoder.ReadUint64()) |
| 1380 | return _bsndebugcounterstatsentry, nil |
| 1381 | } |
| 1382 | |
| 1383 | func NewBsnDebugCounterStatsEntry() *BsnDebugCounterStatsEntry { |
| 1384 | obj := &BsnDebugCounterStatsEntry{} |
| 1385 | return obj |
| 1386 | } |
| 1387 | |
| 1388 | type BsnFlowChecksumBucketStatsEntry struct { |
| 1389 | Checksum uint64 |
| 1390 | } |
| 1391 | |
| 1392 | type IBsnFlowChecksumBucketStatsEntry interface { |
| 1393 | goloxi.Serializable |
| 1394 | GetChecksum() uint64 |
| 1395 | } |
| 1396 | |
| 1397 | func (self *BsnFlowChecksumBucketStatsEntry) GetChecksum() uint64 { |
| 1398 | return self.Checksum |
| 1399 | } |
| 1400 | |
| 1401 | func (self *BsnFlowChecksumBucketStatsEntry) SetChecksum(v uint64) { |
| 1402 | self.Checksum = v |
| 1403 | } |
| 1404 | |
| 1405 | func (self *BsnFlowChecksumBucketStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 1406 | |
| 1407 | encoder.PutUint64(uint64(self.Checksum)) |
| 1408 | |
| 1409 | return nil |
| 1410 | } |
| 1411 | |
| 1412 | func DecodeBsnFlowChecksumBucketStatsEntry(decoder *goloxi.Decoder) (*BsnFlowChecksumBucketStatsEntry, error) { |
| 1413 | _bsnflowchecksumbucketstatsentry := &BsnFlowChecksumBucketStatsEntry{} |
| 1414 | if decoder.Length() < 8 { |
| 1415 | return nil, fmt.Errorf("BsnFlowChecksumBucketStatsEntry packet too short: %d < 8", decoder.Length()) |
| 1416 | } |
| 1417 | _bsnflowchecksumbucketstatsentry.Checksum = uint64(decoder.ReadUint64()) |
| 1418 | return _bsnflowchecksumbucketstatsentry, nil |
| 1419 | } |
| 1420 | |
| 1421 | func NewBsnFlowChecksumBucketStatsEntry() *BsnFlowChecksumBucketStatsEntry { |
| 1422 | obj := &BsnFlowChecksumBucketStatsEntry{} |
| 1423 | return obj |
| 1424 | } |
| 1425 | |
| 1426 | type BsnGenericStatsEntry struct { |
| 1427 | Length uint16 |
| 1428 | Tlvs []IBsnTlv |
| 1429 | } |
| 1430 | |
| 1431 | type IBsnGenericStatsEntry interface { |
| 1432 | goloxi.Serializable |
| 1433 | GetLength() uint16 |
| 1434 | GetTlvs() []IBsnTlv |
| 1435 | } |
| 1436 | |
| 1437 | func (self *BsnGenericStatsEntry) GetLength() uint16 { |
| 1438 | return self.Length |
| 1439 | } |
| 1440 | |
| 1441 | func (self *BsnGenericStatsEntry) SetLength(v uint16) { |
| 1442 | self.Length = v |
| 1443 | } |
| 1444 | |
| 1445 | func (self *BsnGenericStatsEntry) GetTlvs() []IBsnTlv { |
| 1446 | return self.Tlvs |
| 1447 | } |
| 1448 | |
| 1449 | func (self *BsnGenericStatsEntry) SetTlvs(v []IBsnTlv) { |
| 1450 | self.Tlvs = v |
| 1451 | } |
| 1452 | |
| 1453 | func (self *BsnGenericStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 1454 | |
| 1455 | encoder.PutUint16(uint16(self.Length)) |
| 1456 | for _, obj := range self.Tlvs { |
| 1457 | if err := obj.Serialize(encoder); err != nil { |
| 1458 | return err |
| 1459 | } |
| 1460 | } |
| 1461 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 1462 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 1463 | |
| 1464 | return nil |
| 1465 | } |
| 1466 | |
| 1467 | func DecodeBsnGenericStatsEntry(decoder *goloxi.Decoder) (*BsnGenericStatsEntry, error) { |
| 1468 | _bsngenericstatsentry := &BsnGenericStatsEntry{} |
| 1469 | if decoder.Length() < 2 { |
| 1470 | return nil, fmt.Errorf("BsnGenericStatsEntry packet too short: %d < 2", decoder.Length()) |
| 1471 | } |
| 1472 | _bsngenericstatsentry.Length = uint16(decoder.ReadUint16()) |
| 1473 | oldDecoder := decoder |
| 1474 | defer func() { decoder = oldDecoder }() |
| 1475 | decoder = decoder.SliceDecoder(int(_bsngenericstatsentry.Length), 2+0) |
| 1476 | |
| 1477 | for decoder.Length() >= 4 { |
| 1478 | item, err := DecodeBsnTlv(decoder) |
| 1479 | if err != nil { |
| 1480 | return nil, err |
| 1481 | } |
| 1482 | if item != nil { |
| 1483 | _bsngenericstatsentry.Tlvs = append(_bsngenericstatsentry.Tlvs, item) |
| 1484 | } |
| 1485 | } |
| 1486 | return _bsngenericstatsentry, nil |
| 1487 | } |
| 1488 | |
| 1489 | func NewBsnGenericStatsEntry() *BsnGenericStatsEntry { |
| 1490 | obj := &BsnGenericStatsEntry{} |
| 1491 | return obj |
| 1492 | } |
| 1493 | |
| 1494 | type BsnGentableBucketStatsEntry struct { |
| 1495 | Checksum Checksum128 |
| 1496 | } |
| 1497 | |
| 1498 | type IBsnGentableBucketStatsEntry interface { |
| 1499 | goloxi.Serializable |
| 1500 | GetChecksum() Checksum128 |
| 1501 | } |
| 1502 | |
| 1503 | func (self *BsnGentableBucketStatsEntry) GetChecksum() Checksum128 { |
| 1504 | return self.Checksum |
| 1505 | } |
| 1506 | |
| 1507 | func (self *BsnGentableBucketStatsEntry) SetChecksum(v Checksum128) { |
| 1508 | self.Checksum = v |
| 1509 | } |
| 1510 | |
| 1511 | func (self *BsnGentableBucketStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 1512 | |
| 1513 | self.Checksum.Serialize(encoder) |
| 1514 | |
| 1515 | return nil |
| 1516 | } |
| 1517 | |
| 1518 | func DecodeBsnGentableBucketStatsEntry(decoder *goloxi.Decoder) (*BsnGentableBucketStatsEntry, error) { |
| 1519 | _bsngentablebucketstatsentry := &BsnGentableBucketStatsEntry{} |
| 1520 | if decoder.Length() < 16 { |
| 1521 | return nil, fmt.Errorf("BsnGentableBucketStatsEntry packet too short: %d < 16", decoder.Length()) |
| 1522 | } |
| 1523 | _bsngentablebucketstatsentry.Checksum.Decode(decoder) |
| 1524 | return _bsngentablebucketstatsentry, nil |
| 1525 | } |
| 1526 | |
| 1527 | func NewBsnGentableBucketStatsEntry() *BsnGentableBucketStatsEntry { |
| 1528 | obj := &BsnGentableBucketStatsEntry{} |
| 1529 | return obj |
| 1530 | } |
| 1531 | |
| 1532 | type BsnGentableDescStatsEntry struct { |
| 1533 | Length uint16 |
| 1534 | TableId uint16 |
| 1535 | Name string |
| 1536 | BucketsSize uint32 |
| 1537 | MaxEntries uint32 |
| 1538 | } |
| 1539 | |
| 1540 | type IBsnGentableDescStatsEntry interface { |
| 1541 | goloxi.Serializable |
| 1542 | GetLength() uint16 |
| 1543 | GetTableId() uint16 |
| 1544 | GetName() string |
| 1545 | GetBucketsSize() uint32 |
| 1546 | GetMaxEntries() uint32 |
| 1547 | } |
| 1548 | |
| 1549 | func (self *BsnGentableDescStatsEntry) GetLength() uint16 { |
| 1550 | return self.Length |
| 1551 | } |
| 1552 | |
| 1553 | func (self *BsnGentableDescStatsEntry) SetLength(v uint16) { |
| 1554 | self.Length = v |
| 1555 | } |
| 1556 | |
| 1557 | func (self *BsnGentableDescStatsEntry) GetTableId() uint16 { |
| 1558 | return self.TableId |
| 1559 | } |
| 1560 | |
| 1561 | func (self *BsnGentableDescStatsEntry) SetTableId(v uint16) { |
| 1562 | self.TableId = v |
| 1563 | } |
| 1564 | |
| 1565 | func (self *BsnGentableDescStatsEntry) GetName() string { |
| 1566 | return self.Name |
| 1567 | } |
| 1568 | |
| 1569 | func (self *BsnGentableDescStatsEntry) SetName(v string) { |
| 1570 | self.Name = v |
| 1571 | } |
| 1572 | |
| 1573 | func (self *BsnGentableDescStatsEntry) GetBucketsSize() uint32 { |
| 1574 | return self.BucketsSize |
| 1575 | } |
| 1576 | |
| 1577 | func (self *BsnGentableDescStatsEntry) SetBucketsSize(v uint32) { |
| 1578 | self.BucketsSize = v |
| 1579 | } |
| 1580 | |
| 1581 | func (self *BsnGentableDescStatsEntry) GetMaxEntries() uint32 { |
| 1582 | return self.MaxEntries |
| 1583 | } |
| 1584 | |
| 1585 | func (self *BsnGentableDescStatsEntry) SetMaxEntries(v uint32) { |
| 1586 | self.MaxEntries = v |
| 1587 | } |
| 1588 | |
| 1589 | func (self *BsnGentableDescStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 1590 | |
| 1591 | encoder.PutUint16(uint16(self.Length)) |
| 1592 | encoder.PutUint16(uint16(self.TableId)) |
| 1593 | encoder.Write([]byte(self.Name)) |
| 1594 | encoder.PutUint32(uint32(self.BucketsSize)) |
| 1595 | encoder.PutUint32(uint32(self.MaxEntries)) |
| 1596 | encoder.Write(bytes.Repeat([]byte{0}, 4)) |
| 1597 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 1598 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 1599 | |
| 1600 | return nil |
| 1601 | } |
| 1602 | |
| 1603 | func DecodeBsnGentableDescStatsEntry(decoder *goloxi.Decoder) (*BsnGentableDescStatsEntry, error) { |
| 1604 | _bsngentabledescstatsentry := &BsnGentableDescStatsEntry{} |
| 1605 | if decoder.Length() < 48 { |
| 1606 | return nil, fmt.Errorf("BsnGentableDescStatsEntry packet too short: %d < 48", decoder.Length()) |
| 1607 | } |
| 1608 | _bsngentabledescstatsentry.Length = uint16(decoder.ReadUint16()) |
| 1609 | oldDecoder := decoder |
| 1610 | defer func() { decoder = oldDecoder }() |
| 1611 | decoder = decoder.SliceDecoder(int(_bsngentabledescstatsentry.Length), 2+0) |
| 1612 | _bsngentabledescstatsentry.TableId = uint16(decoder.ReadUint16()) |
| 1613 | _bsngentabledescstatsentry.Name = string(bytes.Trim(decoder.Read(32), "\x00")) |
| 1614 | _bsngentabledescstatsentry.BucketsSize = uint32(decoder.ReadUint32()) |
| 1615 | _bsngentabledescstatsentry.MaxEntries = uint32(decoder.ReadUint32()) |
| 1616 | decoder.Skip(4) |
| 1617 | return _bsngentabledescstatsentry, nil |
| 1618 | } |
| 1619 | |
| 1620 | func NewBsnGentableDescStatsEntry() *BsnGentableDescStatsEntry { |
| 1621 | obj := &BsnGentableDescStatsEntry{} |
| 1622 | return obj |
| 1623 | } |
| 1624 | |
| 1625 | type BsnGentableEntryDescStatsEntry struct { |
| 1626 | Length uint16 |
| 1627 | KeyLength uint16 |
| 1628 | Checksum Checksum128 |
| 1629 | Key []IBsnTlv |
| 1630 | Value []IBsnTlv |
| 1631 | } |
| 1632 | |
| 1633 | type IBsnGentableEntryDescStatsEntry interface { |
| 1634 | goloxi.Serializable |
| 1635 | GetLength() uint16 |
| 1636 | GetKeyLength() uint16 |
| 1637 | GetChecksum() Checksum128 |
| 1638 | GetKey() []IBsnTlv |
| 1639 | GetValue() []IBsnTlv |
| 1640 | } |
| 1641 | |
| 1642 | func (self *BsnGentableEntryDescStatsEntry) GetLength() uint16 { |
| 1643 | return self.Length |
| 1644 | } |
| 1645 | |
| 1646 | func (self *BsnGentableEntryDescStatsEntry) SetLength(v uint16) { |
| 1647 | self.Length = v |
| 1648 | } |
| 1649 | |
| 1650 | func (self *BsnGentableEntryDescStatsEntry) GetKeyLength() uint16 { |
| 1651 | return self.KeyLength |
| 1652 | } |
| 1653 | |
| 1654 | func (self *BsnGentableEntryDescStatsEntry) SetKeyLength(v uint16) { |
| 1655 | self.KeyLength = v |
| 1656 | } |
| 1657 | |
| 1658 | func (self *BsnGentableEntryDescStatsEntry) GetChecksum() Checksum128 { |
| 1659 | return self.Checksum |
| 1660 | } |
| 1661 | |
| 1662 | func (self *BsnGentableEntryDescStatsEntry) SetChecksum(v Checksum128) { |
| 1663 | self.Checksum = v |
| 1664 | } |
| 1665 | |
| 1666 | func (self *BsnGentableEntryDescStatsEntry) GetKey() []IBsnTlv { |
| 1667 | return self.Key |
| 1668 | } |
| 1669 | |
| 1670 | func (self *BsnGentableEntryDescStatsEntry) SetKey(v []IBsnTlv) { |
| 1671 | self.Key = v |
| 1672 | } |
| 1673 | |
| 1674 | func (self *BsnGentableEntryDescStatsEntry) GetValue() []IBsnTlv { |
| 1675 | return self.Value |
| 1676 | } |
| 1677 | |
| 1678 | func (self *BsnGentableEntryDescStatsEntry) SetValue(v []IBsnTlv) { |
| 1679 | self.Value = v |
| 1680 | } |
| 1681 | |
| 1682 | func (self *BsnGentableEntryDescStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 1683 | |
| 1684 | encoder.PutUint16(uint16(self.Length)) |
| 1685 | encoder.PutUint16(uint16(self.KeyLength)) |
| 1686 | self.Checksum.Serialize(encoder) |
| 1687 | for _, obj := range self.Key { |
| 1688 | if err := obj.Serialize(encoder); err != nil { |
| 1689 | return err |
| 1690 | } |
| 1691 | } |
| 1692 | for _, obj := range self.Value { |
| 1693 | if err := obj.Serialize(encoder); err != nil { |
| 1694 | return err |
| 1695 | } |
| 1696 | } |
| 1697 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 1698 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 1699 | |
| 1700 | return nil |
| 1701 | } |
| 1702 | |
| 1703 | func DecodeBsnGentableEntryDescStatsEntry(decoder *goloxi.Decoder) (*BsnGentableEntryDescStatsEntry, error) { |
| 1704 | _bsngentableentrydescstatsentry := &BsnGentableEntryDescStatsEntry{} |
| 1705 | if decoder.Length() < 20 { |
| 1706 | return nil, fmt.Errorf("BsnGentableEntryDescStatsEntry packet too short: %d < 20", decoder.Length()) |
| 1707 | } |
| 1708 | _bsngentableentrydescstatsentry.Length = uint16(decoder.ReadUint16()) |
| 1709 | oldDecoder := decoder |
| 1710 | defer func() { decoder = oldDecoder }() |
| 1711 | decoder = decoder.SliceDecoder(int(_bsngentableentrydescstatsentry.Length), 2+0) |
| 1712 | _bsngentableentrydescstatsentry.KeyLength = uint16(decoder.ReadUint16()) |
| 1713 | _bsngentableentrydescstatsentry.Checksum.Decode(decoder) |
| 1714 | |
| 1715 | for i := 0; i < int(_bsngentableentrydescstatsentry.KeyLength); i++ { |
| 1716 | item, err := DecodeBsnTlv(decoder) |
| 1717 | if err != nil { |
| 1718 | return nil, err |
| 1719 | } |
| 1720 | if item != nil { |
| 1721 | _bsngentableentrydescstatsentry.Key = append(_bsngentableentrydescstatsentry.Key, item) |
| 1722 | } |
| 1723 | } |
| 1724 | |
| 1725 | for decoder.Length() >= 4 { |
| 1726 | item, err := DecodeBsnTlv(decoder) |
| 1727 | if err != nil { |
| 1728 | return nil, err |
| 1729 | } |
| 1730 | if item != nil { |
| 1731 | _bsngentableentrydescstatsentry.Value = append(_bsngentableentrydescstatsentry.Value, item) |
| 1732 | } |
| 1733 | } |
| 1734 | return _bsngentableentrydescstatsentry, nil |
| 1735 | } |
| 1736 | |
| 1737 | func NewBsnGentableEntryDescStatsEntry() *BsnGentableEntryDescStatsEntry { |
| 1738 | obj := &BsnGentableEntryDescStatsEntry{} |
| 1739 | return obj |
| 1740 | } |
| 1741 | |
| 1742 | type BsnGentableEntryStatsEntry struct { |
| 1743 | Length uint16 |
| 1744 | KeyLength uint16 |
| 1745 | Key []IBsnTlv |
| 1746 | Stats []IBsnTlv |
| 1747 | } |
| 1748 | |
| 1749 | type IBsnGentableEntryStatsEntry interface { |
| 1750 | goloxi.Serializable |
| 1751 | GetLength() uint16 |
| 1752 | GetKeyLength() uint16 |
| 1753 | GetKey() []IBsnTlv |
| 1754 | GetStats() []IBsnTlv |
| 1755 | } |
| 1756 | |
| 1757 | func (self *BsnGentableEntryStatsEntry) GetLength() uint16 { |
| 1758 | return self.Length |
| 1759 | } |
| 1760 | |
| 1761 | func (self *BsnGentableEntryStatsEntry) SetLength(v uint16) { |
| 1762 | self.Length = v |
| 1763 | } |
| 1764 | |
| 1765 | func (self *BsnGentableEntryStatsEntry) GetKeyLength() uint16 { |
| 1766 | return self.KeyLength |
| 1767 | } |
| 1768 | |
| 1769 | func (self *BsnGentableEntryStatsEntry) SetKeyLength(v uint16) { |
| 1770 | self.KeyLength = v |
| 1771 | } |
| 1772 | |
| 1773 | func (self *BsnGentableEntryStatsEntry) GetKey() []IBsnTlv { |
| 1774 | return self.Key |
| 1775 | } |
| 1776 | |
| 1777 | func (self *BsnGentableEntryStatsEntry) SetKey(v []IBsnTlv) { |
| 1778 | self.Key = v |
| 1779 | } |
| 1780 | |
| 1781 | func (self *BsnGentableEntryStatsEntry) GetStats() []IBsnTlv { |
| 1782 | return self.Stats |
| 1783 | } |
| 1784 | |
| 1785 | func (self *BsnGentableEntryStatsEntry) SetStats(v []IBsnTlv) { |
| 1786 | self.Stats = v |
| 1787 | } |
| 1788 | |
| 1789 | func (self *BsnGentableEntryStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 1790 | |
| 1791 | encoder.PutUint16(uint16(self.Length)) |
| 1792 | encoder.PutUint16(uint16(self.KeyLength)) |
| 1793 | for _, obj := range self.Key { |
| 1794 | if err := obj.Serialize(encoder); err != nil { |
| 1795 | return err |
| 1796 | } |
| 1797 | } |
| 1798 | for _, obj := range self.Stats { |
| 1799 | if err := obj.Serialize(encoder); err != nil { |
| 1800 | return err |
| 1801 | } |
| 1802 | } |
| 1803 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 1804 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 1805 | |
| 1806 | return nil |
| 1807 | } |
| 1808 | |
| 1809 | func DecodeBsnGentableEntryStatsEntry(decoder *goloxi.Decoder) (*BsnGentableEntryStatsEntry, error) { |
| 1810 | _bsngentableentrystatsentry := &BsnGentableEntryStatsEntry{} |
| 1811 | if decoder.Length() < 4 { |
| 1812 | return nil, fmt.Errorf("BsnGentableEntryStatsEntry packet too short: %d < 4", decoder.Length()) |
| 1813 | } |
| 1814 | _bsngentableentrystatsentry.Length = uint16(decoder.ReadUint16()) |
| 1815 | oldDecoder := decoder |
| 1816 | defer func() { decoder = oldDecoder }() |
| 1817 | decoder = decoder.SliceDecoder(int(_bsngentableentrystatsentry.Length), 2+0) |
| 1818 | _bsngentableentrystatsentry.KeyLength = uint16(decoder.ReadUint16()) |
| 1819 | |
| 1820 | for i := 0; i < int(_bsngentableentrystatsentry.KeyLength); i++ { |
| 1821 | item, err := DecodeBsnTlv(decoder) |
| 1822 | if err != nil { |
| 1823 | return nil, err |
| 1824 | } |
| 1825 | if item != nil { |
| 1826 | _bsngentableentrystatsentry.Key = append(_bsngentableentrystatsentry.Key, item) |
| 1827 | } |
| 1828 | } |
| 1829 | |
| 1830 | for decoder.Length() >= 4 { |
| 1831 | item, err := DecodeBsnTlv(decoder) |
| 1832 | if err != nil { |
| 1833 | return nil, err |
| 1834 | } |
| 1835 | if item != nil { |
| 1836 | _bsngentableentrystatsentry.Stats = append(_bsngentableentrystatsentry.Stats, item) |
| 1837 | } |
| 1838 | } |
| 1839 | return _bsngentableentrystatsentry, nil |
| 1840 | } |
| 1841 | |
| 1842 | func NewBsnGentableEntryStatsEntry() *BsnGentableEntryStatsEntry { |
| 1843 | obj := &BsnGentableEntryStatsEntry{} |
| 1844 | return obj |
| 1845 | } |
| 1846 | |
| 1847 | type BsnGentableStatsEntry struct { |
| 1848 | TableId uint16 |
| 1849 | EntryCount uint32 |
| 1850 | Checksum Checksum128 |
| 1851 | } |
| 1852 | |
| 1853 | type IBsnGentableStatsEntry interface { |
| 1854 | goloxi.Serializable |
| 1855 | GetTableId() uint16 |
| 1856 | GetEntryCount() uint32 |
| 1857 | GetChecksum() Checksum128 |
| 1858 | } |
| 1859 | |
| 1860 | func (self *BsnGentableStatsEntry) GetTableId() uint16 { |
| 1861 | return self.TableId |
| 1862 | } |
| 1863 | |
| 1864 | func (self *BsnGentableStatsEntry) SetTableId(v uint16) { |
| 1865 | self.TableId = v |
| 1866 | } |
| 1867 | |
| 1868 | func (self *BsnGentableStatsEntry) GetEntryCount() uint32 { |
| 1869 | return self.EntryCount |
| 1870 | } |
| 1871 | |
| 1872 | func (self *BsnGentableStatsEntry) SetEntryCount(v uint32) { |
| 1873 | self.EntryCount = v |
| 1874 | } |
| 1875 | |
| 1876 | func (self *BsnGentableStatsEntry) GetChecksum() Checksum128 { |
| 1877 | return self.Checksum |
| 1878 | } |
| 1879 | |
| 1880 | func (self *BsnGentableStatsEntry) SetChecksum(v Checksum128) { |
| 1881 | self.Checksum = v |
| 1882 | } |
| 1883 | |
| 1884 | func (self *BsnGentableStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 1885 | |
| 1886 | encoder.PutUint16(uint16(self.TableId)) |
| 1887 | encoder.Write(bytes.Repeat([]byte{0}, 2)) |
| 1888 | encoder.PutUint32(uint32(self.EntryCount)) |
| 1889 | self.Checksum.Serialize(encoder) |
| 1890 | |
| 1891 | return nil |
| 1892 | } |
| 1893 | |
| 1894 | func DecodeBsnGentableStatsEntry(decoder *goloxi.Decoder) (*BsnGentableStatsEntry, error) { |
| 1895 | _bsngentablestatsentry := &BsnGentableStatsEntry{} |
| 1896 | if decoder.Length() < 24 { |
| 1897 | return nil, fmt.Errorf("BsnGentableStatsEntry packet too short: %d < 24", decoder.Length()) |
| 1898 | } |
| 1899 | _bsngentablestatsentry.TableId = uint16(decoder.ReadUint16()) |
| 1900 | decoder.Skip(2) |
| 1901 | _bsngentablestatsentry.EntryCount = uint32(decoder.ReadUint32()) |
| 1902 | _bsngentablestatsentry.Checksum.Decode(decoder) |
| 1903 | return _bsngentablestatsentry, nil |
| 1904 | } |
| 1905 | |
| 1906 | func NewBsnGentableStatsEntry() *BsnGentableStatsEntry { |
| 1907 | obj := &BsnGentableStatsEntry{} |
| 1908 | return obj |
| 1909 | } |
| 1910 | |
| 1911 | type BsnInterface struct { |
| 1912 | HwAddr net.HardwareAddr |
| 1913 | Name string |
| 1914 | Ipv4Addr net.IP |
| 1915 | Ipv4Netmask net.IP |
| 1916 | } |
| 1917 | |
| 1918 | type IBsnInterface interface { |
| 1919 | goloxi.Serializable |
| 1920 | GetHwAddr() net.HardwareAddr |
| 1921 | GetName() string |
| 1922 | GetIpv4Addr() net.IP |
| 1923 | GetIpv4Netmask() net.IP |
| 1924 | } |
| 1925 | |
| 1926 | func (self *BsnInterface) GetHwAddr() net.HardwareAddr { |
| 1927 | return self.HwAddr |
| 1928 | } |
| 1929 | |
| 1930 | func (self *BsnInterface) SetHwAddr(v net.HardwareAddr) { |
| 1931 | self.HwAddr = v |
| 1932 | } |
| 1933 | |
| 1934 | func (self *BsnInterface) GetName() string { |
| 1935 | return self.Name |
| 1936 | } |
| 1937 | |
| 1938 | func (self *BsnInterface) SetName(v string) { |
| 1939 | self.Name = v |
| 1940 | } |
| 1941 | |
| 1942 | func (self *BsnInterface) GetIpv4Addr() net.IP { |
| 1943 | return self.Ipv4Addr |
| 1944 | } |
| 1945 | |
| 1946 | func (self *BsnInterface) SetIpv4Addr(v net.IP) { |
| 1947 | self.Ipv4Addr = v |
| 1948 | } |
| 1949 | |
| 1950 | func (self *BsnInterface) GetIpv4Netmask() net.IP { |
| 1951 | return self.Ipv4Netmask |
| 1952 | } |
| 1953 | |
| 1954 | func (self *BsnInterface) SetIpv4Netmask(v net.IP) { |
| 1955 | self.Ipv4Netmask = v |
| 1956 | } |
| 1957 | |
| 1958 | func (self *BsnInterface) Serialize(encoder *goloxi.Encoder) error { |
| 1959 | |
| 1960 | encoder.Write(self.HwAddr) |
| 1961 | encoder.Write(bytes.Repeat([]byte{0}, 2)) |
| 1962 | encoder.Write([]byte(self.Name)) |
| 1963 | encoder.Write(self.Ipv4Addr.To4()) |
| 1964 | encoder.Write(self.Ipv4Netmask.To4()) |
| 1965 | |
| 1966 | return nil |
| 1967 | } |
| 1968 | |
| 1969 | func DecodeBsnInterface(decoder *goloxi.Decoder) (*BsnInterface, error) { |
| 1970 | _bsninterface := &BsnInterface{} |
| 1971 | if decoder.Length() < 32 { |
| 1972 | return nil, fmt.Errorf("BsnInterface packet too short: %d < 32", decoder.Length()) |
| 1973 | } |
| 1974 | _bsninterface.HwAddr = net.HardwareAddr(decoder.Read(6)) |
| 1975 | decoder.Skip(2) |
| 1976 | _bsninterface.Name = string(bytes.Trim(decoder.Read(16), "\x00")) |
| 1977 | _bsninterface.Ipv4Addr = net.IP(decoder.Read(4)) |
| 1978 | _bsninterface.Ipv4Netmask = net.IP(decoder.Read(4)) |
| 1979 | return _bsninterface, nil |
| 1980 | } |
| 1981 | |
| 1982 | func NewBsnInterface() *BsnInterface { |
| 1983 | obj := &BsnInterface{} |
| 1984 | return obj |
| 1985 | } |
| 1986 | |
| 1987 | type BsnLacpStatsEntry struct { |
| 1988 | PortNo Port |
| 1989 | ActorSysPriority uint16 |
| 1990 | ActorSysMac net.HardwareAddr |
| 1991 | ActorPortPriority uint16 |
| 1992 | ActorPortNum uint16 |
| 1993 | ActorKey uint16 |
| 1994 | ConvergenceStatus uint8 |
| 1995 | PartnerSysPriority uint16 |
| 1996 | PartnerSysMac net.HardwareAddr |
| 1997 | PartnerPortPriority uint16 |
| 1998 | PartnerPortNum uint16 |
| 1999 | PartnerKey uint16 |
| 2000 | } |
| 2001 | |
| 2002 | type IBsnLacpStatsEntry interface { |
| 2003 | goloxi.Serializable |
| 2004 | GetPortNo() Port |
| 2005 | GetActorSysPriority() uint16 |
| 2006 | GetActorSysMac() net.HardwareAddr |
| 2007 | GetActorPortPriority() uint16 |
| 2008 | GetActorPortNum() uint16 |
| 2009 | GetActorKey() uint16 |
| 2010 | GetConvergenceStatus() uint8 |
| 2011 | GetPartnerSysPriority() uint16 |
| 2012 | GetPartnerSysMac() net.HardwareAddr |
| 2013 | GetPartnerPortPriority() uint16 |
| 2014 | GetPartnerPortNum() uint16 |
| 2015 | GetPartnerKey() uint16 |
| 2016 | } |
| 2017 | |
| 2018 | func (self *BsnLacpStatsEntry) GetPortNo() Port { |
| 2019 | return self.PortNo |
| 2020 | } |
| 2021 | |
| 2022 | func (self *BsnLacpStatsEntry) SetPortNo(v Port) { |
| 2023 | self.PortNo = v |
| 2024 | } |
| 2025 | |
| 2026 | func (self *BsnLacpStatsEntry) GetActorSysPriority() uint16 { |
| 2027 | return self.ActorSysPriority |
| 2028 | } |
| 2029 | |
| 2030 | func (self *BsnLacpStatsEntry) SetActorSysPriority(v uint16) { |
| 2031 | self.ActorSysPriority = v |
| 2032 | } |
| 2033 | |
| 2034 | func (self *BsnLacpStatsEntry) GetActorSysMac() net.HardwareAddr { |
| 2035 | return self.ActorSysMac |
| 2036 | } |
| 2037 | |
| 2038 | func (self *BsnLacpStatsEntry) SetActorSysMac(v net.HardwareAddr) { |
| 2039 | self.ActorSysMac = v |
| 2040 | } |
| 2041 | |
| 2042 | func (self *BsnLacpStatsEntry) GetActorPortPriority() uint16 { |
| 2043 | return self.ActorPortPriority |
| 2044 | } |
| 2045 | |
| 2046 | func (self *BsnLacpStatsEntry) SetActorPortPriority(v uint16) { |
| 2047 | self.ActorPortPriority = v |
| 2048 | } |
| 2049 | |
| 2050 | func (self *BsnLacpStatsEntry) GetActorPortNum() uint16 { |
| 2051 | return self.ActorPortNum |
| 2052 | } |
| 2053 | |
| 2054 | func (self *BsnLacpStatsEntry) SetActorPortNum(v uint16) { |
| 2055 | self.ActorPortNum = v |
| 2056 | } |
| 2057 | |
| 2058 | func (self *BsnLacpStatsEntry) GetActorKey() uint16 { |
| 2059 | return self.ActorKey |
| 2060 | } |
| 2061 | |
| 2062 | func (self *BsnLacpStatsEntry) SetActorKey(v uint16) { |
| 2063 | self.ActorKey = v |
| 2064 | } |
| 2065 | |
| 2066 | func (self *BsnLacpStatsEntry) GetConvergenceStatus() uint8 { |
| 2067 | return self.ConvergenceStatus |
| 2068 | } |
| 2069 | |
| 2070 | func (self *BsnLacpStatsEntry) SetConvergenceStatus(v uint8) { |
| 2071 | self.ConvergenceStatus = v |
| 2072 | } |
| 2073 | |
| 2074 | func (self *BsnLacpStatsEntry) GetPartnerSysPriority() uint16 { |
| 2075 | return self.PartnerSysPriority |
| 2076 | } |
| 2077 | |
| 2078 | func (self *BsnLacpStatsEntry) SetPartnerSysPriority(v uint16) { |
| 2079 | self.PartnerSysPriority = v |
| 2080 | } |
| 2081 | |
| 2082 | func (self *BsnLacpStatsEntry) GetPartnerSysMac() net.HardwareAddr { |
| 2083 | return self.PartnerSysMac |
| 2084 | } |
| 2085 | |
| 2086 | func (self *BsnLacpStatsEntry) SetPartnerSysMac(v net.HardwareAddr) { |
| 2087 | self.PartnerSysMac = v |
| 2088 | } |
| 2089 | |
| 2090 | func (self *BsnLacpStatsEntry) GetPartnerPortPriority() uint16 { |
| 2091 | return self.PartnerPortPriority |
| 2092 | } |
| 2093 | |
| 2094 | func (self *BsnLacpStatsEntry) SetPartnerPortPriority(v uint16) { |
| 2095 | self.PartnerPortPriority = v |
| 2096 | } |
| 2097 | |
| 2098 | func (self *BsnLacpStatsEntry) GetPartnerPortNum() uint16 { |
| 2099 | return self.PartnerPortNum |
| 2100 | } |
| 2101 | |
| 2102 | func (self *BsnLacpStatsEntry) SetPartnerPortNum(v uint16) { |
| 2103 | self.PartnerPortNum = v |
| 2104 | } |
| 2105 | |
| 2106 | func (self *BsnLacpStatsEntry) GetPartnerKey() uint16 { |
| 2107 | return self.PartnerKey |
| 2108 | } |
| 2109 | |
| 2110 | func (self *BsnLacpStatsEntry) SetPartnerKey(v uint16) { |
| 2111 | self.PartnerKey = v |
| 2112 | } |
| 2113 | |
| 2114 | func (self *BsnLacpStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 2115 | |
| 2116 | self.PortNo.Serialize(encoder) |
| 2117 | encoder.PutUint16(uint16(self.ActorSysPriority)) |
| 2118 | encoder.Write(self.ActorSysMac) |
| 2119 | encoder.PutUint16(uint16(self.ActorPortPriority)) |
| 2120 | encoder.PutUint16(uint16(self.ActorPortNum)) |
| 2121 | encoder.PutUint16(uint16(self.ActorKey)) |
| 2122 | encoder.PutUint8(uint8(self.ConvergenceStatus)) |
| 2123 | encoder.Write(bytes.Repeat([]byte{0}, 1)) |
| 2124 | encoder.PutUint16(uint16(self.PartnerSysPriority)) |
| 2125 | encoder.Write(self.PartnerSysMac) |
| 2126 | encoder.PutUint16(uint16(self.PartnerPortPriority)) |
| 2127 | encoder.PutUint16(uint16(self.PartnerPortNum)) |
| 2128 | encoder.PutUint16(uint16(self.PartnerKey)) |
| 2129 | encoder.Write(bytes.Repeat([]byte{0}, 2)) |
| 2130 | |
| 2131 | return nil |
| 2132 | } |
| 2133 | |
| 2134 | func DecodeBsnLacpStatsEntry(decoder *goloxi.Decoder) (*BsnLacpStatsEntry, error) { |
| 2135 | _bsnlacpstatsentry := &BsnLacpStatsEntry{} |
| 2136 | if decoder.Length() < 36 { |
| 2137 | return nil, fmt.Errorf("BsnLacpStatsEntry packet too short: %d < 36", decoder.Length()) |
| 2138 | } |
| 2139 | _bsnlacpstatsentry.PortNo.Decode(decoder) |
| 2140 | _bsnlacpstatsentry.ActorSysPriority = uint16(decoder.ReadUint16()) |
| 2141 | _bsnlacpstatsentry.ActorSysMac = net.HardwareAddr(decoder.Read(6)) |
| 2142 | _bsnlacpstatsentry.ActorPortPriority = uint16(decoder.ReadUint16()) |
| 2143 | _bsnlacpstatsentry.ActorPortNum = uint16(decoder.ReadUint16()) |
| 2144 | _bsnlacpstatsentry.ActorKey = uint16(decoder.ReadUint16()) |
| 2145 | _bsnlacpstatsentry.ConvergenceStatus = uint8(decoder.ReadByte()) |
| 2146 | decoder.Skip(1) |
| 2147 | _bsnlacpstatsentry.PartnerSysPriority = uint16(decoder.ReadUint16()) |
| 2148 | _bsnlacpstatsentry.PartnerSysMac = net.HardwareAddr(decoder.Read(6)) |
| 2149 | _bsnlacpstatsentry.PartnerPortPriority = uint16(decoder.ReadUint16()) |
| 2150 | _bsnlacpstatsentry.PartnerPortNum = uint16(decoder.ReadUint16()) |
| 2151 | _bsnlacpstatsentry.PartnerKey = uint16(decoder.ReadUint16()) |
| 2152 | decoder.Skip(2) |
| 2153 | return _bsnlacpstatsentry, nil |
| 2154 | } |
| 2155 | |
| 2156 | func NewBsnLacpStatsEntry() *BsnLacpStatsEntry { |
| 2157 | obj := &BsnLacpStatsEntry{} |
| 2158 | return obj |
| 2159 | } |
| 2160 | |
| 2161 | type BsnPortCounterStatsEntry struct { |
| 2162 | Length uint16 |
| 2163 | PortNo Port |
| 2164 | Values []*Uint64 |
| 2165 | } |
| 2166 | |
| 2167 | type IBsnPortCounterStatsEntry interface { |
| 2168 | goloxi.Serializable |
| 2169 | GetLength() uint16 |
| 2170 | GetPortNo() Port |
| 2171 | GetValues() []*Uint64 |
| 2172 | } |
| 2173 | |
| 2174 | func (self *BsnPortCounterStatsEntry) GetLength() uint16 { |
| 2175 | return self.Length |
| 2176 | } |
| 2177 | |
| 2178 | func (self *BsnPortCounterStatsEntry) SetLength(v uint16) { |
| 2179 | self.Length = v |
| 2180 | } |
| 2181 | |
| 2182 | func (self *BsnPortCounterStatsEntry) GetPortNo() Port { |
| 2183 | return self.PortNo |
| 2184 | } |
| 2185 | |
| 2186 | func (self *BsnPortCounterStatsEntry) SetPortNo(v Port) { |
| 2187 | self.PortNo = v |
| 2188 | } |
| 2189 | |
| 2190 | func (self *BsnPortCounterStatsEntry) GetValues() []*Uint64 { |
| 2191 | return self.Values |
| 2192 | } |
| 2193 | |
| 2194 | func (self *BsnPortCounterStatsEntry) SetValues(v []*Uint64) { |
| 2195 | self.Values = v |
| 2196 | } |
| 2197 | |
| 2198 | func (self *BsnPortCounterStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 2199 | |
| 2200 | encoder.PutUint16(uint16(self.Length)) |
| 2201 | encoder.Write(bytes.Repeat([]byte{0}, 2)) |
| 2202 | self.PortNo.Serialize(encoder) |
| 2203 | for _, obj := range self.Values { |
| 2204 | if err := obj.Serialize(encoder); err != nil { |
| 2205 | return err |
| 2206 | } |
| 2207 | } |
| 2208 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 2209 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 2210 | |
| 2211 | return nil |
| 2212 | } |
| 2213 | |
| 2214 | func DecodeBsnPortCounterStatsEntry(decoder *goloxi.Decoder) (*BsnPortCounterStatsEntry, error) { |
| 2215 | _bsnportcounterstatsentry := &BsnPortCounterStatsEntry{} |
| 2216 | if decoder.Length() < 8 { |
| 2217 | return nil, fmt.Errorf("BsnPortCounterStatsEntry packet too short: %d < 8", decoder.Length()) |
| 2218 | } |
| 2219 | _bsnportcounterstatsentry.Length = uint16(decoder.ReadUint16()) |
| 2220 | oldDecoder := decoder |
| 2221 | defer func() { decoder = oldDecoder }() |
| 2222 | decoder = decoder.SliceDecoder(int(_bsnportcounterstatsentry.Length), 2+0) |
| 2223 | decoder.Skip(2) |
| 2224 | _bsnportcounterstatsentry.PortNo.Decode(decoder) |
| 2225 | |
| 2226 | for decoder.Length() >= 8 { |
| 2227 | item, err := DecodeUint64(decoder) |
| 2228 | if err != nil { |
| 2229 | return nil, err |
| 2230 | } |
| 2231 | if item != nil { |
| 2232 | _bsnportcounterstatsentry.Values = append(_bsnportcounterstatsentry.Values, item) |
| 2233 | } |
| 2234 | } |
| 2235 | return _bsnportcounterstatsentry, nil |
| 2236 | } |
| 2237 | |
| 2238 | func NewBsnPortCounterStatsEntry() *BsnPortCounterStatsEntry { |
| 2239 | obj := &BsnPortCounterStatsEntry{} |
| 2240 | return obj |
| 2241 | } |
| 2242 | |
| 2243 | type BsnSwitchPipelineStatsEntry struct { |
| 2244 | Pipeline string |
| 2245 | } |
| 2246 | |
| 2247 | type IBsnSwitchPipelineStatsEntry interface { |
| 2248 | goloxi.Serializable |
| 2249 | GetPipeline() string |
| 2250 | } |
| 2251 | |
| 2252 | func (self *BsnSwitchPipelineStatsEntry) GetPipeline() string { |
| 2253 | return self.Pipeline |
| 2254 | } |
| 2255 | |
| 2256 | func (self *BsnSwitchPipelineStatsEntry) SetPipeline(v string) { |
| 2257 | self.Pipeline = v |
| 2258 | } |
| 2259 | |
| 2260 | func (self *BsnSwitchPipelineStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 2261 | |
| 2262 | encoder.Write([]byte(self.Pipeline)) |
| 2263 | |
| 2264 | return nil |
| 2265 | } |
| 2266 | |
| 2267 | func DecodeBsnSwitchPipelineStatsEntry(decoder *goloxi.Decoder) (*BsnSwitchPipelineStatsEntry, error) { |
| 2268 | _bsnswitchpipelinestatsentry := &BsnSwitchPipelineStatsEntry{} |
| 2269 | if decoder.Length() < 256 { |
| 2270 | return nil, fmt.Errorf("BsnSwitchPipelineStatsEntry packet too short: %d < 256", decoder.Length()) |
| 2271 | } |
| 2272 | _bsnswitchpipelinestatsentry.Pipeline = string(bytes.Trim(decoder.Read(256), "\x00")) |
| 2273 | return _bsnswitchpipelinestatsentry, nil |
| 2274 | } |
| 2275 | |
| 2276 | func NewBsnSwitchPipelineStatsEntry() *BsnSwitchPipelineStatsEntry { |
| 2277 | obj := &BsnSwitchPipelineStatsEntry{} |
| 2278 | return obj |
| 2279 | } |
| 2280 | |
| 2281 | type BsnTableChecksumStatsEntry struct { |
| 2282 | TableId uint8 |
| 2283 | Checksum uint64 |
| 2284 | } |
| 2285 | |
| 2286 | type IBsnTableChecksumStatsEntry interface { |
| 2287 | goloxi.Serializable |
| 2288 | GetTableId() uint8 |
| 2289 | GetChecksum() uint64 |
| 2290 | } |
| 2291 | |
| 2292 | func (self *BsnTableChecksumStatsEntry) GetTableId() uint8 { |
| 2293 | return self.TableId |
| 2294 | } |
| 2295 | |
| 2296 | func (self *BsnTableChecksumStatsEntry) SetTableId(v uint8) { |
| 2297 | self.TableId = v |
| 2298 | } |
| 2299 | |
| 2300 | func (self *BsnTableChecksumStatsEntry) GetChecksum() uint64 { |
| 2301 | return self.Checksum |
| 2302 | } |
| 2303 | |
| 2304 | func (self *BsnTableChecksumStatsEntry) SetChecksum(v uint64) { |
| 2305 | self.Checksum = v |
| 2306 | } |
| 2307 | |
| 2308 | func (self *BsnTableChecksumStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 2309 | |
| 2310 | encoder.PutUint8(uint8(self.TableId)) |
| 2311 | encoder.PutUint64(uint64(self.Checksum)) |
| 2312 | |
| 2313 | return nil |
| 2314 | } |
| 2315 | |
| 2316 | func DecodeBsnTableChecksumStatsEntry(decoder *goloxi.Decoder) (*BsnTableChecksumStatsEntry, error) { |
| 2317 | _bsntablechecksumstatsentry := &BsnTableChecksumStatsEntry{} |
| 2318 | if decoder.Length() < 9 { |
| 2319 | return nil, fmt.Errorf("BsnTableChecksumStatsEntry packet too short: %d < 9", decoder.Length()) |
| 2320 | } |
| 2321 | _bsntablechecksumstatsentry.TableId = uint8(decoder.ReadByte()) |
| 2322 | _bsntablechecksumstatsentry.Checksum = uint64(decoder.ReadUint64()) |
| 2323 | return _bsntablechecksumstatsentry, nil |
| 2324 | } |
| 2325 | |
| 2326 | func NewBsnTableChecksumStatsEntry() *BsnTableChecksumStatsEntry { |
| 2327 | obj := &BsnTableChecksumStatsEntry{} |
| 2328 | return obj |
| 2329 | } |
| 2330 | |
| 2331 | type BsnTlv struct { |
| 2332 | Type uint16 |
| 2333 | Length uint16 |
| 2334 | } |
| 2335 | |
| 2336 | type IBsnTlv interface { |
| 2337 | goloxi.Serializable |
| 2338 | GetType() uint16 |
| 2339 | GetLength() uint16 |
| 2340 | } |
| 2341 | |
| 2342 | func (self *BsnTlv) GetType() uint16 { |
| 2343 | return self.Type |
| 2344 | } |
| 2345 | |
| 2346 | func (self *BsnTlv) SetType(v uint16) { |
| 2347 | self.Type = v |
| 2348 | } |
| 2349 | |
| 2350 | func (self *BsnTlv) GetLength() uint16 { |
| 2351 | return self.Length |
| 2352 | } |
| 2353 | |
| 2354 | func (self *BsnTlv) SetLength(v uint16) { |
| 2355 | self.Length = v |
| 2356 | } |
| 2357 | |
| 2358 | func (self *BsnTlv) Serialize(encoder *goloxi.Encoder) error { |
| 2359 | |
| 2360 | encoder.PutUint16(uint16(self.Type)) |
| 2361 | encoder.PutUint16(uint16(self.Length)) |
| 2362 | |
| 2363 | return nil |
| 2364 | } |
| 2365 | |
| 2366 | func DecodeBsnTlv(decoder *goloxi.Decoder) (IBsnTlv, error) { |
| 2367 | _bsntlv := &BsnTlv{} |
| 2368 | if decoder.Length() < 4 { |
| 2369 | return nil, fmt.Errorf("BsnTlv packet too short: %d < 4", decoder.Length()) |
| 2370 | } |
| 2371 | _bsntlv.Type = uint16(decoder.ReadUint16()) |
| 2372 | _bsntlv.Length = uint16(decoder.ReadUint16()) |
| 2373 | oldDecoder := decoder |
| 2374 | defer func() { decoder = oldDecoder }() |
| 2375 | decoder = decoder.SliceDecoder(int(_bsntlv.Length), 2+2) |
| 2376 | |
| 2377 | switch _bsntlv.Type { |
| 2378 | case 0: |
| 2379 | return DecodeBsnTlvPort(_bsntlv, decoder) |
| 2380 | case 1: |
| 2381 | return DecodeBsnTlvMac(_bsntlv, decoder) |
| 2382 | case 2: |
| 2383 | return DecodeBsnTlvRxPackets(_bsntlv, decoder) |
| 2384 | case 3: |
| 2385 | return DecodeBsnTlvTxPackets(_bsntlv, decoder) |
| 2386 | case 4: |
| 2387 | return DecodeBsnTlvIpv4(_bsntlv, decoder) |
| 2388 | case 5: |
| 2389 | return DecodeBsnTlvIdleTime(_bsntlv, decoder) |
| 2390 | case 6: |
| 2391 | return DecodeBsnTlvVlanVid(_bsntlv, decoder) |
| 2392 | case 7: |
| 2393 | return DecodeBsnTlvIdleNotification(_bsntlv, decoder) |
| 2394 | case 8: |
| 2395 | return DecodeBsnTlvIdleTimeout(_bsntlv, decoder) |
| 2396 | case 9: |
| 2397 | return DecodeBsnTlvUnicastQueryTimeout(_bsntlv, decoder) |
| 2398 | case 10: |
| 2399 | return DecodeBsnTlvBroadcastQueryTimeout(_bsntlv, decoder) |
| 2400 | case 11: |
| 2401 | return DecodeBsnTlvRequestPackets(_bsntlv, decoder) |
| 2402 | case 12: |
| 2403 | return DecodeBsnTlvReplyPackets(_bsntlv, decoder) |
| 2404 | case 13: |
| 2405 | return DecodeBsnTlvMissPackets(_bsntlv, decoder) |
| 2406 | case 14: |
| 2407 | return DecodeBsnTlvCircuitId(_bsntlv, decoder) |
| 2408 | case 15: |
| 2409 | return DecodeBsnTlvUdfId(_bsntlv, decoder) |
| 2410 | case 16: |
| 2411 | return DecodeBsnTlvUdfAnchor(_bsntlv, decoder) |
| 2412 | case 17: |
| 2413 | return DecodeBsnTlvUdfOffset(_bsntlv, decoder) |
| 2414 | case 18: |
| 2415 | return DecodeBsnTlvUdfLength(_bsntlv, decoder) |
| 2416 | case 19: |
| 2417 | return DecodeBsnTlvVrf(_bsntlv, decoder) |
| 2418 | case 20: |
| 2419 | return DecodeBsnTlvQueueId(_bsntlv, decoder) |
| 2420 | case 21: |
| 2421 | return DecodeBsnTlvQueueWeight(_bsntlv, decoder) |
| 2422 | case 22: |
| 2423 | return DecodeBsnTlvCrcEnabled(_bsntlv, decoder) |
| 2424 | case 23: |
| 2425 | return DecodeBsnTlvExternalIp(_bsntlv, decoder) |
| 2426 | case 24: |
| 2427 | return DecodeBsnTlvExternalMac(_bsntlv, decoder) |
| 2428 | case 25: |
| 2429 | return DecodeBsnTlvExternalNetmask(_bsntlv, decoder) |
| 2430 | case 26: |
| 2431 | return DecodeBsnTlvExternalGatewayIp(_bsntlv, decoder) |
| 2432 | case 27: |
| 2433 | return DecodeBsnTlvInternalMac(_bsntlv, decoder) |
| 2434 | case 28: |
| 2435 | return DecodeBsnTlvInternalGatewayMac(_bsntlv, decoder) |
| 2436 | case 29: |
| 2437 | return DecodeBsnTlvExternalGatewayMac(_bsntlv, decoder) |
| 2438 | case 30: |
| 2439 | return DecodeBsnTlvSamplingRate(_bsntlv, decoder) |
| 2440 | case 31: |
| 2441 | return DecodeBsnTlvHeaderSize(_bsntlv, decoder) |
| 2442 | case 32: |
| 2443 | return DecodeBsnTlvEthSrc(_bsntlv, decoder) |
| 2444 | case 33: |
| 2445 | return DecodeBsnTlvEthDst(_bsntlv, decoder) |
| 2446 | case 34: |
| 2447 | return DecodeBsnTlvIpv4Src(_bsntlv, decoder) |
| 2448 | case 35: |
| 2449 | return DecodeBsnTlvIpv4Dst(_bsntlv, decoder) |
| 2450 | case 36: |
| 2451 | return DecodeBsnTlvUdpSrc(_bsntlv, decoder) |
| 2452 | case 37: |
| 2453 | return DecodeBsnTlvUdpDst(_bsntlv, decoder) |
| 2454 | case 38: |
| 2455 | return DecodeBsnTlvSubAgentId(_bsntlv, decoder) |
| 2456 | case 39: |
| 2457 | return DecodeBsnTlvTxBytes(_bsntlv, decoder) |
| 2458 | case 40: |
| 2459 | return DecodeBsnTlvActorSystemPriority(_bsntlv, decoder) |
| 2460 | case 41: |
| 2461 | return DecodeBsnTlvActorSystemMac(_bsntlv, decoder) |
| 2462 | case 42: |
| 2463 | return DecodeBsnTlvActorPortPriority(_bsntlv, decoder) |
| 2464 | case 43: |
| 2465 | return DecodeBsnTlvActorPortNum(_bsntlv, decoder) |
| 2466 | case 44: |
| 2467 | return DecodeBsnTlvActorKey(_bsntlv, decoder) |
| 2468 | case 45: |
| 2469 | return DecodeBsnTlvConvergenceStatus(_bsntlv, decoder) |
| 2470 | case 47: |
| 2471 | return DecodeBsnTlvPartnerSystemPriority(_bsntlv, decoder) |
| 2472 | case 48: |
| 2473 | return DecodeBsnTlvPartnerSystemMac(_bsntlv, decoder) |
| 2474 | case 49: |
| 2475 | return DecodeBsnTlvPartnerPortPriority(_bsntlv, decoder) |
| 2476 | case 50: |
| 2477 | return DecodeBsnTlvPartnerPortNum(_bsntlv, decoder) |
| 2478 | case 51: |
| 2479 | return DecodeBsnTlvPartnerKey(_bsntlv, decoder) |
| 2480 | case 52: |
| 2481 | return DecodeBsnTlvName(_bsntlv, decoder) |
| 2482 | case 53: |
| 2483 | return DecodeBsnTlvActorState(_bsntlv, decoder) |
| 2484 | case 54: |
| 2485 | return DecodeBsnTlvPartnerState(_bsntlv, decoder) |
| 2486 | case 55: |
| 2487 | return DecodeBsnTlvData(_bsntlv, decoder) |
| 2488 | case 56: |
| 2489 | return DecodeBsnTlvMacMask(_bsntlv, decoder) |
| 2490 | case 57: |
| 2491 | return DecodeBsnTlvPriority(_bsntlv, decoder) |
| 2492 | case 58: |
| 2493 | return DecodeBsnTlvInterval(_bsntlv, decoder) |
| 2494 | case 59: |
| 2495 | return DecodeBsnTlvReference(_bsntlv, decoder) |
| 2496 | case 60: |
| 2497 | return DecodeBsnTlvIpv4Netmask(_bsntlv, decoder) |
| 2498 | case 61: |
| 2499 | return DecodeBsnTlvMplsLabel(_bsntlv, decoder) |
| 2500 | case 62: |
| 2501 | return DecodeBsnTlvMplsControlWord(_bsntlv, decoder) |
| 2502 | case 63: |
| 2503 | return DecodeBsnTlvMplsSequenced(_bsntlv, decoder) |
| 2504 | case 64: |
| 2505 | return DecodeBsnTlvBucket(_bsntlv, decoder) |
| 2506 | case 65: |
| 2507 | return DecodeBsnTlvTcpSrc(_bsntlv, decoder) |
| 2508 | case 66: |
| 2509 | return DecodeBsnTlvTcpDst(_bsntlv, decoder) |
| 2510 | case 67: |
| 2511 | return DecodeBsnTlvIpProto(_bsntlv, decoder) |
| 2512 | case 68: |
| 2513 | return DecodeBsnTlvIcmpType(_bsntlv, decoder) |
| 2514 | case 69: |
| 2515 | return DecodeBsnTlvIcmpCode(_bsntlv, decoder) |
| 2516 | case 70: |
| 2517 | return DecodeBsnTlvIcmpId(_bsntlv, decoder) |
| 2518 | case 71: |
| 2519 | return DecodeBsnTlvRxBytes(_bsntlv, decoder) |
| 2520 | case 72: |
| 2521 | return DecodeBsnTlvVlanPcp(_bsntlv, decoder) |
| 2522 | case 73: |
| 2523 | return DecodeBsnTlvStripVlanOnEgress(_bsntlv, decoder) |
| 2524 | case 74: |
| 2525 | return DecodeBsnTlvSetLoopbackMode(_bsntlv, decoder) |
| 2526 | case 75: |
| 2527 | return DecodeBsnTlvStripMplsL2OnIngress(_bsntlv, decoder) |
| 2528 | case 76: |
| 2529 | return DecodeBsnTlvStripMplsL3OnIngress(_bsntlv, decoder) |
| 2530 | case 77: |
| 2531 | return DecodeBsnTlvVlanVidMask(_bsntlv, decoder) |
| 2532 | case 78: |
| 2533 | return DecodeBsnTlvIgmpSnooping(_bsntlv, decoder) |
| 2534 | case 79: |
| 2535 | return DecodeBsnTlvL2MulticastLookup(_bsntlv, decoder) |
| 2536 | case 80: |
| 2537 | return DecodeBsnTlvGenerationId(_bsntlv, decoder) |
| 2538 | case 81: |
| 2539 | return DecodeBsnTlvAnchor(_bsntlv, decoder) |
| 2540 | case 82: |
| 2541 | return DecodeBsnTlvOffset(_bsntlv, decoder) |
| 2542 | case 83: |
| 2543 | return DecodeBsnTlvNegate(_bsntlv, decoder) |
| 2544 | case 84: |
| 2545 | return DecodeBsnTlvIpv6(_bsntlv, decoder) |
| 2546 | case 85: |
| 2547 | return DecodeBsnTlvDecap(_bsntlv, decoder) |
| 2548 | case 86: |
| 2549 | return DecodeBsnTlvVni(_bsntlv, decoder) |
| 2550 | case 87: |
| 2551 | return DecodeBsnTlvMcgTypeVxlan(_bsntlv, decoder) |
| 2552 | case 88: |
| 2553 | return DecodeBsnTlvPortVxlanMode(_bsntlv, decoder) |
| 2554 | case 89: |
| 2555 | return DecodeBsnTlvRateUnit(_bsntlv, decoder) |
| 2556 | case 90: |
| 2557 | return DecodeBsnTlvBroadcastRate(_bsntlv, decoder) |
| 2558 | case 91: |
| 2559 | return DecodeBsnTlvKnownMulticastRate(_bsntlv, decoder) |
| 2560 | case 92: |
| 2561 | return DecodeBsnTlvUnknownMulticastRate(_bsntlv, decoder) |
| 2562 | case 93: |
| 2563 | return DecodeBsnTlvUnicastRate(_bsntlv, decoder) |
| 2564 | case 94: |
| 2565 | return DecodeBsnTlvNexthopTypeVxlan(_bsntlv, decoder) |
| 2566 | case 95: |
| 2567 | return DecodeBsnTlvMulticastInterfaceId(_bsntlv, decoder) |
| 2568 | case 96: |
| 2569 | return DecodeBsnTlvUsePacketState(_bsntlv, decoder) |
| 2570 | case 97: |
| 2571 | return DecodeBsnTlvStatus(_bsntlv, decoder) |
| 2572 | case 98: |
| 2573 | return DecodeBsnTlvVlanMacList(_bsntlv, decoder) |
| 2574 | case 99: |
| 2575 | return DecodeBsnTlvVfi(_bsntlv, decoder) |
| 2576 | case 100: |
| 2577 | return DecodeBsnTlvHashSeed(_bsntlv, decoder) |
| 2578 | case 101: |
| 2579 | return DecodeBsnTlvHashType(_bsntlv, decoder) |
| 2580 | case 102: |
| 2581 | return DecodeBsnTlvHashPacketType(_bsntlv, decoder) |
| 2582 | case 103: |
| 2583 | return DecodeBsnTlvHashPacketField(_bsntlv, decoder) |
| 2584 | case 104: |
| 2585 | return DecodeBsnTlvHashGtpHeaderMatch(_bsntlv, decoder) |
| 2586 | case 105: |
| 2587 | return DecodeBsnTlvHashGtpPortMatch(_bsntlv, decoder) |
| 2588 | case 106: |
| 2589 | return DecodeBsnTlvUntagged(_bsntlv, decoder) |
| 2590 | case 107: |
| 2591 | return DecodeBsnTlvVfpClassId(_bsntlv, decoder) |
| 2592 | case 108: |
| 2593 | return DecodeBsnTlvQosPriority(_bsntlv, decoder) |
| 2594 | case 109: |
| 2595 | return DecodeBsnTlvParentPort(_bsntlv, decoder) |
| 2596 | case 110: |
| 2597 | return DecodeBsnTlvLoopbackPort(_bsntlv, decoder) |
| 2598 | case 111: |
| 2599 | return DecodeBsnTlvVpnKey(_bsntlv, decoder) |
| 2600 | case 112: |
| 2601 | return DecodeBsnTlvDscp(_bsntlv, decoder) |
| 2602 | case 113: |
| 2603 | return DecodeBsnTlvTtl(_bsntlv, decoder) |
| 2604 | case 114: |
| 2605 | return DecodeBsnTlvNextHopMac(_bsntlv, decoder) |
| 2606 | case 115: |
| 2607 | return DecodeBsnTlvNextHopIpv4(_bsntlv, decoder) |
| 2608 | case 116: |
| 2609 | return DecodeBsnTlvRateLimit(_bsntlv, decoder) |
| 2610 | case 117: |
| 2611 | return DecodeBsnTlvVxlanEgressLag(_bsntlv, decoder) |
| 2612 | case 118: |
| 2613 | return DecodeBsnTlvCpuLag(_bsntlv, decoder) |
| 2614 | case 119: |
| 2615 | return DecodeBsnTlvUint64List(_bsntlv, decoder) |
| 2616 | case 120: |
| 2617 | return DecodeBsnTlvDisableSrcMacCheck(_bsntlv, decoder) |
| 2618 | case 121: |
| 2619 | return DecodeBsnTlvDrop(_bsntlv, decoder) |
| 2620 | case 122: |
| 2621 | return DecodeBsnTlvIpv6Prefix(_bsntlv, decoder) |
| 2622 | case 123: |
| 2623 | return DecodeBsnTlvNdpOffload(_bsntlv, decoder) |
| 2624 | case 124: |
| 2625 | return DecodeBsnTlvNdpStatic(_bsntlv, decoder) |
| 2626 | case 125: |
| 2627 | return DecodeBsnTlvIcmpv6Chksum(_bsntlv, decoder) |
| 2628 | case 126: |
| 2629 | return DecodeBsnTlvIpv6Src(_bsntlv, decoder) |
| 2630 | case 127: |
| 2631 | return DecodeBsnTlvIpv6Dst(_bsntlv, decoder) |
| 2632 | case 128: |
| 2633 | return DecodeBsnTlvPushVlanOnIngress(_bsntlv, decoder) |
| 2634 | case 129: |
| 2635 | return DecodeBsnTlvApplyPackets(_bsntlv, decoder) |
| 2636 | case 130: |
| 2637 | return DecodeBsnTlvApplyBytes(_bsntlv, decoder) |
| 2638 | case 131: |
| 2639 | return DecodeBsnTlvEthType(_bsntlv, decoder) |
| 2640 | case 132: |
| 2641 | return DecodeBsnTlvEcn(_bsntlv, decoder) |
| 2642 | case 133: |
| 2643 | return DecodeBsnTlvTcpFlags(_bsntlv, decoder) |
| 2644 | case 134: |
| 2645 | return DecodeBsnTlvL3InterfaceClassId(_bsntlv, decoder) |
| 2646 | case 135: |
| 2647 | return DecodeBsnTlvL3SrcClassId(_bsntlv, decoder) |
| 2648 | case 136: |
| 2649 | return DecodeBsnTlvL3DstClassId(_bsntlv, decoder) |
| 2650 | case 137: |
| 2651 | return DecodeBsnTlvEgressOnly(_bsntlv, decoder) |
| 2652 | case 138: |
| 2653 | return DecodeBsnTlvIngressPortGroupId(_bsntlv, decoder) |
| 2654 | case 139: |
| 2655 | return DecodeBsnTlvEgressPortGroupId(_bsntlv, decoder) |
| 2656 | case 140: |
| 2657 | return DecodeBsnTlvDataMask(_bsntlv, decoder) |
| 2658 | case 141: |
| 2659 | return DecodeBsnTlvPortUsage(_bsntlv, decoder) |
| 2660 | case 142: |
| 2661 | return DecodeBsnTlvTunnelCapability(_bsntlv, decoder) |
| 2662 | case 143: |
| 2663 | return DecodeBsnTlvEnhancedHashCapability(_bsntlv, decoder) |
| 2664 | case 144: |
| 2665 | return DecodeBsnTlvAutoNegotiation(_bsntlv, decoder) |
| 2666 | case 145: |
| 2667 | return DecodeBsnTlvHashAlgorithm(_bsntlv, decoder) |
| 2668 | case 146: |
| 2669 | return DecodeBsnTlvLoopbackMode(_bsntlv, decoder) |
| 2670 | case 147: |
| 2671 | return DecodeBsnTlvNoArpResponse(_bsntlv, decoder) |
| 2672 | case 148: |
| 2673 | return DecodeBsnTlvNoNsResponse(_bsntlv, decoder) |
| 2674 | case 149: |
| 2675 | return DecodeBsnTlvForwardErrorCorrection(_bsntlv, decoder) |
| 2676 | case 150: |
| 2677 | return DecodeBsnTlvOpticsAlwaysEnabled(_bsntlv, decoder) |
| 2678 | case 151: |
| 2679 | return DecodeBsnTlvForceLinkUp(_bsntlv, decoder) |
| 2680 | case 152: |
| 2681 | return DecodeBsnTlvRestServer(_bsntlv, decoder) |
| 2682 | case 153: |
| 2683 | return DecodeBsnTlvUriScheme(_bsntlv, decoder) |
| 2684 | case 154: |
| 2685 | return DecodeBsnTlvTimestamp(_bsntlv, decoder) |
| 2686 | case 155: |
| 2687 | return DecodeBsnTlvRecordPackets(_bsntlv, decoder) |
| 2688 | case 156: |
| 2689 | return DecodeBsnTlvPortSpeedGbps(_bsntlv, decoder) |
| 2690 | case 157: |
| 2691 | return DecodeBsnTlvOuterSrcMac(_bsntlv, decoder) |
| 2692 | case 158: |
| 2693 | return DecodeBsnTlvVirtual(_bsntlv, decoder) |
| 2694 | case 159: |
| 2695 | return DecodeBsnTlvPduaRxInstance(_bsntlv, decoder) |
| 2696 | case 160: |
| 2697 | return DecodeBsnTlvLagOptions(_bsntlv, decoder) |
| 2698 | case 161: |
| 2699 | return DecodeBsnTlvRoutingParam(_bsntlv, decoder) |
| 2700 | case 162: |
| 2701 | return DecodeBsnTlvPushVlanOnEgress(_bsntlv, decoder) |
| 2702 | case 163: |
| 2703 | return DecodeBsnTlvFlood(_bsntlv, decoder) |
| 2704 | case 164: |
| 2705 | return DecodeBsnTlvUpgrade(_bsntlv, decoder) |
| 2706 | case 165: |
| 2707 | return DecodeBsnTlvFabricPortRole(_bsntlv, decoder) |
| 2708 | case 166: |
| 2709 | return DecodeBsnTlvUserConfigured(_bsntlv, decoder) |
| 2710 | case 167: |
| 2711 | return DecodeBsnTlvUint32(_bsntlv, decoder) |
| 2712 | case 168: |
| 2713 | return DecodeBsnTlvL3(_bsntlv, decoder) |
| 2714 | case 169: |
| 2715 | return DecodeBsnTlvIpTunnelType(_bsntlv, decoder) |
| 2716 | case 170: |
| 2717 | return DecodeBsnTlvMulticastPacket(_bsntlv, decoder) |
| 2718 | case 171: |
| 2719 | return DecodeBsnTlvPimDr(_bsntlv, decoder) |
| 2720 | case 172: |
| 2721 | return DecodeBsnTlvPassive(_bsntlv, decoder) |
| 2722 | case 173: |
| 2723 | return DecodeBsnTlvIdentifier(_bsntlv, decoder) |
| 2724 | case 174: |
| 2725 | return DecodeBsnTlvMultiplier(_bsntlv, decoder) |
| 2726 | case 175: |
| 2727 | return DecodeBsnTlvEncap(_bsntlv, decoder) |
| 2728 | case 176: |
| 2729 | return DecodeBsnTlvBfdEndpoint(_bsntlv, decoder) |
| 2730 | case 177: |
| 2731 | return DecodeBsnTlvBfdState(_bsntlv, decoder) |
| 2732 | case 178: |
| 2733 | return DecodeBsnTlvLrAllEnabled(_bsntlv, decoder) |
| 2734 | case 179: |
| 2735 | return DecodeBsnTlvPortMode(_bsntlv, decoder) |
| 2736 | case 180: |
| 2737 | return DecodeBsnTlvUdfCapability(_bsntlv, decoder) |
| 2738 | case 181: |
| 2739 | return DecodeBsnTlvPimHelloFlood(_bsntlv, decoder) |
| 2740 | case 182: |
| 2741 | return DecodeBsnTlvFlowClassify(_bsntlv, decoder) |
| 2742 | case 183: |
| 2743 | return DecodeBsnTlvFlowIdentifier(_bsntlv, decoder) |
| 2744 | case 184: |
| 2745 | return DecodeBsnTlvFlowClassifier(_bsntlv, decoder) |
| 2746 | default: |
| 2747 | return nil, fmt.Errorf("Invalid type '%d' for 'BsnTlv'", _bsntlv.Type) |
| 2748 | } |
| 2749 | } |
| 2750 | |
| 2751 | func NewBsnTlv(_type uint16) *BsnTlv { |
| 2752 | obj := &BsnTlv{} |
| 2753 | obj.Type = _type |
| 2754 | return obj |
| 2755 | } |
| 2756 | |
| 2757 | type BsnTlvActorKey struct { |
| 2758 | *BsnTlv |
| 2759 | Value uint16 |
| 2760 | } |
| 2761 | |
| 2762 | type IBsnTlvActorKey interface { |
| 2763 | IBsnTlv |
| 2764 | GetValue() uint16 |
| 2765 | } |
| 2766 | |
| 2767 | func (self *BsnTlvActorKey) GetValue() uint16 { |
| 2768 | return self.Value |
| 2769 | } |
| 2770 | |
| 2771 | func (self *BsnTlvActorKey) SetValue(v uint16) { |
| 2772 | self.Value = v |
| 2773 | } |
| 2774 | |
| 2775 | func (self *BsnTlvActorKey) Serialize(encoder *goloxi.Encoder) error { |
| 2776 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 2777 | return err |
| 2778 | } |
| 2779 | |
| 2780 | encoder.PutUint16(uint16(self.Value)) |
| 2781 | |
| 2782 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 2783 | |
| 2784 | return nil |
| 2785 | } |
| 2786 | |
| 2787 | func DecodeBsnTlvActorKey(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvActorKey, error) { |
| 2788 | _bsntlvactorkey := &BsnTlvActorKey{BsnTlv: parent} |
| 2789 | if decoder.Length() < 2 { |
| 2790 | return nil, fmt.Errorf("BsnTlvActorKey packet too short: %d < 2", decoder.Length()) |
| 2791 | } |
| 2792 | _bsntlvactorkey.Value = uint16(decoder.ReadUint16()) |
| 2793 | return _bsntlvactorkey, nil |
| 2794 | } |
| 2795 | |
| 2796 | func NewBsnTlvActorKey() *BsnTlvActorKey { |
| 2797 | obj := &BsnTlvActorKey{ |
| 2798 | BsnTlv: NewBsnTlv(44), |
| 2799 | } |
| 2800 | return obj |
| 2801 | } |
| 2802 | |
| 2803 | type BsnTlvActorPortNum struct { |
| 2804 | *BsnTlv |
| 2805 | Value uint16 |
| 2806 | } |
| 2807 | |
| 2808 | type IBsnTlvActorPortNum interface { |
| 2809 | IBsnTlv |
| 2810 | GetValue() uint16 |
| 2811 | } |
| 2812 | |
| 2813 | func (self *BsnTlvActorPortNum) GetValue() uint16 { |
| 2814 | return self.Value |
| 2815 | } |
| 2816 | |
| 2817 | func (self *BsnTlvActorPortNum) SetValue(v uint16) { |
| 2818 | self.Value = v |
| 2819 | } |
| 2820 | |
| 2821 | func (self *BsnTlvActorPortNum) Serialize(encoder *goloxi.Encoder) error { |
| 2822 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 2823 | return err |
| 2824 | } |
| 2825 | |
| 2826 | encoder.PutUint16(uint16(self.Value)) |
| 2827 | |
| 2828 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 2829 | |
| 2830 | return nil |
| 2831 | } |
| 2832 | |
| 2833 | func DecodeBsnTlvActorPortNum(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvActorPortNum, error) { |
| 2834 | _bsntlvactorportnum := &BsnTlvActorPortNum{BsnTlv: parent} |
| 2835 | if decoder.Length() < 2 { |
| 2836 | return nil, fmt.Errorf("BsnTlvActorPortNum packet too short: %d < 2", decoder.Length()) |
| 2837 | } |
| 2838 | _bsntlvactorportnum.Value = uint16(decoder.ReadUint16()) |
| 2839 | return _bsntlvactorportnum, nil |
| 2840 | } |
| 2841 | |
| 2842 | func NewBsnTlvActorPortNum() *BsnTlvActorPortNum { |
| 2843 | obj := &BsnTlvActorPortNum{ |
| 2844 | BsnTlv: NewBsnTlv(43), |
| 2845 | } |
| 2846 | return obj |
| 2847 | } |
| 2848 | |
| 2849 | type BsnTlvActorPortPriority struct { |
| 2850 | *BsnTlv |
| 2851 | Value uint16 |
| 2852 | } |
| 2853 | |
| 2854 | type IBsnTlvActorPortPriority interface { |
| 2855 | IBsnTlv |
| 2856 | GetValue() uint16 |
| 2857 | } |
| 2858 | |
| 2859 | func (self *BsnTlvActorPortPriority) GetValue() uint16 { |
| 2860 | return self.Value |
| 2861 | } |
| 2862 | |
| 2863 | func (self *BsnTlvActorPortPriority) SetValue(v uint16) { |
| 2864 | self.Value = v |
| 2865 | } |
| 2866 | |
| 2867 | func (self *BsnTlvActorPortPriority) Serialize(encoder *goloxi.Encoder) error { |
| 2868 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 2869 | return err |
| 2870 | } |
| 2871 | |
| 2872 | encoder.PutUint16(uint16(self.Value)) |
| 2873 | |
| 2874 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 2875 | |
| 2876 | return nil |
| 2877 | } |
| 2878 | |
| 2879 | func DecodeBsnTlvActorPortPriority(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvActorPortPriority, error) { |
| 2880 | _bsntlvactorportpriority := &BsnTlvActorPortPriority{BsnTlv: parent} |
| 2881 | if decoder.Length() < 2 { |
| 2882 | return nil, fmt.Errorf("BsnTlvActorPortPriority packet too short: %d < 2", decoder.Length()) |
| 2883 | } |
| 2884 | _bsntlvactorportpriority.Value = uint16(decoder.ReadUint16()) |
| 2885 | return _bsntlvactorportpriority, nil |
| 2886 | } |
| 2887 | |
| 2888 | func NewBsnTlvActorPortPriority() *BsnTlvActorPortPriority { |
| 2889 | obj := &BsnTlvActorPortPriority{ |
| 2890 | BsnTlv: NewBsnTlv(42), |
| 2891 | } |
| 2892 | return obj |
| 2893 | } |
| 2894 | |
| 2895 | type BsnTlvActorState struct { |
| 2896 | *BsnTlv |
| 2897 | Value BsnLacpState |
| 2898 | } |
| 2899 | |
| 2900 | type IBsnTlvActorState interface { |
| 2901 | IBsnTlv |
| 2902 | GetValue() BsnLacpState |
| 2903 | } |
| 2904 | |
| 2905 | func (self *BsnTlvActorState) GetValue() BsnLacpState { |
| 2906 | return self.Value |
| 2907 | } |
| 2908 | |
| 2909 | func (self *BsnTlvActorState) SetValue(v BsnLacpState) { |
| 2910 | self.Value = v |
| 2911 | } |
| 2912 | |
| 2913 | func (self *BsnTlvActorState) Serialize(encoder *goloxi.Encoder) error { |
| 2914 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 2915 | return err |
| 2916 | } |
| 2917 | |
| 2918 | encoder.PutUint8(uint8(self.Value)) |
| 2919 | |
| 2920 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 2921 | |
| 2922 | return nil |
| 2923 | } |
| 2924 | |
| 2925 | func DecodeBsnTlvActorState(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvActorState, error) { |
| 2926 | _bsntlvactorstate := &BsnTlvActorState{BsnTlv: parent} |
| 2927 | if decoder.Length() < 1 { |
| 2928 | return nil, fmt.Errorf("BsnTlvActorState packet too short: %d < 1", decoder.Length()) |
| 2929 | } |
| 2930 | _bsntlvactorstate.Value = BsnLacpState(decoder.ReadByte()) |
| 2931 | return _bsntlvactorstate, nil |
| 2932 | } |
| 2933 | |
| 2934 | func NewBsnTlvActorState() *BsnTlvActorState { |
| 2935 | obj := &BsnTlvActorState{ |
| 2936 | BsnTlv: NewBsnTlv(53), |
| 2937 | } |
| 2938 | return obj |
| 2939 | } |
| 2940 | |
| 2941 | type BsnTlvActorSystemMac struct { |
| 2942 | *BsnTlv |
| 2943 | Value net.HardwareAddr |
| 2944 | } |
| 2945 | |
| 2946 | type IBsnTlvActorSystemMac interface { |
| 2947 | IBsnTlv |
| 2948 | GetValue() net.HardwareAddr |
| 2949 | } |
| 2950 | |
| 2951 | func (self *BsnTlvActorSystemMac) GetValue() net.HardwareAddr { |
| 2952 | return self.Value |
| 2953 | } |
| 2954 | |
| 2955 | func (self *BsnTlvActorSystemMac) SetValue(v net.HardwareAddr) { |
| 2956 | self.Value = v |
| 2957 | } |
| 2958 | |
| 2959 | func (self *BsnTlvActorSystemMac) Serialize(encoder *goloxi.Encoder) error { |
| 2960 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 2961 | return err |
| 2962 | } |
| 2963 | |
| 2964 | encoder.Write(self.Value) |
| 2965 | |
| 2966 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 2967 | |
| 2968 | return nil |
| 2969 | } |
| 2970 | |
| 2971 | func DecodeBsnTlvActorSystemMac(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvActorSystemMac, error) { |
| 2972 | _bsntlvactorsystemmac := &BsnTlvActorSystemMac{BsnTlv: parent} |
| 2973 | if decoder.Length() < 6 { |
| 2974 | return nil, fmt.Errorf("BsnTlvActorSystemMac packet too short: %d < 6", decoder.Length()) |
| 2975 | } |
| 2976 | _bsntlvactorsystemmac.Value = net.HardwareAddr(decoder.Read(6)) |
| 2977 | return _bsntlvactorsystemmac, nil |
| 2978 | } |
| 2979 | |
| 2980 | func NewBsnTlvActorSystemMac() *BsnTlvActorSystemMac { |
| 2981 | obj := &BsnTlvActorSystemMac{ |
| 2982 | BsnTlv: NewBsnTlv(41), |
| 2983 | } |
| 2984 | return obj |
| 2985 | } |
| 2986 | |
| 2987 | type BsnTlvActorSystemPriority struct { |
| 2988 | *BsnTlv |
| 2989 | Value uint16 |
| 2990 | } |
| 2991 | |
| 2992 | type IBsnTlvActorSystemPriority interface { |
| 2993 | IBsnTlv |
| 2994 | GetValue() uint16 |
| 2995 | } |
| 2996 | |
| 2997 | func (self *BsnTlvActorSystemPriority) GetValue() uint16 { |
| 2998 | return self.Value |
| 2999 | } |
| 3000 | |
| 3001 | func (self *BsnTlvActorSystemPriority) SetValue(v uint16) { |
| 3002 | self.Value = v |
| 3003 | } |
| 3004 | |
| 3005 | func (self *BsnTlvActorSystemPriority) Serialize(encoder *goloxi.Encoder) error { |
| 3006 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3007 | return err |
| 3008 | } |
| 3009 | |
| 3010 | encoder.PutUint16(uint16(self.Value)) |
| 3011 | |
| 3012 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3013 | |
| 3014 | return nil |
| 3015 | } |
| 3016 | |
| 3017 | func DecodeBsnTlvActorSystemPriority(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvActorSystemPriority, error) { |
| 3018 | _bsntlvactorsystempriority := &BsnTlvActorSystemPriority{BsnTlv: parent} |
| 3019 | if decoder.Length() < 2 { |
| 3020 | return nil, fmt.Errorf("BsnTlvActorSystemPriority packet too short: %d < 2", decoder.Length()) |
| 3021 | } |
| 3022 | _bsntlvactorsystempriority.Value = uint16(decoder.ReadUint16()) |
| 3023 | return _bsntlvactorsystempriority, nil |
| 3024 | } |
| 3025 | |
| 3026 | func NewBsnTlvActorSystemPriority() *BsnTlvActorSystemPriority { |
| 3027 | obj := &BsnTlvActorSystemPriority{ |
| 3028 | BsnTlv: NewBsnTlv(40), |
| 3029 | } |
| 3030 | return obj |
| 3031 | } |
| 3032 | |
| 3033 | type BsnTlvAnchor struct { |
| 3034 | *BsnTlv |
| 3035 | Value BsnAnchor |
| 3036 | } |
| 3037 | |
| 3038 | type IBsnTlvAnchor interface { |
| 3039 | IBsnTlv |
| 3040 | GetValue() BsnAnchor |
| 3041 | } |
| 3042 | |
| 3043 | func (self *BsnTlvAnchor) GetValue() BsnAnchor { |
| 3044 | return self.Value |
| 3045 | } |
| 3046 | |
| 3047 | func (self *BsnTlvAnchor) SetValue(v BsnAnchor) { |
| 3048 | self.Value = v |
| 3049 | } |
| 3050 | |
| 3051 | func (self *BsnTlvAnchor) Serialize(encoder *goloxi.Encoder) error { |
| 3052 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3053 | return err |
| 3054 | } |
| 3055 | |
| 3056 | encoder.PutUint16(uint16(self.Value)) |
| 3057 | |
| 3058 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3059 | |
| 3060 | return nil |
| 3061 | } |
| 3062 | |
| 3063 | func DecodeBsnTlvAnchor(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvAnchor, error) { |
| 3064 | _bsntlvanchor := &BsnTlvAnchor{BsnTlv: parent} |
| 3065 | if decoder.Length() < 2 { |
| 3066 | return nil, fmt.Errorf("BsnTlvAnchor packet too short: %d < 2", decoder.Length()) |
| 3067 | } |
| 3068 | _bsntlvanchor.Value = BsnAnchor(decoder.ReadUint16()) |
| 3069 | return _bsntlvanchor, nil |
| 3070 | } |
| 3071 | |
| 3072 | func NewBsnTlvAnchor() *BsnTlvAnchor { |
| 3073 | obj := &BsnTlvAnchor{ |
| 3074 | BsnTlv: NewBsnTlv(81), |
| 3075 | } |
| 3076 | return obj |
| 3077 | } |
| 3078 | |
| 3079 | type BsnTlvApplyBytes struct { |
| 3080 | *BsnTlv |
| 3081 | Value uint64 |
| 3082 | } |
| 3083 | |
| 3084 | type IBsnTlvApplyBytes interface { |
| 3085 | IBsnTlv |
| 3086 | GetValue() uint64 |
| 3087 | } |
| 3088 | |
| 3089 | func (self *BsnTlvApplyBytes) GetValue() uint64 { |
| 3090 | return self.Value |
| 3091 | } |
| 3092 | |
| 3093 | func (self *BsnTlvApplyBytes) SetValue(v uint64) { |
| 3094 | self.Value = v |
| 3095 | } |
| 3096 | |
| 3097 | func (self *BsnTlvApplyBytes) Serialize(encoder *goloxi.Encoder) error { |
| 3098 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3099 | return err |
| 3100 | } |
| 3101 | |
| 3102 | encoder.PutUint64(uint64(self.Value)) |
| 3103 | |
| 3104 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3105 | |
| 3106 | return nil |
| 3107 | } |
| 3108 | |
| 3109 | func DecodeBsnTlvApplyBytes(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvApplyBytes, error) { |
| 3110 | _bsntlvapplybytes := &BsnTlvApplyBytes{BsnTlv: parent} |
| 3111 | if decoder.Length() < 8 { |
| 3112 | return nil, fmt.Errorf("BsnTlvApplyBytes packet too short: %d < 8", decoder.Length()) |
| 3113 | } |
| 3114 | _bsntlvapplybytes.Value = uint64(decoder.ReadUint64()) |
| 3115 | return _bsntlvapplybytes, nil |
| 3116 | } |
| 3117 | |
| 3118 | func NewBsnTlvApplyBytes() *BsnTlvApplyBytes { |
| 3119 | obj := &BsnTlvApplyBytes{ |
| 3120 | BsnTlv: NewBsnTlv(130), |
| 3121 | } |
| 3122 | return obj |
| 3123 | } |
| 3124 | |
| 3125 | type BsnTlvApplyPackets struct { |
| 3126 | *BsnTlv |
| 3127 | Value uint64 |
| 3128 | } |
| 3129 | |
| 3130 | type IBsnTlvApplyPackets interface { |
| 3131 | IBsnTlv |
| 3132 | GetValue() uint64 |
| 3133 | } |
| 3134 | |
| 3135 | func (self *BsnTlvApplyPackets) GetValue() uint64 { |
| 3136 | return self.Value |
| 3137 | } |
| 3138 | |
| 3139 | func (self *BsnTlvApplyPackets) SetValue(v uint64) { |
| 3140 | self.Value = v |
| 3141 | } |
| 3142 | |
| 3143 | func (self *BsnTlvApplyPackets) Serialize(encoder *goloxi.Encoder) error { |
| 3144 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3145 | return err |
| 3146 | } |
| 3147 | |
| 3148 | encoder.PutUint64(uint64(self.Value)) |
| 3149 | |
| 3150 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3151 | |
| 3152 | return nil |
| 3153 | } |
| 3154 | |
| 3155 | func DecodeBsnTlvApplyPackets(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvApplyPackets, error) { |
| 3156 | _bsntlvapplypackets := &BsnTlvApplyPackets{BsnTlv: parent} |
| 3157 | if decoder.Length() < 8 { |
| 3158 | return nil, fmt.Errorf("BsnTlvApplyPackets packet too short: %d < 8", decoder.Length()) |
| 3159 | } |
| 3160 | _bsntlvapplypackets.Value = uint64(decoder.ReadUint64()) |
| 3161 | return _bsntlvapplypackets, nil |
| 3162 | } |
| 3163 | |
| 3164 | func NewBsnTlvApplyPackets() *BsnTlvApplyPackets { |
| 3165 | obj := &BsnTlvApplyPackets{ |
| 3166 | BsnTlv: NewBsnTlv(129), |
| 3167 | } |
| 3168 | return obj |
| 3169 | } |
| 3170 | |
| 3171 | type BsnTlvAutoNegotiation struct { |
| 3172 | *BsnTlv |
| 3173 | Value BsnAutoNegotiationType |
| 3174 | } |
| 3175 | |
| 3176 | type IBsnTlvAutoNegotiation interface { |
| 3177 | IBsnTlv |
| 3178 | GetValue() BsnAutoNegotiationType |
| 3179 | } |
| 3180 | |
| 3181 | func (self *BsnTlvAutoNegotiation) GetValue() BsnAutoNegotiationType { |
| 3182 | return self.Value |
| 3183 | } |
| 3184 | |
| 3185 | func (self *BsnTlvAutoNegotiation) SetValue(v BsnAutoNegotiationType) { |
| 3186 | self.Value = v |
| 3187 | } |
| 3188 | |
| 3189 | func (self *BsnTlvAutoNegotiation) Serialize(encoder *goloxi.Encoder) error { |
| 3190 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3191 | return err |
| 3192 | } |
| 3193 | |
| 3194 | encoder.PutUint8(uint8(self.Value)) |
| 3195 | |
| 3196 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3197 | |
| 3198 | return nil |
| 3199 | } |
| 3200 | |
| 3201 | func DecodeBsnTlvAutoNegotiation(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvAutoNegotiation, error) { |
| 3202 | _bsntlvautonegotiation := &BsnTlvAutoNegotiation{BsnTlv: parent} |
| 3203 | if decoder.Length() < 1 { |
| 3204 | return nil, fmt.Errorf("BsnTlvAutoNegotiation packet too short: %d < 1", decoder.Length()) |
| 3205 | } |
| 3206 | _bsntlvautonegotiation.Value = BsnAutoNegotiationType(decoder.ReadByte()) |
| 3207 | return _bsntlvautonegotiation, nil |
| 3208 | } |
| 3209 | |
| 3210 | func NewBsnTlvAutoNegotiation() *BsnTlvAutoNegotiation { |
| 3211 | obj := &BsnTlvAutoNegotiation{ |
| 3212 | BsnTlv: NewBsnTlv(144), |
| 3213 | } |
| 3214 | return obj |
| 3215 | } |
| 3216 | |
| 3217 | type BsnTlvBfdEndpoint struct { |
| 3218 | *BsnTlv |
| 3219 | Value BsnBfdEndpoint |
| 3220 | } |
| 3221 | |
| 3222 | type IBsnTlvBfdEndpoint interface { |
| 3223 | IBsnTlv |
| 3224 | GetValue() BsnBfdEndpoint |
| 3225 | } |
| 3226 | |
| 3227 | func (self *BsnTlvBfdEndpoint) GetValue() BsnBfdEndpoint { |
| 3228 | return self.Value |
| 3229 | } |
| 3230 | |
| 3231 | func (self *BsnTlvBfdEndpoint) SetValue(v BsnBfdEndpoint) { |
| 3232 | self.Value = v |
| 3233 | } |
| 3234 | |
| 3235 | func (self *BsnTlvBfdEndpoint) Serialize(encoder *goloxi.Encoder) error { |
| 3236 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3237 | return err |
| 3238 | } |
| 3239 | |
| 3240 | encoder.PutUint8(uint8(self.Value)) |
| 3241 | |
| 3242 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3243 | |
| 3244 | return nil |
| 3245 | } |
| 3246 | |
| 3247 | func DecodeBsnTlvBfdEndpoint(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvBfdEndpoint, error) { |
| 3248 | _bsntlvbfdendpoint := &BsnTlvBfdEndpoint{BsnTlv: parent} |
| 3249 | if decoder.Length() < 1 { |
| 3250 | return nil, fmt.Errorf("BsnTlvBfdEndpoint packet too short: %d < 1", decoder.Length()) |
| 3251 | } |
| 3252 | _bsntlvbfdendpoint.Value = BsnBfdEndpoint(decoder.ReadByte()) |
| 3253 | return _bsntlvbfdendpoint, nil |
| 3254 | } |
| 3255 | |
| 3256 | func NewBsnTlvBfdEndpoint() *BsnTlvBfdEndpoint { |
| 3257 | obj := &BsnTlvBfdEndpoint{ |
| 3258 | BsnTlv: NewBsnTlv(176), |
| 3259 | } |
| 3260 | return obj |
| 3261 | } |
| 3262 | |
| 3263 | type BsnTlvBfdState struct { |
| 3264 | *BsnTlv |
| 3265 | Value BsnBfdEndpointState |
| 3266 | } |
| 3267 | |
| 3268 | type IBsnTlvBfdState interface { |
| 3269 | IBsnTlv |
| 3270 | GetValue() BsnBfdEndpointState |
| 3271 | } |
| 3272 | |
| 3273 | func (self *BsnTlvBfdState) GetValue() BsnBfdEndpointState { |
| 3274 | return self.Value |
| 3275 | } |
| 3276 | |
| 3277 | func (self *BsnTlvBfdState) SetValue(v BsnBfdEndpointState) { |
| 3278 | self.Value = v |
| 3279 | } |
| 3280 | |
| 3281 | func (self *BsnTlvBfdState) Serialize(encoder *goloxi.Encoder) error { |
| 3282 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3283 | return err |
| 3284 | } |
| 3285 | |
| 3286 | encoder.PutUint8(uint8(self.Value)) |
| 3287 | |
| 3288 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3289 | |
| 3290 | return nil |
| 3291 | } |
| 3292 | |
| 3293 | func DecodeBsnTlvBfdState(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvBfdState, error) { |
| 3294 | _bsntlvbfdstate := &BsnTlvBfdState{BsnTlv: parent} |
| 3295 | if decoder.Length() < 1 { |
| 3296 | return nil, fmt.Errorf("BsnTlvBfdState packet too short: %d < 1", decoder.Length()) |
| 3297 | } |
| 3298 | _bsntlvbfdstate.Value = BsnBfdEndpointState(decoder.ReadByte()) |
| 3299 | return _bsntlvbfdstate, nil |
| 3300 | } |
| 3301 | |
| 3302 | func NewBsnTlvBfdState() *BsnTlvBfdState { |
| 3303 | obj := &BsnTlvBfdState{ |
| 3304 | BsnTlv: NewBsnTlv(177), |
| 3305 | } |
| 3306 | return obj |
| 3307 | } |
| 3308 | |
| 3309 | type BsnTlvBroadcastQueryTimeout struct { |
| 3310 | *BsnTlv |
| 3311 | Value uint32 |
| 3312 | } |
| 3313 | |
| 3314 | type IBsnTlvBroadcastQueryTimeout interface { |
| 3315 | IBsnTlv |
| 3316 | GetValue() uint32 |
| 3317 | } |
| 3318 | |
| 3319 | func (self *BsnTlvBroadcastQueryTimeout) GetValue() uint32 { |
| 3320 | return self.Value |
| 3321 | } |
| 3322 | |
| 3323 | func (self *BsnTlvBroadcastQueryTimeout) SetValue(v uint32) { |
| 3324 | self.Value = v |
| 3325 | } |
| 3326 | |
| 3327 | func (self *BsnTlvBroadcastQueryTimeout) Serialize(encoder *goloxi.Encoder) error { |
| 3328 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3329 | return err |
| 3330 | } |
| 3331 | |
| 3332 | encoder.PutUint32(uint32(self.Value)) |
| 3333 | |
| 3334 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3335 | |
| 3336 | return nil |
| 3337 | } |
| 3338 | |
| 3339 | func DecodeBsnTlvBroadcastQueryTimeout(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvBroadcastQueryTimeout, error) { |
| 3340 | _bsntlvbroadcastquerytimeout := &BsnTlvBroadcastQueryTimeout{BsnTlv: parent} |
| 3341 | if decoder.Length() < 4 { |
| 3342 | return nil, fmt.Errorf("BsnTlvBroadcastQueryTimeout packet too short: %d < 4", decoder.Length()) |
| 3343 | } |
| 3344 | _bsntlvbroadcastquerytimeout.Value = uint32(decoder.ReadUint32()) |
| 3345 | return _bsntlvbroadcastquerytimeout, nil |
| 3346 | } |
| 3347 | |
| 3348 | func NewBsnTlvBroadcastQueryTimeout() *BsnTlvBroadcastQueryTimeout { |
| 3349 | obj := &BsnTlvBroadcastQueryTimeout{ |
| 3350 | BsnTlv: NewBsnTlv(10), |
| 3351 | } |
| 3352 | return obj |
| 3353 | } |
| 3354 | |
| 3355 | type BsnTlvBroadcastRate struct { |
| 3356 | *BsnTlv |
| 3357 | Value uint32 |
| 3358 | } |
| 3359 | |
| 3360 | type IBsnTlvBroadcastRate interface { |
| 3361 | IBsnTlv |
| 3362 | GetValue() uint32 |
| 3363 | } |
| 3364 | |
| 3365 | func (self *BsnTlvBroadcastRate) GetValue() uint32 { |
| 3366 | return self.Value |
| 3367 | } |
| 3368 | |
| 3369 | func (self *BsnTlvBroadcastRate) SetValue(v uint32) { |
| 3370 | self.Value = v |
| 3371 | } |
| 3372 | |
| 3373 | func (self *BsnTlvBroadcastRate) Serialize(encoder *goloxi.Encoder) error { |
| 3374 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3375 | return err |
| 3376 | } |
| 3377 | |
| 3378 | encoder.PutUint32(uint32(self.Value)) |
| 3379 | |
| 3380 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3381 | |
| 3382 | return nil |
| 3383 | } |
| 3384 | |
| 3385 | func DecodeBsnTlvBroadcastRate(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvBroadcastRate, error) { |
| 3386 | _bsntlvbroadcastrate := &BsnTlvBroadcastRate{BsnTlv: parent} |
| 3387 | if decoder.Length() < 4 { |
| 3388 | return nil, fmt.Errorf("BsnTlvBroadcastRate packet too short: %d < 4", decoder.Length()) |
| 3389 | } |
| 3390 | _bsntlvbroadcastrate.Value = uint32(decoder.ReadUint32()) |
| 3391 | return _bsntlvbroadcastrate, nil |
| 3392 | } |
| 3393 | |
| 3394 | func NewBsnTlvBroadcastRate() *BsnTlvBroadcastRate { |
| 3395 | obj := &BsnTlvBroadcastRate{ |
| 3396 | BsnTlv: NewBsnTlv(90), |
| 3397 | } |
| 3398 | return obj |
| 3399 | } |
| 3400 | |
| 3401 | type BsnTlvBucket struct { |
| 3402 | *BsnTlv |
| 3403 | Value []IBsnTlv |
| 3404 | } |
| 3405 | |
| 3406 | type IBsnTlvBucket interface { |
| 3407 | IBsnTlv |
| 3408 | GetValue() []IBsnTlv |
| 3409 | } |
| 3410 | |
| 3411 | func (self *BsnTlvBucket) GetValue() []IBsnTlv { |
| 3412 | return self.Value |
| 3413 | } |
| 3414 | |
| 3415 | func (self *BsnTlvBucket) SetValue(v []IBsnTlv) { |
| 3416 | self.Value = v |
| 3417 | } |
| 3418 | |
| 3419 | func (self *BsnTlvBucket) Serialize(encoder *goloxi.Encoder) error { |
| 3420 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3421 | return err |
| 3422 | } |
| 3423 | |
| 3424 | for _, obj := range self.Value { |
| 3425 | if err := obj.Serialize(encoder); err != nil { |
| 3426 | return err |
| 3427 | } |
| 3428 | } |
| 3429 | |
| 3430 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3431 | |
| 3432 | return nil |
| 3433 | } |
| 3434 | |
| 3435 | func DecodeBsnTlvBucket(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvBucket, error) { |
| 3436 | _bsntlvbucket := &BsnTlvBucket{BsnTlv: parent} |
| 3437 | |
| 3438 | for decoder.Length() >= 4 { |
| 3439 | item, err := DecodeBsnTlv(decoder) |
| 3440 | if err != nil { |
| 3441 | return nil, err |
| 3442 | } |
| 3443 | if item != nil { |
| 3444 | _bsntlvbucket.Value = append(_bsntlvbucket.Value, item) |
| 3445 | } |
| 3446 | } |
| 3447 | return _bsntlvbucket, nil |
| 3448 | } |
| 3449 | |
| 3450 | func NewBsnTlvBucket() *BsnTlvBucket { |
| 3451 | obj := &BsnTlvBucket{ |
| 3452 | BsnTlv: NewBsnTlv(64), |
| 3453 | } |
| 3454 | return obj |
| 3455 | } |
| 3456 | |
| 3457 | type BsnTlvCircuitId struct { |
| 3458 | *BsnTlv |
| 3459 | Value []byte |
| 3460 | } |
| 3461 | |
| 3462 | type IBsnTlvCircuitId interface { |
| 3463 | IBsnTlv |
| 3464 | GetValue() []byte |
| 3465 | } |
| 3466 | |
| 3467 | func (self *BsnTlvCircuitId) GetValue() []byte { |
| 3468 | return self.Value |
| 3469 | } |
| 3470 | |
| 3471 | func (self *BsnTlvCircuitId) SetValue(v []byte) { |
| 3472 | self.Value = v |
| 3473 | } |
| 3474 | |
| 3475 | func (self *BsnTlvCircuitId) Serialize(encoder *goloxi.Encoder) error { |
| 3476 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3477 | return err |
| 3478 | } |
| 3479 | |
| 3480 | encoder.Write(self.Value) |
| 3481 | |
| 3482 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3483 | |
| 3484 | return nil |
| 3485 | } |
| 3486 | |
| 3487 | func DecodeBsnTlvCircuitId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvCircuitId, error) { |
| 3488 | _bsntlvcircuitid := &BsnTlvCircuitId{BsnTlv: parent} |
| 3489 | _bsntlvcircuitid.Value = decoder.Read(int(decoder.Length())) |
| 3490 | return _bsntlvcircuitid, nil |
| 3491 | } |
| 3492 | |
| 3493 | func NewBsnTlvCircuitId() *BsnTlvCircuitId { |
| 3494 | obj := &BsnTlvCircuitId{ |
| 3495 | BsnTlv: NewBsnTlv(14), |
| 3496 | } |
| 3497 | return obj |
| 3498 | } |
| 3499 | |
| 3500 | type BsnTlvConvergenceStatus struct { |
| 3501 | *BsnTlv |
| 3502 | Value uint8 |
| 3503 | } |
| 3504 | |
| 3505 | type IBsnTlvConvergenceStatus interface { |
| 3506 | IBsnTlv |
| 3507 | GetValue() uint8 |
| 3508 | } |
| 3509 | |
| 3510 | func (self *BsnTlvConvergenceStatus) GetValue() uint8 { |
| 3511 | return self.Value |
| 3512 | } |
| 3513 | |
| 3514 | func (self *BsnTlvConvergenceStatus) SetValue(v uint8) { |
| 3515 | self.Value = v |
| 3516 | } |
| 3517 | |
| 3518 | func (self *BsnTlvConvergenceStatus) Serialize(encoder *goloxi.Encoder) error { |
| 3519 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3520 | return err |
| 3521 | } |
| 3522 | |
| 3523 | encoder.PutUint8(uint8(self.Value)) |
| 3524 | |
| 3525 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3526 | |
| 3527 | return nil |
| 3528 | } |
| 3529 | |
| 3530 | func DecodeBsnTlvConvergenceStatus(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvConvergenceStatus, error) { |
| 3531 | _bsntlvconvergencestatus := &BsnTlvConvergenceStatus{BsnTlv: parent} |
| 3532 | if decoder.Length() < 1 { |
| 3533 | return nil, fmt.Errorf("BsnTlvConvergenceStatus packet too short: %d < 1", decoder.Length()) |
| 3534 | } |
| 3535 | _bsntlvconvergencestatus.Value = uint8(decoder.ReadByte()) |
| 3536 | return _bsntlvconvergencestatus, nil |
| 3537 | } |
| 3538 | |
| 3539 | func NewBsnTlvConvergenceStatus() *BsnTlvConvergenceStatus { |
| 3540 | obj := &BsnTlvConvergenceStatus{ |
| 3541 | BsnTlv: NewBsnTlv(45), |
| 3542 | } |
| 3543 | return obj |
| 3544 | } |
| 3545 | |
| 3546 | type BsnTlvCpuLag struct { |
| 3547 | *BsnTlv |
| 3548 | } |
| 3549 | |
| 3550 | type IBsnTlvCpuLag interface { |
| 3551 | IBsnTlv |
| 3552 | } |
| 3553 | |
| 3554 | func (self *BsnTlvCpuLag) Serialize(encoder *goloxi.Encoder) error { |
| 3555 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3556 | return err |
| 3557 | } |
| 3558 | |
| 3559 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3560 | |
| 3561 | return nil |
| 3562 | } |
| 3563 | |
| 3564 | func DecodeBsnTlvCpuLag(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvCpuLag, error) { |
| 3565 | _bsntlvcpulag := &BsnTlvCpuLag{BsnTlv: parent} |
| 3566 | return _bsntlvcpulag, nil |
| 3567 | } |
| 3568 | |
| 3569 | func NewBsnTlvCpuLag() *BsnTlvCpuLag { |
| 3570 | obj := &BsnTlvCpuLag{ |
| 3571 | BsnTlv: NewBsnTlv(118), |
| 3572 | } |
| 3573 | return obj |
| 3574 | } |
| 3575 | |
| 3576 | type BsnTlvCrcEnabled struct { |
| 3577 | *BsnTlv |
| 3578 | Value uint8 |
| 3579 | } |
| 3580 | |
| 3581 | type IBsnTlvCrcEnabled interface { |
| 3582 | IBsnTlv |
| 3583 | GetValue() uint8 |
| 3584 | } |
| 3585 | |
| 3586 | func (self *BsnTlvCrcEnabled) GetValue() uint8 { |
| 3587 | return self.Value |
| 3588 | } |
| 3589 | |
| 3590 | func (self *BsnTlvCrcEnabled) SetValue(v uint8) { |
| 3591 | self.Value = v |
| 3592 | } |
| 3593 | |
| 3594 | func (self *BsnTlvCrcEnabled) Serialize(encoder *goloxi.Encoder) error { |
| 3595 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3596 | return err |
| 3597 | } |
| 3598 | |
| 3599 | encoder.PutUint8(uint8(self.Value)) |
| 3600 | |
| 3601 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3602 | |
| 3603 | return nil |
| 3604 | } |
| 3605 | |
| 3606 | func DecodeBsnTlvCrcEnabled(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvCrcEnabled, error) { |
| 3607 | _bsntlvcrcenabled := &BsnTlvCrcEnabled{BsnTlv: parent} |
| 3608 | if decoder.Length() < 1 { |
| 3609 | return nil, fmt.Errorf("BsnTlvCrcEnabled packet too short: %d < 1", decoder.Length()) |
| 3610 | } |
| 3611 | _bsntlvcrcenabled.Value = uint8(decoder.ReadByte()) |
| 3612 | return _bsntlvcrcenabled, nil |
| 3613 | } |
| 3614 | |
| 3615 | func NewBsnTlvCrcEnabled() *BsnTlvCrcEnabled { |
| 3616 | obj := &BsnTlvCrcEnabled{ |
| 3617 | BsnTlv: NewBsnTlv(22), |
| 3618 | } |
| 3619 | return obj |
| 3620 | } |
| 3621 | |
| 3622 | type BsnTlvData struct { |
| 3623 | *BsnTlv |
| 3624 | Value []byte |
| 3625 | } |
| 3626 | |
| 3627 | type IBsnTlvData interface { |
| 3628 | IBsnTlv |
| 3629 | GetValue() []byte |
| 3630 | } |
| 3631 | |
| 3632 | func (self *BsnTlvData) GetValue() []byte { |
| 3633 | return self.Value |
| 3634 | } |
| 3635 | |
| 3636 | func (self *BsnTlvData) SetValue(v []byte) { |
| 3637 | self.Value = v |
| 3638 | } |
| 3639 | |
| 3640 | func (self *BsnTlvData) Serialize(encoder *goloxi.Encoder) error { |
| 3641 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3642 | return err |
| 3643 | } |
| 3644 | |
| 3645 | encoder.Write(self.Value) |
| 3646 | |
| 3647 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3648 | |
| 3649 | return nil |
| 3650 | } |
| 3651 | |
| 3652 | func DecodeBsnTlvData(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvData, error) { |
| 3653 | _bsntlvdata := &BsnTlvData{BsnTlv: parent} |
| 3654 | _bsntlvdata.Value = decoder.Read(int(decoder.Length())) |
| 3655 | return _bsntlvdata, nil |
| 3656 | } |
| 3657 | |
| 3658 | func NewBsnTlvData() *BsnTlvData { |
| 3659 | obj := &BsnTlvData{ |
| 3660 | BsnTlv: NewBsnTlv(55), |
| 3661 | } |
| 3662 | return obj |
| 3663 | } |
| 3664 | |
| 3665 | type BsnTlvDataMask struct { |
| 3666 | *BsnTlv |
| 3667 | Value []byte |
| 3668 | } |
| 3669 | |
| 3670 | type IBsnTlvDataMask interface { |
| 3671 | IBsnTlv |
| 3672 | GetValue() []byte |
| 3673 | } |
| 3674 | |
| 3675 | func (self *BsnTlvDataMask) GetValue() []byte { |
| 3676 | return self.Value |
| 3677 | } |
| 3678 | |
| 3679 | func (self *BsnTlvDataMask) SetValue(v []byte) { |
| 3680 | self.Value = v |
| 3681 | } |
| 3682 | |
| 3683 | func (self *BsnTlvDataMask) Serialize(encoder *goloxi.Encoder) error { |
| 3684 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3685 | return err |
| 3686 | } |
| 3687 | |
| 3688 | encoder.Write(self.Value) |
| 3689 | |
| 3690 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3691 | |
| 3692 | return nil |
| 3693 | } |
| 3694 | |
| 3695 | func DecodeBsnTlvDataMask(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvDataMask, error) { |
| 3696 | _bsntlvdatamask := &BsnTlvDataMask{BsnTlv: parent} |
| 3697 | _bsntlvdatamask.Value = decoder.Read(int(decoder.Length())) |
| 3698 | return _bsntlvdatamask, nil |
| 3699 | } |
| 3700 | |
| 3701 | func NewBsnTlvDataMask() *BsnTlvDataMask { |
| 3702 | obj := &BsnTlvDataMask{ |
| 3703 | BsnTlv: NewBsnTlv(140), |
| 3704 | } |
| 3705 | return obj |
| 3706 | } |
| 3707 | |
| 3708 | type BsnTlvDecap struct { |
| 3709 | *BsnTlv |
| 3710 | Value BsnDecap |
| 3711 | } |
| 3712 | |
| 3713 | type IBsnTlvDecap interface { |
| 3714 | IBsnTlv |
| 3715 | GetValue() BsnDecap |
| 3716 | } |
| 3717 | |
| 3718 | func (self *BsnTlvDecap) GetValue() BsnDecap { |
| 3719 | return self.Value |
| 3720 | } |
| 3721 | |
| 3722 | func (self *BsnTlvDecap) SetValue(v BsnDecap) { |
| 3723 | self.Value = v |
| 3724 | } |
| 3725 | |
| 3726 | func (self *BsnTlvDecap) Serialize(encoder *goloxi.Encoder) error { |
| 3727 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3728 | return err |
| 3729 | } |
| 3730 | |
| 3731 | encoder.PutUint16(uint16(self.Value)) |
| 3732 | |
| 3733 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3734 | |
| 3735 | return nil |
| 3736 | } |
| 3737 | |
| 3738 | func DecodeBsnTlvDecap(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvDecap, error) { |
| 3739 | _bsntlvdecap := &BsnTlvDecap{BsnTlv: parent} |
| 3740 | if decoder.Length() < 2 { |
| 3741 | return nil, fmt.Errorf("BsnTlvDecap packet too short: %d < 2", decoder.Length()) |
| 3742 | } |
| 3743 | _bsntlvdecap.Value = BsnDecap(decoder.ReadUint16()) |
| 3744 | return _bsntlvdecap, nil |
| 3745 | } |
| 3746 | |
| 3747 | func NewBsnTlvDecap() *BsnTlvDecap { |
| 3748 | obj := &BsnTlvDecap{ |
| 3749 | BsnTlv: NewBsnTlv(85), |
| 3750 | } |
| 3751 | return obj |
| 3752 | } |
| 3753 | |
| 3754 | type BsnTlvDisableSrcMacCheck struct { |
| 3755 | *BsnTlv |
| 3756 | } |
| 3757 | |
| 3758 | type IBsnTlvDisableSrcMacCheck interface { |
| 3759 | IBsnTlv |
| 3760 | } |
| 3761 | |
| 3762 | func (self *BsnTlvDisableSrcMacCheck) Serialize(encoder *goloxi.Encoder) error { |
| 3763 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3764 | return err |
| 3765 | } |
| 3766 | |
| 3767 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3768 | |
| 3769 | return nil |
| 3770 | } |
| 3771 | |
| 3772 | func DecodeBsnTlvDisableSrcMacCheck(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvDisableSrcMacCheck, error) { |
| 3773 | _bsntlvdisablesrcmaccheck := &BsnTlvDisableSrcMacCheck{BsnTlv: parent} |
| 3774 | return _bsntlvdisablesrcmaccheck, nil |
| 3775 | } |
| 3776 | |
| 3777 | func NewBsnTlvDisableSrcMacCheck() *BsnTlvDisableSrcMacCheck { |
| 3778 | obj := &BsnTlvDisableSrcMacCheck{ |
| 3779 | BsnTlv: NewBsnTlv(120), |
| 3780 | } |
| 3781 | return obj |
| 3782 | } |
| 3783 | |
| 3784 | type BsnTlvDrop struct { |
| 3785 | *BsnTlv |
| 3786 | } |
| 3787 | |
| 3788 | type IBsnTlvDrop interface { |
| 3789 | IBsnTlv |
| 3790 | } |
| 3791 | |
| 3792 | func (self *BsnTlvDrop) Serialize(encoder *goloxi.Encoder) error { |
| 3793 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3794 | return err |
| 3795 | } |
| 3796 | |
| 3797 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3798 | |
| 3799 | return nil |
| 3800 | } |
| 3801 | |
| 3802 | func DecodeBsnTlvDrop(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvDrop, error) { |
| 3803 | _bsntlvdrop := &BsnTlvDrop{BsnTlv: parent} |
| 3804 | return _bsntlvdrop, nil |
| 3805 | } |
| 3806 | |
| 3807 | func NewBsnTlvDrop() *BsnTlvDrop { |
| 3808 | obj := &BsnTlvDrop{ |
| 3809 | BsnTlv: NewBsnTlv(121), |
| 3810 | } |
| 3811 | return obj |
| 3812 | } |
| 3813 | |
| 3814 | type BsnTlvDscp struct { |
| 3815 | *BsnTlv |
| 3816 | Value uint16 |
| 3817 | } |
| 3818 | |
| 3819 | type IBsnTlvDscp interface { |
| 3820 | IBsnTlv |
| 3821 | GetValue() uint16 |
| 3822 | } |
| 3823 | |
| 3824 | func (self *BsnTlvDscp) GetValue() uint16 { |
| 3825 | return self.Value |
| 3826 | } |
| 3827 | |
| 3828 | func (self *BsnTlvDscp) SetValue(v uint16) { |
| 3829 | self.Value = v |
| 3830 | } |
| 3831 | |
| 3832 | func (self *BsnTlvDscp) Serialize(encoder *goloxi.Encoder) error { |
| 3833 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3834 | return err |
| 3835 | } |
| 3836 | |
| 3837 | encoder.PutUint16(uint16(self.Value)) |
| 3838 | |
| 3839 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3840 | |
| 3841 | return nil |
| 3842 | } |
| 3843 | |
| 3844 | func DecodeBsnTlvDscp(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvDscp, error) { |
| 3845 | _bsntlvdscp := &BsnTlvDscp{BsnTlv: parent} |
| 3846 | if decoder.Length() < 2 { |
| 3847 | return nil, fmt.Errorf("BsnTlvDscp packet too short: %d < 2", decoder.Length()) |
| 3848 | } |
| 3849 | _bsntlvdscp.Value = uint16(decoder.ReadUint16()) |
| 3850 | return _bsntlvdscp, nil |
| 3851 | } |
| 3852 | |
| 3853 | func NewBsnTlvDscp() *BsnTlvDscp { |
| 3854 | obj := &BsnTlvDscp{ |
| 3855 | BsnTlv: NewBsnTlv(112), |
| 3856 | } |
| 3857 | return obj |
| 3858 | } |
| 3859 | |
| 3860 | type BsnTlvEcn struct { |
| 3861 | *BsnTlv |
| 3862 | Value uint8 |
| 3863 | } |
| 3864 | |
| 3865 | type IBsnTlvEcn interface { |
| 3866 | IBsnTlv |
| 3867 | GetValue() uint8 |
| 3868 | } |
| 3869 | |
| 3870 | func (self *BsnTlvEcn) GetValue() uint8 { |
| 3871 | return self.Value |
| 3872 | } |
| 3873 | |
| 3874 | func (self *BsnTlvEcn) SetValue(v uint8) { |
| 3875 | self.Value = v |
| 3876 | } |
| 3877 | |
| 3878 | func (self *BsnTlvEcn) Serialize(encoder *goloxi.Encoder) error { |
| 3879 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3880 | return err |
| 3881 | } |
| 3882 | |
| 3883 | encoder.PutUint8(uint8(self.Value)) |
| 3884 | |
| 3885 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3886 | |
| 3887 | return nil |
| 3888 | } |
| 3889 | |
| 3890 | func DecodeBsnTlvEcn(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvEcn, error) { |
| 3891 | _bsntlvecn := &BsnTlvEcn{BsnTlv: parent} |
| 3892 | if decoder.Length() < 1 { |
| 3893 | return nil, fmt.Errorf("BsnTlvEcn packet too short: %d < 1", decoder.Length()) |
| 3894 | } |
| 3895 | _bsntlvecn.Value = uint8(decoder.ReadByte()) |
| 3896 | return _bsntlvecn, nil |
| 3897 | } |
| 3898 | |
| 3899 | func NewBsnTlvEcn() *BsnTlvEcn { |
| 3900 | obj := &BsnTlvEcn{ |
| 3901 | BsnTlv: NewBsnTlv(132), |
| 3902 | } |
| 3903 | return obj |
| 3904 | } |
| 3905 | |
| 3906 | type BsnTlvEgressOnly struct { |
| 3907 | *BsnTlv |
| 3908 | } |
| 3909 | |
| 3910 | type IBsnTlvEgressOnly interface { |
| 3911 | IBsnTlv |
| 3912 | } |
| 3913 | |
| 3914 | func (self *BsnTlvEgressOnly) Serialize(encoder *goloxi.Encoder) error { |
| 3915 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3916 | return err |
| 3917 | } |
| 3918 | |
| 3919 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3920 | |
| 3921 | return nil |
| 3922 | } |
| 3923 | |
| 3924 | func DecodeBsnTlvEgressOnly(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvEgressOnly, error) { |
| 3925 | _bsntlvegressonly := &BsnTlvEgressOnly{BsnTlv: parent} |
| 3926 | return _bsntlvegressonly, nil |
| 3927 | } |
| 3928 | |
| 3929 | func NewBsnTlvEgressOnly() *BsnTlvEgressOnly { |
| 3930 | obj := &BsnTlvEgressOnly{ |
| 3931 | BsnTlv: NewBsnTlv(137), |
| 3932 | } |
| 3933 | return obj |
| 3934 | } |
| 3935 | |
| 3936 | type BsnTlvEgressPortGroupId struct { |
| 3937 | *BsnTlv |
| 3938 | Value uint32 |
| 3939 | } |
| 3940 | |
| 3941 | type IBsnTlvEgressPortGroupId interface { |
| 3942 | IBsnTlv |
| 3943 | GetValue() uint32 |
| 3944 | } |
| 3945 | |
| 3946 | func (self *BsnTlvEgressPortGroupId) GetValue() uint32 { |
| 3947 | return self.Value |
| 3948 | } |
| 3949 | |
| 3950 | func (self *BsnTlvEgressPortGroupId) SetValue(v uint32) { |
| 3951 | self.Value = v |
| 3952 | } |
| 3953 | |
| 3954 | func (self *BsnTlvEgressPortGroupId) Serialize(encoder *goloxi.Encoder) error { |
| 3955 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 3956 | return err |
| 3957 | } |
| 3958 | |
| 3959 | encoder.PutUint32(uint32(self.Value)) |
| 3960 | |
| 3961 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 3962 | |
| 3963 | return nil |
| 3964 | } |
| 3965 | |
| 3966 | func DecodeBsnTlvEgressPortGroupId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvEgressPortGroupId, error) { |
| 3967 | _bsntlvegressportgroupid := &BsnTlvEgressPortGroupId{BsnTlv: parent} |
| 3968 | if decoder.Length() < 4 { |
| 3969 | return nil, fmt.Errorf("BsnTlvEgressPortGroupId packet too short: %d < 4", decoder.Length()) |
| 3970 | } |
| 3971 | _bsntlvegressportgroupid.Value = uint32(decoder.ReadUint32()) |
| 3972 | return _bsntlvegressportgroupid, nil |
| 3973 | } |
| 3974 | |
| 3975 | func NewBsnTlvEgressPortGroupId() *BsnTlvEgressPortGroupId { |
| 3976 | obj := &BsnTlvEgressPortGroupId{ |
| 3977 | BsnTlv: NewBsnTlv(139), |
| 3978 | } |
| 3979 | return obj |
| 3980 | } |
| 3981 | |
| 3982 | type BsnTlvEncap struct { |
| 3983 | *BsnTlv |
| 3984 | Value BsnEncap |
| 3985 | } |
| 3986 | |
| 3987 | type IBsnTlvEncap interface { |
| 3988 | IBsnTlv |
| 3989 | GetValue() BsnEncap |
| 3990 | } |
| 3991 | |
| 3992 | func (self *BsnTlvEncap) GetValue() BsnEncap { |
| 3993 | return self.Value |
| 3994 | } |
| 3995 | |
| 3996 | func (self *BsnTlvEncap) SetValue(v BsnEncap) { |
| 3997 | self.Value = v |
| 3998 | } |
| 3999 | |
| 4000 | func (self *BsnTlvEncap) Serialize(encoder *goloxi.Encoder) error { |
| 4001 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4002 | return err |
| 4003 | } |
| 4004 | |
| 4005 | encoder.PutUint8(uint8(self.Value)) |
| 4006 | |
| 4007 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4008 | |
| 4009 | return nil |
| 4010 | } |
| 4011 | |
| 4012 | func DecodeBsnTlvEncap(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvEncap, error) { |
| 4013 | _bsntlvencap := &BsnTlvEncap{BsnTlv: parent} |
| 4014 | if decoder.Length() < 1 { |
| 4015 | return nil, fmt.Errorf("BsnTlvEncap packet too short: %d < 1", decoder.Length()) |
| 4016 | } |
| 4017 | _bsntlvencap.Value = BsnEncap(decoder.ReadByte()) |
| 4018 | return _bsntlvencap, nil |
| 4019 | } |
| 4020 | |
| 4021 | func NewBsnTlvEncap() *BsnTlvEncap { |
| 4022 | obj := &BsnTlvEncap{ |
| 4023 | BsnTlv: NewBsnTlv(175), |
| 4024 | } |
| 4025 | return obj |
| 4026 | } |
| 4027 | |
| 4028 | type BsnTlvEnhancedHashCapability struct { |
| 4029 | *BsnTlv |
| 4030 | Value BsnEnhancedHashType |
| 4031 | } |
| 4032 | |
| 4033 | type IBsnTlvEnhancedHashCapability interface { |
| 4034 | IBsnTlv |
| 4035 | GetValue() BsnEnhancedHashType |
| 4036 | } |
| 4037 | |
| 4038 | func (self *BsnTlvEnhancedHashCapability) GetValue() BsnEnhancedHashType { |
| 4039 | return self.Value |
| 4040 | } |
| 4041 | |
| 4042 | func (self *BsnTlvEnhancedHashCapability) SetValue(v BsnEnhancedHashType) { |
| 4043 | self.Value = v |
| 4044 | } |
| 4045 | |
| 4046 | func (self *BsnTlvEnhancedHashCapability) Serialize(encoder *goloxi.Encoder) error { |
| 4047 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4048 | return err |
| 4049 | } |
| 4050 | |
| 4051 | encoder.PutUint64(uint64(self.Value)) |
| 4052 | |
| 4053 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4054 | |
| 4055 | return nil |
| 4056 | } |
| 4057 | |
| 4058 | func DecodeBsnTlvEnhancedHashCapability(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvEnhancedHashCapability, error) { |
| 4059 | _bsntlvenhancedhashcapability := &BsnTlvEnhancedHashCapability{BsnTlv: parent} |
| 4060 | if decoder.Length() < 8 { |
| 4061 | return nil, fmt.Errorf("BsnTlvEnhancedHashCapability packet too short: %d < 8", decoder.Length()) |
| 4062 | } |
| 4063 | _bsntlvenhancedhashcapability.Value = BsnEnhancedHashType(decoder.ReadUint64()) |
| 4064 | return _bsntlvenhancedhashcapability, nil |
| 4065 | } |
| 4066 | |
| 4067 | func NewBsnTlvEnhancedHashCapability() *BsnTlvEnhancedHashCapability { |
| 4068 | obj := &BsnTlvEnhancedHashCapability{ |
| 4069 | BsnTlv: NewBsnTlv(143), |
| 4070 | } |
| 4071 | return obj |
| 4072 | } |
| 4073 | |
| 4074 | type BsnTlvEthDst struct { |
| 4075 | *BsnTlv |
| 4076 | Value net.HardwareAddr |
| 4077 | } |
| 4078 | |
| 4079 | type IBsnTlvEthDst interface { |
| 4080 | IBsnTlv |
| 4081 | GetValue() net.HardwareAddr |
| 4082 | } |
| 4083 | |
| 4084 | func (self *BsnTlvEthDst) GetValue() net.HardwareAddr { |
| 4085 | return self.Value |
| 4086 | } |
| 4087 | |
| 4088 | func (self *BsnTlvEthDst) SetValue(v net.HardwareAddr) { |
| 4089 | self.Value = v |
| 4090 | } |
| 4091 | |
| 4092 | func (self *BsnTlvEthDst) Serialize(encoder *goloxi.Encoder) error { |
| 4093 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4094 | return err |
| 4095 | } |
| 4096 | |
| 4097 | encoder.Write(self.Value) |
| 4098 | |
| 4099 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4100 | |
| 4101 | return nil |
| 4102 | } |
| 4103 | |
| 4104 | func DecodeBsnTlvEthDst(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvEthDst, error) { |
| 4105 | _bsntlvethdst := &BsnTlvEthDst{BsnTlv: parent} |
| 4106 | if decoder.Length() < 6 { |
| 4107 | return nil, fmt.Errorf("BsnTlvEthDst packet too short: %d < 6", decoder.Length()) |
| 4108 | } |
| 4109 | _bsntlvethdst.Value = net.HardwareAddr(decoder.Read(6)) |
| 4110 | return _bsntlvethdst, nil |
| 4111 | } |
| 4112 | |
| 4113 | func NewBsnTlvEthDst() *BsnTlvEthDst { |
| 4114 | obj := &BsnTlvEthDst{ |
| 4115 | BsnTlv: NewBsnTlv(33), |
| 4116 | } |
| 4117 | return obj |
| 4118 | } |
| 4119 | |
| 4120 | type BsnTlvEthSrc struct { |
| 4121 | *BsnTlv |
| 4122 | Value net.HardwareAddr |
| 4123 | } |
| 4124 | |
| 4125 | type IBsnTlvEthSrc interface { |
| 4126 | IBsnTlv |
| 4127 | GetValue() net.HardwareAddr |
| 4128 | } |
| 4129 | |
| 4130 | func (self *BsnTlvEthSrc) GetValue() net.HardwareAddr { |
| 4131 | return self.Value |
| 4132 | } |
| 4133 | |
| 4134 | func (self *BsnTlvEthSrc) SetValue(v net.HardwareAddr) { |
| 4135 | self.Value = v |
| 4136 | } |
| 4137 | |
| 4138 | func (self *BsnTlvEthSrc) Serialize(encoder *goloxi.Encoder) error { |
| 4139 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4140 | return err |
| 4141 | } |
| 4142 | |
| 4143 | encoder.Write(self.Value) |
| 4144 | |
| 4145 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4146 | |
| 4147 | return nil |
| 4148 | } |
| 4149 | |
| 4150 | func DecodeBsnTlvEthSrc(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvEthSrc, error) { |
| 4151 | _bsntlvethsrc := &BsnTlvEthSrc{BsnTlv: parent} |
| 4152 | if decoder.Length() < 6 { |
| 4153 | return nil, fmt.Errorf("BsnTlvEthSrc packet too short: %d < 6", decoder.Length()) |
| 4154 | } |
| 4155 | _bsntlvethsrc.Value = net.HardwareAddr(decoder.Read(6)) |
| 4156 | return _bsntlvethsrc, nil |
| 4157 | } |
| 4158 | |
| 4159 | func NewBsnTlvEthSrc() *BsnTlvEthSrc { |
| 4160 | obj := &BsnTlvEthSrc{ |
| 4161 | BsnTlv: NewBsnTlv(32), |
| 4162 | } |
| 4163 | return obj |
| 4164 | } |
| 4165 | |
| 4166 | type BsnTlvEthType struct { |
| 4167 | *BsnTlv |
| 4168 | Value uint16 |
| 4169 | } |
| 4170 | |
| 4171 | type IBsnTlvEthType interface { |
| 4172 | IBsnTlv |
| 4173 | GetValue() uint16 |
| 4174 | } |
| 4175 | |
| 4176 | func (self *BsnTlvEthType) GetValue() uint16 { |
| 4177 | return self.Value |
| 4178 | } |
| 4179 | |
| 4180 | func (self *BsnTlvEthType) SetValue(v uint16) { |
| 4181 | self.Value = v |
| 4182 | } |
| 4183 | |
| 4184 | func (self *BsnTlvEthType) Serialize(encoder *goloxi.Encoder) error { |
| 4185 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4186 | return err |
| 4187 | } |
| 4188 | |
| 4189 | encoder.PutUint16(uint16(self.Value)) |
| 4190 | |
| 4191 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4192 | |
| 4193 | return nil |
| 4194 | } |
| 4195 | |
| 4196 | func DecodeBsnTlvEthType(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvEthType, error) { |
| 4197 | _bsntlvethtype := &BsnTlvEthType{BsnTlv: parent} |
| 4198 | if decoder.Length() < 2 { |
| 4199 | return nil, fmt.Errorf("BsnTlvEthType packet too short: %d < 2", decoder.Length()) |
| 4200 | } |
| 4201 | _bsntlvethtype.Value = uint16(decoder.ReadUint16()) |
| 4202 | return _bsntlvethtype, nil |
| 4203 | } |
| 4204 | |
| 4205 | func NewBsnTlvEthType() *BsnTlvEthType { |
| 4206 | obj := &BsnTlvEthType{ |
| 4207 | BsnTlv: NewBsnTlv(131), |
| 4208 | } |
| 4209 | return obj |
| 4210 | } |
| 4211 | |
| 4212 | type BsnTlvExternalGatewayIp struct { |
| 4213 | *BsnTlv |
| 4214 | Value net.IP |
| 4215 | } |
| 4216 | |
| 4217 | type IBsnTlvExternalGatewayIp interface { |
| 4218 | IBsnTlv |
| 4219 | GetValue() net.IP |
| 4220 | } |
| 4221 | |
| 4222 | func (self *BsnTlvExternalGatewayIp) GetValue() net.IP { |
| 4223 | return self.Value |
| 4224 | } |
| 4225 | |
| 4226 | func (self *BsnTlvExternalGatewayIp) SetValue(v net.IP) { |
| 4227 | self.Value = v |
| 4228 | } |
| 4229 | |
| 4230 | func (self *BsnTlvExternalGatewayIp) Serialize(encoder *goloxi.Encoder) error { |
| 4231 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4232 | return err |
| 4233 | } |
| 4234 | |
| 4235 | encoder.Write(self.Value.To4()) |
| 4236 | |
| 4237 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4238 | |
| 4239 | return nil |
| 4240 | } |
| 4241 | |
| 4242 | func DecodeBsnTlvExternalGatewayIp(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvExternalGatewayIp, error) { |
| 4243 | _bsntlvexternalgatewayip := &BsnTlvExternalGatewayIp{BsnTlv: parent} |
| 4244 | if decoder.Length() < 4 { |
| 4245 | return nil, fmt.Errorf("BsnTlvExternalGatewayIp packet too short: %d < 4", decoder.Length()) |
| 4246 | } |
| 4247 | _bsntlvexternalgatewayip.Value = net.IP(decoder.Read(4)) |
| 4248 | return _bsntlvexternalgatewayip, nil |
| 4249 | } |
| 4250 | |
| 4251 | func NewBsnTlvExternalGatewayIp() *BsnTlvExternalGatewayIp { |
| 4252 | obj := &BsnTlvExternalGatewayIp{ |
| 4253 | BsnTlv: NewBsnTlv(26), |
| 4254 | } |
| 4255 | return obj |
| 4256 | } |
| 4257 | |
| 4258 | type BsnTlvExternalGatewayMac struct { |
| 4259 | *BsnTlv |
| 4260 | Value net.HardwareAddr |
| 4261 | } |
| 4262 | |
| 4263 | type IBsnTlvExternalGatewayMac interface { |
| 4264 | IBsnTlv |
| 4265 | GetValue() net.HardwareAddr |
| 4266 | } |
| 4267 | |
| 4268 | func (self *BsnTlvExternalGatewayMac) GetValue() net.HardwareAddr { |
| 4269 | return self.Value |
| 4270 | } |
| 4271 | |
| 4272 | func (self *BsnTlvExternalGatewayMac) SetValue(v net.HardwareAddr) { |
| 4273 | self.Value = v |
| 4274 | } |
| 4275 | |
| 4276 | func (self *BsnTlvExternalGatewayMac) Serialize(encoder *goloxi.Encoder) error { |
| 4277 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4278 | return err |
| 4279 | } |
| 4280 | |
| 4281 | encoder.Write(self.Value) |
| 4282 | |
| 4283 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4284 | |
| 4285 | return nil |
| 4286 | } |
| 4287 | |
| 4288 | func DecodeBsnTlvExternalGatewayMac(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvExternalGatewayMac, error) { |
| 4289 | _bsntlvexternalgatewaymac := &BsnTlvExternalGatewayMac{BsnTlv: parent} |
| 4290 | if decoder.Length() < 6 { |
| 4291 | return nil, fmt.Errorf("BsnTlvExternalGatewayMac packet too short: %d < 6", decoder.Length()) |
| 4292 | } |
| 4293 | _bsntlvexternalgatewaymac.Value = net.HardwareAddr(decoder.Read(6)) |
| 4294 | return _bsntlvexternalgatewaymac, nil |
| 4295 | } |
| 4296 | |
| 4297 | func NewBsnTlvExternalGatewayMac() *BsnTlvExternalGatewayMac { |
| 4298 | obj := &BsnTlvExternalGatewayMac{ |
| 4299 | BsnTlv: NewBsnTlv(29), |
| 4300 | } |
| 4301 | return obj |
| 4302 | } |
| 4303 | |
| 4304 | type BsnTlvExternalIp struct { |
| 4305 | *BsnTlv |
| 4306 | Value net.IP |
| 4307 | } |
| 4308 | |
| 4309 | type IBsnTlvExternalIp interface { |
| 4310 | IBsnTlv |
| 4311 | GetValue() net.IP |
| 4312 | } |
| 4313 | |
| 4314 | func (self *BsnTlvExternalIp) GetValue() net.IP { |
| 4315 | return self.Value |
| 4316 | } |
| 4317 | |
| 4318 | func (self *BsnTlvExternalIp) SetValue(v net.IP) { |
| 4319 | self.Value = v |
| 4320 | } |
| 4321 | |
| 4322 | func (self *BsnTlvExternalIp) Serialize(encoder *goloxi.Encoder) error { |
| 4323 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4324 | return err |
| 4325 | } |
| 4326 | |
| 4327 | encoder.Write(self.Value.To4()) |
| 4328 | |
| 4329 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4330 | |
| 4331 | return nil |
| 4332 | } |
| 4333 | |
| 4334 | func DecodeBsnTlvExternalIp(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvExternalIp, error) { |
| 4335 | _bsntlvexternalip := &BsnTlvExternalIp{BsnTlv: parent} |
| 4336 | if decoder.Length() < 4 { |
| 4337 | return nil, fmt.Errorf("BsnTlvExternalIp packet too short: %d < 4", decoder.Length()) |
| 4338 | } |
| 4339 | _bsntlvexternalip.Value = net.IP(decoder.Read(4)) |
| 4340 | return _bsntlvexternalip, nil |
| 4341 | } |
| 4342 | |
| 4343 | func NewBsnTlvExternalIp() *BsnTlvExternalIp { |
| 4344 | obj := &BsnTlvExternalIp{ |
| 4345 | BsnTlv: NewBsnTlv(23), |
| 4346 | } |
| 4347 | return obj |
| 4348 | } |
| 4349 | |
| 4350 | type BsnTlvExternalMac struct { |
| 4351 | *BsnTlv |
| 4352 | Value net.HardwareAddr |
| 4353 | } |
| 4354 | |
| 4355 | type IBsnTlvExternalMac interface { |
| 4356 | IBsnTlv |
| 4357 | GetValue() net.HardwareAddr |
| 4358 | } |
| 4359 | |
| 4360 | func (self *BsnTlvExternalMac) GetValue() net.HardwareAddr { |
| 4361 | return self.Value |
| 4362 | } |
| 4363 | |
| 4364 | func (self *BsnTlvExternalMac) SetValue(v net.HardwareAddr) { |
| 4365 | self.Value = v |
| 4366 | } |
| 4367 | |
| 4368 | func (self *BsnTlvExternalMac) Serialize(encoder *goloxi.Encoder) error { |
| 4369 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4370 | return err |
| 4371 | } |
| 4372 | |
| 4373 | encoder.Write(self.Value) |
| 4374 | |
| 4375 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4376 | |
| 4377 | return nil |
| 4378 | } |
| 4379 | |
| 4380 | func DecodeBsnTlvExternalMac(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvExternalMac, error) { |
| 4381 | _bsntlvexternalmac := &BsnTlvExternalMac{BsnTlv: parent} |
| 4382 | if decoder.Length() < 6 { |
| 4383 | return nil, fmt.Errorf("BsnTlvExternalMac packet too short: %d < 6", decoder.Length()) |
| 4384 | } |
| 4385 | _bsntlvexternalmac.Value = net.HardwareAddr(decoder.Read(6)) |
| 4386 | return _bsntlvexternalmac, nil |
| 4387 | } |
| 4388 | |
| 4389 | func NewBsnTlvExternalMac() *BsnTlvExternalMac { |
| 4390 | obj := &BsnTlvExternalMac{ |
| 4391 | BsnTlv: NewBsnTlv(24), |
| 4392 | } |
| 4393 | return obj |
| 4394 | } |
| 4395 | |
| 4396 | type BsnTlvExternalNetmask struct { |
| 4397 | *BsnTlv |
| 4398 | Value net.IP |
| 4399 | } |
| 4400 | |
| 4401 | type IBsnTlvExternalNetmask interface { |
| 4402 | IBsnTlv |
| 4403 | GetValue() net.IP |
| 4404 | } |
| 4405 | |
| 4406 | func (self *BsnTlvExternalNetmask) GetValue() net.IP { |
| 4407 | return self.Value |
| 4408 | } |
| 4409 | |
| 4410 | func (self *BsnTlvExternalNetmask) SetValue(v net.IP) { |
| 4411 | self.Value = v |
| 4412 | } |
| 4413 | |
| 4414 | func (self *BsnTlvExternalNetmask) Serialize(encoder *goloxi.Encoder) error { |
| 4415 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4416 | return err |
| 4417 | } |
| 4418 | |
| 4419 | encoder.Write(self.Value.To4()) |
| 4420 | |
| 4421 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4422 | |
| 4423 | return nil |
| 4424 | } |
| 4425 | |
| 4426 | func DecodeBsnTlvExternalNetmask(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvExternalNetmask, error) { |
| 4427 | _bsntlvexternalnetmask := &BsnTlvExternalNetmask{BsnTlv: parent} |
| 4428 | if decoder.Length() < 4 { |
| 4429 | return nil, fmt.Errorf("BsnTlvExternalNetmask packet too short: %d < 4", decoder.Length()) |
| 4430 | } |
| 4431 | _bsntlvexternalnetmask.Value = net.IP(decoder.Read(4)) |
| 4432 | return _bsntlvexternalnetmask, nil |
| 4433 | } |
| 4434 | |
| 4435 | func NewBsnTlvExternalNetmask() *BsnTlvExternalNetmask { |
| 4436 | obj := &BsnTlvExternalNetmask{ |
| 4437 | BsnTlv: NewBsnTlv(25), |
| 4438 | } |
| 4439 | return obj |
| 4440 | } |
| 4441 | |
| 4442 | type BsnTlvFabricPortRole struct { |
| 4443 | *BsnTlv |
| 4444 | Value BsnFabricPortRole |
| 4445 | } |
| 4446 | |
| 4447 | type IBsnTlvFabricPortRole interface { |
| 4448 | IBsnTlv |
| 4449 | GetValue() BsnFabricPortRole |
| 4450 | } |
| 4451 | |
| 4452 | func (self *BsnTlvFabricPortRole) GetValue() BsnFabricPortRole { |
| 4453 | return self.Value |
| 4454 | } |
| 4455 | |
| 4456 | func (self *BsnTlvFabricPortRole) SetValue(v BsnFabricPortRole) { |
| 4457 | self.Value = v |
| 4458 | } |
| 4459 | |
| 4460 | func (self *BsnTlvFabricPortRole) Serialize(encoder *goloxi.Encoder) error { |
| 4461 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4462 | return err |
| 4463 | } |
| 4464 | |
| 4465 | encoder.PutUint16(uint16(self.Value)) |
| 4466 | |
| 4467 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4468 | |
| 4469 | return nil |
| 4470 | } |
| 4471 | |
| 4472 | func DecodeBsnTlvFabricPortRole(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvFabricPortRole, error) { |
| 4473 | _bsntlvfabricportrole := &BsnTlvFabricPortRole{BsnTlv: parent} |
| 4474 | if decoder.Length() < 2 { |
| 4475 | return nil, fmt.Errorf("BsnTlvFabricPortRole packet too short: %d < 2", decoder.Length()) |
| 4476 | } |
| 4477 | _bsntlvfabricportrole.Value = BsnFabricPortRole(decoder.ReadUint16()) |
| 4478 | return _bsntlvfabricportrole, nil |
| 4479 | } |
| 4480 | |
| 4481 | func NewBsnTlvFabricPortRole() *BsnTlvFabricPortRole { |
| 4482 | obj := &BsnTlvFabricPortRole{ |
| 4483 | BsnTlv: NewBsnTlv(165), |
| 4484 | } |
| 4485 | return obj |
| 4486 | } |
| 4487 | |
| 4488 | type BsnTlvFlood struct { |
| 4489 | *BsnTlv |
| 4490 | } |
| 4491 | |
| 4492 | type IBsnTlvFlood interface { |
| 4493 | IBsnTlv |
| 4494 | } |
| 4495 | |
| 4496 | func (self *BsnTlvFlood) Serialize(encoder *goloxi.Encoder) error { |
| 4497 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4498 | return err |
| 4499 | } |
| 4500 | |
| 4501 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4502 | |
| 4503 | return nil |
| 4504 | } |
| 4505 | |
| 4506 | func DecodeBsnTlvFlood(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvFlood, error) { |
| 4507 | _bsntlvflood := &BsnTlvFlood{BsnTlv: parent} |
| 4508 | return _bsntlvflood, nil |
| 4509 | } |
| 4510 | |
| 4511 | func NewBsnTlvFlood() *BsnTlvFlood { |
| 4512 | obj := &BsnTlvFlood{ |
| 4513 | BsnTlv: NewBsnTlv(163), |
| 4514 | } |
| 4515 | return obj |
| 4516 | } |
| 4517 | |
| 4518 | type BsnTlvFlowClassifier struct { |
| 4519 | *BsnTlv |
| 4520 | Value BsnFlowClassifier |
| 4521 | } |
| 4522 | |
| 4523 | type IBsnTlvFlowClassifier interface { |
| 4524 | IBsnTlv |
| 4525 | GetValue() BsnFlowClassifier |
| 4526 | } |
| 4527 | |
| 4528 | func (self *BsnTlvFlowClassifier) GetValue() BsnFlowClassifier { |
| 4529 | return self.Value |
| 4530 | } |
| 4531 | |
| 4532 | func (self *BsnTlvFlowClassifier) SetValue(v BsnFlowClassifier) { |
| 4533 | self.Value = v |
| 4534 | } |
| 4535 | |
| 4536 | func (self *BsnTlvFlowClassifier) Serialize(encoder *goloxi.Encoder) error { |
| 4537 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4538 | return err |
| 4539 | } |
| 4540 | |
| 4541 | encoder.PutUint16(uint16(self.Value)) |
| 4542 | |
| 4543 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4544 | |
| 4545 | return nil |
| 4546 | } |
| 4547 | |
| 4548 | func DecodeBsnTlvFlowClassifier(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvFlowClassifier, error) { |
| 4549 | _bsntlvflowclassifier := &BsnTlvFlowClassifier{BsnTlv: parent} |
| 4550 | if decoder.Length() < 2 { |
| 4551 | return nil, fmt.Errorf("BsnTlvFlowClassifier packet too short: %d < 2", decoder.Length()) |
| 4552 | } |
| 4553 | _bsntlvflowclassifier.Value = BsnFlowClassifier(decoder.ReadUint16()) |
| 4554 | return _bsntlvflowclassifier, nil |
| 4555 | } |
| 4556 | |
| 4557 | func NewBsnTlvFlowClassifier() *BsnTlvFlowClassifier { |
| 4558 | obj := &BsnTlvFlowClassifier{ |
| 4559 | BsnTlv: NewBsnTlv(184), |
| 4560 | } |
| 4561 | return obj |
| 4562 | } |
| 4563 | |
| 4564 | type BsnTlvFlowClassify struct { |
| 4565 | *BsnTlv |
| 4566 | } |
| 4567 | |
| 4568 | type IBsnTlvFlowClassify interface { |
| 4569 | IBsnTlv |
| 4570 | } |
| 4571 | |
| 4572 | func (self *BsnTlvFlowClassify) Serialize(encoder *goloxi.Encoder) error { |
| 4573 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4574 | return err |
| 4575 | } |
| 4576 | |
| 4577 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4578 | |
| 4579 | return nil |
| 4580 | } |
| 4581 | |
| 4582 | func DecodeBsnTlvFlowClassify(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvFlowClassify, error) { |
| 4583 | _bsntlvflowclassify := &BsnTlvFlowClassify{BsnTlv: parent} |
| 4584 | return _bsntlvflowclassify, nil |
| 4585 | } |
| 4586 | |
| 4587 | func NewBsnTlvFlowClassify() *BsnTlvFlowClassify { |
| 4588 | obj := &BsnTlvFlowClassify{ |
| 4589 | BsnTlv: NewBsnTlv(182), |
| 4590 | } |
| 4591 | return obj |
| 4592 | } |
| 4593 | |
| 4594 | type BsnTlvFlowIdentifier struct { |
| 4595 | *BsnTlv |
| 4596 | Value uint32 |
| 4597 | } |
| 4598 | |
| 4599 | type IBsnTlvFlowIdentifier interface { |
| 4600 | IBsnTlv |
| 4601 | GetValue() uint32 |
| 4602 | } |
| 4603 | |
| 4604 | func (self *BsnTlvFlowIdentifier) GetValue() uint32 { |
| 4605 | return self.Value |
| 4606 | } |
| 4607 | |
| 4608 | func (self *BsnTlvFlowIdentifier) SetValue(v uint32) { |
| 4609 | self.Value = v |
| 4610 | } |
| 4611 | |
| 4612 | func (self *BsnTlvFlowIdentifier) Serialize(encoder *goloxi.Encoder) error { |
| 4613 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4614 | return err |
| 4615 | } |
| 4616 | |
| 4617 | encoder.PutUint32(uint32(self.Value)) |
| 4618 | |
| 4619 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4620 | |
| 4621 | return nil |
| 4622 | } |
| 4623 | |
| 4624 | func DecodeBsnTlvFlowIdentifier(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvFlowIdentifier, error) { |
| 4625 | _bsntlvflowidentifier := &BsnTlvFlowIdentifier{BsnTlv: parent} |
| 4626 | if decoder.Length() < 4 { |
| 4627 | return nil, fmt.Errorf("BsnTlvFlowIdentifier packet too short: %d < 4", decoder.Length()) |
| 4628 | } |
| 4629 | _bsntlvflowidentifier.Value = uint32(decoder.ReadUint32()) |
| 4630 | return _bsntlvflowidentifier, nil |
| 4631 | } |
| 4632 | |
| 4633 | func NewBsnTlvFlowIdentifier() *BsnTlvFlowIdentifier { |
| 4634 | obj := &BsnTlvFlowIdentifier{ |
| 4635 | BsnTlv: NewBsnTlv(183), |
| 4636 | } |
| 4637 | return obj |
| 4638 | } |
| 4639 | |
| 4640 | type BsnTlvForceLinkUp struct { |
| 4641 | *BsnTlv |
| 4642 | } |
| 4643 | |
| 4644 | type IBsnTlvForceLinkUp interface { |
| 4645 | IBsnTlv |
| 4646 | } |
| 4647 | |
| 4648 | func (self *BsnTlvForceLinkUp) Serialize(encoder *goloxi.Encoder) error { |
| 4649 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4650 | return err |
| 4651 | } |
| 4652 | |
| 4653 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4654 | |
| 4655 | return nil |
| 4656 | } |
| 4657 | |
| 4658 | func DecodeBsnTlvForceLinkUp(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvForceLinkUp, error) { |
| 4659 | _bsntlvforcelinkup := &BsnTlvForceLinkUp{BsnTlv: parent} |
| 4660 | return _bsntlvforcelinkup, nil |
| 4661 | } |
| 4662 | |
| 4663 | func NewBsnTlvForceLinkUp() *BsnTlvForceLinkUp { |
| 4664 | obj := &BsnTlvForceLinkUp{ |
| 4665 | BsnTlv: NewBsnTlv(151), |
| 4666 | } |
| 4667 | return obj |
| 4668 | } |
| 4669 | |
| 4670 | type BsnTlvForwardErrorCorrection struct { |
| 4671 | *BsnTlv |
| 4672 | Value BsnForwardErrorCorrectionType |
| 4673 | } |
| 4674 | |
| 4675 | type IBsnTlvForwardErrorCorrection interface { |
| 4676 | IBsnTlv |
| 4677 | GetValue() BsnForwardErrorCorrectionType |
| 4678 | } |
| 4679 | |
| 4680 | func (self *BsnTlvForwardErrorCorrection) GetValue() BsnForwardErrorCorrectionType { |
| 4681 | return self.Value |
| 4682 | } |
| 4683 | |
| 4684 | func (self *BsnTlvForwardErrorCorrection) SetValue(v BsnForwardErrorCorrectionType) { |
| 4685 | self.Value = v |
| 4686 | } |
| 4687 | |
| 4688 | func (self *BsnTlvForwardErrorCorrection) Serialize(encoder *goloxi.Encoder) error { |
| 4689 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4690 | return err |
| 4691 | } |
| 4692 | |
| 4693 | encoder.PutUint8(uint8(self.Value)) |
| 4694 | |
| 4695 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4696 | |
| 4697 | return nil |
| 4698 | } |
| 4699 | |
| 4700 | func DecodeBsnTlvForwardErrorCorrection(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvForwardErrorCorrection, error) { |
| 4701 | _bsntlvforwarderrorcorrection := &BsnTlvForwardErrorCorrection{BsnTlv: parent} |
| 4702 | if decoder.Length() < 1 { |
| 4703 | return nil, fmt.Errorf("BsnTlvForwardErrorCorrection packet too short: %d < 1", decoder.Length()) |
| 4704 | } |
| 4705 | _bsntlvforwarderrorcorrection.Value = BsnForwardErrorCorrectionType(decoder.ReadByte()) |
| 4706 | return _bsntlvforwarderrorcorrection, nil |
| 4707 | } |
| 4708 | |
| 4709 | func NewBsnTlvForwardErrorCorrection() *BsnTlvForwardErrorCorrection { |
| 4710 | obj := &BsnTlvForwardErrorCorrection{ |
| 4711 | BsnTlv: NewBsnTlv(149), |
| 4712 | } |
| 4713 | return obj |
| 4714 | } |
| 4715 | |
| 4716 | type BsnTlvGenerationId struct { |
| 4717 | *BsnTlv |
| 4718 | Value uint64 |
| 4719 | } |
| 4720 | |
| 4721 | type IBsnTlvGenerationId interface { |
| 4722 | IBsnTlv |
| 4723 | GetValue() uint64 |
| 4724 | } |
| 4725 | |
| 4726 | func (self *BsnTlvGenerationId) GetValue() uint64 { |
| 4727 | return self.Value |
| 4728 | } |
| 4729 | |
| 4730 | func (self *BsnTlvGenerationId) SetValue(v uint64) { |
| 4731 | self.Value = v |
| 4732 | } |
| 4733 | |
| 4734 | func (self *BsnTlvGenerationId) Serialize(encoder *goloxi.Encoder) error { |
| 4735 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4736 | return err |
| 4737 | } |
| 4738 | |
| 4739 | encoder.PutUint64(uint64(self.Value)) |
| 4740 | |
| 4741 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4742 | |
| 4743 | return nil |
| 4744 | } |
| 4745 | |
| 4746 | func DecodeBsnTlvGenerationId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvGenerationId, error) { |
| 4747 | _bsntlvgenerationid := &BsnTlvGenerationId{BsnTlv: parent} |
| 4748 | if decoder.Length() < 8 { |
| 4749 | return nil, fmt.Errorf("BsnTlvGenerationId packet too short: %d < 8", decoder.Length()) |
| 4750 | } |
| 4751 | _bsntlvgenerationid.Value = uint64(decoder.ReadUint64()) |
| 4752 | return _bsntlvgenerationid, nil |
| 4753 | } |
| 4754 | |
| 4755 | func NewBsnTlvGenerationId() *BsnTlvGenerationId { |
| 4756 | obj := &BsnTlvGenerationId{ |
| 4757 | BsnTlv: NewBsnTlv(80), |
| 4758 | } |
| 4759 | return obj |
| 4760 | } |
| 4761 | |
| 4762 | type BsnTlvHashAlgorithm struct { |
| 4763 | *BsnTlv |
| 4764 | Value BsnHashAlgorithmType |
| 4765 | } |
| 4766 | |
| 4767 | type IBsnTlvHashAlgorithm interface { |
| 4768 | IBsnTlv |
| 4769 | GetValue() BsnHashAlgorithmType |
| 4770 | } |
| 4771 | |
| 4772 | func (self *BsnTlvHashAlgorithm) GetValue() BsnHashAlgorithmType { |
| 4773 | return self.Value |
| 4774 | } |
| 4775 | |
| 4776 | func (self *BsnTlvHashAlgorithm) SetValue(v BsnHashAlgorithmType) { |
| 4777 | self.Value = v |
| 4778 | } |
| 4779 | |
| 4780 | func (self *BsnTlvHashAlgorithm) Serialize(encoder *goloxi.Encoder) error { |
| 4781 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4782 | return err |
| 4783 | } |
| 4784 | |
| 4785 | encoder.PutUint16(uint16(self.Value)) |
| 4786 | |
| 4787 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4788 | |
| 4789 | return nil |
| 4790 | } |
| 4791 | |
| 4792 | func DecodeBsnTlvHashAlgorithm(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvHashAlgorithm, error) { |
| 4793 | _bsntlvhashalgorithm := &BsnTlvHashAlgorithm{BsnTlv: parent} |
| 4794 | if decoder.Length() < 2 { |
| 4795 | return nil, fmt.Errorf("BsnTlvHashAlgorithm packet too short: %d < 2", decoder.Length()) |
| 4796 | } |
| 4797 | _bsntlvhashalgorithm.Value = BsnHashAlgorithmType(decoder.ReadUint16()) |
| 4798 | return _bsntlvhashalgorithm, nil |
| 4799 | } |
| 4800 | |
| 4801 | func NewBsnTlvHashAlgorithm() *BsnTlvHashAlgorithm { |
| 4802 | obj := &BsnTlvHashAlgorithm{ |
| 4803 | BsnTlv: NewBsnTlv(145), |
| 4804 | } |
| 4805 | return obj |
| 4806 | } |
| 4807 | |
| 4808 | type BsnTlvHashGtpHeaderMatch struct { |
| 4809 | *BsnTlv |
| 4810 | FirstHeaderByte uint8 |
| 4811 | FirstHeaderMask uint8 |
| 4812 | } |
| 4813 | |
| 4814 | type IBsnTlvHashGtpHeaderMatch interface { |
| 4815 | IBsnTlv |
| 4816 | GetFirstHeaderByte() uint8 |
| 4817 | GetFirstHeaderMask() uint8 |
| 4818 | } |
| 4819 | |
| 4820 | func (self *BsnTlvHashGtpHeaderMatch) GetFirstHeaderByte() uint8 { |
| 4821 | return self.FirstHeaderByte |
| 4822 | } |
| 4823 | |
| 4824 | func (self *BsnTlvHashGtpHeaderMatch) SetFirstHeaderByte(v uint8) { |
| 4825 | self.FirstHeaderByte = v |
| 4826 | } |
| 4827 | |
| 4828 | func (self *BsnTlvHashGtpHeaderMatch) GetFirstHeaderMask() uint8 { |
| 4829 | return self.FirstHeaderMask |
| 4830 | } |
| 4831 | |
| 4832 | func (self *BsnTlvHashGtpHeaderMatch) SetFirstHeaderMask(v uint8) { |
| 4833 | self.FirstHeaderMask = v |
| 4834 | } |
| 4835 | |
| 4836 | func (self *BsnTlvHashGtpHeaderMatch) Serialize(encoder *goloxi.Encoder) error { |
| 4837 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4838 | return err |
| 4839 | } |
| 4840 | |
| 4841 | encoder.PutUint8(uint8(self.FirstHeaderByte)) |
| 4842 | encoder.PutUint8(uint8(self.FirstHeaderMask)) |
| 4843 | |
| 4844 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4845 | |
| 4846 | return nil |
| 4847 | } |
| 4848 | |
| 4849 | func DecodeBsnTlvHashGtpHeaderMatch(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvHashGtpHeaderMatch, error) { |
| 4850 | _bsntlvhashgtpheadermatch := &BsnTlvHashGtpHeaderMatch{BsnTlv: parent} |
| 4851 | if decoder.Length() < 2 { |
| 4852 | return nil, fmt.Errorf("BsnTlvHashGtpHeaderMatch packet too short: %d < 2", decoder.Length()) |
| 4853 | } |
| 4854 | _bsntlvhashgtpheadermatch.FirstHeaderByte = uint8(decoder.ReadByte()) |
| 4855 | _bsntlvhashgtpheadermatch.FirstHeaderMask = uint8(decoder.ReadByte()) |
| 4856 | return _bsntlvhashgtpheadermatch, nil |
| 4857 | } |
| 4858 | |
| 4859 | func NewBsnTlvHashGtpHeaderMatch() *BsnTlvHashGtpHeaderMatch { |
| 4860 | obj := &BsnTlvHashGtpHeaderMatch{ |
| 4861 | BsnTlv: NewBsnTlv(104), |
| 4862 | } |
| 4863 | return obj |
| 4864 | } |
| 4865 | |
| 4866 | type BsnTlvHashGtpPortMatch struct { |
| 4867 | *BsnTlv |
| 4868 | Match BsnHashGtpPortMatch |
| 4869 | SrcPort uint16 |
| 4870 | DstPort uint16 |
| 4871 | } |
| 4872 | |
| 4873 | type IBsnTlvHashGtpPortMatch interface { |
| 4874 | IBsnTlv |
| 4875 | GetMatch() BsnHashGtpPortMatch |
| 4876 | GetSrcPort() uint16 |
| 4877 | GetDstPort() uint16 |
| 4878 | } |
| 4879 | |
| 4880 | func (self *BsnTlvHashGtpPortMatch) GetMatch() BsnHashGtpPortMatch { |
| 4881 | return self.Match |
| 4882 | } |
| 4883 | |
| 4884 | func (self *BsnTlvHashGtpPortMatch) SetMatch(v BsnHashGtpPortMatch) { |
| 4885 | self.Match = v |
| 4886 | } |
| 4887 | |
| 4888 | func (self *BsnTlvHashGtpPortMatch) GetSrcPort() uint16 { |
| 4889 | return self.SrcPort |
| 4890 | } |
| 4891 | |
| 4892 | func (self *BsnTlvHashGtpPortMatch) SetSrcPort(v uint16) { |
| 4893 | self.SrcPort = v |
| 4894 | } |
| 4895 | |
| 4896 | func (self *BsnTlvHashGtpPortMatch) GetDstPort() uint16 { |
| 4897 | return self.DstPort |
| 4898 | } |
| 4899 | |
| 4900 | func (self *BsnTlvHashGtpPortMatch) SetDstPort(v uint16) { |
| 4901 | self.DstPort = v |
| 4902 | } |
| 4903 | |
| 4904 | func (self *BsnTlvHashGtpPortMatch) Serialize(encoder *goloxi.Encoder) error { |
| 4905 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4906 | return err |
| 4907 | } |
| 4908 | |
| 4909 | encoder.PutUint8(uint8(self.Match)) |
| 4910 | encoder.PutUint16(uint16(self.SrcPort)) |
| 4911 | encoder.PutUint16(uint16(self.DstPort)) |
| 4912 | |
| 4913 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4914 | |
| 4915 | return nil |
| 4916 | } |
| 4917 | |
| 4918 | func DecodeBsnTlvHashGtpPortMatch(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvHashGtpPortMatch, error) { |
| 4919 | _bsntlvhashgtpportmatch := &BsnTlvHashGtpPortMatch{BsnTlv: parent} |
| 4920 | if decoder.Length() < 5 { |
| 4921 | return nil, fmt.Errorf("BsnTlvHashGtpPortMatch packet too short: %d < 5", decoder.Length()) |
| 4922 | } |
| 4923 | _bsntlvhashgtpportmatch.Match = BsnHashGtpPortMatch(decoder.ReadByte()) |
| 4924 | _bsntlvhashgtpportmatch.SrcPort = uint16(decoder.ReadUint16()) |
| 4925 | _bsntlvhashgtpportmatch.DstPort = uint16(decoder.ReadUint16()) |
| 4926 | return _bsntlvhashgtpportmatch, nil |
| 4927 | } |
| 4928 | |
| 4929 | func NewBsnTlvHashGtpPortMatch() *BsnTlvHashGtpPortMatch { |
| 4930 | obj := &BsnTlvHashGtpPortMatch{ |
| 4931 | BsnTlv: NewBsnTlv(105), |
| 4932 | } |
| 4933 | return obj |
| 4934 | } |
| 4935 | |
| 4936 | type BsnTlvHashPacketField struct { |
| 4937 | *BsnTlv |
| 4938 | Value BsnHashPacketField |
| 4939 | } |
| 4940 | |
| 4941 | type IBsnTlvHashPacketField interface { |
| 4942 | IBsnTlv |
| 4943 | GetValue() BsnHashPacketField |
| 4944 | } |
| 4945 | |
| 4946 | func (self *BsnTlvHashPacketField) GetValue() BsnHashPacketField { |
| 4947 | return self.Value |
| 4948 | } |
| 4949 | |
| 4950 | func (self *BsnTlvHashPacketField) SetValue(v BsnHashPacketField) { |
| 4951 | self.Value = v |
| 4952 | } |
| 4953 | |
| 4954 | func (self *BsnTlvHashPacketField) Serialize(encoder *goloxi.Encoder) error { |
| 4955 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 4956 | return err |
| 4957 | } |
| 4958 | |
| 4959 | encoder.PutUint64(uint64(self.Value)) |
| 4960 | |
| 4961 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 4962 | |
| 4963 | return nil |
| 4964 | } |
| 4965 | |
| 4966 | func DecodeBsnTlvHashPacketField(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvHashPacketField, error) { |
| 4967 | _bsntlvhashpacketfield := &BsnTlvHashPacketField{BsnTlv: parent} |
| 4968 | if decoder.Length() < 8 { |
| 4969 | return nil, fmt.Errorf("BsnTlvHashPacketField packet too short: %d < 8", decoder.Length()) |
| 4970 | } |
| 4971 | _bsntlvhashpacketfield.Value = BsnHashPacketField(decoder.ReadUint64()) |
| 4972 | return _bsntlvhashpacketfield, nil |
| 4973 | } |
| 4974 | |
| 4975 | func NewBsnTlvHashPacketField() *BsnTlvHashPacketField { |
| 4976 | obj := &BsnTlvHashPacketField{ |
| 4977 | BsnTlv: NewBsnTlv(103), |
| 4978 | } |
| 4979 | return obj |
| 4980 | } |
| 4981 | |
| 4982 | type BsnTlvHashPacketType struct { |
| 4983 | *BsnTlv |
| 4984 | Value BsnHashPacketType |
| 4985 | } |
| 4986 | |
| 4987 | type IBsnTlvHashPacketType interface { |
| 4988 | IBsnTlv |
| 4989 | GetValue() BsnHashPacketType |
| 4990 | } |
| 4991 | |
| 4992 | func (self *BsnTlvHashPacketType) GetValue() BsnHashPacketType { |
| 4993 | return self.Value |
| 4994 | } |
| 4995 | |
| 4996 | func (self *BsnTlvHashPacketType) SetValue(v BsnHashPacketType) { |
| 4997 | self.Value = v |
| 4998 | } |
| 4999 | |
| 5000 | func (self *BsnTlvHashPacketType) Serialize(encoder *goloxi.Encoder) error { |
| 5001 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5002 | return err |
| 5003 | } |
| 5004 | |
| 5005 | encoder.PutUint8(uint8(self.Value)) |
| 5006 | |
| 5007 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5008 | |
| 5009 | return nil |
| 5010 | } |
| 5011 | |
| 5012 | func DecodeBsnTlvHashPacketType(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvHashPacketType, error) { |
| 5013 | _bsntlvhashpackettype := &BsnTlvHashPacketType{BsnTlv: parent} |
| 5014 | if decoder.Length() < 1 { |
| 5015 | return nil, fmt.Errorf("BsnTlvHashPacketType packet too short: %d < 1", decoder.Length()) |
| 5016 | } |
| 5017 | _bsntlvhashpackettype.Value = BsnHashPacketType(decoder.ReadByte()) |
| 5018 | return _bsntlvhashpackettype, nil |
| 5019 | } |
| 5020 | |
| 5021 | func NewBsnTlvHashPacketType() *BsnTlvHashPacketType { |
| 5022 | obj := &BsnTlvHashPacketType{ |
| 5023 | BsnTlv: NewBsnTlv(102), |
| 5024 | } |
| 5025 | return obj |
| 5026 | } |
| 5027 | |
| 5028 | type BsnTlvHashSeed struct { |
| 5029 | *BsnTlv |
| 5030 | Seed1 uint32 |
| 5031 | Seed2 uint32 |
| 5032 | } |
| 5033 | |
| 5034 | type IBsnTlvHashSeed interface { |
| 5035 | IBsnTlv |
| 5036 | GetSeed1() uint32 |
| 5037 | GetSeed2() uint32 |
| 5038 | } |
| 5039 | |
| 5040 | func (self *BsnTlvHashSeed) GetSeed1() uint32 { |
| 5041 | return self.Seed1 |
| 5042 | } |
| 5043 | |
| 5044 | func (self *BsnTlvHashSeed) SetSeed1(v uint32) { |
| 5045 | self.Seed1 = v |
| 5046 | } |
| 5047 | |
| 5048 | func (self *BsnTlvHashSeed) GetSeed2() uint32 { |
| 5049 | return self.Seed2 |
| 5050 | } |
| 5051 | |
| 5052 | func (self *BsnTlvHashSeed) SetSeed2(v uint32) { |
| 5053 | self.Seed2 = v |
| 5054 | } |
| 5055 | |
| 5056 | func (self *BsnTlvHashSeed) Serialize(encoder *goloxi.Encoder) error { |
| 5057 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5058 | return err |
| 5059 | } |
| 5060 | |
| 5061 | encoder.PutUint32(uint32(self.Seed1)) |
| 5062 | encoder.PutUint32(uint32(self.Seed2)) |
| 5063 | |
| 5064 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5065 | |
| 5066 | return nil |
| 5067 | } |
| 5068 | |
| 5069 | func DecodeBsnTlvHashSeed(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvHashSeed, error) { |
| 5070 | _bsntlvhashseed := &BsnTlvHashSeed{BsnTlv: parent} |
| 5071 | if decoder.Length() < 8 { |
| 5072 | return nil, fmt.Errorf("BsnTlvHashSeed packet too short: %d < 8", decoder.Length()) |
| 5073 | } |
| 5074 | _bsntlvhashseed.Seed1 = uint32(decoder.ReadUint32()) |
| 5075 | _bsntlvhashseed.Seed2 = uint32(decoder.ReadUint32()) |
| 5076 | return _bsntlvhashseed, nil |
| 5077 | } |
| 5078 | |
| 5079 | func NewBsnTlvHashSeed() *BsnTlvHashSeed { |
| 5080 | obj := &BsnTlvHashSeed{ |
| 5081 | BsnTlv: NewBsnTlv(100), |
| 5082 | } |
| 5083 | return obj |
| 5084 | } |
| 5085 | |
| 5086 | type BsnTlvHashType struct { |
| 5087 | *BsnTlv |
| 5088 | Value BsnHashType |
| 5089 | } |
| 5090 | |
| 5091 | type IBsnTlvHashType interface { |
| 5092 | IBsnTlv |
| 5093 | GetValue() BsnHashType |
| 5094 | } |
| 5095 | |
| 5096 | func (self *BsnTlvHashType) GetValue() BsnHashType { |
| 5097 | return self.Value |
| 5098 | } |
| 5099 | |
| 5100 | func (self *BsnTlvHashType) SetValue(v BsnHashType) { |
| 5101 | self.Value = v |
| 5102 | } |
| 5103 | |
| 5104 | func (self *BsnTlvHashType) Serialize(encoder *goloxi.Encoder) error { |
| 5105 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5106 | return err |
| 5107 | } |
| 5108 | |
| 5109 | encoder.PutUint8(uint8(self.Value)) |
| 5110 | |
| 5111 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5112 | |
| 5113 | return nil |
| 5114 | } |
| 5115 | |
| 5116 | func DecodeBsnTlvHashType(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvHashType, error) { |
| 5117 | _bsntlvhashtype := &BsnTlvHashType{BsnTlv: parent} |
| 5118 | if decoder.Length() < 1 { |
| 5119 | return nil, fmt.Errorf("BsnTlvHashType packet too short: %d < 1", decoder.Length()) |
| 5120 | } |
| 5121 | _bsntlvhashtype.Value = BsnHashType(decoder.ReadByte()) |
| 5122 | return _bsntlvhashtype, nil |
| 5123 | } |
| 5124 | |
| 5125 | func NewBsnTlvHashType() *BsnTlvHashType { |
| 5126 | obj := &BsnTlvHashType{ |
| 5127 | BsnTlv: NewBsnTlv(101), |
| 5128 | } |
| 5129 | return obj |
| 5130 | } |
| 5131 | |
| 5132 | type BsnTlvHeaderSize struct { |
| 5133 | *BsnTlv |
| 5134 | Value uint32 |
| 5135 | } |
| 5136 | |
| 5137 | type IBsnTlvHeaderSize interface { |
| 5138 | IBsnTlv |
| 5139 | GetValue() uint32 |
| 5140 | } |
| 5141 | |
| 5142 | func (self *BsnTlvHeaderSize) GetValue() uint32 { |
| 5143 | return self.Value |
| 5144 | } |
| 5145 | |
| 5146 | func (self *BsnTlvHeaderSize) SetValue(v uint32) { |
| 5147 | self.Value = v |
| 5148 | } |
| 5149 | |
| 5150 | func (self *BsnTlvHeaderSize) Serialize(encoder *goloxi.Encoder) error { |
| 5151 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5152 | return err |
| 5153 | } |
| 5154 | |
| 5155 | encoder.PutUint32(uint32(self.Value)) |
| 5156 | |
| 5157 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5158 | |
| 5159 | return nil |
| 5160 | } |
| 5161 | |
| 5162 | func DecodeBsnTlvHeaderSize(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvHeaderSize, error) { |
| 5163 | _bsntlvheadersize := &BsnTlvHeaderSize{BsnTlv: parent} |
| 5164 | if decoder.Length() < 4 { |
| 5165 | return nil, fmt.Errorf("BsnTlvHeaderSize packet too short: %d < 4", decoder.Length()) |
| 5166 | } |
| 5167 | _bsntlvheadersize.Value = uint32(decoder.ReadUint32()) |
| 5168 | return _bsntlvheadersize, nil |
| 5169 | } |
| 5170 | |
| 5171 | func NewBsnTlvHeaderSize() *BsnTlvHeaderSize { |
| 5172 | obj := &BsnTlvHeaderSize{ |
| 5173 | BsnTlv: NewBsnTlv(31), |
| 5174 | } |
| 5175 | return obj |
| 5176 | } |
| 5177 | |
| 5178 | type BsnTlvIcmpCode struct { |
| 5179 | *BsnTlv |
| 5180 | Value uint8 |
| 5181 | } |
| 5182 | |
| 5183 | type IBsnTlvIcmpCode interface { |
| 5184 | IBsnTlv |
| 5185 | GetValue() uint8 |
| 5186 | } |
| 5187 | |
| 5188 | func (self *BsnTlvIcmpCode) GetValue() uint8 { |
| 5189 | return self.Value |
| 5190 | } |
| 5191 | |
| 5192 | func (self *BsnTlvIcmpCode) SetValue(v uint8) { |
| 5193 | self.Value = v |
| 5194 | } |
| 5195 | |
| 5196 | func (self *BsnTlvIcmpCode) Serialize(encoder *goloxi.Encoder) error { |
| 5197 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5198 | return err |
| 5199 | } |
| 5200 | |
| 5201 | encoder.PutUint8(uint8(self.Value)) |
| 5202 | |
| 5203 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5204 | |
| 5205 | return nil |
| 5206 | } |
| 5207 | |
| 5208 | func DecodeBsnTlvIcmpCode(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIcmpCode, error) { |
| 5209 | _bsntlvicmpcode := &BsnTlvIcmpCode{BsnTlv: parent} |
| 5210 | if decoder.Length() < 1 { |
| 5211 | return nil, fmt.Errorf("BsnTlvIcmpCode packet too short: %d < 1", decoder.Length()) |
| 5212 | } |
| 5213 | _bsntlvicmpcode.Value = uint8(decoder.ReadByte()) |
| 5214 | return _bsntlvicmpcode, nil |
| 5215 | } |
| 5216 | |
| 5217 | func NewBsnTlvIcmpCode() *BsnTlvIcmpCode { |
| 5218 | obj := &BsnTlvIcmpCode{ |
| 5219 | BsnTlv: NewBsnTlv(69), |
| 5220 | } |
| 5221 | return obj |
| 5222 | } |
| 5223 | |
| 5224 | type BsnTlvIcmpId struct { |
| 5225 | *BsnTlv |
| 5226 | Value uint16 |
| 5227 | } |
| 5228 | |
| 5229 | type IBsnTlvIcmpId interface { |
| 5230 | IBsnTlv |
| 5231 | GetValue() uint16 |
| 5232 | } |
| 5233 | |
| 5234 | func (self *BsnTlvIcmpId) GetValue() uint16 { |
| 5235 | return self.Value |
| 5236 | } |
| 5237 | |
| 5238 | func (self *BsnTlvIcmpId) SetValue(v uint16) { |
| 5239 | self.Value = v |
| 5240 | } |
| 5241 | |
| 5242 | func (self *BsnTlvIcmpId) Serialize(encoder *goloxi.Encoder) error { |
| 5243 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5244 | return err |
| 5245 | } |
| 5246 | |
| 5247 | encoder.PutUint16(uint16(self.Value)) |
| 5248 | |
| 5249 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5250 | |
| 5251 | return nil |
| 5252 | } |
| 5253 | |
| 5254 | func DecodeBsnTlvIcmpId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIcmpId, error) { |
| 5255 | _bsntlvicmpid := &BsnTlvIcmpId{BsnTlv: parent} |
| 5256 | if decoder.Length() < 2 { |
| 5257 | return nil, fmt.Errorf("BsnTlvIcmpId packet too short: %d < 2", decoder.Length()) |
| 5258 | } |
| 5259 | _bsntlvicmpid.Value = uint16(decoder.ReadUint16()) |
| 5260 | return _bsntlvicmpid, nil |
| 5261 | } |
| 5262 | |
| 5263 | func NewBsnTlvIcmpId() *BsnTlvIcmpId { |
| 5264 | obj := &BsnTlvIcmpId{ |
| 5265 | BsnTlv: NewBsnTlv(70), |
| 5266 | } |
| 5267 | return obj |
| 5268 | } |
| 5269 | |
| 5270 | type BsnTlvIcmpType struct { |
| 5271 | *BsnTlv |
| 5272 | Value uint8 |
| 5273 | } |
| 5274 | |
| 5275 | type IBsnTlvIcmpType interface { |
| 5276 | IBsnTlv |
| 5277 | GetValue() uint8 |
| 5278 | } |
| 5279 | |
| 5280 | func (self *BsnTlvIcmpType) GetValue() uint8 { |
| 5281 | return self.Value |
| 5282 | } |
| 5283 | |
| 5284 | func (self *BsnTlvIcmpType) SetValue(v uint8) { |
| 5285 | self.Value = v |
| 5286 | } |
| 5287 | |
| 5288 | func (self *BsnTlvIcmpType) Serialize(encoder *goloxi.Encoder) error { |
| 5289 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5290 | return err |
| 5291 | } |
| 5292 | |
| 5293 | encoder.PutUint8(uint8(self.Value)) |
| 5294 | |
| 5295 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5296 | |
| 5297 | return nil |
| 5298 | } |
| 5299 | |
| 5300 | func DecodeBsnTlvIcmpType(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIcmpType, error) { |
| 5301 | _bsntlvicmptype := &BsnTlvIcmpType{BsnTlv: parent} |
| 5302 | if decoder.Length() < 1 { |
| 5303 | return nil, fmt.Errorf("BsnTlvIcmpType packet too short: %d < 1", decoder.Length()) |
| 5304 | } |
| 5305 | _bsntlvicmptype.Value = uint8(decoder.ReadByte()) |
| 5306 | return _bsntlvicmptype, nil |
| 5307 | } |
| 5308 | |
| 5309 | func NewBsnTlvIcmpType() *BsnTlvIcmpType { |
| 5310 | obj := &BsnTlvIcmpType{ |
| 5311 | BsnTlv: NewBsnTlv(68), |
| 5312 | } |
| 5313 | return obj |
| 5314 | } |
| 5315 | |
| 5316 | type BsnTlvIcmpv6Chksum struct { |
| 5317 | *BsnTlv |
| 5318 | Value uint16 |
| 5319 | } |
| 5320 | |
| 5321 | type IBsnTlvIcmpv6Chksum interface { |
| 5322 | IBsnTlv |
| 5323 | GetValue() uint16 |
| 5324 | } |
| 5325 | |
| 5326 | func (self *BsnTlvIcmpv6Chksum) GetValue() uint16 { |
| 5327 | return self.Value |
| 5328 | } |
| 5329 | |
| 5330 | func (self *BsnTlvIcmpv6Chksum) SetValue(v uint16) { |
| 5331 | self.Value = v |
| 5332 | } |
| 5333 | |
| 5334 | func (self *BsnTlvIcmpv6Chksum) Serialize(encoder *goloxi.Encoder) error { |
| 5335 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5336 | return err |
| 5337 | } |
| 5338 | |
| 5339 | encoder.PutUint16(uint16(self.Value)) |
| 5340 | |
| 5341 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5342 | |
| 5343 | return nil |
| 5344 | } |
| 5345 | |
| 5346 | func DecodeBsnTlvIcmpv6Chksum(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIcmpv6Chksum, error) { |
| 5347 | _bsntlvicmpv6chksum := &BsnTlvIcmpv6Chksum{BsnTlv: parent} |
| 5348 | if decoder.Length() < 2 { |
| 5349 | return nil, fmt.Errorf("BsnTlvIcmpv6Chksum packet too short: %d < 2", decoder.Length()) |
| 5350 | } |
| 5351 | _bsntlvicmpv6chksum.Value = uint16(decoder.ReadUint16()) |
| 5352 | return _bsntlvicmpv6chksum, nil |
| 5353 | } |
| 5354 | |
| 5355 | func NewBsnTlvIcmpv6Chksum() *BsnTlvIcmpv6Chksum { |
| 5356 | obj := &BsnTlvIcmpv6Chksum{ |
| 5357 | BsnTlv: NewBsnTlv(125), |
| 5358 | } |
| 5359 | return obj |
| 5360 | } |
| 5361 | |
| 5362 | type BsnTlvIdentifier struct { |
| 5363 | *BsnTlv |
| 5364 | Value uint32 |
| 5365 | } |
| 5366 | |
| 5367 | type IBsnTlvIdentifier interface { |
| 5368 | IBsnTlv |
| 5369 | GetValue() uint32 |
| 5370 | } |
| 5371 | |
| 5372 | func (self *BsnTlvIdentifier) GetValue() uint32 { |
| 5373 | return self.Value |
| 5374 | } |
| 5375 | |
| 5376 | func (self *BsnTlvIdentifier) SetValue(v uint32) { |
| 5377 | self.Value = v |
| 5378 | } |
| 5379 | |
| 5380 | func (self *BsnTlvIdentifier) Serialize(encoder *goloxi.Encoder) error { |
| 5381 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5382 | return err |
| 5383 | } |
| 5384 | |
| 5385 | encoder.PutUint32(uint32(self.Value)) |
| 5386 | |
| 5387 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5388 | |
| 5389 | return nil |
| 5390 | } |
| 5391 | |
| 5392 | func DecodeBsnTlvIdentifier(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIdentifier, error) { |
| 5393 | _bsntlvidentifier := &BsnTlvIdentifier{BsnTlv: parent} |
| 5394 | if decoder.Length() < 4 { |
| 5395 | return nil, fmt.Errorf("BsnTlvIdentifier packet too short: %d < 4", decoder.Length()) |
| 5396 | } |
| 5397 | _bsntlvidentifier.Value = uint32(decoder.ReadUint32()) |
| 5398 | return _bsntlvidentifier, nil |
| 5399 | } |
| 5400 | |
| 5401 | func NewBsnTlvIdentifier() *BsnTlvIdentifier { |
| 5402 | obj := &BsnTlvIdentifier{ |
| 5403 | BsnTlv: NewBsnTlv(173), |
| 5404 | } |
| 5405 | return obj |
| 5406 | } |
| 5407 | |
| 5408 | type BsnTlvIdleNotification struct { |
| 5409 | *BsnTlv |
| 5410 | } |
| 5411 | |
| 5412 | type IBsnTlvIdleNotification interface { |
| 5413 | IBsnTlv |
| 5414 | } |
| 5415 | |
| 5416 | func (self *BsnTlvIdleNotification) Serialize(encoder *goloxi.Encoder) error { |
| 5417 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5418 | return err |
| 5419 | } |
| 5420 | |
| 5421 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5422 | |
| 5423 | return nil |
| 5424 | } |
| 5425 | |
| 5426 | func DecodeBsnTlvIdleNotification(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIdleNotification, error) { |
| 5427 | _bsntlvidlenotification := &BsnTlvIdleNotification{BsnTlv: parent} |
| 5428 | return _bsntlvidlenotification, nil |
| 5429 | } |
| 5430 | |
| 5431 | func NewBsnTlvIdleNotification() *BsnTlvIdleNotification { |
| 5432 | obj := &BsnTlvIdleNotification{ |
| 5433 | BsnTlv: NewBsnTlv(7), |
| 5434 | } |
| 5435 | return obj |
| 5436 | } |
| 5437 | |
| 5438 | type BsnTlvIdleTime struct { |
| 5439 | *BsnTlv |
| 5440 | Value uint64 |
| 5441 | } |
| 5442 | |
| 5443 | type IBsnTlvIdleTime interface { |
| 5444 | IBsnTlv |
| 5445 | GetValue() uint64 |
| 5446 | } |
| 5447 | |
| 5448 | func (self *BsnTlvIdleTime) GetValue() uint64 { |
| 5449 | return self.Value |
| 5450 | } |
| 5451 | |
| 5452 | func (self *BsnTlvIdleTime) SetValue(v uint64) { |
| 5453 | self.Value = v |
| 5454 | } |
| 5455 | |
| 5456 | func (self *BsnTlvIdleTime) Serialize(encoder *goloxi.Encoder) error { |
| 5457 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5458 | return err |
| 5459 | } |
| 5460 | |
| 5461 | encoder.PutUint64(uint64(self.Value)) |
| 5462 | |
| 5463 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5464 | |
| 5465 | return nil |
| 5466 | } |
| 5467 | |
| 5468 | func DecodeBsnTlvIdleTime(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIdleTime, error) { |
| 5469 | _bsntlvidletime := &BsnTlvIdleTime{BsnTlv: parent} |
| 5470 | if decoder.Length() < 8 { |
| 5471 | return nil, fmt.Errorf("BsnTlvIdleTime packet too short: %d < 8", decoder.Length()) |
| 5472 | } |
| 5473 | _bsntlvidletime.Value = uint64(decoder.ReadUint64()) |
| 5474 | return _bsntlvidletime, nil |
| 5475 | } |
| 5476 | |
| 5477 | func NewBsnTlvIdleTime() *BsnTlvIdleTime { |
| 5478 | obj := &BsnTlvIdleTime{ |
| 5479 | BsnTlv: NewBsnTlv(5), |
| 5480 | } |
| 5481 | return obj |
| 5482 | } |
| 5483 | |
| 5484 | type BsnTlvIdleTimeout struct { |
| 5485 | *BsnTlv |
| 5486 | Value uint32 |
| 5487 | } |
| 5488 | |
| 5489 | type IBsnTlvIdleTimeout interface { |
| 5490 | IBsnTlv |
| 5491 | GetValue() uint32 |
| 5492 | } |
| 5493 | |
| 5494 | func (self *BsnTlvIdleTimeout) GetValue() uint32 { |
| 5495 | return self.Value |
| 5496 | } |
| 5497 | |
| 5498 | func (self *BsnTlvIdleTimeout) SetValue(v uint32) { |
| 5499 | self.Value = v |
| 5500 | } |
| 5501 | |
| 5502 | func (self *BsnTlvIdleTimeout) Serialize(encoder *goloxi.Encoder) error { |
| 5503 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5504 | return err |
| 5505 | } |
| 5506 | |
| 5507 | encoder.PutUint32(uint32(self.Value)) |
| 5508 | |
| 5509 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5510 | |
| 5511 | return nil |
| 5512 | } |
| 5513 | |
| 5514 | func DecodeBsnTlvIdleTimeout(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIdleTimeout, error) { |
| 5515 | _bsntlvidletimeout := &BsnTlvIdleTimeout{BsnTlv: parent} |
| 5516 | if decoder.Length() < 4 { |
| 5517 | return nil, fmt.Errorf("BsnTlvIdleTimeout packet too short: %d < 4", decoder.Length()) |
| 5518 | } |
| 5519 | _bsntlvidletimeout.Value = uint32(decoder.ReadUint32()) |
| 5520 | return _bsntlvidletimeout, nil |
| 5521 | } |
| 5522 | |
| 5523 | func NewBsnTlvIdleTimeout() *BsnTlvIdleTimeout { |
| 5524 | obj := &BsnTlvIdleTimeout{ |
| 5525 | BsnTlv: NewBsnTlv(8), |
| 5526 | } |
| 5527 | return obj |
| 5528 | } |
| 5529 | |
| 5530 | type BsnTlvIgmpSnooping struct { |
| 5531 | *BsnTlv |
| 5532 | } |
| 5533 | |
| 5534 | type IBsnTlvIgmpSnooping interface { |
| 5535 | IBsnTlv |
| 5536 | } |
| 5537 | |
| 5538 | func (self *BsnTlvIgmpSnooping) Serialize(encoder *goloxi.Encoder) error { |
| 5539 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5540 | return err |
| 5541 | } |
| 5542 | |
| 5543 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5544 | |
| 5545 | return nil |
| 5546 | } |
| 5547 | |
| 5548 | func DecodeBsnTlvIgmpSnooping(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIgmpSnooping, error) { |
| 5549 | _bsntlvigmpsnooping := &BsnTlvIgmpSnooping{BsnTlv: parent} |
| 5550 | return _bsntlvigmpsnooping, nil |
| 5551 | } |
| 5552 | |
| 5553 | func NewBsnTlvIgmpSnooping() *BsnTlvIgmpSnooping { |
| 5554 | obj := &BsnTlvIgmpSnooping{ |
| 5555 | BsnTlv: NewBsnTlv(78), |
| 5556 | } |
| 5557 | return obj |
| 5558 | } |
| 5559 | |
| 5560 | type BsnTlvIngressPortGroupId struct { |
| 5561 | *BsnTlv |
| 5562 | Value uint32 |
| 5563 | } |
| 5564 | |
| 5565 | type IBsnTlvIngressPortGroupId interface { |
| 5566 | IBsnTlv |
| 5567 | GetValue() uint32 |
| 5568 | } |
| 5569 | |
| 5570 | func (self *BsnTlvIngressPortGroupId) GetValue() uint32 { |
| 5571 | return self.Value |
| 5572 | } |
| 5573 | |
| 5574 | func (self *BsnTlvIngressPortGroupId) SetValue(v uint32) { |
| 5575 | self.Value = v |
| 5576 | } |
| 5577 | |
| 5578 | func (self *BsnTlvIngressPortGroupId) Serialize(encoder *goloxi.Encoder) error { |
| 5579 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5580 | return err |
| 5581 | } |
| 5582 | |
| 5583 | encoder.PutUint32(uint32(self.Value)) |
| 5584 | |
| 5585 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5586 | |
| 5587 | return nil |
| 5588 | } |
| 5589 | |
| 5590 | func DecodeBsnTlvIngressPortGroupId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIngressPortGroupId, error) { |
| 5591 | _bsntlvingressportgroupid := &BsnTlvIngressPortGroupId{BsnTlv: parent} |
| 5592 | if decoder.Length() < 4 { |
| 5593 | return nil, fmt.Errorf("BsnTlvIngressPortGroupId packet too short: %d < 4", decoder.Length()) |
| 5594 | } |
| 5595 | _bsntlvingressportgroupid.Value = uint32(decoder.ReadUint32()) |
| 5596 | return _bsntlvingressportgroupid, nil |
| 5597 | } |
| 5598 | |
| 5599 | func NewBsnTlvIngressPortGroupId() *BsnTlvIngressPortGroupId { |
| 5600 | obj := &BsnTlvIngressPortGroupId{ |
| 5601 | BsnTlv: NewBsnTlv(138), |
| 5602 | } |
| 5603 | return obj |
| 5604 | } |
| 5605 | |
| 5606 | type BsnTlvInternalGatewayMac struct { |
| 5607 | *BsnTlv |
| 5608 | Value net.HardwareAddr |
| 5609 | } |
| 5610 | |
| 5611 | type IBsnTlvInternalGatewayMac interface { |
| 5612 | IBsnTlv |
| 5613 | GetValue() net.HardwareAddr |
| 5614 | } |
| 5615 | |
| 5616 | func (self *BsnTlvInternalGatewayMac) GetValue() net.HardwareAddr { |
| 5617 | return self.Value |
| 5618 | } |
| 5619 | |
| 5620 | func (self *BsnTlvInternalGatewayMac) SetValue(v net.HardwareAddr) { |
| 5621 | self.Value = v |
| 5622 | } |
| 5623 | |
| 5624 | func (self *BsnTlvInternalGatewayMac) Serialize(encoder *goloxi.Encoder) error { |
| 5625 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5626 | return err |
| 5627 | } |
| 5628 | |
| 5629 | encoder.Write(self.Value) |
| 5630 | |
| 5631 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5632 | |
| 5633 | return nil |
| 5634 | } |
| 5635 | |
| 5636 | func DecodeBsnTlvInternalGatewayMac(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvInternalGatewayMac, error) { |
| 5637 | _bsntlvinternalgatewaymac := &BsnTlvInternalGatewayMac{BsnTlv: parent} |
| 5638 | if decoder.Length() < 6 { |
| 5639 | return nil, fmt.Errorf("BsnTlvInternalGatewayMac packet too short: %d < 6", decoder.Length()) |
| 5640 | } |
| 5641 | _bsntlvinternalgatewaymac.Value = net.HardwareAddr(decoder.Read(6)) |
| 5642 | return _bsntlvinternalgatewaymac, nil |
| 5643 | } |
| 5644 | |
| 5645 | func NewBsnTlvInternalGatewayMac() *BsnTlvInternalGatewayMac { |
| 5646 | obj := &BsnTlvInternalGatewayMac{ |
| 5647 | BsnTlv: NewBsnTlv(28), |
| 5648 | } |
| 5649 | return obj |
| 5650 | } |
| 5651 | |
| 5652 | type BsnTlvInternalMac struct { |
| 5653 | *BsnTlv |
| 5654 | Value net.HardwareAddr |
| 5655 | } |
| 5656 | |
| 5657 | type IBsnTlvInternalMac interface { |
| 5658 | IBsnTlv |
| 5659 | GetValue() net.HardwareAddr |
| 5660 | } |
| 5661 | |
| 5662 | func (self *BsnTlvInternalMac) GetValue() net.HardwareAddr { |
| 5663 | return self.Value |
| 5664 | } |
| 5665 | |
| 5666 | func (self *BsnTlvInternalMac) SetValue(v net.HardwareAddr) { |
| 5667 | self.Value = v |
| 5668 | } |
| 5669 | |
| 5670 | func (self *BsnTlvInternalMac) Serialize(encoder *goloxi.Encoder) error { |
| 5671 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5672 | return err |
| 5673 | } |
| 5674 | |
| 5675 | encoder.Write(self.Value) |
| 5676 | |
| 5677 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5678 | |
| 5679 | return nil |
| 5680 | } |
| 5681 | |
| 5682 | func DecodeBsnTlvInternalMac(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvInternalMac, error) { |
| 5683 | _bsntlvinternalmac := &BsnTlvInternalMac{BsnTlv: parent} |
| 5684 | if decoder.Length() < 6 { |
| 5685 | return nil, fmt.Errorf("BsnTlvInternalMac packet too short: %d < 6", decoder.Length()) |
| 5686 | } |
| 5687 | _bsntlvinternalmac.Value = net.HardwareAddr(decoder.Read(6)) |
| 5688 | return _bsntlvinternalmac, nil |
| 5689 | } |
| 5690 | |
| 5691 | func NewBsnTlvInternalMac() *BsnTlvInternalMac { |
| 5692 | obj := &BsnTlvInternalMac{ |
| 5693 | BsnTlv: NewBsnTlv(27), |
| 5694 | } |
| 5695 | return obj |
| 5696 | } |
| 5697 | |
| 5698 | type BsnTlvInterval struct { |
| 5699 | *BsnTlv |
| 5700 | Value uint32 |
| 5701 | } |
| 5702 | |
| 5703 | type IBsnTlvInterval interface { |
| 5704 | IBsnTlv |
| 5705 | GetValue() uint32 |
| 5706 | } |
| 5707 | |
| 5708 | func (self *BsnTlvInterval) GetValue() uint32 { |
| 5709 | return self.Value |
| 5710 | } |
| 5711 | |
| 5712 | func (self *BsnTlvInterval) SetValue(v uint32) { |
| 5713 | self.Value = v |
| 5714 | } |
| 5715 | |
| 5716 | func (self *BsnTlvInterval) Serialize(encoder *goloxi.Encoder) error { |
| 5717 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5718 | return err |
| 5719 | } |
| 5720 | |
| 5721 | encoder.PutUint32(uint32(self.Value)) |
| 5722 | |
| 5723 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5724 | |
| 5725 | return nil |
| 5726 | } |
| 5727 | |
| 5728 | func DecodeBsnTlvInterval(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvInterval, error) { |
| 5729 | _bsntlvinterval := &BsnTlvInterval{BsnTlv: parent} |
| 5730 | if decoder.Length() < 4 { |
| 5731 | return nil, fmt.Errorf("BsnTlvInterval packet too short: %d < 4", decoder.Length()) |
| 5732 | } |
| 5733 | _bsntlvinterval.Value = uint32(decoder.ReadUint32()) |
| 5734 | return _bsntlvinterval, nil |
| 5735 | } |
| 5736 | |
| 5737 | func NewBsnTlvInterval() *BsnTlvInterval { |
| 5738 | obj := &BsnTlvInterval{ |
| 5739 | BsnTlv: NewBsnTlv(58), |
| 5740 | } |
| 5741 | return obj |
| 5742 | } |
| 5743 | |
| 5744 | type BsnTlvIpProto struct { |
| 5745 | *BsnTlv |
| 5746 | Value uint8 |
| 5747 | } |
| 5748 | |
| 5749 | type IBsnTlvIpProto interface { |
| 5750 | IBsnTlv |
| 5751 | GetValue() uint8 |
| 5752 | } |
| 5753 | |
| 5754 | func (self *BsnTlvIpProto) GetValue() uint8 { |
| 5755 | return self.Value |
| 5756 | } |
| 5757 | |
| 5758 | func (self *BsnTlvIpProto) SetValue(v uint8) { |
| 5759 | self.Value = v |
| 5760 | } |
| 5761 | |
| 5762 | func (self *BsnTlvIpProto) Serialize(encoder *goloxi.Encoder) error { |
| 5763 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5764 | return err |
| 5765 | } |
| 5766 | |
| 5767 | encoder.PutUint8(uint8(self.Value)) |
| 5768 | |
| 5769 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5770 | |
| 5771 | return nil |
| 5772 | } |
| 5773 | |
| 5774 | func DecodeBsnTlvIpProto(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIpProto, error) { |
| 5775 | _bsntlvipproto := &BsnTlvIpProto{BsnTlv: parent} |
| 5776 | if decoder.Length() < 1 { |
| 5777 | return nil, fmt.Errorf("BsnTlvIpProto packet too short: %d < 1", decoder.Length()) |
| 5778 | } |
| 5779 | _bsntlvipproto.Value = uint8(decoder.ReadByte()) |
| 5780 | return _bsntlvipproto, nil |
| 5781 | } |
| 5782 | |
| 5783 | func NewBsnTlvIpProto() *BsnTlvIpProto { |
| 5784 | obj := &BsnTlvIpProto{ |
| 5785 | BsnTlv: NewBsnTlv(67), |
| 5786 | } |
| 5787 | return obj |
| 5788 | } |
| 5789 | |
| 5790 | type BsnTlvIpTunnelType struct { |
| 5791 | *BsnTlv |
| 5792 | Value BsnIpTunnelType |
| 5793 | } |
| 5794 | |
| 5795 | type IBsnTlvIpTunnelType interface { |
| 5796 | IBsnTlv |
| 5797 | GetValue() BsnIpTunnelType |
| 5798 | } |
| 5799 | |
| 5800 | func (self *BsnTlvIpTunnelType) GetValue() BsnIpTunnelType { |
| 5801 | return self.Value |
| 5802 | } |
| 5803 | |
| 5804 | func (self *BsnTlvIpTunnelType) SetValue(v BsnIpTunnelType) { |
| 5805 | self.Value = v |
| 5806 | } |
| 5807 | |
| 5808 | func (self *BsnTlvIpTunnelType) Serialize(encoder *goloxi.Encoder) error { |
| 5809 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5810 | return err |
| 5811 | } |
| 5812 | |
| 5813 | encoder.PutUint16(uint16(self.Value)) |
| 5814 | |
| 5815 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5816 | |
| 5817 | return nil |
| 5818 | } |
| 5819 | |
| 5820 | func DecodeBsnTlvIpTunnelType(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIpTunnelType, error) { |
| 5821 | _bsntlviptunneltype := &BsnTlvIpTunnelType{BsnTlv: parent} |
| 5822 | if decoder.Length() < 2 { |
| 5823 | return nil, fmt.Errorf("BsnTlvIpTunnelType packet too short: %d < 2", decoder.Length()) |
| 5824 | } |
| 5825 | _bsntlviptunneltype.Value = BsnIpTunnelType(decoder.ReadUint16()) |
| 5826 | return _bsntlviptunneltype, nil |
| 5827 | } |
| 5828 | |
| 5829 | func NewBsnTlvIpTunnelType() *BsnTlvIpTunnelType { |
| 5830 | obj := &BsnTlvIpTunnelType{ |
| 5831 | BsnTlv: NewBsnTlv(169), |
| 5832 | } |
| 5833 | return obj |
| 5834 | } |
| 5835 | |
| 5836 | type BsnTlvIpv4 struct { |
| 5837 | *BsnTlv |
| 5838 | Value net.IP |
| 5839 | } |
| 5840 | |
| 5841 | type IBsnTlvIpv4 interface { |
| 5842 | IBsnTlv |
| 5843 | GetValue() net.IP |
| 5844 | } |
| 5845 | |
| 5846 | func (self *BsnTlvIpv4) GetValue() net.IP { |
| 5847 | return self.Value |
| 5848 | } |
| 5849 | |
| 5850 | func (self *BsnTlvIpv4) SetValue(v net.IP) { |
| 5851 | self.Value = v |
| 5852 | } |
| 5853 | |
| 5854 | func (self *BsnTlvIpv4) Serialize(encoder *goloxi.Encoder) error { |
| 5855 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5856 | return err |
| 5857 | } |
| 5858 | |
| 5859 | encoder.Write(self.Value.To4()) |
| 5860 | |
| 5861 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5862 | |
| 5863 | return nil |
| 5864 | } |
| 5865 | |
| 5866 | func DecodeBsnTlvIpv4(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIpv4, error) { |
| 5867 | _bsntlvipv4 := &BsnTlvIpv4{BsnTlv: parent} |
| 5868 | if decoder.Length() < 4 { |
| 5869 | return nil, fmt.Errorf("BsnTlvIpv4 packet too short: %d < 4", decoder.Length()) |
| 5870 | } |
| 5871 | _bsntlvipv4.Value = net.IP(decoder.Read(4)) |
| 5872 | return _bsntlvipv4, nil |
| 5873 | } |
| 5874 | |
| 5875 | func NewBsnTlvIpv4() *BsnTlvIpv4 { |
| 5876 | obj := &BsnTlvIpv4{ |
| 5877 | BsnTlv: NewBsnTlv(4), |
| 5878 | } |
| 5879 | return obj |
| 5880 | } |
| 5881 | |
| 5882 | type BsnTlvIpv4Dst struct { |
| 5883 | *BsnTlv |
| 5884 | Value net.IP |
| 5885 | } |
| 5886 | |
| 5887 | type IBsnTlvIpv4Dst interface { |
| 5888 | IBsnTlv |
| 5889 | GetValue() net.IP |
| 5890 | } |
| 5891 | |
| 5892 | func (self *BsnTlvIpv4Dst) GetValue() net.IP { |
| 5893 | return self.Value |
| 5894 | } |
| 5895 | |
| 5896 | func (self *BsnTlvIpv4Dst) SetValue(v net.IP) { |
| 5897 | self.Value = v |
| 5898 | } |
| 5899 | |
| 5900 | func (self *BsnTlvIpv4Dst) Serialize(encoder *goloxi.Encoder) error { |
| 5901 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5902 | return err |
| 5903 | } |
| 5904 | |
| 5905 | encoder.Write(self.Value.To4()) |
| 5906 | |
| 5907 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5908 | |
| 5909 | return nil |
| 5910 | } |
| 5911 | |
| 5912 | func DecodeBsnTlvIpv4Dst(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIpv4Dst, error) { |
| 5913 | _bsntlvipv4dst := &BsnTlvIpv4Dst{BsnTlv: parent} |
| 5914 | if decoder.Length() < 4 { |
| 5915 | return nil, fmt.Errorf("BsnTlvIpv4Dst packet too short: %d < 4", decoder.Length()) |
| 5916 | } |
| 5917 | _bsntlvipv4dst.Value = net.IP(decoder.Read(4)) |
| 5918 | return _bsntlvipv4dst, nil |
| 5919 | } |
| 5920 | |
| 5921 | func NewBsnTlvIpv4Dst() *BsnTlvIpv4Dst { |
| 5922 | obj := &BsnTlvIpv4Dst{ |
| 5923 | BsnTlv: NewBsnTlv(35), |
| 5924 | } |
| 5925 | return obj |
| 5926 | } |
| 5927 | |
| 5928 | type BsnTlvIpv4Netmask struct { |
| 5929 | *BsnTlv |
| 5930 | Value net.IP |
| 5931 | } |
| 5932 | |
| 5933 | type IBsnTlvIpv4Netmask interface { |
| 5934 | IBsnTlv |
| 5935 | GetValue() net.IP |
| 5936 | } |
| 5937 | |
| 5938 | func (self *BsnTlvIpv4Netmask) GetValue() net.IP { |
| 5939 | return self.Value |
| 5940 | } |
| 5941 | |
| 5942 | func (self *BsnTlvIpv4Netmask) SetValue(v net.IP) { |
| 5943 | self.Value = v |
| 5944 | } |
| 5945 | |
| 5946 | func (self *BsnTlvIpv4Netmask) Serialize(encoder *goloxi.Encoder) error { |
| 5947 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5948 | return err |
| 5949 | } |
| 5950 | |
| 5951 | encoder.Write(self.Value.To4()) |
| 5952 | |
| 5953 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 5954 | |
| 5955 | return nil |
| 5956 | } |
| 5957 | |
| 5958 | func DecodeBsnTlvIpv4Netmask(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIpv4Netmask, error) { |
| 5959 | _bsntlvipv4netmask := &BsnTlvIpv4Netmask{BsnTlv: parent} |
| 5960 | if decoder.Length() < 4 { |
| 5961 | return nil, fmt.Errorf("BsnTlvIpv4Netmask packet too short: %d < 4", decoder.Length()) |
| 5962 | } |
| 5963 | _bsntlvipv4netmask.Value = net.IP(decoder.Read(4)) |
| 5964 | return _bsntlvipv4netmask, nil |
| 5965 | } |
| 5966 | |
| 5967 | func NewBsnTlvIpv4Netmask() *BsnTlvIpv4Netmask { |
| 5968 | obj := &BsnTlvIpv4Netmask{ |
| 5969 | BsnTlv: NewBsnTlv(60), |
| 5970 | } |
| 5971 | return obj |
| 5972 | } |
| 5973 | |
| 5974 | type BsnTlvIpv4Src struct { |
| 5975 | *BsnTlv |
| 5976 | Value net.IP |
| 5977 | } |
| 5978 | |
| 5979 | type IBsnTlvIpv4Src interface { |
| 5980 | IBsnTlv |
| 5981 | GetValue() net.IP |
| 5982 | } |
| 5983 | |
| 5984 | func (self *BsnTlvIpv4Src) GetValue() net.IP { |
| 5985 | return self.Value |
| 5986 | } |
| 5987 | |
| 5988 | func (self *BsnTlvIpv4Src) SetValue(v net.IP) { |
| 5989 | self.Value = v |
| 5990 | } |
| 5991 | |
| 5992 | func (self *BsnTlvIpv4Src) Serialize(encoder *goloxi.Encoder) error { |
| 5993 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 5994 | return err |
| 5995 | } |
| 5996 | |
| 5997 | encoder.Write(self.Value.To4()) |
| 5998 | |
| 5999 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6000 | |
| 6001 | return nil |
| 6002 | } |
| 6003 | |
| 6004 | func DecodeBsnTlvIpv4Src(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIpv4Src, error) { |
| 6005 | _bsntlvipv4src := &BsnTlvIpv4Src{BsnTlv: parent} |
| 6006 | if decoder.Length() < 4 { |
| 6007 | return nil, fmt.Errorf("BsnTlvIpv4Src packet too short: %d < 4", decoder.Length()) |
| 6008 | } |
| 6009 | _bsntlvipv4src.Value = net.IP(decoder.Read(4)) |
| 6010 | return _bsntlvipv4src, nil |
| 6011 | } |
| 6012 | |
| 6013 | func NewBsnTlvIpv4Src() *BsnTlvIpv4Src { |
| 6014 | obj := &BsnTlvIpv4Src{ |
| 6015 | BsnTlv: NewBsnTlv(34), |
| 6016 | } |
| 6017 | return obj |
| 6018 | } |
| 6019 | |
| 6020 | type BsnTlvIpv6 struct { |
| 6021 | *BsnTlv |
| 6022 | Value net.IP |
| 6023 | } |
| 6024 | |
| 6025 | type IBsnTlvIpv6 interface { |
| 6026 | IBsnTlv |
| 6027 | GetValue() net.IP |
| 6028 | } |
| 6029 | |
| 6030 | func (self *BsnTlvIpv6) GetValue() net.IP { |
| 6031 | return self.Value |
| 6032 | } |
| 6033 | |
| 6034 | func (self *BsnTlvIpv6) SetValue(v net.IP) { |
| 6035 | self.Value = v |
| 6036 | } |
| 6037 | |
| 6038 | func (self *BsnTlvIpv6) Serialize(encoder *goloxi.Encoder) error { |
| 6039 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6040 | return err |
| 6041 | } |
| 6042 | |
| 6043 | encoder.Write(self.Value.To16()) |
| 6044 | |
| 6045 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6046 | |
| 6047 | return nil |
| 6048 | } |
| 6049 | |
| 6050 | func DecodeBsnTlvIpv6(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIpv6, error) { |
| 6051 | _bsntlvipv6 := &BsnTlvIpv6{BsnTlv: parent} |
| 6052 | if decoder.Length() < 16 { |
| 6053 | return nil, fmt.Errorf("BsnTlvIpv6 packet too short: %d < 16", decoder.Length()) |
| 6054 | } |
| 6055 | _bsntlvipv6.Value = net.IP(decoder.Read(16)) |
| 6056 | return _bsntlvipv6, nil |
| 6057 | } |
| 6058 | |
| 6059 | func NewBsnTlvIpv6() *BsnTlvIpv6 { |
| 6060 | obj := &BsnTlvIpv6{ |
| 6061 | BsnTlv: NewBsnTlv(84), |
| 6062 | } |
| 6063 | return obj |
| 6064 | } |
| 6065 | |
| 6066 | type BsnTlvIpv6Dst struct { |
| 6067 | *BsnTlv |
| 6068 | Value net.IP |
| 6069 | } |
| 6070 | |
| 6071 | type IBsnTlvIpv6Dst interface { |
| 6072 | IBsnTlv |
| 6073 | GetValue() net.IP |
| 6074 | } |
| 6075 | |
| 6076 | func (self *BsnTlvIpv6Dst) GetValue() net.IP { |
| 6077 | return self.Value |
| 6078 | } |
| 6079 | |
| 6080 | func (self *BsnTlvIpv6Dst) SetValue(v net.IP) { |
| 6081 | self.Value = v |
| 6082 | } |
| 6083 | |
| 6084 | func (self *BsnTlvIpv6Dst) Serialize(encoder *goloxi.Encoder) error { |
| 6085 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6086 | return err |
| 6087 | } |
| 6088 | |
| 6089 | encoder.Write(self.Value.To16()) |
| 6090 | |
| 6091 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6092 | |
| 6093 | return nil |
| 6094 | } |
| 6095 | |
| 6096 | func DecodeBsnTlvIpv6Dst(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIpv6Dst, error) { |
| 6097 | _bsntlvipv6dst := &BsnTlvIpv6Dst{BsnTlv: parent} |
| 6098 | if decoder.Length() < 16 { |
| 6099 | return nil, fmt.Errorf("BsnTlvIpv6Dst packet too short: %d < 16", decoder.Length()) |
| 6100 | } |
| 6101 | _bsntlvipv6dst.Value = net.IP(decoder.Read(16)) |
| 6102 | return _bsntlvipv6dst, nil |
| 6103 | } |
| 6104 | |
| 6105 | func NewBsnTlvIpv6Dst() *BsnTlvIpv6Dst { |
| 6106 | obj := &BsnTlvIpv6Dst{ |
| 6107 | BsnTlv: NewBsnTlv(127), |
| 6108 | } |
| 6109 | return obj |
| 6110 | } |
| 6111 | |
| 6112 | type BsnTlvIpv6Prefix struct { |
| 6113 | *BsnTlv |
| 6114 | Value net.IP |
| 6115 | PrefixLength uint8 |
| 6116 | } |
| 6117 | |
| 6118 | type IBsnTlvIpv6Prefix interface { |
| 6119 | IBsnTlv |
| 6120 | GetValue() net.IP |
| 6121 | GetPrefixLength() uint8 |
| 6122 | } |
| 6123 | |
| 6124 | func (self *BsnTlvIpv6Prefix) GetValue() net.IP { |
| 6125 | return self.Value |
| 6126 | } |
| 6127 | |
| 6128 | func (self *BsnTlvIpv6Prefix) SetValue(v net.IP) { |
| 6129 | self.Value = v |
| 6130 | } |
| 6131 | |
| 6132 | func (self *BsnTlvIpv6Prefix) GetPrefixLength() uint8 { |
| 6133 | return self.PrefixLength |
| 6134 | } |
| 6135 | |
| 6136 | func (self *BsnTlvIpv6Prefix) SetPrefixLength(v uint8) { |
| 6137 | self.PrefixLength = v |
| 6138 | } |
| 6139 | |
| 6140 | func (self *BsnTlvIpv6Prefix) Serialize(encoder *goloxi.Encoder) error { |
| 6141 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6142 | return err |
| 6143 | } |
| 6144 | |
| 6145 | encoder.Write(self.Value.To16()) |
| 6146 | encoder.PutUint8(uint8(self.PrefixLength)) |
| 6147 | |
| 6148 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6149 | |
| 6150 | return nil |
| 6151 | } |
| 6152 | |
| 6153 | func DecodeBsnTlvIpv6Prefix(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIpv6Prefix, error) { |
| 6154 | _bsntlvipv6prefix := &BsnTlvIpv6Prefix{BsnTlv: parent} |
| 6155 | if decoder.Length() < 17 { |
| 6156 | return nil, fmt.Errorf("BsnTlvIpv6Prefix packet too short: %d < 17", decoder.Length()) |
| 6157 | } |
| 6158 | _bsntlvipv6prefix.Value = net.IP(decoder.Read(16)) |
| 6159 | _bsntlvipv6prefix.PrefixLength = uint8(decoder.ReadByte()) |
| 6160 | return _bsntlvipv6prefix, nil |
| 6161 | } |
| 6162 | |
| 6163 | func NewBsnTlvIpv6Prefix() *BsnTlvIpv6Prefix { |
| 6164 | obj := &BsnTlvIpv6Prefix{ |
| 6165 | BsnTlv: NewBsnTlv(122), |
| 6166 | } |
| 6167 | return obj |
| 6168 | } |
| 6169 | |
| 6170 | type BsnTlvIpv6Src struct { |
| 6171 | *BsnTlv |
| 6172 | Value net.IP |
| 6173 | } |
| 6174 | |
| 6175 | type IBsnTlvIpv6Src interface { |
| 6176 | IBsnTlv |
| 6177 | GetValue() net.IP |
| 6178 | } |
| 6179 | |
| 6180 | func (self *BsnTlvIpv6Src) GetValue() net.IP { |
| 6181 | return self.Value |
| 6182 | } |
| 6183 | |
| 6184 | func (self *BsnTlvIpv6Src) SetValue(v net.IP) { |
| 6185 | self.Value = v |
| 6186 | } |
| 6187 | |
| 6188 | func (self *BsnTlvIpv6Src) Serialize(encoder *goloxi.Encoder) error { |
| 6189 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6190 | return err |
| 6191 | } |
| 6192 | |
| 6193 | encoder.Write(self.Value.To16()) |
| 6194 | |
| 6195 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6196 | |
| 6197 | return nil |
| 6198 | } |
| 6199 | |
| 6200 | func DecodeBsnTlvIpv6Src(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvIpv6Src, error) { |
| 6201 | _bsntlvipv6src := &BsnTlvIpv6Src{BsnTlv: parent} |
| 6202 | if decoder.Length() < 16 { |
| 6203 | return nil, fmt.Errorf("BsnTlvIpv6Src packet too short: %d < 16", decoder.Length()) |
| 6204 | } |
| 6205 | _bsntlvipv6src.Value = net.IP(decoder.Read(16)) |
| 6206 | return _bsntlvipv6src, nil |
| 6207 | } |
| 6208 | |
| 6209 | func NewBsnTlvIpv6Src() *BsnTlvIpv6Src { |
| 6210 | obj := &BsnTlvIpv6Src{ |
| 6211 | BsnTlv: NewBsnTlv(126), |
| 6212 | } |
| 6213 | return obj |
| 6214 | } |
| 6215 | |
| 6216 | type BsnTlvKnownMulticastRate struct { |
| 6217 | *BsnTlv |
| 6218 | Value uint32 |
| 6219 | } |
| 6220 | |
| 6221 | type IBsnTlvKnownMulticastRate interface { |
| 6222 | IBsnTlv |
| 6223 | GetValue() uint32 |
| 6224 | } |
| 6225 | |
| 6226 | func (self *BsnTlvKnownMulticastRate) GetValue() uint32 { |
| 6227 | return self.Value |
| 6228 | } |
| 6229 | |
| 6230 | func (self *BsnTlvKnownMulticastRate) SetValue(v uint32) { |
| 6231 | self.Value = v |
| 6232 | } |
| 6233 | |
| 6234 | func (self *BsnTlvKnownMulticastRate) Serialize(encoder *goloxi.Encoder) error { |
| 6235 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6236 | return err |
| 6237 | } |
| 6238 | |
| 6239 | encoder.PutUint32(uint32(self.Value)) |
| 6240 | |
| 6241 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6242 | |
| 6243 | return nil |
| 6244 | } |
| 6245 | |
| 6246 | func DecodeBsnTlvKnownMulticastRate(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvKnownMulticastRate, error) { |
| 6247 | _bsntlvknownmulticastrate := &BsnTlvKnownMulticastRate{BsnTlv: parent} |
| 6248 | if decoder.Length() < 4 { |
| 6249 | return nil, fmt.Errorf("BsnTlvKnownMulticastRate packet too short: %d < 4", decoder.Length()) |
| 6250 | } |
| 6251 | _bsntlvknownmulticastrate.Value = uint32(decoder.ReadUint32()) |
| 6252 | return _bsntlvknownmulticastrate, nil |
| 6253 | } |
| 6254 | |
| 6255 | func NewBsnTlvKnownMulticastRate() *BsnTlvKnownMulticastRate { |
| 6256 | obj := &BsnTlvKnownMulticastRate{ |
| 6257 | BsnTlv: NewBsnTlv(91), |
| 6258 | } |
| 6259 | return obj |
| 6260 | } |
| 6261 | |
| 6262 | type BsnTlvL2MulticastLookup struct { |
| 6263 | *BsnTlv |
| 6264 | } |
| 6265 | |
| 6266 | type IBsnTlvL2MulticastLookup interface { |
| 6267 | IBsnTlv |
| 6268 | } |
| 6269 | |
| 6270 | func (self *BsnTlvL2MulticastLookup) Serialize(encoder *goloxi.Encoder) error { |
| 6271 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6272 | return err |
| 6273 | } |
| 6274 | |
| 6275 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6276 | |
| 6277 | return nil |
| 6278 | } |
| 6279 | |
| 6280 | func DecodeBsnTlvL2MulticastLookup(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvL2MulticastLookup, error) { |
| 6281 | _bsntlvl2multicastlookup := &BsnTlvL2MulticastLookup{BsnTlv: parent} |
| 6282 | return _bsntlvl2multicastlookup, nil |
| 6283 | } |
| 6284 | |
| 6285 | func NewBsnTlvL2MulticastLookup() *BsnTlvL2MulticastLookup { |
| 6286 | obj := &BsnTlvL2MulticastLookup{ |
| 6287 | BsnTlv: NewBsnTlv(79), |
| 6288 | } |
| 6289 | return obj |
| 6290 | } |
| 6291 | |
| 6292 | type BsnTlvL3 struct { |
| 6293 | *BsnTlv |
| 6294 | } |
| 6295 | |
| 6296 | type IBsnTlvL3 interface { |
| 6297 | IBsnTlv |
| 6298 | } |
| 6299 | |
| 6300 | func (self *BsnTlvL3) Serialize(encoder *goloxi.Encoder) error { |
| 6301 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6302 | return err |
| 6303 | } |
| 6304 | |
| 6305 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6306 | |
| 6307 | return nil |
| 6308 | } |
| 6309 | |
| 6310 | func DecodeBsnTlvL3(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvL3, error) { |
| 6311 | _bsntlvl3 := &BsnTlvL3{BsnTlv: parent} |
| 6312 | return _bsntlvl3, nil |
| 6313 | } |
| 6314 | |
| 6315 | func NewBsnTlvL3() *BsnTlvL3 { |
| 6316 | obj := &BsnTlvL3{ |
| 6317 | BsnTlv: NewBsnTlv(168), |
| 6318 | } |
| 6319 | return obj |
| 6320 | } |
| 6321 | |
| 6322 | type BsnTlvL3DstClassId struct { |
| 6323 | *BsnTlv |
| 6324 | Value uint32 |
| 6325 | } |
| 6326 | |
| 6327 | type IBsnTlvL3DstClassId interface { |
| 6328 | IBsnTlv |
| 6329 | GetValue() uint32 |
| 6330 | } |
| 6331 | |
| 6332 | func (self *BsnTlvL3DstClassId) GetValue() uint32 { |
| 6333 | return self.Value |
| 6334 | } |
| 6335 | |
| 6336 | func (self *BsnTlvL3DstClassId) SetValue(v uint32) { |
| 6337 | self.Value = v |
| 6338 | } |
| 6339 | |
| 6340 | func (self *BsnTlvL3DstClassId) Serialize(encoder *goloxi.Encoder) error { |
| 6341 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6342 | return err |
| 6343 | } |
| 6344 | |
| 6345 | encoder.PutUint32(uint32(self.Value)) |
| 6346 | |
| 6347 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6348 | |
| 6349 | return nil |
| 6350 | } |
| 6351 | |
| 6352 | func DecodeBsnTlvL3DstClassId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvL3DstClassId, error) { |
| 6353 | _bsntlvl3dstclassid := &BsnTlvL3DstClassId{BsnTlv: parent} |
| 6354 | if decoder.Length() < 4 { |
| 6355 | return nil, fmt.Errorf("BsnTlvL3DstClassId packet too short: %d < 4", decoder.Length()) |
| 6356 | } |
| 6357 | _bsntlvl3dstclassid.Value = uint32(decoder.ReadUint32()) |
| 6358 | return _bsntlvl3dstclassid, nil |
| 6359 | } |
| 6360 | |
| 6361 | func NewBsnTlvL3DstClassId() *BsnTlvL3DstClassId { |
| 6362 | obj := &BsnTlvL3DstClassId{ |
| 6363 | BsnTlv: NewBsnTlv(136), |
| 6364 | } |
| 6365 | return obj |
| 6366 | } |
| 6367 | |
| 6368 | type BsnTlvL3InterfaceClassId struct { |
| 6369 | *BsnTlv |
| 6370 | Value uint32 |
| 6371 | } |
| 6372 | |
| 6373 | type IBsnTlvL3InterfaceClassId interface { |
| 6374 | IBsnTlv |
| 6375 | GetValue() uint32 |
| 6376 | } |
| 6377 | |
| 6378 | func (self *BsnTlvL3InterfaceClassId) GetValue() uint32 { |
| 6379 | return self.Value |
| 6380 | } |
| 6381 | |
| 6382 | func (self *BsnTlvL3InterfaceClassId) SetValue(v uint32) { |
| 6383 | self.Value = v |
| 6384 | } |
| 6385 | |
| 6386 | func (self *BsnTlvL3InterfaceClassId) Serialize(encoder *goloxi.Encoder) error { |
| 6387 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6388 | return err |
| 6389 | } |
| 6390 | |
| 6391 | encoder.PutUint32(uint32(self.Value)) |
| 6392 | |
| 6393 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6394 | |
| 6395 | return nil |
| 6396 | } |
| 6397 | |
| 6398 | func DecodeBsnTlvL3InterfaceClassId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvL3InterfaceClassId, error) { |
| 6399 | _bsntlvl3interfaceclassid := &BsnTlvL3InterfaceClassId{BsnTlv: parent} |
| 6400 | if decoder.Length() < 4 { |
| 6401 | return nil, fmt.Errorf("BsnTlvL3InterfaceClassId packet too short: %d < 4", decoder.Length()) |
| 6402 | } |
| 6403 | _bsntlvl3interfaceclassid.Value = uint32(decoder.ReadUint32()) |
| 6404 | return _bsntlvl3interfaceclassid, nil |
| 6405 | } |
| 6406 | |
| 6407 | func NewBsnTlvL3InterfaceClassId() *BsnTlvL3InterfaceClassId { |
| 6408 | obj := &BsnTlvL3InterfaceClassId{ |
| 6409 | BsnTlv: NewBsnTlv(134), |
| 6410 | } |
| 6411 | return obj |
| 6412 | } |
| 6413 | |
| 6414 | type BsnTlvL3SrcClassId struct { |
| 6415 | *BsnTlv |
| 6416 | Value uint32 |
| 6417 | } |
| 6418 | |
| 6419 | type IBsnTlvL3SrcClassId interface { |
| 6420 | IBsnTlv |
| 6421 | GetValue() uint32 |
| 6422 | } |
| 6423 | |
| 6424 | func (self *BsnTlvL3SrcClassId) GetValue() uint32 { |
| 6425 | return self.Value |
| 6426 | } |
| 6427 | |
| 6428 | func (self *BsnTlvL3SrcClassId) SetValue(v uint32) { |
| 6429 | self.Value = v |
| 6430 | } |
| 6431 | |
| 6432 | func (self *BsnTlvL3SrcClassId) Serialize(encoder *goloxi.Encoder) error { |
| 6433 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6434 | return err |
| 6435 | } |
| 6436 | |
| 6437 | encoder.PutUint32(uint32(self.Value)) |
| 6438 | |
| 6439 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6440 | |
| 6441 | return nil |
| 6442 | } |
| 6443 | |
| 6444 | func DecodeBsnTlvL3SrcClassId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvL3SrcClassId, error) { |
| 6445 | _bsntlvl3srcclassid := &BsnTlvL3SrcClassId{BsnTlv: parent} |
| 6446 | if decoder.Length() < 4 { |
| 6447 | return nil, fmt.Errorf("BsnTlvL3SrcClassId packet too short: %d < 4", decoder.Length()) |
| 6448 | } |
| 6449 | _bsntlvl3srcclassid.Value = uint32(decoder.ReadUint32()) |
| 6450 | return _bsntlvl3srcclassid, nil |
| 6451 | } |
| 6452 | |
| 6453 | func NewBsnTlvL3SrcClassId() *BsnTlvL3SrcClassId { |
| 6454 | obj := &BsnTlvL3SrcClassId{ |
| 6455 | BsnTlv: NewBsnTlv(135), |
| 6456 | } |
| 6457 | return obj |
| 6458 | } |
| 6459 | |
| 6460 | type BsnTlvLagOptions struct { |
| 6461 | *BsnTlv |
| 6462 | Flags BsnLagFlag |
| 6463 | } |
| 6464 | |
| 6465 | type IBsnTlvLagOptions interface { |
| 6466 | IBsnTlv |
| 6467 | GetFlags() BsnLagFlag |
| 6468 | } |
| 6469 | |
| 6470 | func (self *BsnTlvLagOptions) GetFlags() BsnLagFlag { |
| 6471 | return self.Flags |
| 6472 | } |
| 6473 | |
| 6474 | func (self *BsnTlvLagOptions) SetFlags(v BsnLagFlag) { |
| 6475 | self.Flags = v |
| 6476 | } |
| 6477 | |
| 6478 | func (self *BsnTlvLagOptions) Serialize(encoder *goloxi.Encoder) error { |
| 6479 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6480 | return err |
| 6481 | } |
| 6482 | |
| 6483 | encoder.PutUint16(uint16(self.Flags)) |
| 6484 | |
| 6485 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6486 | |
| 6487 | return nil |
| 6488 | } |
| 6489 | |
| 6490 | func DecodeBsnTlvLagOptions(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvLagOptions, error) { |
| 6491 | _bsntlvlagoptions := &BsnTlvLagOptions{BsnTlv: parent} |
| 6492 | if decoder.Length() < 2 { |
| 6493 | return nil, fmt.Errorf("BsnTlvLagOptions packet too short: %d < 2", decoder.Length()) |
| 6494 | } |
| 6495 | _bsntlvlagoptions.Flags = BsnLagFlag(decoder.ReadUint16()) |
| 6496 | return _bsntlvlagoptions, nil |
| 6497 | } |
| 6498 | |
| 6499 | func NewBsnTlvLagOptions() *BsnTlvLagOptions { |
| 6500 | obj := &BsnTlvLagOptions{ |
| 6501 | BsnTlv: NewBsnTlv(160), |
| 6502 | } |
| 6503 | return obj |
| 6504 | } |
| 6505 | |
| 6506 | type BsnTlvLoopbackMode struct { |
| 6507 | *BsnTlv |
| 6508 | Value BsnLoopbackMode |
| 6509 | } |
| 6510 | |
| 6511 | type IBsnTlvLoopbackMode interface { |
| 6512 | IBsnTlv |
| 6513 | GetValue() BsnLoopbackMode |
| 6514 | } |
| 6515 | |
| 6516 | func (self *BsnTlvLoopbackMode) GetValue() BsnLoopbackMode { |
| 6517 | return self.Value |
| 6518 | } |
| 6519 | |
| 6520 | func (self *BsnTlvLoopbackMode) SetValue(v BsnLoopbackMode) { |
| 6521 | self.Value = v |
| 6522 | } |
| 6523 | |
| 6524 | func (self *BsnTlvLoopbackMode) Serialize(encoder *goloxi.Encoder) error { |
| 6525 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6526 | return err |
| 6527 | } |
| 6528 | |
| 6529 | encoder.PutUint8(uint8(self.Value)) |
| 6530 | |
| 6531 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6532 | |
| 6533 | return nil |
| 6534 | } |
| 6535 | |
| 6536 | func DecodeBsnTlvLoopbackMode(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvLoopbackMode, error) { |
| 6537 | _bsntlvloopbackmode := &BsnTlvLoopbackMode{BsnTlv: parent} |
| 6538 | if decoder.Length() < 1 { |
| 6539 | return nil, fmt.Errorf("BsnTlvLoopbackMode packet too short: %d < 1", decoder.Length()) |
| 6540 | } |
| 6541 | _bsntlvloopbackmode.Value = BsnLoopbackMode(decoder.ReadByte()) |
| 6542 | return _bsntlvloopbackmode, nil |
| 6543 | } |
| 6544 | |
| 6545 | func NewBsnTlvLoopbackMode() *BsnTlvLoopbackMode { |
| 6546 | obj := &BsnTlvLoopbackMode{ |
| 6547 | BsnTlv: NewBsnTlv(146), |
| 6548 | } |
| 6549 | return obj |
| 6550 | } |
| 6551 | |
| 6552 | type BsnTlvLoopbackPort struct { |
| 6553 | *BsnTlv |
| 6554 | Value Port |
| 6555 | } |
| 6556 | |
| 6557 | type IBsnTlvLoopbackPort interface { |
| 6558 | IBsnTlv |
| 6559 | GetValue() Port |
| 6560 | } |
| 6561 | |
| 6562 | func (self *BsnTlvLoopbackPort) GetValue() Port { |
| 6563 | return self.Value |
| 6564 | } |
| 6565 | |
| 6566 | func (self *BsnTlvLoopbackPort) SetValue(v Port) { |
| 6567 | self.Value = v |
| 6568 | } |
| 6569 | |
| 6570 | func (self *BsnTlvLoopbackPort) Serialize(encoder *goloxi.Encoder) error { |
| 6571 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6572 | return err |
| 6573 | } |
| 6574 | |
| 6575 | self.Value.Serialize(encoder) |
| 6576 | |
| 6577 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6578 | |
| 6579 | return nil |
| 6580 | } |
| 6581 | |
| 6582 | func DecodeBsnTlvLoopbackPort(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvLoopbackPort, error) { |
| 6583 | _bsntlvloopbackport := &BsnTlvLoopbackPort{BsnTlv: parent} |
| 6584 | if decoder.Length() < 4 { |
| 6585 | return nil, fmt.Errorf("BsnTlvLoopbackPort packet too short: %d < 4", decoder.Length()) |
| 6586 | } |
| 6587 | _bsntlvloopbackport.Value.Decode(decoder) |
| 6588 | return _bsntlvloopbackport, nil |
| 6589 | } |
| 6590 | |
| 6591 | func NewBsnTlvLoopbackPort() *BsnTlvLoopbackPort { |
| 6592 | obj := &BsnTlvLoopbackPort{ |
| 6593 | BsnTlv: NewBsnTlv(110), |
| 6594 | } |
| 6595 | return obj |
| 6596 | } |
| 6597 | |
| 6598 | type BsnTlvLrAllEnabled struct { |
| 6599 | *BsnTlv |
| 6600 | } |
| 6601 | |
| 6602 | type IBsnTlvLrAllEnabled interface { |
| 6603 | IBsnTlv |
| 6604 | } |
| 6605 | |
| 6606 | func (self *BsnTlvLrAllEnabled) Serialize(encoder *goloxi.Encoder) error { |
| 6607 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6608 | return err |
| 6609 | } |
| 6610 | |
| 6611 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6612 | |
| 6613 | return nil |
| 6614 | } |
| 6615 | |
| 6616 | func DecodeBsnTlvLrAllEnabled(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvLrAllEnabled, error) { |
| 6617 | _bsntlvlrallenabled := &BsnTlvLrAllEnabled{BsnTlv: parent} |
| 6618 | return _bsntlvlrallenabled, nil |
| 6619 | } |
| 6620 | |
| 6621 | func NewBsnTlvLrAllEnabled() *BsnTlvLrAllEnabled { |
| 6622 | obj := &BsnTlvLrAllEnabled{ |
| 6623 | BsnTlv: NewBsnTlv(178), |
| 6624 | } |
| 6625 | return obj |
| 6626 | } |
| 6627 | |
| 6628 | type BsnTlvMac struct { |
| 6629 | *BsnTlv |
| 6630 | Value net.HardwareAddr |
| 6631 | } |
| 6632 | |
| 6633 | type IBsnTlvMac interface { |
| 6634 | IBsnTlv |
| 6635 | GetValue() net.HardwareAddr |
| 6636 | } |
| 6637 | |
| 6638 | func (self *BsnTlvMac) GetValue() net.HardwareAddr { |
| 6639 | return self.Value |
| 6640 | } |
| 6641 | |
| 6642 | func (self *BsnTlvMac) SetValue(v net.HardwareAddr) { |
| 6643 | self.Value = v |
| 6644 | } |
| 6645 | |
| 6646 | func (self *BsnTlvMac) Serialize(encoder *goloxi.Encoder) error { |
| 6647 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6648 | return err |
| 6649 | } |
| 6650 | |
| 6651 | encoder.Write(self.Value) |
| 6652 | |
| 6653 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6654 | |
| 6655 | return nil |
| 6656 | } |
| 6657 | |
| 6658 | func DecodeBsnTlvMac(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvMac, error) { |
| 6659 | _bsntlvmac := &BsnTlvMac{BsnTlv: parent} |
| 6660 | if decoder.Length() < 6 { |
| 6661 | return nil, fmt.Errorf("BsnTlvMac packet too short: %d < 6", decoder.Length()) |
| 6662 | } |
| 6663 | _bsntlvmac.Value = net.HardwareAddr(decoder.Read(6)) |
| 6664 | return _bsntlvmac, nil |
| 6665 | } |
| 6666 | |
| 6667 | func NewBsnTlvMac() *BsnTlvMac { |
| 6668 | obj := &BsnTlvMac{ |
| 6669 | BsnTlv: NewBsnTlv(1), |
| 6670 | } |
| 6671 | return obj |
| 6672 | } |
| 6673 | |
| 6674 | type BsnTlvMacMask struct { |
| 6675 | *BsnTlv |
| 6676 | Value net.HardwareAddr |
| 6677 | } |
| 6678 | |
| 6679 | type IBsnTlvMacMask interface { |
| 6680 | IBsnTlv |
| 6681 | GetValue() net.HardwareAddr |
| 6682 | } |
| 6683 | |
| 6684 | func (self *BsnTlvMacMask) GetValue() net.HardwareAddr { |
| 6685 | return self.Value |
| 6686 | } |
| 6687 | |
| 6688 | func (self *BsnTlvMacMask) SetValue(v net.HardwareAddr) { |
| 6689 | self.Value = v |
| 6690 | } |
| 6691 | |
| 6692 | func (self *BsnTlvMacMask) Serialize(encoder *goloxi.Encoder) error { |
| 6693 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6694 | return err |
| 6695 | } |
| 6696 | |
| 6697 | encoder.Write(self.Value) |
| 6698 | |
| 6699 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6700 | |
| 6701 | return nil |
| 6702 | } |
| 6703 | |
| 6704 | func DecodeBsnTlvMacMask(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvMacMask, error) { |
| 6705 | _bsntlvmacmask := &BsnTlvMacMask{BsnTlv: parent} |
| 6706 | if decoder.Length() < 6 { |
| 6707 | return nil, fmt.Errorf("BsnTlvMacMask packet too short: %d < 6", decoder.Length()) |
| 6708 | } |
| 6709 | _bsntlvmacmask.Value = net.HardwareAddr(decoder.Read(6)) |
| 6710 | return _bsntlvmacmask, nil |
| 6711 | } |
| 6712 | |
| 6713 | func NewBsnTlvMacMask() *BsnTlvMacMask { |
| 6714 | obj := &BsnTlvMacMask{ |
| 6715 | BsnTlv: NewBsnTlv(56), |
| 6716 | } |
| 6717 | return obj |
| 6718 | } |
| 6719 | |
| 6720 | type BsnTlvMcgTypeVxlan struct { |
| 6721 | *BsnTlv |
| 6722 | } |
| 6723 | |
| 6724 | type IBsnTlvMcgTypeVxlan interface { |
| 6725 | IBsnTlv |
| 6726 | } |
| 6727 | |
| 6728 | func (self *BsnTlvMcgTypeVxlan) Serialize(encoder *goloxi.Encoder) error { |
| 6729 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6730 | return err |
| 6731 | } |
| 6732 | |
| 6733 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6734 | |
| 6735 | return nil |
| 6736 | } |
| 6737 | |
| 6738 | func DecodeBsnTlvMcgTypeVxlan(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvMcgTypeVxlan, error) { |
| 6739 | _bsntlvmcgtypevxlan := &BsnTlvMcgTypeVxlan{BsnTlv: parent} |
| 6740 | return _bsntlvmcgtypevxlan, nil |
| 6741 | } |
| 6742 | |
| 6743 | func NewBsnTlvMcgTypeVxlan() *BsnTlvMcgTypeVxlan { |
| 6744 | obj := &BsnTlvMcgTypeVxlan{ |
| 6745 | BsnTlv: NewBsnTlv(87), |
| 6746 | } |
| 6747 | return obj |
| 6748 | } |
| 6749 | |
| 6750 | type BsnTlvMissPackets struct { |
| 6751 | *BsnTlv |
| 6752 | Value uint64 |
| 6753 | } |
| 6754 | |
| 6755 | type IBsnTlvMissPackets interface { |
| 6756 | IBsnTlv |
| 6757 | GetValue() uint64 |
| 6758 | } |
| 6759 | |
| 6760 | func (self *BsnTlvMissPackets) GetValue() uint64 { |
| 6761 | return self.Value |
| 6762 | } |
| 6763 | |
| 6764 | func (self *BsnTlvMissPackets) SetValue(v uint64) { |
| 6765 | self.Value = v |
| 6766 | } |
| 6767 | |
| 6768 | func (self *BsnTlvMissPackets) Serialize(encoder *goloxi.Encoder) error { |
| 6769 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6770 | return err |
| 6771 | } |
| 6772 | |
| 6773 | encoder.PutUint64(uint64(self.Value)) |
| 6774 | |
| 6775 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6776 | |
| 6777 | return nil |
| 6778 | } |
| 6779 | |
| 6780 | func DecodeBsnTlvMissPackets(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvMissPackets, error) { |
| 6781 | _bsntlvmisspackets := &BsnTlvMissPackets{BsnTlv: parent} |
| 6782 | if decoder.Length() < 8 { |
| 6783 | return nil, fmt.Errorf("BsnTlvMissPackets packet too short: %d < 8", decoder.Length()) |
| 6784 | } |
| 6785 | _bsntlvmisspackets.Value = uint64(decoder.ReadUint64()) |
| 6786 | return _bsntlvmisspackets, nil |
| 6787 | } |
| 6788 | |
| 6789 | func NewBsnTlvMissPackets() *BsnTlvMissPackets { |
| 6790 | obj := &BsnTlvMissPackets{ |
| 6791 | BsnTlv: NewBsnTlv(13), |
| 6792 | } |
| 6793 | return obj |
| 6794 | } |
| 6795 | |
| 6796 | type BsnTlvMplsControlWord struct { |
| 6797 | *BsnTlv |
| 6798 | Value uint8 |
| 6799 | } |
| 6800 | |
| 6801 | type IBsnTlvMplsControlWord interface { |
| 6802 | IBsnTlv |
| 6803 | GetValue() uint8 |
| 6804 | } |
| 6805 | |
| 6806 | func (self *BsnTlvMplsControlWord) GetValue() uint8 { |
| 6807 | return self.Value |
| 6808 | } |
| 6809 | |
| 6810 | func (self *BsnTlvMplsControlWord) SetValue(v uint8) { |
| 6811 | self.Value = v |
| 6812 | } |
| 6813 | |
| 6814 | func (self *BsnTlvMplsControlWord) Serialize(encoder *goloxi.Encoder) error { |
| 6815 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6816 | return err |
| 6817 | } |
| 6818 | |
| 6819 | encoder.PutUint8(uint8(self.Value)) |
| 6820 | |
| 6821 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6822 | |
| 6823 | return nil |
| 6824 | } |
| 6825 | |
| 6826 | func DecodeBsnTlvMplsControlWord(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvMplsControlWord, error) { |
| 6827 | _bsntlvmplscontrolword := &BsnTlvMplsControlWord{BsnTlv: parent} |
| 6828 | if decoder.Length() < 1 { |
| 6829 | return nil, fmt.Errorf("BsnTlvMplsControlWord packet too short: %d < 1", decoder.Length()) |
| 6830 | } |
| 6831 | _bsntlvmplscontrolword.Value = uint8(decoder.ReadByte()) |
| 6832 | return _bsntlvmplscontrolword, nil |
| 6833 | } |
| 6834 | |
| 6835 | func NewBsnTlvMplsControlWord() *BsnTlvMplsControlWord { |
| 6836 | obj := &BsnTlvMplsControlWord{ |
| 6837 | BsnTlv: NewBsnTlv(62), |
| 6838 | } |
| 6839 | return obj |
| 6840 | } |
| 6841 | |
| 6842 | type BsnTlvMplsLabel struct { |
| 6843 | *BsnTlv |
| 6844 | Value uint32 |
| 6845 | } |
| 6846 | |
| 6847 | type IBsnTlvMplsLabel interface { |
| 6848 | IBsnTlv |
| 6849 | GetValue() uint32 |
| 6850 | } |
| 6851 | |
| 6852 | func (self *BsnTlvMplsLabel) GetValue() uint32 { |
| 6853 | return self.Value |
| 6854 | } |
| 6855 | |
| 6856 | func (self *BsnTlvMplsLabel) SetValue(v uint32) { |
| 6857 | self.Value = v |
| 6858 | } |
| 6859 | |
| 6860 | func (self *BsnTlvMplsLabel) Serialize(encoder *goloxi.Encoder) error { |
| 6861 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6862 | return err |
| 6863 | } |
| 6864 | |
| 6865 | encoder.PutUint32(uint32(self.Value)) |
| 6866 | |
| 6867 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6868 | |
| 6869 | return nil |
| 6870 | } |
| 6871 | |
| 6872 | func DecodeBsnTlvMplsLabel(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvMplsLabel, error) { |
| 6873 | _bsntlvmplslabel := &BsnTlvMplsLabel{BsnTlv: parent} |
| 6874 | if decoder.Length() < 4 { |
| 6875 | return nil, fmt.Errorf("BsnTlvMplsLabel packet too short: %d < 4", decoder.Length()) |
| 6876 | } |
| 6877 | _bsntlvmplslabel.Value = uint32(decoder.ReadUint32()) |
| 6878 | return _bsntlvmplslabel, nil |
| 6879 | } |
| 6880 | |
| 6881 | func NewBsnTlvMplsLabel() *BsnTlvMplsLabel { |
| 6882 | obj := &BsnTlvMplsLabel{ |
| 6883 | BsnTlv: NewBsnTlv(61), |
| 6884 | } |
| 6885 | return obj |
| 6886 | } |
| 6887 | |
| 6888 | type BsnTlvMplsSequenced struct { |
| 6889 | *BsnTlv |
| 6890 | Value uint8 |
| 6891 | } |
| 6892 | |
| 6893 | type IBsnTlvMplsSequenced interface { |
| 6894 | IBsnTlv |
| 6895 | GetValue() uint8 |
| 6896 | } |
| 6897 | |
| 6898 | func (self *BsnTlvMplsSequenced) GetValue() uint8 { |
| 6899 | return self.Value |
| 6900 | } |
| 6901 | |
| 6902 | func (self *BsnTlvMplsSequenced) SetValue(v uint8) { |
| 6903 | self.Value = v |
| 6904 | } |
| 6905 | |
| 6906 | func (self *BsnTlvMplsSequenced) Serialize(encoder *goloxi.Encoder) error { |
| 6907 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6908 | return err |
| 6909 | } |
| 6910 | |
| 6911 | encoder.PutUint8(uint8(self.Value)) |
| 6912 | |
| 6913 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6914 | |
| 6915 | return nil |
| 6916 | } |
| 6917 | |
| 6918 | func DecodeBsnTlvMplsSequenced(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvMplsSequenced, error) { |
| 6919 | _bsntlvmplssequenced := &BsnTlvMplsSequenced{BsnTlv: parent} |
| 6920 | if decoder.Length() < 1 { |
| 6921 | return nil, fmt.Errorf("BsnTlvMplsSequenced packet too short: %d < 1", decoder.Length()) |
| 6922 | } |
| 6923 | _bsntlvmplssequenced.Value = uint8(decoder.ReadByte()) |
| 6924 | return _bsntlvmplssequenced, nil |
| 6925 | } |
| 6926 | |
| 6927 | func NewBsnTlvMplsSequenced() *BsnTlvMplsSequenced { |
| 6928 | obj := &BsnTlvMplsSequenced{ |
| 6929 | BsnTlv: NewBsnTlv(63), |
| 6930 | } |
| 6931 | return obj |
| 6932 | } |
| 6933 | |
| 6934 | type BsnTlvMulticastInterfaceId struct { |
| 6935 | *BsnTlv |
| 6936 | Value uint32 |
| 6937 | } |
| 6938 | |
| 6939 | type IBsnTlvMulticastInterfaceId interface { |
| 6940 | IBsnTlv |
| 6941 | GetValue() uint32 |
| 6942 | } |
| 6943 | |
| 6944 | func (self *BsnTlvMulticastInterfaceId) GetValue() uint32 { |
| 6945 | return self.Value |
| 6946 | } |
| 6947 | |
| 6948 | func (self *BsnTlvMulticastInterfaceId) SetValue(v uint32) { |
| 6949 | self.Value = v |
| 6950 | } |
| 6951 | |
| 6952 | func (self *BsnTlvMulticastInterfaceId) Serialize(encoder *goloxi.Encoder) error { |
| 6953 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 6954 | return err |
| 6955 | } |
| 6956 | |
| 6957 | encoder.PutUint32(uint32(self.Value)) |
| 6958 | |
| 6959 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 6960 | |
| 6961 | return nil |
| 6962 | } |
| 6963 | |
| 6964 | func DecodeBsnTlvMulticastInterfaceId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvMulticastInterfaceId, error) { |
| 6965 | _bsntlvmulticastinterfaceid := &BsnTlvMulticastInterfaceId{BsnTlv: parent} |
| 6966 | if decoder.Length() < 4 { |
| 6967 | return nil, fmt.Errorf("BsnTlvMulticastInterfaceId packet too short: %d < 4", decoder.Length()) |
| 6968 | } |
| 6969 | _bsntlvmulticastinterfaceid.Value = uint32(decoder.ReadUint32()) |
| 6970 | return _bsntlvmulticastinterfaceid, nil |
| 6971 | } |
| 6972 | |
| 6973 | func NewBsnTlvMulticastInterfaceId() *BsnTlvMulticastInterfaceId { |
| 6974 | obj := &BsnTlvMulticastInterfaceId{ |
| 6975 | BsnTlv: NewBsnTlv(95), |
| 6976 | } |
| 6977 | return obj |
| 6978 | } |
| 6979 | |
| 6980 | type BsnTlvMulticastPacket struct { |
| 6981 | *BsnTlv |
| 6982 | Value BsnMulticastPacket |
| 6983 | } |
| 6984 | |
| 6985 | type IBsnTlvMulticastPacket interface { |
| 6986 | IBsnTlv |
| 6987 | GetValue() BsnMulticastPacket |
| 6988 | } |
| 6989 | |
| 6990 | func (self *BsnTlvMulticastPacket) GetValue() BsnMulticastPacket { |
| 6991 | return self.Value |
| 6992 | } |
| 6993 | |
| 6994 | func (self *BsnTlvMulticastPacket) SetValue(v BsnMulticastPacket) { |
| 6995 | self.Value = v |
| 6996 | } |
| 6997 | |
| 6998 | func (self *BsnTlvMulticastPacket) Serialize(encoder *goloxi.Encoder) error { |
| 6999 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7000 | return err |
| 7001 | } |
| 7002 | |
| 7003 | encoder.PutUint16(uint16(self.Value)) |
| 7004 | |
| 7005 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7006 | |
| 7007 | return nil |
| 7008 | } |
| 7009 | |
| 7010 | func DecodeBsnTlvMulticastPacket(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvMulticastPacket, error) { |
| 7011 | _bsntlvmulticastpacket := &BsnTlvMulticastPacket{BsnTlv: parent} |
| 7012 | if decoder.Length() < 2 { |
| 7013 | return nil, fmt.Errorf("BsnTlvMulticastPacket packet too short: %d < 2", decoder.Length()) |
| 7014 | } |
| 7015 | _bsntlvmulticastpacket.Value = BsnMulticastPacket(decoder.ReadUint16()) |
| 7016 | return _bsntlvmulticastpacket, nil |
| 7017 | } |
| 7018 | |
| 7019 | func NewBsnTlvMulticastPacket() *BsnTlvMulticastPacket { |
| 7020 | obj := &BsnTlvMulticastPacket{ |
| 7021 | BsnTlv: NewBsnTlv(170), |
| 7022 | } |
| 7023 | return obj |
| 7024 | } |
| 7025 | |
| 7026 | type BsnTlvMultiplier struct { |
| 7027 | *BsnTlv |
| 7028 | Value uint32 |
| 7029 | } |
| 7030 | |
| 7031 | type IBsnTlvMultiplier interface { |
| 7032 | IBsnTlv |
| 7033 | GetValue() uint32 |
| 7034 | } |
| 7035 | |
| 7036 | func (self *BsnTlvMultiplier) GetValue() uint32 { |
| 7037 | return self.Value |
| 7038 | } |
| 7039 | |
| 7040 | func (self *BsnTlvMultiplier) SetValue(v uint32) { |
| 7041 | self.Value = v |
| 7042 | } |
| 7043 | |
| 7044 | func (self *BsnTlvMultiplier) Serialize(encoder *goloxi.Encoder) error { |
| 7045 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7046 | return err |
| 7047 | } |
| 7048 | |
| 7049 | encoder.PutUint32(uint32(self.Value)) |
| 7050 | |
| 7051 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7052 | |
| 7053 | return nil |
| 7054 | } |
| 7055 | |
| 7056 | func DecodeBsnTlvMultiplier(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvMultiplier, error) { |
| 7057 | _bsntlvmultiplier := &BsnTlvMultiplier{BsnTlv: parent} |
| 7058 | if decoder.Length() < 4 { |
| 7059 | return nil, fmt.Errorf("BsnTlvMultiplier packet too short: %d < 4", decoder.Length()) |
| 7060 | } |
| 7061 | _bsntlvmultiplier.Value = uint32(decoder.ReadUint32()) |
| 7062 | return _bsntlvmultiplier, nil |
| 7063 | } |
| 7064 | |
| 7065 | func NewBsnTlvMultiplier() *BsnTlvMultiplier { |
| 7066 | obj := &BsnTlvMultiplier{ |
| 7067 | BsnTlv: NewBsnTlv(174), |
| 7068 | } |
| 7069 | return obj |
| 7070 | } |
| 7071 | |
| 7072 | type BsnTlvName struct { |
| 7073 | *BsnTlv |
| 7074 | Value []byte |
| 7075 | } |
| 7076 | |
| 7077 | type IBsnTlvName interface { |
| 7078 | IBsnTlv |
| 7079 | GetValue() []byte |
| 7080 | } |
| 7081 | |
| 7082 | func (self *BsnTlvName) GetValue() []byte { |
| 7083 | return self.Value |
| 7084 | } |
| 7085 | |
| 7086 | func (self *BsnTlvName) SetValue(v []byte) { |
| 7087 | self.Value = v |
| 7088 | } |
| 7089 | |
| 7090 | func (self *BsnTlvName) Serialize(encoder *goloxi.Encoder) error { |
| 7091 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7092 | return err |
| 7093 | } |
| 7094 | |
| 7095 | encoder.Write(self.Value) |
| 7096 | |
| 7097 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7098 | |
| 7099 | return nil |
| 7100 | } |
| 7101 | |
| 7102 | func DecodeBsnTlvName(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvName, error) { |
| 7103 | _bsntlvname := &BsnTlvName{BsnTlv: parent} |
| 7104 | _bsntlvname.Value = decoder.Read(int(decoder.Length())) |
| 7105 | return _bsntlvname, nil |
| 7106 | } |
| 7107 | |
| 7108 | func NewBsnTlvName() *BsnTlvName { |
| 7109 | obj := &BsnTlvName{ |
| 7110 | BsnTlv: NewBsnTlv(52), |
| 7111 | } |
| 7112 | return obj |
| 7113 | } |
| 7114 | |
| 7115 | type BsnTlvNdpOffload struct { |
| 7116 | *BsnTlv |
| 7117 | } |
| 7118 | |
| 7119 | type IBsnTlvNdpOffload interface { |
| 7120 | IBsnTlv |
| 7121 | } |
| 7122 | |
| 7123 | func (self *BsnTlvNdpOffload) Serialize(encoder *goloxi.Encoder) error { |
| 7124 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7125 | return err |
| 7126 | } |
| 7127 | |
| 7128 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7129 | |
| 7130 | return nil |
| 7131 | } |
| 7132 | |
| 7133 | func DecodeBsnTlvNdpOffload(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvNdpOffload, error) { |
| 7134 | _bsntlvndpoffload := &BsnTlvNdpOffload{BsnTlv: parent} |
| 7135 | return _bsntlvndpoffload, nil |
| 7136 | } |
| 7137 | |
| 7138 | func NewBsnTlvNdpOffload() *BsnTlvNdpOffload { |
| 7139 | obj := &BsnTlvNdpOffload{ |
| 7140 | BsnTlv: NewBsnTlv(123), |
| 7141 | } |
| 7142 | return obj |
| 7143 | } |
| 7144 | |
| 7145 | type BsnTlvNdpStatic struct { |
| 7146 | *BsnTlv |
| 7147 | } |
| 7148 | |
| 7149 | type IBsnTlvNdpStatic interface { |
| 7150 | IBsnTlv |
| 7151 | } |
| 7152 | |
| 7153 | func (self *BsnTlvNdpStatic) Serialize(encoder *goloxi.Encoder) error { |
| 7154 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7155 | return err |
| 7156 | } |
| 7157 | |
| 7158 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7159 | |
| 7160 | return nil |
| 7161 | } |
| 7162 | |
| 7163 | func DecodeBsnTlvNdpStatic(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvNdpStatic, error) { |
| 7164 | _bsntlvndpstatic := &BsnTlvNdpStatic{BsnTlv: parent} |
| 7165 | return _bsntlvndpstatic, nil |
| 7166 | } |
| 7167 | |
| 7168 | func NewBsnTlvNdpStatic() *BsnTlvNdpStatic { |
| 7169 | obj := &BsnTlvNdpStatic{ |
| 7170 | BsnTlv: NewBsnTlv(124), |
| 7171 | } |
| 7172 | return obj |
| 7173 | } |
| 7174 | |
| 7175 | type BsnTlvNegate struct { |
| 7176 | *BsnTlv |
| 7177 | } |
| 7178 | |
| 7179 | type IBsnTlvNegate interface { |
| 7180 | IBsnTlv |
| 7181 | } |
| 7182 | |
| 7183 | func (self *BsnTlvNegate) Serialize(encoder *goloxi.Encoder) error { |
| 7184 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7185 | return err |
| 7186 | } |
| 7187 | |
| 7188 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7189 | |
| 7190 | return nil |
| 7191 | } |
| 7192 | |
| 7193 | func DecodeBsnTlvNegate(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvNegate, error) { |
| 7194 | _bsntlvnegate := &BsnTlvNegate{BsnTlv: parent} |
| 7195 | return _bsntlvnegate, nil |
| 7196 | } |
| 7197 | |
| 7198 | func NewBsnTlvNegate() *BsnTlvNegate { |
| 7199 | obj := &BsnTlvNegate{ |
| 7200 | BsnTlv: NewBsnTlv(83), |
| 7201 | } |
| 7202 | return obj |
| 7203 | } |
| 7204 | |
| 7205 | type BsnTlvNextHopIpv4 struct { |
| 7206 | *BsnTlv |
| 7207 | Value net.IP |
| 7208 | } |
| 7209 | |
| 7210 | type IBsnTlvNextHopIpv4 interface { |
| 7211 | IBsnTlv |
| 7212 | GetValue() net.IP |
| 7213 | } |
| 7214 | |
| 7215 | func (self *BsnTlvNextHopIpv4) GetValue() net.IP { |
| 7216 | return self.Value |
| 7217 | } |
| 7218 | |
| 7219 | func (self *BsnTlvNextHopIpv4) SetValue(v net.IP) { |
| 7220 | self.Value = v |
| 7221 | } |
| 7222 | |
| 7223 | func (self *BsnTlvNextHopIpv4) Serialize(encoder *goloxi.Encoder) error { |
| 7224 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7225 | return err |
| 7226 | } |
| 7227 | |
| 7228 | encoder.Write(self.Value.To4()) |
| 7229 | |
| 7230 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7231 | |
| 7232 | return nil |
| 7233 | } |
| 7234 | |
| 7235 | func DecodeBsnTlvNextHopIpv4(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvNextHopIpv4, error) { |
| 7236 | _bsntlvnexthopipv4 := &BsnTlvNextHopIpv4{BsnTlv: parent} |
| 7237 | if decoder.Length() < 4 { |
| 7238 | return nil, fmt.Errorf("BsnTlvNextHopIpv4 packet too short: %d < 4", decoder.Length()) |
| 7239 | } |
| 7240 | _bsntlvnexthopipv4.Value = net.IP(decoder.Read(4)) |
| 7241 | return _bsntlvnexthopipv4, nil |
| 7242 | } |
| 7243 | |
| 7244 | func NewBsnTlvNextHopIpv4() *BsnTlvNextHopIpv4 { |
| 7245 | obj := &BsnTlvNextHopIpv4{ |
| 7246 | BsnTlv: NewBsnTlv(115), |
| 7247 | } |
| 7248 | return obj |
| 7249 | } |
| 7250 | |
| 7251 | type BsnTlvNextHopMac struct { |
| 7252 | *BsnTlv |
| 7253 | Value net.HardwareAddr |
| 7254 | } |
| 7255 | |
| 7256 | type IBsnTlvNextHopMac interface { |
| 7257 | IBsnTlv |
| 7258 | GetValue() net.HardwareAddr |
| 7259 | } |
| 7260 | |
| 7261 | func (self *BsnTlvNextHopMac) GetValue() net.HardwareAddr { |
| 7262 | return self.Value |
| 7263 | } |
| 7264 | |
| 7265 | func (self *BsnTlvNextHopMac) SetValue(v net.HardwareAddr) { |
| 7266 | self.Value = v |
| 7267 | } |
| 7268 | |
| 7269 | func (self *BsnTlvNextHopMac) Serialize(encoder *goloxi.Encoder) error { |
| 7270 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7271 | return err |
| 7272 | } |
| 7273 | |
| 7274 | encoder.Write(self.Value) |
| 7275 | |
| 7276 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7277 | |
| 7278 | return nil |
| 7279 | } |
| 7280 | |
| 7281 | func DecodeBsnTlvNextHopMac(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvNextHopMac, error) { |
| 7282 | _bsntlvnexthopmac := &BsnTlvNextHopMac{BsnTlv: parent} |
| 7283 | if decoder.Length() < 6 { |
| 7284 | return nil, fmt.Errorf("BsnTlvNextHopMac packet too short: %d < 6", decoder.Length()) |
| 7285 | } |
| 7286 | _bsntlvnexthopmac.Value = net.HardwareAddr(decoder.Read(6)) |
| 7287 | return _bsntlvnexthopmac, nil |
| 7288 | } |
| 7289 | |
| 7290 | func NewBsnTlvNextHopMac() *BsnTlvNextHopMac { |
| 7291 | obj := &BsnTlvNextHopMac{ |
| 7292 | BsnTlv: NewBsnTlv(114), |
| 7293 | } |
| 7294 | return obj |
| 7295 | } |
| 7296 | |
| 7297 | type BsnTlvNexthopTypeVxlan struct { |
| 7298 | *BsnTlv |
| 7299 | } |
| 7300 | |
| 7301 | type IBsnTlvNexthopTypeVxlan interface { |
| 7302 | IBsnTlv |
| 7303 | } |
| 7304 | |
| 7305 | func (self *BsnTlvNexthopTypeVxlan) Serialize(encoder *goloxi.Encoder) error { |
| 7306 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7307 | return err |
| 7308 | } |
| 7309 | |
| 7310 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7311 | |
| 7312 | return nil |
| 7313 | } |
| 7314 | |
| 7315 | func DecodeBsnTlvNexthopTypeVxlan(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvNexthopTypeVxlan, error) { |
| 7316 | _bsntlvnexthoptypevxlan := &BsnTlvNexthopTypeVxlan{BsnTlv: parent} |
| 7317 | return _bsntlvnexthoptypevxlan, nil |
| 7318 | } |
| 7319 | |
| 7320 | func NewBsnTlvNexthopTypeVxlan() *BsnTlvNexthopTypeVxlan { |
| 7321 | obj := &BsnTlvNexthopTypeVxlan{ |
| 7322 | BsnTlv: NewBsnTlv(94), |
| 7323 | } |
| 7324 | return obj |
| 7325 | } |
| 7326 | |
| 7327 | type BsnTlvNoArpResponse struct { |
| 7328 | *BsnTlv |
| 7329 | } |
| 7330 | |
| 7331 | type IBsnTlvNoArpResponse interface { |
| 7332 | IBsnTlv |
| 7333 | } |
| 7334 | |
| 7335 | func (self *BsnTlvNoArpResponse) Serialize(encoder *goloxi.Encoder) error { |
| 7336 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7337 | return err |
| 7338 | } |
| 7339 | |
| 7340 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7341 | |
| 7342 | return nil |
| 7343 | } |
| 7344 | |
| 7345 | func DecodeBsnTlvNoArpResponse(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvNoArpResponse, error) { |
| 7346 | _bsntlvnoarpresponse := &BsnTlvNoArpResponse{BsnTlv: parent} |
| 7347 | return _bsntlvnoarpresponse, nil |
| 7348 | } |
| 7349 | |
| 7350 | func NewBsnTlvNoArpResponse() *BsnTlvNoArpResponse { |
| 7351 | obj := &BsnTlvNoArpResponse{ |
| 7352 | BsnTlv: NewBsnTlv(147), |
| 7353 | } |
| 7354 | return obj |
| 7355 | } |
| 7356 | |
| 7357 | type BsnTlvNoNsResponse struct { |
| 7358 | *BsnTlv |
| 7359 | } |
| 7360 | |
| 7361 | type IBsnTlvNoNsResponse interface { |
| 7362 | IBsnTlv |
| 7363 | } |
| 7364 | |
| 7365 | func (self *BsnTlvNoNsResponse) Serialize(encoder *goloxi.Encoder) error { |
| 7366 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7367 | return err |
| 7368 | } |
| 7369 | |
| 7370 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7371 | |
| 7372 | return nil |
| 7373 | } |
| 7374 | |
| 7375 | func DecodeBsnTlvNoNsResponse(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvNoNsResponse, error) { |
| 7376 | _bsntlvnonsresponse := &BsnTlvNoNsResponse{BsnTlv: parent} |
| 7377 | return _bsntlvnonsresponse, nil |
| 7378 | } |
| 7379 | |
| 7380 | func NewBsnTlvNoNsResponse() *BsnTlvNoNsResponse { |
| 7381 | obj := &BsnTlvNoNsResponse{ |
| 7382 | BsnTlv: NewBsnTlv(148), |
| 7383 | } |
| 7384 | return obj |
| 7385 | } |
| 7386 | |
| 7387 | type BsnTlvOffset struct { |
| 7388 | *BsnTlv |
| 7389 | Value uint16 |
| 7390 | } |
| 7391 | |
| 7392 | type IBsnTlvOffset interface { |
| 7393 | IBsnTlv |
| 7394 | GetValue() uint16 |
| 7395 | } |
| 7396 | |
| 7397 | func (self *BsnTlvOffset) GetValue() uint16 { |
| 7398 | return self.Value |
| 7399 | } |
| 7400 | |
| 7401 | func (self *BsnTlvOffset) SetValue(v uint16) { |
| 7402 | self.Value = v |
| 7403 | } |
| 7404 | |
| 7405 | func (self *BsnTlvOffset) Serialize(encoder *goloxi.Encoder) error { |
| 7406 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7407 | return err |
| 7408 | } |
| 7409 | |
| 7410 | encoder.PutUint16(uint16(self.Value)) |
| 7411 | |
| 7412 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7413 | |
| 7414 | return nil |
| 7415 | } |
| 7416 | |
| 7417 | func DecodeBsnTlvOffset(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvOffset, error) { |
| 7418 | _bsntlvoffset := &BsnTlvOffset{BsnTlv: parent} |
| 7419 | if decoder.Length() < 2 { |
| 7420 | return nil, fmt.Errorf("BsnTlvOffset packet too short: %d < 2", decoder.Length()) |
| 7421 | } |
| 7422 | _bsntlvoffset.Value = uint16(decoder.ReadUint16()) |
| 7423 | return _bsntlvoffset, nil |
| 7424 | } |
| 7425 | |
| 7426 | func NewBsnTlvOffset() *BsnTlvOffset { |
| 7427 | obj := &BsnTlvOffset{ |
| 7428 | BsnTlv: NewBsnTlv(82), |
| 7429 | } |
| 7430 | return obj |
| 7431 | } |
| 7432 | |
| 7433 | type BsnTlvOpticsAlwaysEnabled struct { |
| 7434 | *BsnTlv |
| 7435 | } |
| 7436 | |
| 7437 | type IBsnTlvOpticsAlwaysEnabled interface { |
| 7438 | IBsnTlv |
| 7439 | } |
| 7440 | |
| 7441 | func (self *BsnTlvOpticsAlwaysEnabled) Serialize(encoder *goloxi.Encoder) error { |
| 7442 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7443 | return err |
| 7444 | } |
| 7445 | |
| 7446 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7447 | |
| 7448 | return nil |
| 7449 | } |
| 7450 | |
| 7451 | func DecodeBsnTlvOpticsAlwaysEnabled(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvOpticsAlwaysEnabled, error) { |
| 7452 | _bsntlvopticsalwaysenabled := &BsnTlvOpticsAlwaysEnabled{BsnTlv: parent} |
| 7453 | return _bsntlvopticsalwaysenabled, nil |
| 7454 | } |
| 7455 | |
| 7456 | func NewBsnTlvOpticsAlwaysEnabled() *BsnTlvOpticsAlwaysEnabled { |
| 7457 | obj := &BsnTlvOpticsAlwaysEnabled{ |
| 7458 | BsnTlv: NewBsnTlv(150), |
| 7459 | } |
| 7460 | return obj |
| 7461 | } |
| 7462 | |
| 7463 | type BsnTlvOuterSrcMac struct { |
| 7464 | *BsnTlv |
| 7465 | Value net.HardwareAddr |
| 7466 | } |
| 7467 | |
| 7468 | type IBsnTlvOuterSrcMac interface { |
| 7469 | IBsnTlv |
| 7470 | GetValue() net.HardwareAddr |
| 7471 | } |
| 7472 | |
| 7473 | func (self *BsnTlvOuterSrcMac) GetValue() net.HardwareAddr { |
| 7474 | return self.Value |
| 7475 | } |
| 7476 | |
| 7477 | func (self *BsnTlvOuterSrcMac) SetValue(v net.HardwareAddr) { |
| 7478 | self.Value = v |
| 7479 | } |
| 7480 | |
| 7481 | func (self *BsnTlvOuterSrcMac) Serialize(encoder *goloxi.Encoder) error { |
| 7482 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7483 | return err |
| 7484 | } |
| 7485 | |
| 7486 | encoder.Write(self.Value) |
| 7487 | |
| 7488 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7489 | |
| 7490 | return nil |
| 7491 | } |
| 7492 | |
| 7493 | func DecodeBsnTlvOuterSrcMac(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvOuterSrcMac, error) { |
| 7494 | _bsntlvoutersrcmac := &BsnTlvOuterSrcMac{BsnTlv: parent} |
| 7495 | if decoder.Length() < 6 { |
| 7496 | return nil, fmt.Errorf("BsnTlvOuterSrcMac packet too short: %d < 6", decoder.Length()) |
| 7497 | } |
| 7498 | _bsntlvoutersrcmac.Value = net.HardwareAddr(decoder.Read(6)) |
| 7499 | return _bsntlvoutersrcmac, nil |
| 7500 | } |
| 7501 | |
| 7502 | func NewBsnTlvOuterSrcMac() *BsnTlvOuterSrcMac { |
| 7503 | obj := &BsnTlvOuterSrcMac{ |
| 7504 | BsnTlv: NewBsnTlv(157), |
| 7505 | } |
| 7506 | return obj |
| 7507 | } |
| 7508 | |
| 7509 | type BsnTlvParentPort struct { |
| 7510 | *BsnTlv |
| 7511 | Value Port |
| 7512 | } |
| 7513 | |
| 7514 | type IBsnTlvParentPort interface { |
| 7515 | IBsnTlv |
| 7516 | GetValue() Port |
| 7517 | } |
| 7518 | |
| 7519 | func (self *BsnTlvParentPort) GetValue() Port { |
| 7520 | return self.Value |
| 7521 | } |
| 7522 | |
| 7523 | func (self *BsnTlvParentPort) SetValue(v Port) { |
| 7524 | self.Value = v |
| 7525 | } |
| 7526 | |
| 7527 | func (self *BsnTlvParentPort) Serialize(encoder *goloxi.Encoder) error { |
| 7528 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7529 | return err |
| 7530 | } |
| 7531 | |
| 7532 | self.Value.Serialize(encoder) |
| 7533 | |
| 7534 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7535 | |
| 7536 | return nil |
| 7537 | } |
| 7538 | |
| 7539 | func DecodeBsnTlvParentPort(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvParentPort, error) { |
| 7540 | _bsntlvparentport := &BsnTlvParentPort{BsnTlv: parent} |
| 7541 | if decoder.Length() < 4 { |
| 7542 | return nil, fmt.Errorf("BsnTlvParentPort packet too short: %d < 4", decoder.Length()) |
| 7543 | } |
| 7544 | _bsntlvparentport.Value.Decode(decoder) |
| 7545 | return _bsntlvparentport, nil |
| 7546 | } |
| 7547 | |
| 7548 | func NewBsnTlvParentPort() *BsnTlvParentPort { |
| 7549 | obj := &BsnTlvParentPort{ |
| 7550 | BsnTlv: NewBsnTlv(109), |
| 7551 | } |
| 7552 | return obj |
| 7553 | } |
| 7554 | |
| 7555 | type BsnTlvPartnerKey struct { |
| 7556 | *BsnTlv |
| 7557 | Value uint16 |
| 7558 | } |
| 7559 | |
| 7560 | type IBsnTlvPartnerKey interface { |
| 7561 | IBsnTlv |
| 7562 | GetValue() uint16 |
| 7563 | } |
| 7564 | |
| 7565 | func (self *BsnTlvPartnerKey) GetValue() uint16 { |
| 7566 | return self.Value |
| 7567 | } |
| 7568 | |
| 7569 | func (self *BsnTlvPartnerKey) SetValue(v uint16) { |
| 7570 | self.Value = v |
| 7571 | } |
| 7572 | |
| 7573 | func (self *BsnTlvPartnerKey) Serialize(encoder *goloxi.Encoder) error { |
| 7574 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7575 | return err |
| 7576 | } |
| 7577 | |
| 7578 | encoder.PutUint16(uint16(self.Value)) |
| 7579 | |
| 7580 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7581 | |
| 7582 | return nil |
| 7583 | } |
| 7584 | |
| 7585 | func DecodeBsnTlvPartnerKey(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPartnerKey, error) { |
| 7586 | _bsntlvpartnerkey := &BsnTlvPartnerKey{BsnTlv: parent} |
| 7587 | if decoder.Length() < 2 { |
| 7588 | return nil, fmt.Errorf("BsnTlvPartnerKey packet too short: %d < 2", decoder.Length()) |
| 7589 | } |
| 7590 | _bsntlvpartnerkey.Value = uint16(decoder.ReadUint16()) |
| 7591 | return _bsntlvpartnerkey, nil |
| 7592 | } |
| 7593 | |
| 7594 | func NewBsnTlvPartnerKey() *BsnTlvPartnerKey { |
| 7595 | obj := &BsnTlvPartnerKey{ |
| 7596 | BsnTlv: NewBsnTlv(51), |
| 7597 | } |
| 7598 | return obj |
| 7599 | } |
| 7600 | |
| 7601 | type BsnTlvPartnerPortNum struct { |
| 7602 | *BsnTlv |
| 7603 | Value uint16 |
| 7604 | } |
| 7605 | |
| 7606 | type IBsnTlvPartnerPortNum interface { |
| 7607 | IBsnTlv |
| 7608 | GetValue() uint16 |
| 7609 | } |
| 7610 | |
| 7611 | func (self *BsnTlvPartnerPortNum) GetValue() uint16 { |
| 7612 | return self.Value |
| 7613 | } |
| 7614 | |
| 7615 | func (self *BsnTlvPartnerPortNum) SetValue(v uint16) { |
| 7616 | self.Value = v |
| 7617 | } |
| 7618 | |
| 7619 | func (self *BsnTlvPartnerPortNum) Serialize(encoder *goloxi.Encoder) error { |
| 7620 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7621 | return err |
| 7622 | } |
| 7623 | |
| 7624 | encoder.PutUint16(uint16(self.Value)) |
| 7625 | |
| 7626 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7627 | |
| 7628 | return nil |
| 7629 | } |
| 7630 | |
| 7631 | func DecodeBsnTlvPartnerPortNum(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPartnerPortNum, error) { |
| 7632 | _bsntlvpartnerportnum := &BsnTlvPartnerPortNum{BsnTlv: parent} |
| 7633 | if decoder.Length() < 2 { |
| 7634 | return nil, fmt.Errorf("BsnTlvPartnerPortNum packet too short: %d < 2", decoder.Length()) |
| 7635 | } |
| 7636 | _bsntlvpartnerportnum.Value = uint16(decoder.ReadUint16()) |
| 7637 | return _bsntlvpartnerportnum, nil |
| 7638 | } |
| 7639 | |
| 7640 | func NewBsnTlvPartnerPortNum() *BsnTlvPartnerPortNum { |
| 7641 | obj := &BsnTlvPartnerPortNum{ |
| 7642 | BsnTlv: NewBsnTlv(50), |
| 7643 | } |
| 7644 | return obj |
| 7645 | } |
| 7646 | |
| 7647 | type BsnTlvPartnerPortPriority struct { |
| 7648 | *BsnTlv |
| 7649 | Value uint16 |
| 7650 | } |
| 7651 | |
| 7652 | type IBsnTlvPartnerPortPriority interface { |
| 7653 | IBsnTlv |
| 7654 | GetValue() uint16 |
| 7655 | } |
| 7656 | |
| 7657 | func (self *BsnTlvPartnerPortPriority) GetValue() uint16 { |
| 7658 | return self.Value |
| 7659 | } |
| 7660 | |
| 7661 | func (self *BsnTlvPartnerPortPriority) SetValue(v uint16) { |
| 7662 | self.Value = v |
| 7663 | } |
| 7664 | |
| 7665 | func (self *BsnTlvPartnerPortPriority) Serialize(encoder *goloxi.Encoder) error { |
| 7666 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7667 | return err |
| 7668 | } |
| 7669 | |
| 7670 | encoder.PutUint16(uint16(self.Value)) |
| 7671 | |
| 7672 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7673 | |
| 7674 | return nil |
| 7675 | } |
| 7676 | |
| 7677 | func DecodeBsnTlvPartnerPortPriority(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPartnerPortPriority, error) { |
| 7678 | _bsntlvpartnerportpriority := &BsnTlvPartnerPortPriority{BsnTlv: parent} |
| 7679 | if decoder.Length() < 2 { |
| 7680 | return nil, fmt.Errorf("BsnTlvPartnerPortPriority packet too short: %d < 2", decoder.Length()) |
| 7681 | } |
| 7682 | _bsntlvpartnerportpriority.Value = uint16(decoder.ReadUint16()) |
| 7683 | return _bsntlvpartnerportpriority, nil |
| 7684 | } |
| 7685 | |
| 7686 | func NewBsnTlvPartnerPortPriority() *BsnTlvPartnerPortPriority { |
| 7687 | obj := &BsnTlvPartnerPortPriority{ |
| 7688 | BsnTlv: NewBsnTlv(49), |
| 7689 | } |
| 7690 | return obj |
| 7691 | } |
| 7692 | |
| 7693 | type BsnTlvPartnerState struct { |
| 7694 | *BsnTlv |
| 7695 | Value BsnLacpState |
| 7696 | } |
| 7697 | |
| 7698 | type IBsnTlvPartnerState interface { |
| 7699 | IBsnTlv |
| 7700 | GetValue() BsnLacpState |
| 7701 | } |
| 7702 | |
| 7703 | func (self *BsnTlvPartnerState) GetValue() BsnLacpState { |
| 7704 | return self.Value |
| 7705 | } |
| 7706 | |
| 7707 | func (self *BsnTlvPartnerState) SetValue(v BsnLacpState) { |
| 7708 | self.Value = v |
| 7709 | } |
| 7710 | |
| 7711 | func (self *BsnTlvPartnerState) Serialize(encoder *goloxi.Encoder) error { |
| 7712 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7713 | return err |
| 7714 | } |
| 7715 | |
| 7716 | encoder.PutUint8(uint8(self.Value)) |
| 7717 | |
| 7718 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7719 | |
| 7720 | return nil |
| 7721 | } |
| 7722 | |
| 7723 | func DecodeBsnTlvPartnerState(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPartnerState, error) { |
| 7724 | _bsntlvpartnerstate := &BsnTlvPartnerState{BsnTlv: parent} |
| 7725 | if decoder.Length() < 1 { |
| 7726 | return nil, fmt.Errorf("BsnTlvPartnerState packet too short: %d < 1", decoder.Length()) |
| 7727 | } |
| 7728 | _bsntlvpartnerstate.Value = BsnLacpState(decoder.ReadByte()) |
| 7729 | return _bsntlvpartnerstate, nil |
| 7730 | } |
| 7731 | |
| 7732 | func NewBsnTlvPartnerState() *BsnTlvPartnerState { |
| 7733 | obj := &BsnTlvPartnerState{ |
| 7734 | BsnTlv: NewBsnTlv(54), |
| 7735 | } |
| 7736 | return obj |
| 7737 | } |
| 7738 | |
| 7739 | type BsnTlvPartnerSystemMac struct { |
| 7740 | *BsnTlv |
| 7741 | Value net.HardwareAddr |
| 7742 | } |
| 7743 | |
| 7744 | type IBsnTlvPartnerSystemMac interface { |
| 7745 | IBsnTlv |
| 7746 | GetValue() net.HardwareAddr |
| 7747 | } |
| 7748 | |
| 7749 | func (self *BsnTlvPartnerSystemMac) GetValue() net.HardwareAddr { |
| 7750 | return self.Value |
| 7751 | } |
| 7752 | |
| 7753 | func (self *BsnTlvPartnerSystemMac) SetValue(v net.HardwareAddr) { |
| 7754 | self.Value = v |
| 7755 | } |
| 7756 | |
| 7757 | func (self *BsnTlvPartnerSystemMac) Serialize(encoder *goloxi.Encoder) error { |
| 7758 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7759 | return err |
| 7760 | } |
| 7761 | |
| 7762 | encoder.Write(self.Value) |
| 7763 | |
| 7764 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7765 | |
| 7766 | return nil |
| 7767 | } |
| 7768 | |
| 7769 | func DecodeBsnTlvPartnerSystemMac(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPartnerSystemMac, error) { |
| 7770 | _bsntlvpartnersystemmac := &BsnTlvPartnerSystemMac{BsnTlv: parent} |
| 7771 | if decoder.Length() < 6 { |
| 7772 | return nil, fmt.Errorf("BsnTlvPartnerSystemMac packet too short: %d < 6", decoder.Length()) |
| 7773 | } |
| 7774 | _bsntlvpartnersystemmac.Value = net.HardwareAddr(decoder.Read(6)) |
| 7775 | return _bsntlvpartnersystemmac, nil |
| 7776 | } |
| 7777 | |
| 7778 | func NewBsnTlvPartnerSystemMac() *BsnTlvPartnerSystemMac { |
| 7779 | obj := &BsnTlvPartnerSystemMac{ |
| 7780 | BsnTlv: NewBsnTlv(48), |
| 7781 | } |
| 7782 | return obj |
| 7783 | } |
| 7784 | |
| 7785 | type BsnTlvPartnerSystemPriority struct { |
| 7786 | *BsnTlv |
| 7787 | Value uint16 |
| 7788 | } |
| 7789 | |
| 7790 | type IBsnTlvPartnerSystemPriority interface { |
| 7791 | IBsnTlv |
| 7792 | GetValue() uint16 |
| 7793 | } |
| 7794 | |
| 7795 | func (self *BsnTlvPartnerSystemPriority) GetValue() uint16 { |
| 7796 | return self.Value |
| 7797 | } |
| 7798 | |
| 7799 | func (self *BsnTlvPartnerSystemPriority) SetValue(v uint16) { |
| 7800 | self.Value = v |
| 7801 | } |
| 7802 | |
| 7803 | func (self *BsnTlvPartnerSystemPriority) Serialize(encoder *goloxi.Encoder) error { |
| 7804 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7805 | return err |
| 7806 | } |
| 7807 | |
| 7808 | encoder.PutUint16(uint16(self.Value)) |
| 7809 | |
| 7810 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7811 | |
| 7812 | return nil |
| 7813 | } |
| 7814 | |
| 7815 | func DecodeBsnTlvPartnerSystemPriority(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPartnerSystemPriority, error) { |
| 7816 | _bsntlvpartnersystempriority := &BsnTlvPartnerSystemPriority{BsnTlv: parent} |
| 7817 | if decoder.Length() < 2 { |
| 7818 | return nil, fmt.Errorf("BsnTlvPartnerSystemPriority packet too short: %d < 2", decoder.Length()) |
| 7819 | } |
| 7820 | _bsntlvpartnersystempriority.Value = uint16(decoder.ReadUint16()) |
| 7821 | return _bsntlvpartnersystempriority, nil |
| 7822 | } |
| 7823 | |
| 7824 | func NewBsnTlvPartnerSystemPriority() *BsnTlvPartnerSystemPriority { |
| 7825 | obj := &BsnTlvPartnerSystemPriority{ |
| 7826 | BsnTlv: NewBsnTlv(47), |
| 7827 | } |
| 7828 | return obj |
| 7829 | } |
| 7830 | |
| 7831 | type BsnTlvPassive struct { |
| 7832 | *BsnTlv |
| 7833 | } |
| 7834 | |
| 7835 | type IBsnTlvPassive interface { |
| 7836 | IBsnTlv |
| 7837 | } |
| 7838 | |
| 7839 | func (self *BsnTlvPassive) Serialize(encoder *goloxi.Encoder) error { |
| 7840 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7841 | return err |
| 7842 | } |
| 7843 | |
| 7844 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7845 | |
| 7846 | return nil |
| 7847 | } |
| 7848 | |
| 7849 | func DecodeBsnTlvPassive(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPassive, error) { |
| 7850 | _bsntlvpassive := &BsnTlvPassive{BsnTlv: parent} |
| 7851 | return _bsntlvpassive, nil |
| 7852 | } |
| 7853 | |
| 7854 | func NewBsnTlvPassive() *BsnTlvPassive { |
| 7855 | obj := &BsnTlvPassive{ |
| 7856 | BsnTlv: NewBsnTlv(172), |
| 7857 | } |
| 7858 | return obj |
| 7859 | } |
| 7860 | |
| 7861 | type BsnTlvPduaRxInstance struct { |
| 7862 | *BsnTlv |
| 7863 | Value []byte |
| 7864 | } |
| 7865 | |
| 7866 | type IBsnTlvPduaRxInstance interface { |
| 7867 | IBsnTlv |
| 7868 | GetValue() []byte |
| 7869 | } |
| 7870 | |
| 7871 | func (self *BsnTlvPduaRxInstance) GetValue() []byte { |
| 7872 | return self.Value |
| 7873 | } |
| 7874 | |
| 7875 | func (self *BsnTlvPduaRxInstance) SetValue(v []byte) { |
| 7876 | self.Value = v |
| 7877 | } |
| 7878 | |
| 7879 | func (self *BsnTlvPduaRxInstance) Serialize(encoder *goloxi.Encoder) error { |
| 7880 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7881 | return err |
| 7882 | } |
| 7883 | |
| 7884 | encoder.Write(self.Value) |
| 7885 | |
| 7886 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7887 | |
| 7888 | return nil |
| 7889 | } |
| 7890 | |
| 7891 | func DecodeBsnTlvPduaRxInstance(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPduaRxInstance, error) { |
| 7892 | _bsntlvpduarxinstance := &BsnTlvPduaRxInstance{BsnTlv: parent} |
| 7893 | _bsntlvpduarxinstance.Value = decoder.Read(int(decoder.Length())) |
| 7894 | return _bsntlvpduarxinstance, nil |
| 7895 | } |
| 7896 | |
| 7897 | func NewBsnTlvPduaRxInstance() *BsnTlvPduaRxInstance { |
| 7898 | obj := &BsnTlvPduaRxInstance{ |
| 7899 | BsnTlv: NewBsnTlv(159), |
| 7900 | } |
| 7901 | return obj |
| 7902 | } |
| 7903 | |
| 7904 | type BsnTlvPimDr struct { |
| 7905 | *BsnTlv |
| 7906 | } |
| 7907 | |
| 7908 | type IBsnTlvPimDr interface { |
| 7909 | IBsnTlv |
| 7910 | } |
| 7911 | |
| 7912 | func (self *BsnTlvPimDr) Serialize(encoder *goloxi.Encoder) error { |
| 7913 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7914 | return err |
| 7915 | } |
| 7916 | |
| 7917 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7918 | |
| 7919 | return nil |
| 7920 | } |
| 7921 | |
| 7922 | func DecodeBsnTlvPimDr(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPimDr, error) { |
| 7923 | _bsntlvpimdr := &BsnTlvPimDr{BsnTlv: parent} |
| 7924 | return _bsntlvpimdr, nil |
| 7925 | } |
| 7926 | |
| 7927 | func NewBsnTlvPimDr() *BsnTlvPimDr { |
| 7928 | obj := &BsnTlvPimDr{ |
| 7929 | BsnTlv: NewBsnTlv(171), |
| 7930 | } |
| 7931 | return obj |
| 7932 | } |
| 7933 | |
| 7934 | type BsnTlvPimHelloFlood struct { |
| 7935 | *BsnTlv |
| 7936 | } |
| 7937 | |
| 7938 | type IBsnTlvPimHelloFlood interface { |
| 7939 | IBsnTlv |
| 7940 | } |
| 7941 | |
| 7942 | func (self *BsnTlvPimHelloFlood) Serialize(encoder *goloxi.Encoder) error { |
| 7943 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7944 | return err |
| 7945 | } |
| 7946 | |
| 7947 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7948 | |
| 7949 | return nil |
| 7950 | } |
| 7951 | |
| 7952 | func DecodeBsnTlvPimHelloFlood(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPimHelloFlood, error) { |
| 7953 | _bsntlvpimhelloflood := &BsnTlvPimHelloFlood{BsnTlv: parent} |
| 7954 | return _bsntlvpimhelloflood, nil |
| 7955 | } |
| 7956 | |
| 7957 | func NewBsnTlvPimHelloFlood() *BsnTlvPimHelloFlood { |
| 7958 | obj := &BsnTlvPimHelloFlood{ |
| 7959 | BsnTlv: NewBsnTlv(181), |
| 7960 | } |
| 7961 | return obj |
| 7962 | } |
| 7963 | |
| 7964 | type BsnTlvPort struct { |
| 7965 | *BsnTlv |
| 7966 | Value Port |
| 7967 | } |
| 7968 | |
| 7969 | type IBsnTlvPort interface { |
| 7970 | IBsnTlv |
| 7971 | GetValue() Port |
| 7972 | } |
| 7973 | |
| 7974 | func (self *BsnTlvPort) GetValue() Port { |
| 7975 | return self.Value |
| 7976 | } |
| 7977 | |
| 7978 | func (self *BsnTlvPort) SetValue(v Port) { |
| 7979 | self.Value = v |
| 7980 | } |
| 7981 | |
| 7982 | func (self *BsnTlvPort) Serialize(encoder *goloxi.Encoder) error { |
| 7983 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 7984 | return err |
| 7985 | } |
| 7986 | |
| 7987 | self.Value.Serialize(encoder) |
| 7988 | |
| 7989 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 7990 | |
| 7991 | return nil |
| 7992 | } |
| 7993 | |
| 7994 | func DecodeBsnTlvPort(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPort, error) { |
| 7995 | _bsntlvport := &BsnTlvPort{BsnTlv: parent} |
| 7996 | if decoder.Length() < 4 { |
| 7997 | return nil, fmt.Errorf("BsnTlvPort packet too short: %d < 4", decoder.Length()) |
| 7998 | } |
| 7999 | _bsntlvport.Value.Decode(decoder) |
| 8000 | return _bsntlvport, nil |
| 8001 | } |
| 8002 | |
| 8003 | func NewBsnTlvPort() *BsnTlvPort { |
| 8004 | obj := &BsnTlvPort{ |
| 8005 | BsnTlv: NewBsnTlv(0), |
| 8006 | } |
| 8007 | return obj |
| 8008 | } |
| 8009 | |
| 8010 | type BsnTlvPortMode struct { |
| 8011 | *BsnTlv |
| 8012 | Value BsnPortMode |
| 8013 | } |
| 8014 | |
| 8015 | type IBsnTlvPortMode interface { |
| 8016 | IBsnTlv |
| 8017 | GetValue() BsnPortMode |
| 8018 | } |
| 8019 | |
| 8020 | func (self *BsnTlvPortMode) GetValue() BsnPortMode { |
| 8021 | return self.Value |
| 8022 | } |
| 8023 | |
| 8024 | func (self *BsnTlvPortMode) SetValue(v BsnPortMode) { |
| 8025 | self.Value = v |
| 8026 | } |
| 8027 | |
| 8028 | func (self *BsnTlvPortMode) Serialize(encoder *goloxi.Encoder) error { |
| 8029 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8030 | return err |
| 8031 | } |
| 8032 | |
| 8033 | encoder.PutUint16(uint16(self.Value)) |
| 8034 | |
| 8035 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8036 | |
| 8037 | return nil |
| 8038 | } |
| 8039 | |
| 8040 | func DecodeBsnTlvPortMode(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPortMode, error) { |
| 8041 | _bsntlvportmode := &BsnTlvPortMode{BsnTlv: parent} |
| 8042 | if decoder.Length() < 2 { |
| 8043 | return nil, fmt.Errorf("BsnTlvPortMode packet too short: %d < 2", decoder.Length()) |
| 8044 | } |
| 8045 | _bsntlvportmode.Value = BsnPortMode(decoder.ReadUint16()) |
| 8046 | return _bsntlvportmode, nil |
| 8047 | } |
| 8048 | |
| 8049 | func NewBsnTlvPortMode() *BsnTlvPortMode { |
| 8050 | obj := &BsnTlvPortMode{ |
| 8051 | BsnTlv: NewBsnTlv(179), |
| 8052 | } |
| 8053 | return obj |
| 8054 | } |
| 8055 | |
| 8056 | type BsnTlvPortSpeedGbps struct { |
| 8057 | *BsnTlv |
| 8058 | Value uint32 |
| 8059 | } |
| 8060 | |
| 8061 | type IBsnTlvPortSpeedGbps interface { |
| 8062 | IBsnTlv |
| 8063 | GetValue() uint32 |
| 8064 | } |
| 8065 | |
| 8066 | func (self *BsnTlvPortSpeedGbps) GetValue() uint32 { |
| 8067 | return self.Value |
| 8068 | } |
| 8069 | |
| 8070 | func (self *BsnTlvPortSpeedGbps) SetValue(v uint32) { |
| 8071 | self.Value = v |
| 8072 | } |
| 8073 | |
| 8074 | func (self *BsnTlvPortSpeedGbps) Serialize(encoder *goloxi.Encoder) error { |
| 8075 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8076 | return err |
| 8077 | } |
| 8078 | |
| 8079 | encoder.PutUint32(uint32(self.Value)) |
| 8080 | |
| 8081 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8082 | |
| 8083 | return nil |
| 8084 | } |
| 8085 | |
| 8086 | func DecodeBsnTlvPortSpeedGbps(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPortSpeedGbps, error) { |
| 8087 | _bsntlvportspeedgbps := &BsnTlvPortSpeedGbps{BsnTlv: parent} |
| 8088 | if decoder.Length() < 4 { |
| 8089 | return nil, fmt.Errorf("BsnTlvPortSpeedGbps packet too short: %d < 4", decoder.Length()) |
| 8090 | } |
| 8091 | _bsntlvportspeedgbps.Value = uint32(decoder.ReadUint32()) |
| 8092 | return _bsntlvportspeedgbps, nil |
| 8093 | } |
| 8094 | |
| 8095 | func NewBsnTlvPortSpeedGbps() *BsnTlvPortSpeedGbps { |
| 8096 | obj := &BsnTlvPortSpeedGbps{ |
| 8097 | BsnTlv: NewBsnTlv(156), |
| 8098 | } |
| 8099 | return obj |
| 8100 | } |
| 8101 | |
| 8102 | type BsnTlvPortUsage struct { |
| 8103 | *BsnTlv |
| 8104 | Value BsnPortUsage |
| 8105 | } |
| 8106 | |
| 8107 | type IBsnTlvPortUsage interface { |
| 8108 | IBsnTlv |
| 8109 | GetValue() BsnPortUsage |
| 8110 | } |
| 8111 | |
| 8112 | func (self *BsnTlvPortUsage) GetValue() BsnPortUsage { |
| 8113 | return self.Value |
| 8114 | } |
| 8115 | |
| 8116 | func (self *BsnTlvPortUsage) SetValue(v BsnPortUsage) { |
| 8117 | self.Value = v |
| 8118 | } |
| 8119 | |
| 8120 | func (self *BsnTlvPortUsage) Serialize(encoder *goloxi.Encoder) error { |
| 8121 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8122 | return err |
| 8123 | } |
| 8124 | |
| 8125 | encoder.PutUint16(uint16(self.Value)) |
| 8126 | |
| 8127 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8128 | |
| 8129 | return nil |
| 8130 | } |
| 8131 | |
| 8132 | func DecodeBsnTlvPortUsage(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPortUsage, error) { |
| 8133 | _bsntlvportusage := &BsnTlvPortUsage{BsnTlv: parent} |
| 8134 | if decoder.Length() < 2 { |
| 8135 | return nil, fmt.Errorf("BsnTlvPortUsage packet too short: %d < 2", decoder.Length()) |
| 8136 | } |
| 8137 | _bsntlvportusage.Value = BsnPortUsage(decoder.ReadUint16()) |
| 8138 | return _bsntlvportusage, nil |
| 8139 | } |
| 8140 | |
| 8141 | func NewBsnTlvPortUsage() *BsnTlvPortUsage { |
| 8142 | obj := &BsnTlvPortUsage{ |
| 8143 | BsnTlv: NewBsnTlv(141), |
| 8144 | } |
| 8145 | return obj |
| 8146 | } |
| 8147 | |
| 8148 | type BsnTlvPortVxlanMode struct { |
| 8149 | *BsnTlv |
| 8150 | Value BsnPortVxlanMode |
| 8151 | } |
| 8152 | |
| 8153 | type IBsnTlvPortVxlanMode interface { |
| 8154 | IBsnTlv |
| 8155 | GetValue() BsnPortVxlanMode |
| 8156 | } |
| 8157 | |
| 8158 | func (self *BsnTlvPortVxlanMode) GetValue() BsnPortVxlanMode { |
| 8159 | return self.Value |
| 8160 | } |
| 8161 | |
| 8162 | func (self *BsnTlvPortVxlanMode) SetValue(v BsnPortVxlanMode) { |
| 8163 | self.Value = v |
| 8164 | } |
| 8165 | |
| 8166 | func (self *BsnTlvPortVxlanMode) Serialize(encoder *goloxi.Encoder) error { |
| 8167 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8168 | return err |
| 8169 | } |
| 8170 | |
| 8171 | encoder.PutUint8(uint8(self.Value)) |
| 8172 | |
| 8173 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8174 | |
| 8175 | return nil |
| 8176 | } |
| 8177 | |
| 8178 | func DecodeBsnTlvPortVxlanMode(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPortVxlanMode, error) { |
| 8179 | _bsntlvportvxlanmode := &BsnTlvPortVxlanMode{BsnTlv: parent} |
| 8180 | if decoder.Length() < 1 { |
| 8181 | return nil, fmt.Errorf("BsnTlvPortVxlanMode packet too short: %d < 1", decoder.Length()) |
| 8182 | } |
| 8183 | _bsntlvportvxlanmode.Value = BsnPortVxlanMode(decoder.ReadByte()) |
| 8184 | return _bsntlvportvxlanmode, nil |
| 8185 | } |
| 8186 | |
| 8187 | func NewBsnTlvPortVxlanMode() *BsnTlvPortVxlanMode { |
| 8188 | obj := &BsnTlvPortVxlanMode{ |
| 8189 | BsnTlv: NewBsnTlv(88), |
| 8190 | } |
| 8191 | return obj |
| 8192 | } |
| 8193 | |
| 8194 | type BsnTlvPriority struct { |
| 8195 | *BsnTlv |
| 8196 | Value uint32 |
| 8197 | } |
| 8198 | |
| 8199 | type IBsnTlvPriority interface { |
| 8200 | IBsnTlv |
| 8201 | GetValue() uint32 |
| 8202 | } |
| 8203 | |
| 8204 | func (self *BsnTlvPriority) GetValue() uint32 { |
| 8205 | return self.Value |
| 8206 | } |
| 8207 | |
| 8208 | func (self *BsnTlvPriority) SetValue(v uint32) { |
| 8209 | self.Value = v |
| 8210 | } |
| 8211 | |
| 8212 | func (self *BsnTlvPriority) Serialize(encoder *goloxi.Encoder) error { |
| 8213 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8214 | return err |
| 8215 | } |
| 8216 | |
| 8217 | encoder.PutUint32(uint32(self.Value)) |
| 8218 | |
| 8219 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8220 | |
| 8221 | return nil |
| 8222 | } |
| 8223 | |
| 8224 | func DecodeBsnTlvPriority(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPriority, error) { |
| 8225 | _bsntlvpriority := &BsnTlvPriority{BsnTlv: parent} |
| 8226 | if decoder.Length() < 4 { |
| 8227 | return nil, fmt.Errorf("BsnTlvPriority packet too short: %d < 4", decoder.Length()) |
| 8228 | } |
| 8229 | _bsntlvpriority.Value = uint32(decoder.ReadUint32()) |
| 8230 | return _bsntlvpriority, nil |
| 8231 | } |
| 8232 | |
| 8233 | func NewBsnTlvPriority() *BsnTlvPriority { |
| 8234 | obj := &BsnTlvPriority{ |
| 8235 | BsnTlv: NewBsnTlv(57), |
| 8236 | } |
| 8237 | return obj |
| 8238 | } |
| 8239 | |
| 8240 | type BsnTlvPushVlanOnEgress struct { |
| 8241 | *BsnTlv |
| 8242 | } |
| 8243 | |
| 8244 | type IBsnTlvPushVlanOnEgress interface { |
| 8245 | IBsnTlv |
| 8246 | } |
| 8247 | |
| 8248 | func (self *BsnTlvPushVlanOnEgress) Serialize(encoder *goloxi.Encoder) error { |
| 8249 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8250 | return err |
| 8251 | } |
| 8252 | |
| 8253 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8254 | |
| 8255 | return nil |
| 8256 | } |
| 8257 | |
| 8258 | func DecodeBsnTlvPushVlanOnEgress(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPushVlanOnEgress, error) { |
| 8259 | _bsntlvpushvlanonegress := &BsnTlvPushVlanOnEgress{BsnTlv: parent} |
| 8260 | return _bsntlvpushvlanonegress, nil |
| 8261 | } |
| 8262 | |
| 8263 | func NewBsnTlvPushVlanOnEgress() *BsnTlvPushVlanOnEgress { |
| 8264 | obj := &BsnTlvPushVlanOnEgress{ |
| 8265 | BsnTlv: NewBsnTlv(162), |
| 8266 | } |
| 8267 | return obj |
| 8268 | } |
| 8269 | |
| 8270 | type BsnTlvPushVlanOnIngress struct { |
| 8271 | *BsnTlv |
| 8272 | Flags BsnPushVlan |
| 8273 | } |
| 8274 | |
| 8275 | type IBsnTlvPushVlanOnIngress interface { |
| 8276 | IBsnTlv |
| 8277 | GetFlags() BsnPushVlan |
| 8278 | } |
| 8279 | |
| 8280 | func (self *BsnTlvPushVlanOnIngress) GetFlags() BsnPushVlan { |
| 8281 | return self.Flags |
| 8282 | } |
| 8283 | |
| 8284 | func (self *BsnTlvPushVlanOnIngress) SetFlags(v BsnPushVlan) { |
| 8285 | self.Flags = v |
| 8286 | } |
| 8287 | |
| 8288 | func (self *BsnTlvPushVlanOnIngress) Serialize(encoder *goloxi.Encoder) error { |
| 8289 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8290 | return err |
| 8291 | } |
| 8292 | |
| 8293 | encoder.PutUint8(uint8(self.Flags)) |
| 8294 | |
| 8295 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8296 | |
| 8297 | return nil |
| 8298 | } |
| 8299 | |
| 8300 | func DecodeBsnTlvPushVlanOnIngress(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvPushVlanOnIngress, error) { |
| 8301 | _bsntlvpushvlanoningress := &BsnTlvPushVlanOnIngress{BsnTlv: parent} |
| 8302 | if decoder.Length() < 1 { |
| 8303 | return nil, fmt.Errorf("BsnTlvPushVlanOnIngress packet too short: %d < 1", decoder.Length()) |
| 8304 | } |
| 8305 | _bsntlvpushvlanoningress.Flags = BsnPushVlan(decoder.ReadByte()) |
| 8306 | return _bsntlvpushvlanoningress, nil |
| 8307 | } |
| 8308 | |
| 8309 | func NewBsnTlvPushVlanOnIngress() *BsnTlvPushVlanOnIngress { |
| 8310 | obj := &BsnTlvPushVlanOnIngress{ |
| 8311 | BsnTlv: NewBsnTlv(128), |
| 8312 | } |
| 8313 | return obj |
| 8314 | } |
| 8315 | |
| 8316 | type BsnTlvQosPriority struct { |
| 8317 | *BsnTlv |
| 8318 | Value uint32 |
| 8319 | } |
| 8320 | |
| 8321 | type IBsnTlvQosPriority interface { |
| 8322 | IBsnTlv |
| 8323 | GetValue() uint32 |
| 8324 | } |
| 8325 | |
| 8326 | func (self *BsnTlvQosPriority) GetValue() uint32 { |
| 8327 | return self.Value |
| 8328 | } |
| 8329 | |
| 8330 | func (self *BsnTlvQosPriority) SetValue(v uint32) { |
| 8331 | self.Value = v |
| 8332 | } |
| 8333 | |
| 8334 | func (self *BsnTlvQosPriority) Serialize(encoder *goloxi.Encoder) error { |
| 8335 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8336 | return err |
| 8337 | } |
| 8338 | |
| 8339 | encoder.PutUint32(uint32(self.Value)) |
| 8340 | |
| 8341 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8342 | |
| 8343 | return nil |
| 8344 | } |
| 8345 | |
| 8346 | func DecodeBsnTlvQosPriority(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvQosPriority, error) { |
| 8347 | _bsntlvqospriority := &BsnTlvQosPriority{BsnTlv: parent} |
| 8348 | if decoder.Length() < 4 { |
| 8349 | return nil, fmt.Errorf("BsnTlvQosPriority packet too short: %d < 4", decoder.Length()) |
| 8350 | } |
| 8351 | _bsntlvqospriority.Value = uint32(decoder.ReadUint32()) |
| 8352 | return _bsntlvqospriority, nil |
| 8353 | } |
| 8354 | |
| 8355 | func NewBsnTlvQosPriority() *BsnTlvQosPriority { |
| 8356 | obj := &BsnTlvQosPriority{ |
| 8357 | BsnTlv: NewBsnTlv(108), |
| 8358 | } |
| 8359 | return obj |
| 8360 | } |
| 8361 | |
| 8362 | type BsnTlvQueueId struct { |
| 8363 | *BsnTlv |
| 8364 | Value uint32 |
| 8365 | } |
| 8366 | |
| 8367 | type IBsnTlvQueueId interface { |
| 8368 | IBsnTlv |
| 8369 | GetValue() uint32 |
| 8370 | } |
| 8371 | |
| 8372 | func (self *BsnTlvQueueId) GetValue() uint32 { |
| 8373 | return self.Value |
| 8374 | } |
| 8375 | |
| 8376 | func (self *BsnTlvQueueId) SetValue(v uint32) { |
| 8377 | self.Value = v |
| 8378 | } |
| 8379 | |
| 8380 | func (self *BsnTlvQueueId) Serialize(encoder *goloxi.Encoder) error { |
| 8381 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8382 | return err |
| 8383 | } |
| 8384 | |
| 8385 | encoder.PutUint32(uint32(self.Value)) |
| 8386 | |
| 8387 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8388 | |
| 8389 | return nil |
| 8390 | } |
| 8391 | |
| 8392 | func DecodeBsnTlvQueueId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvQueueId, error) { |
| 8393 | _bsntlvqueueid := &BsnTlvQueueId{BsnTlv: parent} |
| 8394 | if decoder.Length() < 4 { |
| 8395 | return nil, fmt.Errorf("BsnTlvQueueId packet too short: %d < 4", decoder.Length()) |
| 8396 | } |
| 8397 | _bsntlvqueueid.Value = uint32(decoder.ReadUint32()) |
| 8398 | return _bsntlvqueueid, nil |
| 8399 | } |
| 8400 | |
| 8401 | func NewBsnTlvQueueId() *BsnTlvQueueId { |
| 8402 | obj := &BsnTlvQueueId{ |
| 8403 | BsnTlv: NewBsnTlv(20), |
| 8404 | } |
| 8405 | return obj |
| 8406 | } |
| 8407 | |
| 8408 | type BsnTlvQueueWeight struct { |
| 8409 | *BsnTlv |
| 8410 | Value uint32 |
| 8411 | } |
| 8412 | |
| 8413 | type IBsnTlvQueueWeight interface { |
| 8414 | IBsnTlv |
| 8415 | GetValue() uint32 |
| 8416 | } |
| 8417 | |
| 8418 | func (self *BsnTlvQueueWeight) GetValue() uint32 { |
| 8419 | return self.Value |
| 8420 | } |
| 8421 | |
| 8422 | func (self *BsnTlvQueueWeight) SetValue(v uint32) { |
| 8423 | self.Value = v |
| 8424 | } |
| 8425 | |
| 8426 | func (self *BsnTlvQueueWeight) Serialize(encoder *goloxi.Encoder) error { |
| 8427 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8428 | return err |
| 8429 | } |
| 8430 | |
| 8431 | encoder.PutUint32(uint32(self.Value)) |
| 8432 | |
| 8433 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8434 | |
| 8435 | return nil |
| 8436 | } |
| 8437 | |
| 8438 | func DecodeBsnTlvQueueWeight(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvQueueWeight, error) { |
| 8439 | _bsntlvqueueweight := &BsnTlvQueueWeight{BsnTlv: parent} |
| 8440 | if decoder.Length() < 4 { |
| 8441 | return nil, fmt.Errorf("BsnTlvQueueWeight packet too short: %d < 4", decoder.Length()) |
| 8442 | } |
| 8443 | _bsntlvqueueweight.Value = uint32(decoder.ReadUint32()) |
| 8444 | return _bsntlvqueueweight, nil |
| 8445 | } |
| 8446 | |
| 8447 | func NewBsnTlvQueueWeight() *BsnTlvQueueWeight { |
| 8448 | obj := &BsnTlvQueueWeight{ |
| 8449 | BsnTlv: NewBsnTlv(21), |
| 8450 | } |
| 8451 | return obj |
| 8452 | } |
| 8453 | |
| 8454 | type BsnTlvRateLimit struct { |
| 8455 | *BsnTlv |
| 8456 | Value uint32 |
| 8457 | } |
| 8458 | |
| 8459 | type IBsnTlvRateLimit interface { |
| 8460 | IBsnTlv |
| 8461 | GetValue() uint32 |
| 8462 | } |
| 8463 | |
| 8464 | func (self *BsnTlvRateLimit) GetValue() uint32 { |
| 8465 | return self.Value |
| 8466 | } |
| 8467 | |
| 8468 | func (self *BsnTlvRateLimit) SetValue(v uint32) { |
| 8469 | self.Value = v |
| 8470 | } |
| 8471 | |
| 8472 | func (self *BsnTlvRateLimit) Serialize(encoder *goloxi.Encoder) error { |
| 8473 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8474 | return err |
| 8475 | } |
| 8476 | |
| 8477 | encoder.PutUint32(uint32(self.Value)) |
| 8478 | |
| 8479 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8480 | |
| 8481 | return nil |
| 8482 | } |
| 8483 | |
| 8484 | func DecodeBsnTlvRateLimit(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvRateLimit, error) { |
| 8485 | _bsntlvratelimit := &BsnTlvRateLimit{BsnTlv: parent} |
| 8486 | if decoder.Length() < 4 { |
| 8487 | return nil, fmt.Errorf("BsnTlvRateLimit packet too short: %d < 4", decoder.Length()) |
| 8488 | } |
| 8489 | _bsntlvratelimit.Value = uint32(decoder.ReadUint32()) |
| 8490 | return _bsntlvratelimit, nil |
| 8491 | } |
| 8492 | |
| 8493 | func NewBsnTlvRateLimit() *BsnTlvRateLimit { |
| 8494 | obj := &BsnTlvRateLimit{ |
| 8495 | BsnTlv: NewBsnTlv(116), |
| 8496 | } |
| 8497 | return obj |
| 8498 | } |
| 8499 | |
| 8500 | type BsnTlvRateUnit struct { |
| 8501 | *BsnTlv |
| 8502 | Value BsnRateUnit |
| 8503 | } |
| 8504 | |
| 8505 | type IBsnTlvRateUnit interface { |
| 8506 | IBsnTlv |
| 8507 | GetValue() BsnRateUnit |
| 8508 | } |
| 8509 | |
| 8510 | func (self *BsnTlvRateUnit) GetValue() BsnRateUnit { |
| 8511 | return self.Value |
| 8512 | } |
| 8513 | |
| 8514 | func (self *BsnTlvRateUnit) SetValue(v BsnRateUnit) { |
| 8515 | self.Value = v |
| 8516 | } |
| 8517 | |
| 8518 | func (self *BsnTlvRateUnit) Serialize(encoder *goloxi.Encoder) error { |
| 8519 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8520 | return err |
| 8521 | } |
| 8522 | |
| 8523 | encoder.PutUint8(uint8(self.Value)) |
| 8524 | |
| 8525 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8526 | |
| 8527 | return nil |
| 8528 | } |
| 8529 | |
| 8530 | func DecodeBsnTlvRateUnit(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvRateUnit, error) { |
| 8531 | _bsntlvrateunit := &BsnTlvRateUnit{BsnTlv: parent} |
| 8532 | if decoder.Length() < 1 { |
| 8533 | return nil, fmt.Errorf("BsnTlvRateUnit packet too short: %d < 1", decoder.Length()) |
| 8534 | } |
| 8535 | _bsntlvrateunit.Value = BsnRateUnit(decoder.ReadByte()) |
| 8536 | return _bsntlvrateunit, nil |
| 8537 | } |
| 8538 | |
| 8539 | func NewBsnTlvRateUnit() *BsnTlvRateUnit { |
| 8540 | obj := &BsnTlvRateUnit{ |
| 8541 | BsnTlv: NewBsnTlv(89), |
| 8542 | } |
| 8543 | return obj |
| 8544 | } |
| 8545 | |
| 8546 | type BsnTlvRecordPackets struct { |
| 8547 | *BsnTlv |
| 8548 | Value uint32 |
| 8549 | } |
| 8550 | |
| 8551 | type IBsnTlvRecordPackets interface { |
| 8552 | IBsnTlv |
| 8553 | GetValue() uint32 |
| 8554 | } |
| 8555 | |
| 8556 | func (self *BsnTlvRecordPackets) GetValue() uint32 { |
| 8557 | return self.Value |
| 8558 | } |
| 8559 | |
| 8560 | func (self *BsnTlvRecordPackets) SetValue(v uint32) { |
| 8561 | self.Value = v |
| 8562 | } |
| 8563 | |
| 8564 | func (self *BsnTlvRecordPackets) Serialize(encoder *goloxi.Encoder) error { |
| 8565 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8566 | return err |
| 8567 | } |
| 8568 | |
| 8569 | encoder.PutUint32(uint32(self.Value)) |
| 8570 | |
| 8571 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8572 | |
| 8573 | return nil |
| 8574 | } |
| 8575 | |
| 8576 | func DecodeBsnTlvRecordPackets(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvRecordPackets, error) { |
| 8577 | _bsntlvrecordpackets := &BsnTlvRecordPackets{BsnTlv: parent} |
| 8578 | if decoder.Length() < 4 { |
| 8579 | return nil, fmt.Errorf("BsnTlvRecordPackets packet too short: %d < 4", decoder.Length()) |
| 8580 | } |
| 8581 | _bsntlvrecordpackets.Value = uint32(decoder.ReadUint32()) |
| 8582 | return _bsntlvrecordpackets, nil |
| 8583 | } |
| 8584 | |
| 8585 | func NewBsnTlvRecordPackets() *BsnTlvRecordPackets { |
| 8586 | obj := &BsnTlvRecordPackets{ |
| 8587 | BsnTlv: NewBsnTlv(155), |
| 8588 | } |
| 8589 | return obj |
| 8590 | } |
| 8591 | |
| 8592 | type BsnTlvReference struct { |
| 8593 | *BsnTlv |
| 8594 | TableId uint16 |
| 8595 | Key []IBsnTlv |
| 8596 | } |
| 8597 | |
| 8598 | type IBsnTlvReference interface { |
| 8599 | IBsnTlv |
| 8600 | GetTableId() uint16 |
| 8601 | GetKey() []IBsnTlv |
| 8602 | } |
| 8603 | |
| 8604 | func (self *BsnTlvReference) GetTableId() uint16 { |
| 8605 | return self.TableId |
| 8606 | } |
| 8607 | |
| 8608 | func (self *BsnTlvReference) SetTableId(v uint16) { |
| 8609 | self.TableId = v |
| 8610 | } |
| 8611 | |
| 8612 | func (self *BsnTlvReference) GetKey() []IBsnTlv { |
| 8613 | return self.Key |
| 8614 | } |
| 8615 | |
| 8616 | func (self *BsnTlvReference) SetKey(v []IBsnTlv) { |
| 8617 | self.Key = v |
| 8618 | } |
| 8619 | |
| 8620 | func (self *BsnTlvReference) Serialize(encoder *goloxi.Encoder) error { |
| 8621 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8622 | return err |
| 8623 | } |
| 8624 | |
| 8625 | encoder.PutUint16(uint16(self.TableId)) |
| 8626 | for _, obj := range self.Key { |
| 8627 | if err := obj.Serialize(encoder); err != nil { |
| 8628 | return err |
| 8629 | } |
| 8630 | } |
| 8631 | |
| 8632 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8633 | |
| 8634 | return nil |
| 8635 | } |
| 8636 | |
| 8637 | func DecodeBsnTlvReference(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvReference, error) { |
| 8638 | _bsntlvreference := &BsnTlvReference{BsnTlv: parent} |
| 8639 | if decoder.Length() < 2 { |
| 8640 | return nil, fmt.Errorf("BsnTlvReference packet too short: %d < 2", decoder.Length()) |
| 8641 | } |
| 8642 | _bsntlvreference.TableId = uint16(decoder.ReadUint16()) |
| 8643 | |
| 8644 | for decoder.Length() >= 4 { |
| 8645 | item, err := DecodeBsnTlv(decoder) |
| 8646 | if err != nil { |
| 8647 | return nil, err |
| 8648 | } |
| 8649 | if item != nil { |
| 8650 | _bsntlvreference.Key = append(_bsntlvreference.Key, item) |
| 8651 | } |
| 8652 | } |
| 8653 | return _bsntlvreference, nil |
| 8654 | } |
| 8655 | |
| 8656 | func NewBsnTlvReference() *BsnTlvReference { |
| 8657 | obj := &BsnTlvReference{ |
| 8658 | BsnTlv: NewBsnTlv(59), |
| 8659 | } |
| 8660 | return obj |
| 8661 | } |
| 8662 | |
| 8663 | type BsnTlvReplyPackets struct { |
| 8664 | *BsnTlv |
| 8665 | Value uint64 |
| 8666 | } |
| 8667 | |
| 8668 | type IBsnTlvReplyPackets interface { |
| 8669 | IBsnTlv |
| 8670 | GetValue() uint64 |
| 8671 | } |
| 8672 | |
| 8673 | func (self *BsnTlvReplyPackets) GetValue() uint64 { |
| 8674 | return self.Value |
| 8675 | } |
| 8676 | |
| 8677 | func (self *BsnTlvReplyPackets) SetValue(v uint64) { |
| 8678 | self.Value = v |
| 8679 | } |
| 8680 | |
| 8681 | func (self *BsnTlvReplyPackets) Serialize(encoder *goloxi.Encoder) error { |
| 8682 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8683 | return err |
| 8684 | } |
| 8685 | |
| 8686 | encoder.PutUint64(uint64(self.Value)) |
| 8687 | |
| 8688 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8689 | |
| 8690 | return nil |
| 8691 | } |
| 8692 | |
| 8693 | func DecodeBsnTlvReplyPackets(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvReplyPackets, error) { |
| 8694 | _bsntlvreplypackets := &BsnTlvReplyPackets{BsnTlv: parent} |
| 8695 | if decoder.Length() < 8 { |
| 8696 | return nil, fmt.Errorf("BsnTlvReplyPackets packet too short: %d < 8", decoder.Length()) |
| 8697 | } |
| 8698 | _bsntlvreplypackets.Value = uint64(decoder.ReadUint64()) |
| 8699 | return _bsntlvreplypackets, nil |
| 8700 | } |
| 8701 | |
| 8702 | func NewBsnTlvReplyPackets() *BsnTlvReplyPackets { |
| 8703 | obj := &BsnTlvReplyPackets{ |
| 8704 | BsnTlv: NewBsnTlv(12), |
| 8705 | } |
| 8706 | return obj |
| 8707 | } |
| 8708 | |
| 8709 | type BsnTlvRequestPackets struct { |
| 8710 | *BsnTlv |
| 8711 | Value uint64 |
| 8712 | } |
| 8713 | |
| 8714 | type IBsnTlvRequestPackets interface { |
| 8715 | IBsnTlv |
| 8716 | GetValue() uint64 |
| 8717 | } |
| 8718 | |
| 8719 | func (self *BsnTlvRequestPackets) GetValue() uint64 { |
| 8720 | return self.Value |
| 8721 | } |
| 8722 | |
| 8723 | func (self *BsnTlvRequestPackets) SetValue(v uint64) { |
| 8724 | self.Value = v |
| 8725 | } |
| 8726 | |
| 8727 | func (self *BsnTlvRequestPackets) Serialize(encoder *goloxi.Encoder) error { |
| 8728 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8729 | return err |
| 8730 | } |
| 8731 | |
| 8732 | encoder.PutUint64(uint64(self.Value)) |
| 8733 | |
| 8734 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8735 | |
| 8736 | return nil |
| 8737 | } |
| 8738 | |
| 8739 | func DecodeBsnTlvRequestPackets(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvRequestPackets, error) { |
| 8740 | _bsntlvrequestpackets := &BsnTlvRequestPackets{BsnTlv: parent} |
| 8741 | if decoder.Length() < 8 { |
| 8742 | return nil, fmt.Errorf("BsnTlvRequestPackets packet too short: %d < 8", decoder.Length()) |
| 8743 | } |
| 8744 | _bsntlvrequestpackets.Value = uint64(decoder.ReadUint64()) |
| 8745 | return _bsntlvrequestpackets, nil |
| 8746 | } |
| 8747 | |
| 8748 | func NewBsnTlvRequestPackets() *BsnTlvRequestPackets { |
| 8749 | obj := &BsnTlvRequestPackets{ |
| 8750 | BsnTlv: NewBsnTlv(11), |
| 8751 | } |
| 8752 | return obj |
| 8753 | } |
| 8754 | |
| 8755 | type BsnTlvRestServer struct { |
| 8756 | *BsnTlv |
| 8757 | } |
| 8758 | |
| 8759 | type IBsnTlvRestServer interface { |
| 8760 | IBsnTlv |
| 8761 | } |
| 8762 | |
| 8763 | func (self *BsnTlvRestServer) Serialize(encoder *goloxi.Encoder) error { |
| 8764 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8765 | return err |
| 8766 | } |
| 8767 | |
| 8768 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8769 | |
| 8770 | return nil |
| 8771 | } |
| 8772 | |
| 8773 | func DecodeBsnTlvRestServer(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvRestServer, error) { |
| 8774 | _bsntlvrestserver := &BsnTlvRestServer{BsnTlv: parent} |
| 8775 | return _bsntlvrestserver, nil |
| 8776 | } |
| 8777 | |
| 8778 | func NewBsnTlvRestServer() *BsnTlvRestServer { |
| 8779 | obj := &BsnTlvRestServer{ |
| 8780 | BsnTlv: NewBsnTlv(152), |
| 8781 | } |
| 8782 | return obj |
| 8783 | } |
| 8784 | |
| 8785 | type BsnTlvRoutingParam struct { |
| 8786 | *BsnTlv |
| 8787 | Value BsnRoutingParam |
| 8788 | } |
| 8789 | |
| 8790 | type IBsnTlvRoutingParam interface { |
| 8791 | IBsnTlv |
| 8792 | GetValue() BsnRoutingParam |
| 8793 | } |
| 8794 | |
| 8795 | func (self *BsnTlvRoutingParam) GetValue() BsnRoutingParam { |
| 8796 | return self.Value |
| 8797 | } |
| 8798 | |
| 8799 | func (self *BsnTlvRoutingParam) SetValue(v BsnRoutingParam) { |
| 8800 | self.Value = v |
| 8801 | } |
| 8802 | |
| 8803 | func (self *BsnTlvRoutingParam) Serialize(encoder *goloxi.Encoder) error { |
| 8804 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8805 | return err |
| 8806 | } |
| 8807 | |
| 8808 | encoder.PutUint16(uint16(self.Value)) |
| 8809 | |
| 8810 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8811 | |
| 8812 | return nil |
| 8813 | } |
| 8814 | |
| 8815 | func DecodeBsnTlvRoutingParam(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvRoutingParam, error) { |
| 8816 | _bsntlvroutingparam := &BsnTlvRoutingParam{BsnTlv: parent} |
| 8817 | if decoder.Length() < 2 { |
| 8818 | return nil, fmt.Errorf("BsnTlvRoutingParam packet too short: %d < 2", decoder.Length()) |
| 8819 | } |
| 8820 | _bsntlvroutingparam.Value = BsnRoutingParam(decoder.ReadUint16()) |
| 8821 | return _bsntlvroutingparam, nil |
| 8822 | } |
| 8823 | |
| 8824 | func NewBsnTlvRoutingParam() *BsnTlvRoutingParam { |
| 8825 | obj := &BsnTlvRoutingParam{ |
| 8826 | BsnTlv: NewBsnTlv(161), |
| 8827 | } |
| 8828 | return obj |
| 8829 | } |
| 8830 | |
| 8831 | type BsnTlvRxBytes struct { |
| 8832 | *BsnTlv |
| 8833 | Value uint64 |
| 8834 | } |
| 8835 | |
| 8836 | type IBsnTlvRxBytes interface { |
| 8837 | IBsnTlv |
| 8838 | GetValue() uint64 |
| 8839 | } |
| 8840 | |
| 8841 | func (self *BsnTlvRxBytes) GetValue() uint64 { |
| 8842 | return self.Value |
| 8843 | } |
| 8844 | |
| 8845 | func (self *BsnTlvRxBytes) SetValue(v uint64) { |
| 8846 | self.Value = v |
| 8847 | } |
| 8848 | |
| 8849 | func (self *BsnTlvRxBytes) Serialize(encoder *goloxi.Encoder) error { |
| 8850 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8851 | return err |
| 8852 | } |
| 8853 | |
| 8854 | encoder.PutUint64(uint64(self.Value)) |
| 8855 | |
| 8856 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8857 | |
| 8858 | return nil |
| 8859 | } |
| 8860 | |
| 8861 | func DecodeBsnTlvRxBytes(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvRxBytes, error) { |
| 8862 | _bsntlvrxbytes := &BsnTlvRxBytes{BsnTlv: parent} |
| 8863 | if decoder.Length() < 8 { |
| 8864 | return nil, fmt.Errorf("BsnTlvRxBytes packet too short: %d < 8", decoder.Length()) |
| 8865 | } |
| 8866 | _bsntlvrxbytes.Value = uint64(decoder.ReadUint64()) |
| 8867 | return _bsntlvrxbytes, nil |
| 8868 | } |
| 8869 | |
| 8870 | func NewBsnTlvRxBytes() *BsnTlvRxBytes { |
| 8871 | obj := &BsnTlvRxBytes{ |
| 8872 | BsnTlv: NewBsnTlv(71), |
| 8873 | } |
| 8874 | return obj |
| 8875 | } |
| 8876 | |
| 8877 | type BsnTlvRxPackets struct { |
| 8878 | *BsnTlv |
| 8879 | Value uint64 |
| 8880 | } |
| 8881 | |
| 8882 | type IBsnTlvRxPackets interface { |
| 8883 | IBsnTlv |
| 8884 | GetValue() uint64 |
| 8885 | } |
| 8886 | |
| 8887 | func (self *BsnTlvRxPackets) GetValue() uint64 { |
| 8888 | return self.Value |
| 8889 | } |
| 8890 | |
| 8891 | func (self *BsnTlvRxPackets) SetValue(v uint64) { |
| 8892 | self.Value = v |
| 8893 | } |
| 8894 | |
| 8895 | func (self *BsnTlvRxPackets) Serialize(encoder *goloxi.Encoder) error { |
| 8896 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8897 | return err |
| 8898 | } |
| 8899 | |
| 8900 | encoder.PutUint64(uint64(self.Value)) |
| 8901 | |
| 8902 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8903 | |
| 8904 | return nil |
| 8905 | } |
| 8906 | |
| 8907 | func DecodeBsnTlvRxPackets(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvRxPackets, error) { |
| 8908 | _bsntlvrxpackets := &BsnTlvRxPackets{BsnTlv: parent} |
| 8909 | if decoder.Length() < 8 { |
| 8910 | return nil, fmt.Errorf("BsnTlvRxPackets packet too short: %d < 8", decoder.Length()) |
| 8911 | } |
| 8912 | _bsntlvrxpackets.Value = uint64(decoder.ReadUint64()) |
| 8913 | return _bsntlvrxpackets, nil |
| 8914 | } |
| 8915 | |
| 8916 | func NewBsnTlvRxPackets() *BsnTlvRxPackets { |
| 8917 | obj := &BsnTlvRxPackets{ |
| 8918 | BsnTlv: NewBsnTlv(2), |
| 8919 | } |
| 8920 | return obj |
| 8921 | } |
| 8922 | |
| 8923 | type BsnTlvSamplingRate struct { |
| 8924 | *BsnTlv |
| 8925 | Value uint32 |
| 8926 | } |
| 8927 | |
| 8928 | type IBsnTlvSamplingRate interface { |
| 8929 | IBsnTlv |
| 8930 | GetValue() uint32 |
| 8931 | } |
| 8932 | |
| 8933 | func (self *BsnTlvSamplingRate) GetValue() uint32 { |
| 8934 | return self.Value |
| 8935 | } |
| 8936 | |
| 8937 | func (self *BsnTlvSamplingRate) SetValue(v uint32) { |
| 8938 | self.Value = v |
| 8939 | } |
| 8940 | |
| 8941 | func (self *BsnTlvSamplingRate) Serialize(encoder *goloxi.Encoder) error { |
| 8942 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8943 | return err |
| 8944 | } |
| 8945 | |
| 8946 | encoder.PutUint32(uint32(self.Value)) |
| 8947 | |
| 8948 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8949 | |
| 8950 | return nil |
| 8951 | } |
| 8952 | |
| 8953 | func DecodeBsnTlvSamplingRate(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvSamplingRate, error) { |
| 8954 | _bsntlvsamplingrate := &BsnTlvSamplingRate{BsnTlv: parent} |
| 8955 | if decoder.Length() < 4 { |
| 8956 | return nil, fmt.Errorf("BsnTlvSamplingRate packet too short: %d < 4", decoder.Length()) |
| 8957 | } |
| 8958 | _bsntlvsamplingrate.Value = uint32(decoder.ReadUint32()) |
| 8959 | return _bsntlvsamplingrate, nil |
| 8960 | } |
| 8961 | |
| 8962 | func NewBsnTlvSamplingRate() *BsnTlvSamplingRate { |
| 8963 | obj := &BsnTlvSamplingRate{ |
| 8964 | BsnTlv: NewBsnTlv(30), |
| 8965 | } |
| 8966 | return obj |
| 8967 | } |
| 8968 | |
| 8969 | type BsnTlvSetLoopbackMode struct { |
| 8970 | *BsnTlv |
| 8971 | } |
| 8972 | |
| 8973 | type IBsnTlvSetLoopbackMode interface { |
| 8974 | IBsnTlv |
| 8975 | } |
| 8976 | |
| 8977 | func (self *BsnTlvSetLoopbackMode) Serialize(encoder *goloxi.Encoder) error { |
| 8978 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 8979 | return err |
| 8980 | } |
| 8981 | |
| 8982 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 8983 | |
| 8984 | return nil |
| 8985 | } |
| 8986 | |
| 8987 | func DecodeBsnTlvSetLoopbackMode(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvSetLoopbackMode, error) { |
| 8988 | _bsntlvsetloopbackmode := &BsnTlvSetLoopbackMode{BsnTlv: parent} |
| 8989 | return _bsntlvsetloopbackmode, nil |
| 8990 | } |
| 8991 | |
| 8992 | func NewBsnTlvSetLoopbackMode() *BsnTlvSetLoopbackMode { |
| 8993 | obj := &BsnTlvSetLoopbackMode{ |
| 8994 | BsnTlv: NewBsnTlv(74), |
| 8995 | } |
| 8996 | return obj |
| 8997 | } |
| 8998 | |
| 8999 | type BsnTlvStatus struct { |
| 9000 | *BsnTlv |
| 9001 | Value BsnStatus |
| 9002 | } |
| 9003 | |
| 9004 | type IBsnTlvStatus interface { |
| 9005 | IBsnTlv |
| 9006 | GetValue() BsnStatus |
| 9007 | } |
| 9008 | |
| 9009 | func (self *BsnTlvStatus) GetValue() BsnStatus { |
| 9010 | return self.Value |
| 9011 | } |
| 9012 | |
| 9013 | func (self *BsnTlvStatus) SetValue(v BsnStatus) { |
| 9014 | self.Value = v |
| 9015 | } |
| 9016 | |
| 9017 | func (self *BsnTlvStatus) Serialize(encoder *goloxi.Encoder) error { |
| 9018 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9019 | return err |
| 9020 | } |
| 9021 | |
| 9022 | encoder.PutUint8(uint8(self.Value)) |
| 9023 | |
| 9024 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9025 | |
| 9026 | return nil |
| 9027 | } |
| 9028 | |
| 9029 | func DecodeBsnTlvStatus(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvStatus, error) { |
| 9030 | _bsntlvstatus := &BsnTlvStatus{BsnTlv: parent} |
| 9031 | if decoder.Length() < 1 { |
| 9032 | return nil, fmt.Errorf("BsnTlvStatus packet too short: %d < 1", decoder.Length()) |
| 9033 | } |
| 9034 | _bsntlvstatus.Value = BsnStatus(decoder.ReadByte()) |
| 9035 | return _bsntlvstatus, nil |
| 9036 | } |
| 9037 | |
| 9038 | func NewBsnTlvStatus() *BsnTlvStatus { |
| 9039 | obj := &BsnTlvStatus{ |
| 9040 | BsnTlv: NewBsnTlv(97), |
| 9041 | } |
| 9042 | return obj |
| 9043 | } |
| 9044 | |
| 9045 | type BsnTlvStripMplsL2OnIngress struct { |
| 9046 | *BsnTlv |
| 9047 | } |
| 9048 | |
| 9049 | type IBsnTlvStripMplsL2OnIngress interface { |
| 9050 | IBsnTlv |
| 9051 | } |
| 9052 | |
| 9053 | func (self *BsnTlvStripMplsL2OnIngress) Serialize(encoder *goloxi.Encoder) error { |
| 9054 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9055 | return err |
| 9056 | } |
| 9057 | |
| 9058 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9059 | |
| 9060 | return nil |
| 9061 | } |
| 9062 | |
| 9063 | func DecodeBsnTlvStripMplsL2OnIngress(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvStripMplsL2OnIngress, error) { |
| 9064 | _bsntlvstripmplsl2oningress := &BsnTlvStripMplsL2OnIngress{BsnTlv: parent} |
| 9065 | return _bsntlvstripmplsl2oningress, nil |
| 9066 | } |
| 9067 | |
| 9068 | func NewBsnTlvStripMplsL2OnIngress() *BsnTlvStripMplsL2OnIngress { |
| 9069 | obj := &BsnTlvStripMplsL2OnIngress{ |
| 9070 | BsnTlv: NewBsnTlv(75), |
| 9071 | } |
| 9072 | return obj |
| 9073 | } |
| 9074 | |
| 9075 | type BsnTlvStripMplsL3OnIngress struct { |
| 9076 | *BsnTlv |
| 9077 | } |
| 9078 | |
| 9079 | type IBsnTlvStripMplsL3OnIngress interface { |
| 9080 | IBsnTlv |
| 9081 | } |
| 9082 | |
| 9083 | func (self *BsnTlvStripMplsL3OnIngress) Serialize(encoder *goloxi.Encoder) error { |
| 9084 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9085 | return err |
| 9086 | } |
| 9087 | |
| 9088 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9089 | |
| 9090 | return nil |
| 9091 | } |
| 9092 | |
| 9093 | func DecodeBsnTlvStripMplsL3OnIngress(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvStripMplsL3OnIngress, error) { |
| 9094 | _bsntlvstripmplsl3oningress := &BsnTlvStripMplsL3OnIngress{BsnTlv: parent} |
| 9095 | return _bsntlvstripmplsl3oningress, nil |
| 9096 | } |
| 9097 | |
| 9098 | func NewBsnTlvStripMplsL3OnIngress() *BsnTlvStripMplsL3OnIngress { |
| 9099 | obj := &BsnTlvStripMplsL3OnIngress{ |
| 9100 | BsnTlv: NewBsnTlv(76), |
| 9101 | } |
| 9102 | return obj |
| 9103 | } |
| 9104 | |
| 9105 | type BsnTlvStripVlanOnEgress struct { |
| 9106 | *BsnTlv |
| 9107 | Flags BsnStripVlan |
| 9108 | } |
| 9109 | |
| 9110 | type IBsnTlvStripVlanOnEgress interface { |
| 9111 | IBsnTlv |
| 9112 | GetFlags() BsnStripVlan |
| 9113 | } |
| 9114 | |
| 9115 | func (self *BsnTlvStripVlanOnEgress) GetFlags() BsnStripVlan { |
| 9116 | return self.Flags |
| 9117 | } |
| 9118 | |
| 9119 | func (self *BsnTlvStripVlanOnEgress) SetFlags(v BsnStripVlan) { |
| 9120 | self.Flags = v |
| 9121 | } |
| 9122 | |
| 9123 | func (self *BsnTlvStripVlanOnEgress) Serialize(encoder *goloxi.Encoder) error { |
| 9124 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9125 | return err |
| 9126 | } |
| 9127 | |
| 9128 | encoder.PutUint8(uint8(self.Flags)) |
| 9129 | |
| 9130 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9131 | |
| 9132 | return nil |
| 9133 | } |
| 9134 | |
| 9135 | func DecodeBsnTlvStripVlanOnEgress(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvStripVlanOnEgress, error) { |
| 9136 | _bsntlvstripvlanonegress := &BsnTlvStripVlanOnEgress{BsnTlv: parent} |
| 9137 | if decoder.Length() < 1 { |
| 9138 | return nil, fmt.Errorf("BsnTlvStripVlanOnEgress packet too short: %d < 1", decoder.Length()) |
| 9139 | } |
| 9140 | _bsntlvstripvlanonegress.Flags = BsnStripVlan(decoder.ReadByte()) |
| 9141 | return _bsntlvstripvlanonegress, nil |
| 9142 | } |
| 9143 | |
| 9144 | func NewBsnTlvStripVlanOnEgress() *BsnTlvStripVlanOnEgress { |
| 9145 | obj := &BsnTlvStripVlanOnEgress{ |
| 9146 | BsnTlv: NewBsnTlv(73), |
| 9147 | } |
| 9148 | return obj |
| 9149 | } |
| 9150 | |
| 9151 | type BsnTlvSubAgentId struct { |
| 9152 | *BsnTlv |
| 9153 | Value uint32 |
| 9154 | } |
| 9155 | |
| 9156 | type IBsnTlvSubAgentId interface { |
| 9157 | IBsnTlv |
| 9158 | GetValue() uint32 |
| 9159 | } |
| 9160 | |
| 9161 | func (self *BsnTlvSubAgentId) GetValue() uint32 { |
| 9162 | return self.Value |
| 9163 | } |
| 9164 | |
| 9165 | func (self *BsnTlvSubAgentId) SetValue(v uint32) { |
| 9166 | self.Value = v |
| 9167 | } |
| 9168 | |
| 9169 | func (self *BsnTlvSubAgentId) Serialize(encoder *goloxi.Encoder) error { |
| 9170 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9171 | return err |
| 9172 | } |
| 9173 | |
| 9174 | encoder.PutUint32(uint32(self.Value)) |
| 9175 | |
| 9176 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9177 | |
| 9178 | return nil |
| 9179 | } |
| 9180 | |
| 9181 | func DecodeBsnTlvSubAgentId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvSubAgentId, error) { |
| 9182 | _bsntlvsubagentid := &BsnTlvSubAgentId{BsnTlv: parent} |
| 9183 | if decoder.Length() < 4 { |
| 9184 | return nil, fmt.Errorf("BsnTlvSubAgentId packet too short: %d < 4", decoder.Length()) |
| 9185 | } |
| 9186 | _bsntlvsubagentid.Value = uint32(decoder.ReadUint32()) |
| 9187 | return _bsntlvsubagentid, nil |
| 9188 | } |
| 9189 | |
| 9190 | func NewBsnTlvSubAgentId() *BsnTlvSubAgentId { |
| 9191 | obj := &BsnTlvSubAgentId{ |
| 9192 | BsnTlv: NewBsnTlv(38), |
| 9193 | } |
| 9194 | return obj |
| 9195 | } |
| 9196 | |
| 9197 | type BsnTlvTcpDst struct { |
| 9198 | *BsnTlv |
| 9199 | Value uint16 |
| 9200 | } |
| 9201 | |
| 9202 | type IBsnTlvTcpDst interface { |
| 9203 | IBsnTlv |
| 9204 | GetValue() uint16 |
| 9205 | } |
| 9206 | |
| 9207 | func (self *BsnTlvTcpDst) GetValue() uint16 { |
| 9208 | return self.Value |
| 9209 | } |
| 9210 | |
| 9211 | func (self *BsnTlvTcpDst) SetValue(v uint16) { |
| 9212 | self.Value = v |
| 9213 | } |
| 9214 | |
| 9215 | func (self *BsnTlvTcpDst) Serialize(encoder *goloxi.Encoder) error { |
| 9216 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9217 | return err |
| 9218 | } |
| 9219 | |
| 9220 | encoder.PutUint16(uint16(self.Value)) |
| 9221 | |
| 9222 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9223 | |
| 9224 | return nil |
| 9225 | } |
| 9226 | |
| 9227 | func DecodeBsnTlvTcpDst(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvTcpDst, error) { |
| 9228 | _bsntlvtcpdst := &BsnTlvTcpDst{BsnTlv: parent} |
| 9229 | if decoder.Length() < 2 { |
| 9230 | return nil, fmt.Errorf("BsnTlvTcpDst packet too short: %d < 2", decoder.Length()) |
| 9231 | } |
| 9232 | _bsntlvtcpdst.Value = uint16(decoder.ReadUint16()) |
| 9233 | return _bsntlvtcpdst, nil |
| 9234 | } |
| 9235 | |
| 9236 | func NewBsnTlvTcpDst() *BsnTlvTcpDst { |
| 9237 | obj := &BsnTlvTcpDst{ |
| 9238 | BsnTlv: NewBsnTlv(66), |
| 9239 | } |
| 9240 | return obj |
| 9241 | } |
| 9242 | |
| 9243 | type BsnTlvTcpFlags struct { |
| 9244 | *BsnTlv |
| 9245 | Value uint16 |
| 9246 | } |
| 9247 | |
| 9248 | type IBsnTlvTcpFlags interface { |
| 9249 | IBsnTlv |
| 9250 | GetValue() uint16 |
| 9251 | } |
| 9252 | |
| 9253 | func (self *BsnTlvTcpFlags) GetValue() uint16 { |
| 9254 | return self.Value |
| 9255 | } |
| 9256 | |
| 9257 | func (self *BsnTlvTcpFlags) SetValue(v uint16) { |
| 9258 | self.Value = v |
| 9259 | } |
| 9260 | |
| 9261 | func (self *BsnTlvTcpFlags) Serialize(encoder *goloxi.Encoder) error { |
| 9262 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9263 | return err |
| 9264 | } |
| 9265 | |
| 9266 | encoder.PutUint16(uint16(self.Value)) |
| 9267 | |
| 9268 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9269 | |
| 9270 | return nil |
| 9271 | } |
| 9272 | |
| 9273 | func DecodeBsnTlvTcpFlags(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvTcpFlags, error) { |
| 9274 | _bsntlvtcpflags := &BsnTlvTcpFlags{BsnTlv: parent} |
| 9275 | if decoder.Length() < 2 { |
| 9276 | return nil, fmt.Errorf("BsnTlvTcpFlags packet too short: %d < 2", decoder.Length()) |
| 9277 | } |
| 9278 | _bsntlvtcpflags.Value = uint16(decoder.ReadUint16()) |
| 9279 | return _bsntlvtcpflags, nil |
| 9280 | } |
| 9281 | |
| 9282 | func NewBsnTlvTcpFlags() *BsnTlvTcpFlags { |
| 9283 | obj := &BsnTlvTcpFlags{ |
| 9284 | BsnTlv: NewBsnTlv(133), |
| 9285 | } |
| 9286 | return obj |
| 9287 | } |
| 9288 | |
| 9289 | type BsnTlvTcpSrc struct { |
| 9290 | *BsnTlv |
| 9291 | Value uint16 |
| 9292 | } |
| 9293 | |
| 9294 | type IBsnTlvTcpSrc interface { |
| 9295 | IBsnTlv |
| 9296 | GetValue() uint16 |
| 9297 | } |
| 9298 | |
| 9299 | func (self *BsnTlvTcpSrc) GetValue() uint16 { |
| 9300 | return self.Value |
| 9301 | } |
| 9302 | |
| 9303 | func (self *BsnTlvTcpSrc) SetValue(v uint16) { |
| 9304 | self.Value = v |
| 9305 | } |
| 9306 | |
| 9307 | func (self *BsnTlvTcpSrc) Serialize(encoder *goloxi.Encoder) error { |
| 9308 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9309 | return err |
| 9310 | } |
| 9311 | |
| 9312 | encoder.PutUint16(uint16(self.Value)) |
| 9313 | |
| 9314 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9315 | |
| 9316 | return nil |
| 9317 | } |
| 9318 | |
| 9319 | func DecodeBsnTlvTcpSrc(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvTcpSrc, error) { |
| 9320 | _bsntlvtcpsrc := &BsnTlvTcpSrc{BsnTlv: parent} |
| 9321 | if decoder.Length() < 2 { |
| 9322 | return nil, fmt.Errorf("BsnTlvTcpSrc packet too short: %d < 2", decoder.Length()) |
| 9323 | } |
| 9324 | _bsntlvtcpsrc.Value = uint16(decoder.ReadUint16()) |
| 9325 | return _bsntlvtcpsrc, nil |
| 9326 | } |
| 9327 | |
| 9328 | func NewBsnTlvTcpSrc() *BsnTlvTcpSrc { |
| 9329 | obj := &BsnTlvTcpSrc{ |
| 9330 | BsnTlv: NewBsnTlv(65), |
| 9331 | } |
| 9332 | return obj |
| 9333 | } |
| 9334 | |
| 9335 | type BsnTlvTimestamp struct { |
| 9336 | *BsnTlv |
| 9337 | Value uint64 |
| 9338 | } |
| 9339 | |
| 9340 | type IBsnTlvTimestamp interface { |
| 9341 | IBsnTlv |
| 9342 | GetValue() uint64 |
| 9343 | } |
| 9344 | |
| 9345 | func (self *BsnTlvTimestamp) GetValue() uint64 { |
| 9346 | return self.Value |
| 9347 | } |
| 9348 | |
| 9349 | func (self *BsnTlvTimestamp) SetValue(v uint64) { |
| 9350 | self.Value = v |
| 9351 | } |
| 9352 | |
| 9353 | func (self *BsnTlvTimestamp) Serialize(encoder *goloxi.Encoder) error { |
| 9354 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9355 | return err |
| 9356 | } |
| 9357 | |
| 9358 | encoder.PutUint64(uint64(self.Value)) |
| 9359 | |
| 9360 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9361 | |
| 9362 | return nil |
| 9363 | } |
| 9364 | |
| 9365 | func DecodeBsnTlvTimestamp(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvTimestamp, error) { |
| 9366 | _bsntlvtimestamp := &BsnTlvTimestamp{BsnTlv: parent} |
| 9367 | if decoder.Length() < 8 { |
| 9368 | return nil, fmt.Errorf("BsnTlvTimestamp packet too short: %d < 8", decoder.Length()) |
| 9369 | } |
| 9370 | _bsntlvtimestamp.Value = uint64(decoder.ReadUint64()) |
| 9371 | return _bsntlvtimestamp, nil |
| 9372 | } |
| 9373 | |
| 9374 | func NewBsnTlvTimestamp() *BsnTlvTimestamp { |
| 9375 | obj := &BsnTlvTimestamp{ |
| 9376 | BsnTlv: NewBsnTlv(154), |
| 9377 | } |
| 9378 | return obj |
| 9379 | } |
| 9380 | |
| 9381 | type BsnTlvTtl struct { |
| 9382 | *BsnTlv |
| 9383 | Value uint16 |
| 9384 | } |
| 9385 | |
| 9386 | type IBsnTlvTtl interface { |
| 9387 | IBsnTlv |
| 9388 | GetValue() uint16 |
| 9389 | } |
| 9390 | |
| 9391 | func (self *BsnTlvTtl) GetValue() uint16 { |
| 9392 | return self.Value |
| 9393 | } |
| 9394 | |
| 9395 | func (self *BsnTlvTtl) SetValue(v uint16) { |
| 9396 | self.Value = v |
| 9397 | } |
| 9398 | |
| 9399 | func (self *BsnTlvTtl) Serialize(encoder *goloxi.Encoder) error { |
| 9400 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9401 | return err |
| 9402 | } |
| 9403 | |
| 9404 | encoder.PutUint16(uint16(self.Value)) |
| 9405 | |
| 9406 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9407 | |
| 9408 | return nil |
| 9409 | } |
| 9410 | |
| 9411 | func DecodeBsnTlvTtl(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvTtl, error) { |
| 9412 | _bsntlvttl := &BsnTlvTtl{BsnTlv: parent} |
| 9413 | if decoder.Length() < 2 { |
| 9414 | return nil, fmt.Errorf("BsnTlvTtl packet too short: %d < 2", decoder.Length()) |
| 9415 | } |
| 9416 | _bsntlvttl.Value = uint16(decoder.ReadUint16()) |
| 9417 | return _bsntlvttl, nil |
| 9418 | } |
| 9419 | |
| 9420 | func NewBsnTlvTtl() *BsnTlvTtl { |
| 9421 | obj := &BsnTlvTtl{ |
| 9422 | BsnTlv: NewBsnTlv(113), |
| 9423 | } |
| 9424 | return obj |
| 9425 | } |
| 9426 | |
| 9427 | type BsnTlvTunnelCapability struct { |
| 9428 | *BsnTlv |
| 9429 | Value BsnTunnelType |
| 9430 | } |
| 9431 | |
| 9432 | type IBsnTlvTunnelCapability interface { |
| 9433 | IBsnTlv |
| 9434 | GetValue() BsnTunnelType |
| 9435 | } |
| 9436 | |
| 9437 | func (self *BsnTlvTunnelCapability) GetValue() BsnTunnelType { |
| 9438 | return self.Value |
| 9439 | } |
| 9440 | |
| 9441 | func (self *BsnTlvTunnelCapability) SetValue(v BsnTunnelType) { |
| 9442 | self.Value = v |
| 9443 | } |
| 9444 | |
| 9445 | func (self *BsnTlvTunnelCapability) Serialize(encoder *goloxi.Encoder) error { |
| 9446 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9447 | return err |
| 9448 | } |
| 9449 | |
| 9450 | encoder.PutUint64(uint64(self.Value)) |
| 9451 | |
| 9452 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9453 | |
| 9454 | return nil |
| 9455 | } |
| 9456 | |
| 9457 | func DecodeBsnTlvTunnelCapability(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvTunnelCapability, error) { |
| 9458 | _bsntlvtunnelcapability := &BsnTlvTunnelCapability{BsnTlv: parent} |
| 9459 | if decoder.Length() < 8 { |
| 9460 | return nil, fmt.Errorf("BsnTlvTunnelCapability packet too short: %d < 8", decoder.Length()) |
| 9461 | } |
| 9462 | _bsntlvtunnelcapability.Value = BsnTunnelType(decoder.ReadUint64()) |
| 9463 | return _bsntlvtunnelcapability, nil |
| 9464 | } |
| 9465 | |
| 9466 | func NewBsnTlvTunnelCapability() *BsnTlvTunnelCapability { |
| 9467 | obj := &BsnTlvTunnelCapability{ |
| 9468 | BsnTlv: NewBsnTlv(142), |
| 9469 | } |
| 9470 | return obj |
| 9471 | } |
| 9472 | |
| 9473 | type BsnTlvTxBytes struct { |
| 9474 | *BsnTlv |
| 9475 | Value uint64 |
| 9476 | } |
| 9477 | |
| 9478 | type IBsnTlvTxBytes interface { |
| 9479 | IBsnTlv |
| 9480 | GetValue() uint64 |
| 9481 | } |
| 9482 | |
| 9483 | func (self *BsnTlvTxBytes) GetValue() uint64 { |
| 9484 | return self.Value |
| 9485 | } |
| 9486 | |
| 9487 | func (self *BsnTlvTxBytes) SetValue(v uint64) { |
| 9488 | self.Value = v |
| 9489 | } |
| 9490 | |
| 9491 | func (self *BsnTlvTxBytes) Serialize(encoder *goloxi.Encoder) error { |
| 9492 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9493 | return err |
| 9494 | } |
| 9495 | |
| 9496 | encoder.PutUint64(uint64(self.Value)) |
| 9497 | |
| 9498 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9499 | |
| 9500 | return nil |
| 9501 | } |
| 9502 | |
| 9503 | func DecodeBsnTlvTxBytes(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvTxBytes, error) { |
| 9504 | _bsntlvtxbytes := &BsnTlvTxBytes{BsnTlv: parent} |
| 9505 | if decoder.Length() < 8 { |
| 9506 | return nil, fmt.Errorf("BsnTlvTxBytes packet too short: %d < 8", decoder.Length()) |
| 9507 | } |
| 9508 | _bsntlvtxbytes.Value = uint64(decoder.ReadUint64()) |
| 9509 | return _bsntlvtxbytes, nil |
| 9510 | } |
| 9511 | |
| 9512 | func NewBsnTlvTxBytes() *BsnTlvTxBytes { |
| 9513 | obj := &BsnTlvTxBytes{ |
| 9514 | BsnTlv: NewBsnTlv(39), |
| 9515 | } |
| 9516 | return obj |
| 9517 | } |
| 9518 | |
| 9519 | type BsnTlvTxPackets struct { |
| 9520 | *BsnTlv |
| 9521 | Value uint64 |
| 9522 | } |
| 9523 | |
| 9524 | type IBsnTlvTxPackets interface { |
| 9525 | IBsnTlv |
| 9526 | GetValue() uint64 |
| 9527 | } |
| 9528 | |
| 9529 | func (self *BsnTlvTxPackets) GetValue() uint64 { |
| 9530 | return self.Value |
| 9531 | } |
| 9532 | |
| 9533 | func (self *BsnTlvTxPackets) SetValue(v uint64) { |
| 9534 | self.Value = v |
| 9535 | } |
| 9536 | |
| 9537 | func (self *BsnTlvTxPackets) Serialize(encoder *goloxi.Encoder) error { |
| 9538 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9539 | return err |
| 9540 | } |
| 9541 | |
| 9542 | encoder.PutUint64(uint64(self.Value)) |
| 9543 | |
| 9544 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9545 | |
| 9546 | return nil |
| 9547 | } |
| 9548 | |
| 9549 | func DecodeBsnTlvTxPackets(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvTxPackets, error) { |
| 9550 | _bsntlvtxpackets := &BsnTlvTxPackets{BsnTlv: parent} |
| 9551 | if decoder.Length() < 8 { |
| 9552 | return nil, fmt.Errorf("BsnTlvTxPackets packet too short: %d < 8", decoder.Length()) |
| 9553 | } |
| 9554 | _bsntlvtxpackets.Value = uint64(decoder.ReadUint64()) |
| 9555 | return _bsntlvtxpackets, nil |
| 9556 | } |
| 9557 | |
| 9558 | func NewBsnTlvTxPackets() *BsnTlvTxPackets { |
| 9559 | obj := &BsnTlvTxPackets{ |
| 9560 | BsnTlv: NewBsnTlv(3), |
| 9561 | } |
| 9562 | return obj |
| 9563 | } |
| 9564 | |
| 9565 | type BsnTlvUdfAnchor struct { |
| 9566 | *BsnTlv |
| 9567 | Value BsnUdfAnchor |
| 9568 | } |
| 9569 | |
| 9570 | type IBsnTlvUdfAnchor interface { |
| 9571 | IBsnTlv |
| 9572 | GetValue() BsnUdfAnchor |
| 9573 | } |
| 9574 | |
| 9575 | func (self *BsnTlvUdfAnchor) GetValue() BsnUdfAnchor { |
| 9576 | return self.Value |
| 9577 | } |
| 9578 | |
| 9579 | func (self *BsnTlvUdfAnchor) SetValue(v BsnUdfAnchor) { |
| 9580 | self.Value = v |
| 9581 | } |
| 9582 | |
| 9583 | func (self *BsnTlvUdfAnchor) Serialize(encoder *goloxi.Encoder) error { |
| 9584 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9585 | return err |
| 9586 | } |
| 9587 | |
| 9588 | encoder.PutUint16(uint16(self.Value)) |
| 9589 | |
| 9590 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9591 | |
| 9592 | return nil |
| 9593 | } |
| 9594 | |
| 9595 | func DecodeBsnTlvUdfAnchor(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUdfAnchor, error) { |
| 9596 | _bsntlvudfanchor := &BsnTlvUdfAnchor{BsnTlv: parent} |
| 9597 | if decoder.Length() < 2 { |
| 9598 | return nil, fmt.Errorf("BsnTlvUdfAnchor packet too short: %d < 2", decoder.Length()) |
| 9599 | } |
| 9600 | _bsntlvudfanchor.Value = BsnUdfAnchor(decoder.ReadUint16()) |
| 9601 | return _bsntlvudfanchor, nil |
| 9602 | } |
| 9603 | |
| 9604 | func NewBsnTlvUdfAnchor() *BsnTlvUdfAnchor { |
| 9605 | obj := &BsnTlvUdfAnchor{ |
| 9606 | BsnTlv: NewBsnTlv(16), |
| 9607 | } |
| 9608 | return obj |
| 9609 | } |
| 9610 | |
| 9611 | type BsnTlvUdfCapability struct { |
| 9612 | *BsnTlv |
| 9613 | Value BsnUdfMode |
| 9614 | } |
| 9615 | |
| 9616 | type IBsnTlvUdfCapability interface { |
| 9617 | IBsnTlv |
| 9618 | GetValue() BsnUdfMode |
| 9619 | } |
| 9620 | |
| 9621 | func (self *BsnTlvUdfCapability) GetValue() BsnUdfMode { |
| 9622 | return self.Value |
| 9623 | } |
| 9624 | |
| 9625 | func (self *BsnTlvUdfCapability) SetValue(v BsnUdfMode) { |
| 9626 | self.Value = v |
| 9627 | } |
| 9628 | |
| 9629 | func (self *BsnTlvUdfCapability) Serialize(encoder *goloxi.Encoder) error { |
| 9630 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9631 | return err |
| 9632 | } |
| 9633 | |
| 9634 | encoder.PutUint8(uint8(self.Value)) |
| 9635 | |
| 9636 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9637 | |
| 9638 | return nil |
| 9639 | } |
| 9640 | |
| 9641 | func DecodeBsnTlvUdfCapability(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUdfCapability, error) { |
| 9642 | _bsntlvudfcapability := &BsnTlvUdfCapability{BsnTlv: parent} |
| 9643 | if decoder.Length() < 1 { |
| 9644 | return nil, fmt.Errorf("BsnTlvUdfCapability packet too short: %d < 1", decoder.Length()) |
| 9645 | } |
| 9646 | _bsntlvudfcapability.Value = BsnUdfMode(decoder.ReadByte()) |
| 9647 | return _bsntlvudfcapability, nil |
| 9648 | } |
| 9649 | |
| 9650 | func NewBsnTlvUdfCapability() *BsnTlvUdfCapability { |
| 9651 | obj := &BsnTlvUdfCapability{ |
| 9652 | BsnTlv: NewBsnTlv(180), |
| 9653 | } |
| 9654 | return obj |
| 9655 | } |
| 9656 | |
| 9657 | type BsnTlvUdfId struct { |
| 9658 | *BsnTlv |
| 9659 | Value uint16 |
| 9660 | } |
| 9661 | |
| 9662 | type IBsnTlvUdfId interface { |
| 9663 | IBsnTlv |
| 9664 | GetValue() uint16 |
| 9665 | } |
| 9666 | |
| 9667 | func (self *BsnTlvUdfId) GetValue() uint16 { |
| 9668 | return self.Value |
| 9669 | } |
| 9670 | |
| 9671 | func (self *BsnTlvUdfId) SetValue(v uint16) { |
| 9672 | self.Value = v |
| 9673 | } |
| 9674 | |
| 9675 | func (self *BsnTlvUdfId) Serialize(encoder *goloxi.Encoder) error { |
| 9676 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9677 | return err |
| 9678 | } |
| 9679 | |
| 9680 | encoder.PutUint16(uint16(self.Value)) |
| 9681 | |
| 9682 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9683 | |
| 9684 | return nil |
| 9685 | } |
| 9686 | |
| 9687 | func DecodeBsnTlvUdfId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUdfId, error) { |
| 9688 | _bsntlvudfid := &BsnTlvUdfId{BsnTlv: parent} |
| 9689 | if decoder.Length() < 2 { |
| 9690 | return nil, fmt.Errorf("BsnTlvUdfId packet too short: %d < 2", decoder.Length()) |
| 9691 | } |
| 9692 | _bsntlvudfid.Value = uint16(decoder.ReadUint16()) |
| 9693 | return _bsntlvudfid, nil |
| 9694 | } |
| 9695 | |
| 9696 | func NewBsnTlvUdfId() *BsnTlvUdfId { |
| 9697 | obj := &BsnTlvUdfId{ |
| 9698 | BsnTlv: NewBsnTlv(15), |
| 9699 | } |
| 9700 | return obj |
| 9701 | } |
| 9702 | |
| 9703 | type BsnTlvUdfLength struct { |
| 9704 | *BsnTlv |
| 9705 | Value uint16 |
| 9706 | } |
| 9707 | |
| 9708 | type IBsnTlvUdfLength interface { |
| 9709 | IBsnTlv |
| 9710 | GetValue() uint16 |
| 9711 | } |
| 9712 | |
| 9713 | func (self *BsnTlvUdfLength) GetValue() uint16 { |
| 9714 | return self.Value |
| 9715 | } |
| 9716 | |
| 9717 | func (self *BsnTlvUdfLength) SetValue(v uint16) { |
| 9718 | self.Value = v |
| 9719 | } |
| 9720 | |
| 9721 | func (self *BsnTlvUdfLength) Serialize(encoder *goloxi.Encoder) error { |
| 9722 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9723 | return err |
| 9724 | } |
| 9725 | |
| 9726 | encoder.PutUint16(uint16(self.Value)) |
| 9727 | |
| 9728 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9729 | |
| 9730 | return nil |
| 9731 | } |
| 9732 | |
| 9733 | func DecodeBsnTlvUdfLength(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUdfLength, error) { |
| 9734 | _bsntlvudflength := &BsnTlvUdfLength{BsnTlv: parent} |
| 9735 | if decoder.Length() < 2 { |
| 9736 | return nil, fmt.Errorf("BsnTlvUdfLength packet too short: %d < 2", decoder.Length()) |
| 9737 | } |
| 9738 | _bsntlvudflength.Value = uint16(decoder.ReadUint16()) |
| 9739 | return _bsntlvudflength, nil |
| 9740 | } |
| 9741 | |
| 9742 | func NewBsnTlvUdfLength() *BsnTlvUdfLength { |
| 9743 | obj := &BsnTlvUdfLength{ |
| 9744 | BsnTlv: NewBsnTlv(18), |
| 9745 | } |
| 9746 | return obj |
| 9747 | } |
| 9748 | |
| 9749 | type BsnTlvUdfOffset struct { |
| 9750 | *BsnTlv |
| 9751 | Value uint16 |
| 9752 | } |
| 9753 | |
| 9754 | type IBsnTlvUdfOffset interface { |
| 9755 | IBsnTlv |
| 9756 | GetValue() uint16 |
| 9757 | } |
| 9758 | |
| 9759 | func (self *BsnTlvUdfOffset) GetValue() uint16 { |
| 9760 | return self.Value |
| 9761 | } |
| 9762 | |
| 9763 | func (self *BsnTlvUdfOffset) SetValue(v uint16) { |
| 9764 | self.Value = v |
| 9765 | } |
| 9766 | |
| 9767 | func (self *BsnTlvUdfOffset) Serialize(encoder *goloxi.Encoder) error { |
| 9768 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9769 | return err |
| 9770 | } |
| 9771 | |
| 9772 | encoder.PutUint16(uint16(self.Value)) |
| 9773 | |
| 9774 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9775 | |
| 9776 | return nil |
| 9777 | } |
| 9778 | |
| 9779 | func DecodeBsnTlvUdfOffset(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUdfOffset, error) { |
| 9780 | _bsntlvudfoffset := &BsnTlvUdfOffset{BsnTlv: parent} |
| 9781 | if decoder.Length() < 2 { |
| 9782 | return nil, fmt.Errorf("BsnTlvUdfOffset packet too short: %d < 2", decoder.Length()) |
| 9783 | } |
| 9784 | _bsntlvudfoffset.Value = uint16(decoder.ReadUint16()) |
| 9785 | return _bsntlvudfoffset, nil |
| 9786 | } |
| 9787 | |
| 9788 | func NewBsnTlvUdfOffset() *BsnTlvUdfOffset { |
| 9789 | obj := &BsnTlvUdfOffset{ |
| 9790 | BsnTlv: NewBsnTlv(17), |
| 9791 | } |
| 9792 | return obj |
| 9793 | } |
| 9794 | |
| 9795 | type BsnTlvUdpDst struct { |
| 9796 | *BsnTlv |
| 9797 | Value uint16 |
| 9798 | } |
| 9799 | |
| 9800 | type IBsnTlvUdpDst interface { |
| 9801 | IBsnTlv |
| 9802 | GetValue() uint16 |
| 9803 | } |
| 9804 | |
| 9805 | func (self *BsnTlvUdpDst) GetValue() uint16 { |
| 9806 | return self.Value |
| 9807 | } |
| 9808 | |
| 9809 | func (self *BsnTlvUdpDst) SetValue(v uint16) { |
| 9810 | self.Value = v |
| 9811 | } |
| 9812 | |
| 9813 | func (self *BsnTlvUdpDst) Serialize(encoder *goloxi.Encoder) error { |
| 9814 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9815 | return err |
| 9816 | } |
| 9817 | |
| 9818 | encoder.PutUint16(uint16(self.Value)) |
| 9819 | |
| 9820 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9821 | |
| 9822 | return nil |
| 9823 | } |
| 9824 | |
| 9825 | func DecodeBsnTlvUdpDst(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUdpDst, error) { |
| 9826 | _bsntlvudpdst := &BsnTlvUdpDst{BsnTlv: parent} |
| 9827 | if decoder.Length() < 2 { |
| 9828 | return nil, fmt.Errorf("BsnTlvUdpDst packet too short: %d < 2", decoder.Length()) |
| 9829 | } |
| 9830 | _bsntlvudpdst.Value = uint16(decoder.ReadUint16()) |
| 9831 | return _bsntlvudpdst, nil |
| 9832 | } |
| 9833 | |
| 9834 | func NewBsnTlvUdpDst() *BsnTlvUdpDst { |
| 9835 | obj := &BsnTlvUdpDst{ |
| 9836 | BsnTlv: NewBsnTlv(37), |
| 9837 | } |
| 9838 | return obj |
| 9839 | } |
| 9840 | |
| 9841 | type BsnTlvUdpSrc struct { |
| 9842 | *BsnTlv |
| 9843 | Value uint16 |
| 9844 | } |
| 9845 | |
| 9846 | type IBsnTlvUdpSrc interface { |
| 9847 | IBsnTlv |
| 9848 | GetValue() uint16 |
| 9849 | } |
| 9850 | |
| 9851 | func (self *BsnTlvUdpSrc) GetValue() uint16 { |
| 9852 | return self.Value |
| 9853 | } |
| 9854 | |
| 9855 | func (self *BsnTlvUdpSrc) SetValue(v uint16) { |
| 9856 | self.Value = v |
| 9857 | } |
| 9858 | |
| 9859 | func (self *BsnTlvUdpSrc) Serialize(encoder *goloxi.Encoder) error { |
| 9860 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9861 | return err |
| 9862 | } |
| 9863 | |
| 9864 | encoder.PutUint16(uint16(self.Value)) |
| 9865 | |
| 9866 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9867 | |
| 9868 | return nil |
| 9869 | } |
| 9870 | |
| 9871 | func DecodeBsnTlvUdpSrc(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUdpSrc, error) { |
| 9872 | _bsntlvudpsrc := &BsnTlvUdpSrc{BsnTlv: parent} |
| 9873 | if decoder.Length() < 2 { |
| 9874 | return nil, fmt.Errorf("BsnTlvUdpSrc packet too short: %d < 2", decoder.Length()) |
| 9875 | } |
| 9876 | _bsntlvudpsrc.Value = uint16(decoder.ReadUint16()) |
| 9877 | return _bsntlvudpsrc, nil |
| 9878 | } |
| 9879 | |
| 9880 | func NewBsnTlvUdpSrc() *BsnTlvUdpSrc { |
| 9881 | obj := &BsnTlvUdpSrc{ |
| 9882 | BsnTlv: NewBsnTlv(36), |
| 9883 | } |
| 9884 | return obj |
| 9885 | } |
| 9886 | |
| 9887 | type BsnTlvUint32 struct { |
| 9888 | *BsnTlv |
| 9889 | Value uint32 |
| 9890 | } |
| 9891 | |
| 9892 | type IBsnTlvUint32 interface { |
| 9893 | IBsnTlv |
| 9894 | GetValue() uint32 |
| 9895 | } |
| 9896 | |
| 9897 | func (self *BsnTlvUint32) GetValue() uint32 { |
| 9898 | return self.Value |
| 9899 | } |
| 9900 | |
| 9901 | func (self *BsnTlvUint32) SetValue(v uint32) { |
| 9902 | self.Value = v |
| 9903 | } |
| 9904 | |
| 9905 | func (self *BsnTlvUint32) Serialize(encoder *goloxi.Encoder) error { |
| 9906 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9907 | return err |
| 9908 | } |
| 9909 | |
| 9910 | encoder.PutUint32(uint32(self.Value)) |
| 9911 | |
| 9912 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9913 | |
| 9914 | return nil |
| 9915 | } |
| 9916 | |
| 9917 | func DecodeBsnTlvUint32(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUint32, error) { |
| 9918 | _bsntlvuint32 := &BsnTlvUint32{BsnTlv: parent} |
| 9919 | if decoder.Length() < 4 { |
| 9920 | return nil, fmt.Errorf("BsnTlvUint32 packet too short: %d < 4", decoder.Length()) |
| 9921 | } |
| 9922 | _bsntlvuint32.Value = uint32(decoder.ReadUint32()) |
| 9923 | return _bsntlvuint32, nil |
| 9924 | } |
| 9925 | |
| 9926 | func NewBsnTlvUint32() *BsnTlvUint32 { |
| 9927 | obj := &BsnTlvUint32{ |
| 9928 | BsnTlv: NewBsnTlv(167), |
| 9929 | } |
| 9930 | return obj |
| 9931 | } |
| 9932 | |
| 9933 | type BsnTlvUint64List struct { |
| 9934 | *BsnTlv |
| 9935 | Value []*Uint64 |
| 9936 | } |
| 9937 | |
| 9938 | type IBsnTlvUint64List interface { |
| 9939 | IBsnTlv |
| 9940 | GetValue() []*Uint64 |
| 9941 | } |
| 9942 | |
| 9943 | func (self *BsnTlvUint64List) GetValue() []*Uint64 { |
| 9944 | return self.Value |
| 9945 | } |
| 9946 | |
| 9947 | func (self *BsnTlvUint64List) SetValue(v []*Uint64) { |
| 9948 | self.Value = v |
| 9949 | } |
| 9950 | |
| 9951 | func (self *BsnTlvUint64List) Serialize(encoder *goloxi.Encoder) error { |
| 9952 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 9953 | return err |
| 9954 | } |
| 9955 | |
| 9956 | for _, obj := range self.Value { |
| 9957 | if err := obj.Serialize(encoder); err != nil { |
| 9958 | return err |
| 9959 | } |
| 9960 | } |
| 9961 | |
| 9962 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 9963 | |
| 9964 | return nil |
| 9965 | } |
| 9966 | |
| 9967 | func DecodeBsnTlvUint64List(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUint64List, error) { |
| 9968 | _bsntlvuint64list := &BsnTlvUint64List{BsnTlv: parent} |
| 9969 | |
| 9970 | for decoder.Length() >= 8 { |
| 9971 | item, err := DecodeUint64(decoder) |
| 9972 | if err != nil { |
| 9973 | return nil, err |
| 9974 | } |
| 9975 | if item != nil { |
| 9976 | _bsntlvuint64list.Value = append(_bsntlvuint64list.Value, item) |
| 9977 | } |
| 9978 | } |
| 9979 | return _bsntlvuint64list, nil |
| 9980 | } |
| 9981 | |
| 9982 | func NewBsnTlvUint64List() *BsnTlvUint64List { |
| 9983 | obj := &BsnTlvUint64List{ |
| 9984 | BsnTlv: NewBsnTlv(119), |
| 9985 | } |
| 9986 | return obj |
| 9987 | } |
| 9988 | |
| 9989 | type BsnTlvUnicastQueryTimeout struct { |
| 9990 | *BsnTlv |
| 9991 | Value uint32 |
| 9992 | } |
| 9993 | |
| 9994 | type IBsnTlvUnicastQueryTimeout interface { |
| 9995 | IBsnTlv |
| 9996 | GetValue() uint32 |
| 9997 | } |
| 9998 | |
| 9999 | func (self *BsnTlvUnicastQueryTimeout) GetValue() uint32 { |
| 10000 | return self.Value |
| 10001 | } |
| 10002 | |
| 10003 | func (self *BsnTlvUnicastQueryTimeout) SetValue(v uint32) { |
| 10004 | self.Value = v |
| 10005 | } |
| 10006 | |
| 10007 | func (self *BsnTlvUnicastQueryTimeout) Serialize(encoder *goloxi.Encoder) error { |
| 10008 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10009 | return err |
| 10010 | } |
| 10011 | |
| 10012 | encoder.PutUint32(uint32(self.Value)) |
| 10013 | |
| 10014 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10015 | |
| 10016 | return nil |
| 10017 | } |
| 10018 | |
| 10019 | func DecodeBsnTlvUnicastQueryTimeout(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUnicastQueryTimeout, error) { |
| 10020 | _bsntlvunicastquerytimeout := &BsnTlvUnicastQueryTimeout{BsnTlv: parent} |
| 10021 | if decoder.Length() < 4 { |
| 10022 | return nil, fmt.Errorf("BsnTlvUnicastQueryTimeout packet too short: %d < 4", decoder.Length()) |
| 10023 | } |
| 10024 | _bsntlvunicastquerytimeout.Value = uint32(decoder.ReadUint32()) |
| 10025 | return _bsntlvunicastquerytimeout, nil |
| 10026 | } |
| 10027 | |
| 10028 | func NewBsnTlvUnicastQueryTimeout() *BsnTlvUnicastQueryTimeout { |
| 10029 | obj := &BsnTlvUnicastQueryTimeout{ |
| 10030 | BsnTlv: NewBsnTlv(9), |
| 10031 | } |
| 10032 | return obj |
| 10033 | } |
| 10034 | |
| 10035 | type BsnTlvUnicastRate struct { |
| 10036 | *BsnTlv |
| 10037 | Value uint32 |
| 10038 | } |
| 10039 | |
| 10040 | type IBsnTlvUnicastRate interface { |
| 10041 | IBsnTlv |
| 10042 | GetValue() uint32 |
| 10043 | } |
| 10044 | |
| 10045 | func (self *BsnTlvUnicastRate) GetValue() uint32 { |
| 10046 | return self.Value |
| 10047 | } |
| 10048 | |
| 10049 | func (self *BsnTlvUnicastRate) SetValue(v uint32) { |
| 10050 | self.Value = v |
| 10051 | } |
| 10052 | |
| 10053 | func (self *BsnTlvUnicastRate) Serialize(encoder *goloxi.Encoder) error { |
| 10054 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10055 | return err |
| 10056 | } |
| 10057 | |
| 10058 | encoder.PutUint32(uint32(self.Value)) |
| 10059 | |
| 10060 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10061 | |
| 10062 | return nil |
| 10063 | } |
| 10064 | |
| 10065 | func DecodeBsnTlvUnicastRate(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUnicastRate, error) { |
| 10066 | _bsntlvunicastrate := &BsnTlvUnicastRate{BsnTlv: parent} |
| 10067 | if decoder.Length() < 4 { |
| 10068 | return nil, fmt.Errorf("BsnTlvUnicastRate packet too short: %d < 4", decoder.Length()) |
| 10069 | } |
| 10070 | _bsntlvunicastrate.Value = uint32(decoder.ReadUint32()) |
| 10071 | return _bsntlvunicastrate, nil |
| 10072 | } |
| 10073 | |
| 10074 | func NewBsnTlvUnicastRate() *BsnTlvUnicastRate { |
| 10075 | obj := &BsnTlvUnicastRate{ |
| 10076 | BsnTlv: NewBsnTlv(93), |
| 10077 | } |
| 10078 | return obj |
| 10079 | } |
| 10080 | |
| 10081 | type BsnTlvUnknownMulticastRate struct { |
| 10082 | *BsnTlv |
| 10083 | Value uint32 |
| 10084 | } |
| 10085 | |
| 10086 | type IBsnTlvUnknownMulticastRate interface { |
| 10087 | IBsnTlv |
| 10088 | GetValue() uint32 |
| 10089 | } |
| 10090 | |
| 10091 | func (self *BsnTlvUnknownMulticastRate) GetValue() uint32 { |
| 10092 | return self.Value |
| 10093 | } |
| 10094 | |
| 10095 | func (self *BsnTlvUnknownMulticastRate) SetValue(v uint32) { |
| 10096 | self.Value = v |
| 10097 | } |
| 10098 | |
| 10099 | func (self *BsnTlvUnknownMulticastRate) Serialize(encoder *goloxi.Encoder) error { |
| 10100 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10101 | return err |
| 10102 | } |
| 10103 | |
| 10104 | encoder.PutUint32(uint32(self.Value)) |
| 10105 | |
| 10106 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10107 | |
| 10108 | return nil |
| 10109 | } |
| 10110 | |
| 10111 | func DecodeBsnTlvUnknownMulticastRate(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUnknownMulticastRate, error) { |
| 10112 | _bsntlvunknownmulticastrate := &BsnTlvUnknownMulticastRate{BsnTlv: parent} |
| 10113 | if decoder.Length() < 4 { |
| 10114 | return nil, fmt.Errorf("BsnTlvUnknownMulticastRate packet too short: %d < 4", decoder.Length()) |
| 10115 | } |
| 10116 | _bsntlvunknownmulticastrate.Value = uint32(decoder.ReadUint32()) |
| 10117 | return _bsntlvunknownmulticastrate, nil |
| 10118 | } |
| 10119 | |
| 10120 | func NewBsnTlvUnknownMulticastRate() *BsnTlvUnknownMulticastRate { |
| 10121 | obj := &BsnTlvUnknownMulticastRate{ |
| 10122 | BsnTlv: NewBsnTlv(92), |
| 10123 | } |
| 10124 | return obj |
| 10125 | } |
| 10126 | |
| 10127 | type BsnTlvUntagged struct { |
| 10128 | *BsnTlv |
| 10129 | } |
| 10130 | |
| 10131 | type IBsnTlvUntagged interface { |
| 10132 | IBsnTlv |
| 10133 | } |
| 10134 | |
| 10135 | func (self *BsnTlvUntagged) Serialize(encoder *goloxi.Encoder) error { |
| 10136 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10137 | return err |
| 10138 | } |
| 10139 | |
| 10140 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10141 | |
| 10142 | return nil |
| 10143 | } |
| 10144 | |
| 10145 | func DecodeBsnTlvUntagged(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUntagged, error) { |
| 10146 | _bsntlvuntagged := &BsnTlvUntagged{BsnTlv: parent} |
| 10147 | return _bsntlvuntagged, nil |
| 10148 | } |
| 10149 | |
| 10150 | func NewBsnTlvUntagged() *BsnTlvUntagged { |
| 10151 | obj := &BsnTlvUntagged{ |
| 10152 | BsnTlv: NewBsnTlv(106), |
| 10153 | } |
| 10154 | return obj |
| 10155 | } |
| 10156 | |
| 10157 | type BsnTlvUpgrade struct { |
| 10158 | *BsnTlv |
| 10159 | Value BsnUpgrade |
| 10160 | } |
| 10161 | |
| 10162 | type IBsnTlvUpgrade interface { |
| 10163 | IBsnTlv |
| 10164 | GetValue() BsnUpgrade |
| 10165 | } |
| 10166 | |
| 10167 | func (self *BsnTlvUpgrade) GetValue() BsnUpgrade { |
| 10168 | return self.Value |
| 10169 | } |
| 10170 | |
| 10171 | func (self *BsnTlvUpgrade) SetValue(v BsnUpgrade) { |
| 10172 | self.Value = v |
| 10173 | } |
| 10174 | |
| 10175 | func (self *BsnTlvUpgrade) Serialize(encoder *goloxi.Encoder) error { |
| 10176 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10177 | return err |
| 10178 | } |
| 10179 | |
| 10180 | encoder.PutUint16(uint16(self.Value)) |
| 10181 | |
| 10182 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10183 | |
| 10184 | return nil |
| 10185 | } |
| 10186 | |
| 10187 | func DecodeBsnTlvUpgrade(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUpgrade, error) { |
| 10188 | _bsntlvupgrade := &BsnTlvUpgrade{BsnTlv: parent} |
| 10189 | if decoder.Length() < 2 { |
| 10190 | return nil, fmt.Errorf("BsnTlvUpgrade packet too short: %d < 2", decoder.Length()) |
| 10191 | } |
| 10192 | _bsntlvupgrade.Value = BsnUpgrade(decoder.ReadUint16()) |
| 10193 | return _bsntlvupgrade, nil |
| 10194 | } |
| 10195 | |
| 10196 | func NewBsnTlvUpgrade() *BsnTlvUpgrade { |
| 10197 | obj := &BsnTlvUpgrade{ |
| 10198 | BsnTlv: NewBsnTlv(164), |
| 10199 | } |
| 10200 | return obj |
| 10201 | } |
| 10202 | |
| 10203 | type BsnTlvUriScheme struct { |
| 10204 | *BsnTlv |
| 10205 | Value []byte |
| 10206 | } |
| 10207 | |
| 10208 | type IBsnTlvUriScheme interface { |
| 10209 | IBsnTlv |
| 10210 | GetValue() []byte |
| 10211 | } |
| 10212 | |
| 10213 | func (self *BsnTlvUriScheme) GetValue() []byte { |
| 10214 | return self.Value |
| 10215 | } |
| 10216 | |
| 10217 | func (self *BsnTlvUriScheme) SetValue(v []byte) { |
| 10218 | self.Value = v |
| 10219 | } |
| 10220 | |
| 10221 | func (self *BsnTlvUriScheme) Serialize(encoder *goloxi.Encoder) error { |
| 10222 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10223 | return err |
| 10224 | } |
| 10225 | |
| 10226 | encoder.Write(self.Value) |
| 10227 | |
| 10228 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10229 | |
| 10230 | return nil |
| 10231 | } |
| 10232 | |
| 10233 | func DecodeBsnTlvUriScheme(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUriScheme, error) { |
| 10234 | _bsntlvurischeme := &BsnTlvUriScheme{BsnTlv: parent} |
| 10235 | _bsntlvurischeme.Value = decoder.Read(int(decoder.Length())) |
| 10236 | return _bsntlvurischeme, nil |
| 10237 | } |
| 10238 | |
| 10239 | func NewBsnTlvUriScheme() *BsnTlvUriScheme { |
| 10240 | obj := &BsnTlvUriScheme{ |
| 10241 | BsnTlv: NewBsnTlv(153), |
| 10242 | } |
| 10243 | return obj |
| 10244 | } |
| 10245 | |
| 10246 | type BsnTlvUsePacketState struct { |
| 10247 | *BsnTlv |
| 10248 | Value uint8 |
| 10249 | } |
| 10250 | |
| 10251 | type IBsnTlvUsePacketState interface { |
| 10252 | IBsnTlv |
| 10253 | GetValue() uint8 |
| 10254 | } |
| 10255 | |
| 10256 | func (self *BsnTlvUsePacketState) GetValue() uint8 { |
| 10257 | return self.Value |
| 10258 | } |
| 10259 | |
| 10260 | func (self *BsnTlvUsePacketState) SetValue(v uint8) { |
| 10261 | self.Value = v |
| 10262 | } |
| 10263 | |
| 10264 | func (self *BsnTlvUsePacketState) Serialize(encoder *goloxi.Encoder) error { |
| 10265 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10266 | return err |
| 10267 | } |
| 10268 | |
| 10269 | encoder.PutUint8(uint8(self.Value)) |
| 10270 | |
| 10271 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10272 | |
| 10273 | return nil |
| 10274 | } |
| 10275 | |
| 10276 | func DecodeBsnTlvUsePacketState(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUsePacketState, error) { |
| 10277 | _bsntlvusepacketstate := &BsnTlvUsePacketState{BsnTlv: parent} |
| 10278 | if decoder.Length() < 1 { |
| 10279 | return nil, fmt.Errorf("BsnTlvUsePacketState packet too short: %d < 1", decoder.Length()) |
| 10280 | } |
| 10281 | _bsntlvusepacketstate.Value = uint8(decoder.ReadByte()) |
| 10282 | return _bsntlvusepacketstate, nil |
| 10283 | } |
| 10284 | |
| 10285 | func NewBsnTlvUsePacketState() *BsnTlvUsePacketState { |
| 10286 | obj := &BsnTlvUsePacketState{ |
| 10287 | BsnTlv: NewBsnTlv(96), |
| 10288 | } |
| 10289 | return obj |
| 10290 | } |
| 10291 | |
| 10292 | type BsnTlvUserConfigured struct { |
| 10293 | *BsnTlv |
| 10294 | } |
| 10295 | |
| 10296 | type IBsnTlvUserConfigured interface { |
| 10297 | IBsnTlv |
| 10298 | } |
| 10299 | |
| 10300 | func (self *BsnTlvUserConfigured) Serialize(encoder *goloxi.Encoder) error { |
| 10301 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10302 | return err |
| 10303 | } |
| 10304 | |
| 10305 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10306 | |
| 10307 | return nil |
| 10308 | } |
| 10309 | |
| 10310 | func DecodeBsnTlvUserConfigured(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvUserConfigured, error) { |
| 10311 | _bsntlvuserconfigured := &BsnTlvUserConfigured{BsnTlv: parent} |
| 10312 | return _bsntlvuserconfigured, nil |
| 10313 | } |
| 10314 | |
| 10315 | func NewBsnTlvUserConfigured() *BsnTlvUserConfigured { |
| 10316 | obj := &BsnTlvUserConfigured{ |
| 10317 | BsnTlv: NewBsnTlv(166), |
| 10318 | } |
| 10319 | return obj |
| 10320 | } |
| 10321 | |
| 10322 | type BsnTlvVfi struct { |
| 10323 | *BsnTlv |
| 10324 | Value uint16 |
| 10325 | } |
| 10326 | |
| 10327 | type IBsnTlvVfi interface { |
| 10328 | IBsnTlv |
| 10329 | GetValue() uint16 |
| 10330 | } |
| 10331 | |
| 10332 | func (self *BsnTlvVfi) GetValue() uint16 { |
| 10333 | return self.Value |
| 10334 | } |
| 10335 | |
| 10336 | func (self *BsnTlvVfi) SetValue(v uint16) { |
| 10337 | self.Value = v |
| 10338 | } |
| 10339 | |
| 10340 | func (self *BsnTlvVfi) Serialize(encoder *goloxi.Encoder) error { |
| 10341 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10342 | return err |
| 10343 | } |
| 10344 | |
| 10345 | encoder.PutUint16(uint16(self.Value)) |
| 10346 | |
| 10347 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10348 | |
| 10349 | return nil |
| 10350 | } |
| 10351 | |
| 10352 | func DecodeBsnTlvVfi(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvVfi, error) { |
| 10353 | _bsntlvvfi := &BsnTlvVfi{BsnTlv: parent} |
| 10354 | if decoder.Length() < 2 { |
| 10355 | return nil, fmt.Errorf("BsnTlvVfi packet too short: %d < 2", decoder.Length()) |
| 10356 | } |
| 10357 | _bsntlvvfi.Value = uint16(decoder.ReadUint16()) |
| 10358 | return _bsntlvvfi, nil |
| 10359 | } |
| 10360 | |
| 10361 | func NewBsnTlvVfi() *BsnTlvVfi { |
| 10362 | obj := &BsnTlvVfi{ |
| 10363 | BsnTlv: NewBsnTlv(99), |
| 10364 | } |
| 10365 | return obj |
| 10366 | } |
| 10367 | |
| 10368 | type BsnTlvVfpClassId struct { |
| 10369 | *BsnTlv |
| 10370 | Value uint32 |
| 10371 | } |
| 10372 | |
| 10373 | type IBsnTlvVfpClassId interface { |
| 10374 | IBsnTlv |
| 10375 | GetValue() uint32 |
| 10376 | } |
| 10377 | |
| 10378 | func (self *BsnTlvVfpClassId) GetValue() uint32 { |
| 10379 | return self.Value |
| 10380 | } |
| 10381 | |
| 10382 | func (self *BsnTlvVfpClassId) SetValue(v uint32) { |
| 10383 | self.Value = v |
| 10384 | } |
| 10385 | |
| 10386 | func (self *BsnTlvVfpClassId) Serialize(encoder *goloxi.Encoder) error { |
| 10387 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10388 | return err |
| 10389 | } |
| 10390 | |
| 10391 | encoder.PutUint32(uint32(self.Value)) |
| 10392 | |
| 10393 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10394 | |
| 10395 | return nil |
| 10396 | } |
| 10397 | |
| 10398 | func DecodeBsnTlvVfpClassId(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvVfpClassId, error) { |
| 10399 | _bsntlvvfpclassid := &BsnTlvVfpClassId{BsnTlv: parent} |
| 10400 | if decoder.Length() < 4 { |
| 10401 | return nil, fmt.Errorf("BsnTlvVfpClassId packet too short: %d < 4", decoder.Length()) |
| 10402 | } |
| 10403 | _bsntlvvfpclassid.Value = uint32(decoder.ReadUint32()) |
| 10404 | return _bsntlvvfpclassid, nil |
| 10405 | } |
| 10406 | |
| 10407 | func NewBsnTlvVfpClassId() *BsnTlvVfpClassId { |
| 10408 | obj := &BsnTlvVfpClassId{ |
| 10409 | BsnTlv: NewBsnTlv(107), |
| 10410 | } |
| 10411 | return obj |
| 10412 | } |
| 10413 | |
| 10414 | type BsnTlvVirtual struct { |
| 10415 | *BsnTlv |
| 10416 | } |
| 10417 | |
| 10418 | type IBsnTlvVirtual interface { |
| 10419 | IBsnTlv |
| 10420 | } |
| 10421 | |
| 10422 | func (self *BsnTlvVirtual) Serialize(encoder *goloxi.Encoder) error { |
| 10423 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10424 | return err |
| 10425 | } |
| 10426 | |
| 10427 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10428 | |
| 10429 | return nil |
| 10430 | } |
| 10431 | |
| 10432 | func DecodeBsnTlvVirtual(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvVirtual, error) { |
| 10433 | _bsntlvvirtual := &BsnTlvVirtual{BsnTlv: parent} |
| 10434 | return _bsntlvvirtual, nil |
| 10435 | } |
| 10436 | |
| 10437 | func NewBsnTlvVirtual() *BsnTlvVirtual { |
| 10438 | obj := &BsnTlvVirtual{ |
| 10439 | BsnTlv: NewBsnTlv(158), |
| 10440 | } |
| 10441 | return obj |
| 10442 | } |
| 10443 | |
| 10444 | type BsnTlvVlanMacList struct { |
| 10445 | *BsnTlv |
| 10446 | Key []*BsnVlanMac |
| 10447 | } |
| 10448 | |
| 10449 | type IBsnTlvVlanMacList interface { |
| 10450 | IBsnTlv |
| 10451 | GetKey() []*BsnVlanMac |
| 10452 | } |
| 10453 | |
| 10454 | func (self *BsnTlvVlanMacList) GetKey() []*BsnVlanMac { |
| 10455 | return self.Key |
| 10456 | } |
| 10457 | |
| 10458 | func (self *BsnTlvVlanMacList) SetKey(v []*BsnVlanMac) { |
| 10459 | self.Key = v |
| 10460 | } |
| 10461 | |
| 10462 | func (self *BsnTlvVlanMacList) Serialize(encoder *goloxi.Encoder) error { |
| 10463 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10464 | return err |
| 10465 | } |
| 10466 | |
| 10467 | for _, obj := range self.Key { |
| 10468 | if err := obj.Serialize(encoder); err != nil { |
| 10469 | return err |
| 10470 | } |
| 10471 | } |
| 10472 | |
| 10473 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10474 | |
| 10475 | return nil |
| 10476 | } |
| 10477 | |
| 10478 | func DecodeBsnTlvVlanMacList(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvVlanMacList, error) { |
| 10479 | _bsntlvvlanmaclist := &BsnTlvVlanMacList{BsnTlv: parent} |
| 10480 | |
| 10481 | for decoder.Length() >= 8 { |
| 10482 | item, err := DecodeBsnVlanMac(decoder) |
| 10483 | if err != nil { |
| 10484 | return nil, err |
| 10485 | } |
| 10486 | if item != nil { |
| 10487 | _bsntlvvlanmaclist.Key = append(_bsntlvvlanmaclist.Key, item) |
| 10488 | } |
| 10489 | } |
| 10490 | return _bsntlvvlanmaclist, nil |
| 10491 | } |
| 10492 | |
| 10493 | func NewBsnTlvVlanMacList() *BsnTlvVlanMacList { |
| 10494 | obj := &BsnTlvVlanMacList{ |
| 10495 | BsnTlv: NewBsnTlv(98), |
| 10496 | } |
| 10497 | return obj |
| 10498 | } |
| 10499 | |
| 10500 | type BsnTlvVlanPcp struct { |
| 10501 | *BsnTlv |
| 10502 | Value uint8 |
| 10503 | } |
| 10504 | |
| 10505 | type IBsnTlvVlanPcp interface { |
| 10506 | IBsnTlv |
| 10507 | GetValue() uint8 |
| 10508 | } |
| 10509 | |
| 10510 | func (self *BsnTlvVlanPcp) GetValue() uint8 { |
| 10511 | return self.Value |
| 10512 | } |
| 10513 | |
| 10514 | func (self *BsnTlvVlanPcp) SetValue(v uint8) { |
| 10515 | self.Value = v |
| 10516 | } |
| 10517 | |
| 10518 | func (self *BsnTlvVlanPcp) Serialize(encoder *goloxi.Encoder) error { |
| 10519 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10520 | return err |
| 10521 | } |
| 10522 | |
| 10523 | encoder.PutUint8(uint8(self.Value)) |
| 10524 | |
| 10525 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10526 | |
| 10527 | return nil |
| 10528 | } |
| 10529 | |
| 10530 | func DecodeBsnTlvVlanPcp(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvVlanPcp, error) { |
| 10531 | _bsntlvvlanpcp := &BsnTlvVlanPcp{BsnTlv: parent} |
| 10532 | if decoder.Length() < 1 { |
| 10533 | return nil, fmt.Errorf("BsnTlvVlanPcp packet too short: %d < 1", decoder.Length()) |
| 10534 | } |
| 10535 | _bsntlvvlanpcp.Value = uint8(decoder.ReadByte()) |
| 10536 | return _bsntlvvlanpcp, nil |
| 10537 | } |
| 10538 | |
| 10539 | func NewBsnTlvVlanPcp() *BsnTlvVlanPcp { |
| 10540 | obj := &BsnTlvVlanPcp{ |
| 10541 | BsnTlv: NewBsnTlv(72), |
| 10542 | } |
| 10543 | return obj |
| 10544 | } |
| 10545 | |
| 10546 | type BsnTlvVlanVid struct { |
| 10547 | *BsnTlv |
| 10548 | Value uint16 |
| 10549 | } |
| 10550 | |
| 10551 | type IBsnTlvVlanVid interface { |
| 10552 | IBsnTlv |
| 10553 | GetValue() uint16 |
| 10554 | } |
| 10555 | |
| 10556 | func (self *BsnTlvVlanVid) GetValue() uint16 { |
| 10557 | return self.Value |
| 10558 | } |
| 10559 | |
| 10560 | func (self *BsnTlvVlanVid) SetValue(v uint16) { |
| 10561 | self.Value = v |
| 10562 | } |
| 10563 | |
| 10564 | func (self *BsnTlvVlanVid) Serialize(encoder *goloxi.Encoder) error { |
| 10565 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10566 | return err |
| 10567 | } |
| 10568 | |
| 10569 | encoder.PutUint16(uint16(self.Value)) |
| 10570 | |
| 10571 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10572 | |
| 10573 | return nil |
| 10574 | } |
| 10575 | |
| 10576 | func DecodeBsnTlvVlanVid(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvVlanVid, error) { |
| 10577 | _bsntlvvlanvid := &BsnTlvVlanVid{BsnTlv: parent} |
| 10578 | if decoder.Length() < 2 { |
| 10579 | return nil, fmt.Errorf("BsnTlvVlanVid packet too short: %d < 2", decoder.Length()) |
| 10580 | } |
| 10581 | _bsntlvvlanvid.Value = uint16(decoder.ReadUint16()) |
| 10582 | return _bsntlvvlanvid, nil |
| 10583 | } |
| 10584 | |
| 10585 | func NewBsnTlvVlanVid() *BsnTlvVlanVid { |
| 10586 | obj := &BsnTlvVlanVid{ |
| 10587 | BsnTlv: NewBsnTlv(6), |
| 10588 | } |
| 10589 | return obj |
| 10590 | } |
| 10591 | |
| 10592 | type BsnTlvVlanVidMask struct { |
| 10593 | *BsnTlv |
| 10594 | Value uint16 |
| 10595 | } |
| 10596 | |
| 10597 | type IBsnTlvVlanVidMask interface { |
| 10598 | IBsnTlv |
| 10599 | GetValue() uint16 |
| 10600 | } |
| 10601 | |
| 10602 | func (self *BsnTlvVlanVidMask) GetValue() uint16 { |
| 10603 | return self.Value |
| 10604 | } |
| 10605 | |
| 10606 | func (self *BsnTlvVlanVidMask) SetValue(v uint16) { |
| 10607 | self.Value = v |
| 10608 | } |
| 10609 | |
| 10610 | func (self *BsnTlvVlanVidMask) Serialize(encoder *goloxi.Encoder) error { |
| 10611 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10612 | return err |
| 10613 | } |
| 10614 | |
| 10615 | encoder.PutUint16(uint16(self.Value)) |
| 10616 | |
| 10617 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10618 | |
| 10619 | return nil |
| 10620 | } |
| 10621 | |
| 10622 | func DecodeBsnTlvVlanVidMask(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvVlanVidMask, error) { |
| 10623 | _bsntlvvlanvidmask := &BsnTlvVlanVidMask{BsnTlv: parent} |
| 10624 | if decoder.Length() < 2 { |
| 10625 | return nil, fmt.Errorf("BsnTlvVlanVidMask packet too short: %d < 2", decoder.Length()) |
| 10626 | } |
| 10627 | _bsntlvvlanvidmask.Value = uint16(decoder.ReadUint16()) |
| 10628 | return _bsntlvvlanvidmask, nil |
| 10629 | } |
| 10630 | |
| 10631 | func NewBsnTlvVlanVidMask() *BsnTlvVlanVidMask { |
| 10632 | obj := &BsnTlvVlanVidMask{ |
| 10633 | BsnTlv: NewBsnTlv(77), |
| 10634 | } |
| 10635 | return obj |
| 10636 | } |
| 10637 | |
| 10638 | type BsnTlvVni struct { |
| 10639 | *BsnTlv |
| 10640 | Value uint32 |
| 10641 | } |
| 10642 | |
| 10643 | type IBsnTlvVni interface { |
| 10644 | IBsnTlv |
| 10645 | GetValue() uint32 |
| 10646 | } |
| 10647 | |
| 10648 | func (self *BsnTlvVni) GetValue() uint32 { |
| 10649 | return self.Value |
| 10650 | } |
| 10651 | |
| 10652 | func (self *BsnTlvVni) SetValue(v uint32) { |
| 10653 | self.Value = v |
| 10654 | } |
| 10655 | |
| 10656 | func (self *BsnTlvVni) Serialize(encoder *goloxi.Encoder) error { |
| 10657 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10658 | return err |
| 10659 | } |
| 10660 | |
| 10661 | encoder.PutUint32(uint32(self.Value)) |
| 10662 | |
| 10663 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10664 | |
| 10665 | return nil |
| 10666 | } |
| 10667 | |
| 10668 | func DecodeBsnTlvVni(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvVni, error) { |
| 10669 | _bsntlvvni := &BsnTlvVni{BsnTlv: parent} |
| 10670 | if decoder.Length() < 4 { |
| 10671 | return nil, fmt.Errorf("BsnTlvVni packet too short: %d < 4", decoder.Length()) |
| 10672 | } |
| 10673 | _bsntlvvni.Value = uint32(decoder.ReadUint32()) |
| 10674 | return _bsntlvvni, nil |
| 10675 | } |
| 10676 | |
| 10677 | func NewBsnTlvVni() *BsnTlvVni { |
| 10678 | obj := &BsnTlvVni{ |
| 10679 | BsnTlv: NewBsnTlv(86), |
| 10680 | } |
| 10681 | return obj |
| 10682 | } |
| 10683 | |
| 10684 | type BsnTlvVpnKey struct { |
| 10685 | *BsnTlv |
| 10686 | Value uint32 |
| 10687 | } |
| 10688 | |
| 10689 | type IBsnTlvVpnKey interface { |
| 10690 | IBsnTlv |
| 10691 | GetValue() uint32 |
| 10692 | } |
| 10693 | |
| 10694 | func (self *BsnTlvVpnKey) GetValue() uint32 { |
| 10695 | return self.Value |
| 10696 | } |
| 10697 | |
| 10698 | func (self *BsnTlvVpnKey) SetValue(v uint32) { |
| 10699 | self.Value = v |
| 10700 | } |
| 10701 | |
| 10702 | func (self *BsnTlvVpnKey) Serialize(encoder *goloxi.Encoder) error { |
| 10703 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10704 | return err |
| 10705 | } |
| 10706 | |
| 10707 | encoder.PutUint32(uint32(self.Value)) |
| 10708 | |
| 10709 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10710 | |
| 10711 | return nil |
| 10712 | } |
| 10713 | |
| 10714 | func DecodeBsnTlvVpnKey(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvVpnKey, error) { |
| 10715 | _bsntlvvpnkey := &BsnTlvVpnKey{BsnTlv: parent} |
| 10716 | if decoder.Length() < 4 { |
| 10717 | return nil, fmt.Errorf("BsnTlvVpnKey packet too short: %d < 4", decoder.Length()) |
| 10718 | } |
| 10719 | _bsntlvvpnkey.Value = uint32(decoder.ReadUint32()) |
| 10720 | return _bsntlvvpnkey, nil |
| 10721 | } |
| 10722 | |
| 10723 | func NewBsnTlvVpnKey() *BsnTlvVpnKey { |
| 10724 | obj := &BsnTlvVpnKey{ |
| 10725 | BsnTlv: NewBsnTlv(111), |
| 10726 | } |
| 10727 | return obj |
| 10728 | } |
| 10729 | |
| 10730 | type BsnTlvVrf struct { |
| 10731 | *BsnTlv |
| 10732 | Value uint32 |
| 10733 | } |
| 10734 | |
| 10735 | type IBsnTlvVrf interface { |
| 10736 | IBsnTlv |
| 10737 | GetValue() uint32 |
| 10738 | } |
| 10739 | |
| 10740 | func (self *BsnTlvVrf) GetValue() uint32 { |
| 10741 | return self.Value |
| 10742 | } |
| 10743 | |
| 10744 | func (self *BsnTlvVrf) SetValue(v uint32) { |
| 10745 | self.Value = v |
| 10746 | } |
| 10747 | |
| 10748 | func (self *BsnTlvVrf) Serialize(encoder *goloxi.Encoder) error { |
| 10749 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10750 | return err |
| 10751 | } |
| 10752 | |
| 10753 | encoder.PutUint32(uint32(self.Value)) |
| 10754 | |
| 10755 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10756 | |
| 10757 | return nil |
| 10758 | } |
| 10759 | |
| 10760 | func DecodeBsnTlvVrf(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvVrf, error) { |
| 10761 | _bsntlvvrf := &BsnTlvVrf{BsnTlv: parent} |
| 10762 | if decoder.Length() < 4 { |
| 10763 | return nil, fmt.Errorf("BsnTlvVrf packet too short: %d < 4", decoder.Length()) |
| 10764 | } |
| 10765 | _bsntlvvrf.Value = uint32(decoder.ReadUint32()) |
| 10766 | return _bsntlvvrf, nil |
| 10767 | } |
| 10768 | |
| 10769 | func NewBsnTlvVrf() *BsnTlvVrf { |
| 10770 | obj := &BsnTlvVrf{ |
| 10771 | BsnTlv: NewBsnTlv(19), |
| 10772 | } |
| 10773 | return obj |
| 10774 | } |
| 10775 | |
| 10776 | type BsnTlvVxlanEgressLag struct { |
| 10777 | *BsnTlv |
| 10778 | } |
| 10779 | |
| 10780 | type IBsnTlvVxlanEgressLag interface { |
| 10781 | IBsnTlv |
| 10782 | } |
| 10783 | |
| 10784 | func (self *BsnTlvVxlanEgressLag) Serialize(encoder *goloxi.Encoder) error { |
| 10785 | if err := self.BsnTlv.Serialize(encoder); err != nil { |
| 10786 | return err |
| 10787 | } |
| 10788 | |
| 10789 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 10790 | |
| 10791 | return nil |
| 10792 | } |
| 10793 | |
| 10794 | func DecodeBsnTlvVxlanEgressLag(parent *BsnTlv, decoder *goloxi.Decoder) (*BsnTlvVxlanEgressLag, error) { |
| 10795 | _bsntlvvxlanegresslag := &BsnTlvVxlanEgressLag{BsnTlv: parent} |
| 10796 | return _bsntlvvxlanegresslag, nil |
| 10797 | } |
| 10798 | |
| 10799 | func NewBsnTlvVxlanEgressLag() *BsnTlvVxlanEgressLag { |
| 10800 | obj := &BsnTlvVxlanEgressLag{ |
| 10801 | BsnTlv: NewBsnTlv(117), |
| 10802 | } |
| 10803 | return obj |
| 10804 | } |
| 10805 | |
| 10806 | type BsnVport struct { |
| 10807 | Type uint16 |
| 10808 | Length uint16 |
| 10809 | } |
| 10810 | |
| 10811 | type IBsnVport interface { |
| 10812 | goloxi.Serializable |
| 10813 | GetType() uint16 |
| 10814 | GetLength() uint16 |
| 10815 | } |
| 10816 | |
| 10817 | func (self *BsnVport) GetType() uint16 { |
| 10818 | return self.Type |
| 10819 | } |
| 10820 | |
| 10821 | func (self *BsnVport) SetType(v uint16) { |
| 10822 | self.Type = v |
| 10823 | } |
| 10824 | |
| 10825 | func (self *BsnVport) GetLength() uint16 { |
| 10826 | return self.Length |
| 10827 | } |
| 10828 | |
| 10829 | func (self *BsnVport) SetLength(v uint16) { |
| 10830 | self.Length = v |
| 10831 | } |
| 10832 | |
| 10833 | func (self *BsnVport) Serialize(encoder *goloxi.Encoder) error { |
| 10834 | |
| 10835 | encoder.PutUint16(uint16(self.Type)) |
| 10836 | encoder.PutUint16(uint16(self.Length)) |
| 10837 | |
| 10838 | return nil |
| 10839 | } |
| 10840 | func (self *BsnVport) Decode(decoder *goloxi.Decoder) error { |
| 10841 | if decoder.Length() < 4 { |
| 10842 | return fmt.Errorf("BsnVport packet too short: %d < 4", decoder.Length()) |
| 10843 | } |
| 10844 | |
| 10845 | self.Type = uint16(decoder.ReadUint16()) |
| 10846 | self.Length = uint16(decoder.ReadUint16()) |
| 10847 | oldDecoder := decoder |
| 10848 | defer func() { decoder = oldDecoder }() |
| 10849 | decoder = decoder.SliceDecoder(int(self.Length), 2+2) |
| 10850 | |
| 10851 | return nil |
| 10852 | } |
| 10853 | |
| 10854 | func NewBsnVport(_type uint16) *BsnVport { |
| 10855 | obj := &BsnVport{} |
| 10856 | obj.Type = _type |
| 10857 | return obj |
| 10858 | } |
| 10859 | |
| 10860 | type BsnVlanCounterStatsEntry struct { |
| 10861 | Length uint16 |
| 10862 | VlanVid uint16 |
| 10863 | Values []*Uint64 |
| 10864 | } |
| 10865 | |
| 10866 | type IBsnVlanCounterStatsEntry interface { |
| 10867 | goloxi.Serializable |
| 10868 | GetLength() uint16 |
| 10869 | GetVlanVid() uint16 |
| 10870 | GetValues() []*Uint64 |
| 10871 | } |
| 10872 | |
| 10873 | func (self *BsnVlanCounterStatsEntry) GetLength() uint16 { |
| 10874 | return self.Length |
| 10875 | } |
| 10876 | |
| 10877 | func (self *BsnVlanCounterStatsEntry) SetLength(v uint16) { |
| 10878 | self.Length = v |
| 10879 | } |
| 10880 | |
| 10881 | func (self *BsnVlanCounterStatsEntry) GetVlanVid() uint16 { |
| 10882 | return self.VlanVid |
| 10883 | } |
| 10884 | |
| 10885 | func (self *BsnVlanCounterStatsEntry) SetVlanVid(v uint16) { |
| 10886 | self.VlanVid = v |
| 10887 | } |
| 10888 | |
| 10889 | func (self *BsnVlanCounterStatsEntry) GetValues() []*Uint64 { |
| 10890 | return self.Values |
| 10891 | } |
| 10892 | |
| 10893 | func (self *BsnVlanCounterStatsEntry) SetValues(v []*Uint64) { |
| 10894 | self.Values = v |
| 10895 | } |
| 10896 | |
| 10897 | func (self *BsnVlanCounterStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 10898 | |
| 10899 | encoder.PutUint16(uint16(self.Length)) |
| 10900 | encoder.PutUint16(uint16(self.VlanVid)) |
| 10901 | encoder.Write(bytes.Repeat([]byte{0}, 4)) |
| 10902 | for _, obj := range self.Values { |
| 10903 | if err := obj.Serialize(encoder); err != nil { |
| 10904 | return err |
| 10905 | } |
| 10906 | } |
| 10907 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 10908 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 10909 | |
| 10910 | return nil |
| 10911 | } |
| 10912 | |
| 10913 | func DecodeBsnVlanCounterStatsEntry(decoder *goloxi.Decoder) (*BsnVlanCounterStatsEntry, error) { |
| 10914 | _bsnvlancounterstatsentry := &BsnVlanCounterStatsEntry{} |
| 10915 | if decoder.Length() < 8 { |
| 10916 | return nil, fmt.Errorf("BsnVlanCounterStatsEntry packet too short: %d < 8", decoder.Length()) |
| 10917 | } |
| 10918 | _bsnvlancounterstatsentry.Length = uint16(decoder.ReadUint16()) |
| 10919 | oldDecoder := decoder |
| 10920 | defer func() { decoder = oldDecoder }() |
| 10921 | decoder = decoder.SliceDecoder(int(_bsnvlancounterstatsentry.Length), 2+0) |
| 10922 | _bsnvlancounterstatsentry.VlanVid = uint16(decoder.ReadUint16()) |
| 10923 | decoder.Skip(4) |
| 10924 | |
| 10925 | for decoder.Length() >= 8 { |
| 10926 | item, err := DecodeUint64(decoder) |
| 10927 | if err != nil { |
| 10928 | return nil, err |
| 10929 | } |
| 10930 | if item != nil { |
| 10931 | _bsnvlancounterstatsentry.Values = append(_bsnvlancounterstatsentry.Values, item) |
| 10932 | } |
| 10933 | } |
| 10934 | return _bsnvlancounterstatsentry, nil |
| 10935 | } |
| 10936 | |
| 10937 | func NewBsnVlanCounterStatsEntry() *BsnVlanCounterStatsEntry { |
| 10938 | obj := &BsnVlanCounterStatsEntry{} |
| 10939 | return obj |
| 10940 | } |
| 10941 | |
| 10942 | type BsnVlanMac struct { |
| 10943 | VlanVid uint16 |
| 10944 | Mac net.HardwareAddr |
| 10945 | } |
| 10946 | |
| 10947 | type IBsnVlanMac interface { |
| 10948 | goloxi.Serializable |
| 10949 | GetVlanVid() uint16 |
| 10950 | GetMac() net.HardwareAddr |
| 10951 | } |
| 10952 | |
| 10953 | func (self *BsnVlanMac) GetVlanVid() uint16 { |
| 10954 | return self.VlanVid |
| 10955 | } |
| 10956 | |
| 10957 | func (self *BsnVlanMac) SetVlanVid(v uint16) { |
| 10958 | self.VlanVid = v |
| 10959 | } |
| 10960 | |
| 10961 | func (self *BsnVlanMac) GetMac() net.HardwareAddr { |
| 10962 | return self.Mac |
| 10963 | } |
| 10964 | |
| 10965 | func (self *BsnVlanMac) SetMac(v net.HardwareAddr) { |
| 10966 | self.Mac = v |
| 10967 | } |
| 10968 | |
| 10969 | func (self *BsnVlanMac) Serialize(encoder *goloxi.Encoder) error { |
| 10970 | |
| 10971 | encoder.PutUint16(uint16(self.VlanVid)) |
| 10972 | encoder.Write(self.Mac) |
| 10973 | |
| 10974 | return nil |
| 10975 | } |
| 10976 | |
| 10977 | func DecodeBsnVlanMac(decoder *goloxi.Decoder) (*BsnVlanMac, error) { |
| 10978 | _bsnvlanmac := &BsnVlanMac{} |
| 10979 | if decoder.Length() < 8 { |
| 10980 | return nil, fmt.Errorf("BsnVlanMac packet too short: %d < 8", decoder.Length()) |
| 10981 | } |
| 10982 | _bsnvlanmac.VlanVid = uint16(decoder.ReadUint16()) |
| 10983 | _bsnvlanmac.Mac = net.HardwareAddr(decoder.Read(6)) |
| 10984 | return _bsnvlanmac, nil |
| 10985 | } |
| 10986 | |
| 10987 | func NewBsnVlanMac() *BsnVlanMac { |
| 10988 | obj := &BsnVlanMac{} |
| 10989 | return obj |
| 10990 | } |
| 10991 | |
| 10992 | type BsnVportL2Gre struct { |
| 10993 | *BsnVport |
| 10994 | Flags BsnVportL2GreFlags |
| 10995 | PortNo Port |
| 10996 | LoopbackPortNo Port |
| 10997 | LocalMac net.HardwareAddr |
| 10998 | NhMac net.HardwareAddr |
| 10999 | SrcIp net.IP |
| 11000 | DstIp net.IP |
| 11001 | Dscp uint8 |
| 11002 | Ttl uint8 |
| 11003 | Vpn uint32 |
| 11004 | RateLimit uint32 |
| 11005 | IfName string |
| 11006 | } |
| 11007 | |
| 11008 | type IBsnVportL2Gre interface { |
| 11009 | IBsnVport |
| 11010 | GetFlags() BsnVportL2GreFlags |
| 11011 | GetPortNo() Port |
| 11012 | GetLoopbackPortNo() Port |
| 11013 | GetLocalMac() net.HardwareAddr |
| 11014 | GetNhMac() net.HardwareAddr |
| 11015 | GetSrcIp() net.IP |
| 11016 | GetDstIp() net.IP |
| 11017 | GetDscp() uint8 |
| 11018 | GetTtl() uint8 |
| 11019 | GetVpn() uint32 |
| 11020 | GetRateLimit() uint32 |
| 11021 | GetIfName() string |
| 11022 | } |
| 11023 | |
| 11024 | func (self *BsnVportL2Gre) GetFlags() BsnVportL2GreFlags { |
| 11025 | return self.Flags |
| 11026 | } |
| 11027 | |
| 11028 | func (self *BsnVportL2Gre) SetFlags(v BsnVportL2GreFlags) { |
| 11029 | self.Flags = v |
| 11030 | } |
| 11031 | |
| 11032 | func (self *BsnVportL2Gre) GetPortNo() Port { |
| 11033 | return self.PortNo |
| 11034 | } |
| 11035 | |
| 11036 | func (self *BsnVportL2Gre) SetPortNo(v Port) { |
| 11037 | self.PortNo = v |
| 11038 | } |
| 11039 | |
| 11040 | func (self *BsnVportL2Gre) GetLoopbackPortNo() Port { |
| 11041 | return self.LoopbackPortNo |
| 11042 | } |
| 11043 | |
| 11044 | func (self *BsnVportL2Gre) SetLoopbackPortNo(v Port) { |
| 11045 | self.LoopbackPortNo = v |
| 11046 | } |
| 11047 | |
| 11048 | func (self *BsnVportL2Gre) GetLocalMac() net.HardwareAddr { |
| 11049 | return self.LocalMac |
| 11050 | } |
| 11051 | |
| 11052 | func (self *BsnVportL2Gre) SetLocalMac(v net.HardwareAddr) { |
| 11053 | self.LocalMac = v |
| 11054 | } |
| 11055 | |
| 11056 | func (self *BsnVportL2Gre) GetNhMac() net.HardwareAddr { |
| 11057 | return self.NhMac |
| 11058 | } |
| 11059 | |
| 11060 | func (self *BsnVportL2Gre) SetNhMac(v net.HardwareAddr) { |
| 11061 | self.NhMac = v |
| 11062 | } |
| 11063 | |
| 11064 | func (self *BsnVportL2Gre) GetSrcIp() net.IP { |
| 11065 | return self.SrcIp |
| 11066 | } |
| 11067 | |
| 11068 | func (self *BsnVportL2Gre) SetSrcIp(v net.IP) { |
| 11069 | self.SrcIp = v |
| 11070 | } |
| 11071 | |
| 11072 | func (self *BsnVportL2Gre) GetDstIp() net.IP { |
| 11073 | return self.DstIp |
| 11074 | } |
| 11075 | |
| 11076 | func (self *BsnVportL2Gre) SetDstIp(v net.IP) { |
| 11077 | self.DstIp = v |
| 11078 | } |
| 11079 | |
| 11080 | func (self *BsnVportL2Gre) GetDscp() uint8 { |
| 11081 | return self.Dscp |
| 11082 | } |
| 11083 | |
| 11084 | func (self *BsnVportL2Gre) SetDscp(v uint8) { |
| 11085 | self.Dscp = v |
| 11086 | } |
| 11087 | |
| 11088 | func (self *BsnVportL2Gre) GetTtl() uint8 { |
| 11089 | return self.Ttl |
| 11090 | } |
| 11091 | |
| 11092 | func (self *BsnVportL2Gre) SetTtl(v uint8) { |
| 11093 | self.Ttl = v |
| 11094 | } |
| 11095 | |
| 11096 | func (self *BsnVportL2Gre) GetVpn() uint32 { |
| 11097 | return self.Vpn |
| 11098 | } |
| 11099 | |
| 11100 | func (self *BsnVportL2Gre) SetVpn(v uint32) { |
| 11101 | self.Vpn = v |
| 11102 | } |
| 11103 | |
| 11104 | func (self *BsnVportL2Gre) GetRateLimit() uint32 { |
| 11105 | return self.RateLimit |
| 11106 | } |
| 11107 | |
| 11108 | func (self *BsnVportL2Gre) SetRateLimit(v uint32) { |
| 11109 | self.RateLimit = v |
| 11110 | } |
| 11111 | |
| 11112 | func (self *BsnVportL2Gre) GetIfName() string { |
| 11113 | return self.IfName |
| 11114 | } |
| 11115 | |
| 11116 | func (self *BsnVportL2Gre) SetIfName(v string) { |
| 11117 | self.IfName = v |
| 11118 | } |
| 11119 | |
| 11120 | func (self *BsnVportL2Gre) Serialize(encoder *goloxi.Encoder) error { |
| 11121 | if err := self.BsnVport.Serialize(encoder); err != nil { |
| 11122 | return err |
| 11123 | } |
| 11124 | |
| 11125 | encoder.PutUint32(uint32(self.Flags)) |
| 11126 | self.PortNo.Serialize(encoder) |
| 11127 | self.LoopbackPortNo.Serialize(encoder) |
| 11128 | encoder.Write(self.LocalMac) |
| 11129 | encoder.Write(self.NhMac) |
| 11130 | encoder.Write(self.SrcIp.To4()) |
| 11131 | encoder.Write(self.DstIp.To4()) |
| 11132 | encoder.PutUint8(uint8(self.Dscp)) |
| 11133 | encoder.PutUint8(uint8(self.Ttl)) |
| 11134 | encoder.Write(bytes.Repeat([]byte{0}, 2)) |
| 11135 | encoder.PutUint32(uint32(self.Vpn)) |
| 11136 | encoder.PutUint32(uint32(self.RateLimit)) |
| 11137 | encoder.Write([]byte(self.IfName)) |
| 11138 | |
| 11139 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 11140 | |
| 11141 | return nil |
| 11142 | } |
| 11143 | |
| 11144 | func DecodeBsnVportL2Gre(parent *BsnVport, decoder *goloxi.Decoder) (*BsnVportL2Gre, error) { |
| 11145 | _bsnvportl2gre := &BsnVportL2Gre{BsnVport: parent} |
| 11146 | if decoder.Length() < 60 { |
| 11147 | return nil, fmt.Errorf("BsnVportL2Gre packet too short: %d < 60", decoder.Length()) |
| 11148 | } |
| 11149 | _bsnvportl2gre.Flags = BsnVportL2GreFlags(decoder.ReadUint32()) |
| 11150 | _bsnvportl2gre.PortNo.Decode(decoder) |
| 11151 | _bsnvportl2gre.LoopbackPortNo.Decode(decoder) |
| 11152 | _bsnvportl2gre.LocalMac = net.HardwareAddr(decoder.Read(6)) |
| 11153 | _bsnvportl2gre.NhMac = net.HardwareAddr(decoder.Read(6)) |
| 11154 | _bsnvportl2gre.SrcIp = net.IP(decoder.Read(4)) |
| 11155 | _bsnvportl2gre.DstIp = net.IP(decoder.Read(4)) |
| 11156 | _bsnvportl2gre.Dscp = uint8(decoder.ReadByte()) |
| 11157 | _bsnvportl2gre.Ttl = uint8(decoder.ReadByte()) |
| 11158 | decoder.Skip(2) |
| 11159 | _bsnvportl2gre.Vpn = uint32(decoder.ReadUint32()) |
| 11160 | _bsnvportl2gre.RateLimit = uint32(decoder.ReadUint32()) |
| 11161 | _bsnvportl2gre.IfName = string(bytes.Trim(decoder.Read(16), "\x00")) |
| 11162 | return _bsnvportl2gre, nil |
| 11163 | } |
| 11164 | |
| 11165 | func NewBsnVportL2Gre() *BsnVportL2Gre { |
| 11166 | obj := &BsnVportL2Gre{ |
| 11167 | BsnVport: NewBsnVport(1), |
| 11168 | } |
| 11169 | return obj |
| 11170 | } |
| 11171 | |
| 11172 | type BsnVportQInQ struct { |
| 11173 | *BsnVport |
| 11174 | PortNo uint32 |
| 11175 | IngressTpid uint16 |
| 11176 | IngressVlanId uint16 |
| 11177 | EgressTpid uint16 |
| 11178 | EgressVlanId uint16 |
| 11179 | IfName string |
| 11180 | } |
| 11181 | |
| 11182 | type IBsnVportQInQ interface { |
| 11183 | IBsnVport |
| 11184 | GetPortNo() uint32 |
| 11185 | GetIngressTpid() uint16 |
| 11186 | GetIngressVlanId() uint16 |
| 11187 | GetEgressTpid() uint16 |
| 11188 | GetEgressVlanId() uint16 |
| 11189 | GetIfName() string |
| 11190 | } |
| 11191 | |
| 11192 | func (self *BsnVportQInQ) GetPortNo() uint32 { |
| 11193 | return self.PortNo |
| 11194 | } |
| 11195 | |
| 11196 | func (self *BsnVportQInQ) SetPortNo(v uint32) { |
| 11197 | self.PortNo = v |
| 11198 | } |
| 11199 | |
| 11200 | func (self *BsnVportQInQ) GetIngressTpid() uint16 { |
| 11201 | return self.IngressTpid |
| 11202 | } |
| 11203 | |
| 11204 | func (self *BsnVportQInQ) SetIngressTpid(v uint16) { |
| 11205 | self.IngressTpid = v |
| 11206 | } |
| 11207 | |
| 11208 | func (self *BsnVportQInQ) GetIngressVlanId() uint16 { |
| 11209 | return self.IngressVlanId |
| 11210 | } |
| 11211 | |
| 11212 | func (self *BsnVportQInQ) SetIngressVlanId(v uint16) { |
| 11213 | self.IngressVlanId = v |
| 11214 | } |
| 11215 | |
| 11216 | func (self *BsnVportQInQ) GetEgressTpid() uint16 { |
| 11217 | return self.EgressTpid |
| 11218 | } |
| 11219 | |
| 11220 | func (self *BsnVportQInQ) SetEgressTpid(v uint16) { |
| 11221 | self.EgressTpid = v |
| 11222 | } |
| 11223 | |
| 11224 | func (self *BsnVportQInQ) GetEgressVlanId() uint16 { |
| 11225 | return self.EgressVlanId |
| 11226 | } |
| 11227 | |
| 11228 | func (self *BsnVportQInQ) SetEgressVlanId(v uint16) { |
| 11229 | self.EgressVlanId = v |
| 11230 | } |
| 11231 | |
| 11232 | func (self *BsnVportQInQ) GetIfName() string { |
| 11233 | return self.IfName |
| 11234 | } |
| 11235 | |
| 11236 | func (self *BsnVportQInQ) SetIfName(v string) { |
| 11237 | self.IfName = v |
| 11238 | } |
| 11239 | |
| 11240 | func (self *BsnVportQInQ) Serialize(encoder *goloxi.Encoder) error { |
| 11241 | if err := self.BsnVport.Serialize(encoder); err != nil { |
| 11242 | return err |
| 11243 | } |
| 11244 | |
| 11245 | encoder.PutUint32(uint32(self.PortNo)) |
| 11246 | encoder.PutUint16(uint16(self.IngressTpid)) |
| 11247 | encoder.PutUint16(uint16(self.IngressVlanId)) |
| 11248 | encoder.PutUint16(uint16(self.EgressTpid)) |
| 11249 | encoder.PutUint16(uint16(self.EgressVlanId)) |
| 11250 | encoder.Write([]byte(self.IfName)) |
| 11251 | |
| 11252 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 11253 | |
| 11254 | return nil |
| 11255 | } |
| 11256 | |
| 11257 | func DecodeBsnVportQInQ(parent *BsnVport, decoder *goloxi.Decoder) (*BsnVportQInQ, error) { |
| 11258 | _bsnvportqinq := &BsnVportQInQ{BsnVport: parent} |
| 11259 | if decoder.Length() < 28 { |
| 11260 | return nil, fmt.Errorf("BsnVportQInQ packet too short: %d < 28", decoder.Length()) |
| 11261 | } |
| 11262 | _bsnvportqinq.PortNo = uint32(decoder.ReadUint32()) |
| 11263 | _bsnvportqinq.IngressTpid = uint16(decoder.ReadUint16()) |
| 11264 | _bsnvportqinq.IngressVlanId = uint16(decoder.ReadUint16()) |
| 11265 | _bsnvportqinq.EgressTpid = uint16(decoder.ReadUint16()) |
| 11266 | _bsnvportqinq.EgressVlanId = uint16(decoder.ReadUint16()) |
| 11267 | _bsnvportqinq.IfName = string(bytes.Trim(decoder.Read(16), "\x00")) |
| 11268 | return _bsnvportqinq, nil |
| 11269 | } |
| 11270 | |
| 11271 | func NewBsnVportQInQ() *BsnVportQInQ { |
| 11272 | obj := &BsnVportQInQ{ |
| 11273 | BsnVport: NewBsnVport(0), |
| 11274 | } |
| 11275 | return obj |
| 11276 | } |
| 11277 | |
| 11278 | type BsnVrfCounterStatsEntry struct { |
| 11279 | Length uint16 |
| 11280 | Vrf uint32 |
| 11281 | Values []*Uint64 |
| 11282 | } |
| 11283 | |
| 11284 | type IBsnVrfCounterStatsEntry interface { |
| 11285 | goloxi.Serializable |
| 11286 | GetLength() uint16 |
| 11287 | GetVrf() uint32 |
| 11288 | GetValues() []*Uint64 |
| 11289 | } |
| 11290 | |
| 11291 | func (self *BsnVrfCounterStatsEntry) GetLength() uint16 { |
| 11292 | return self.Length |
| 11293 | } |
| 11294 | |
| 11295 | func (self *BsnVrfCounterStatsEntry) SetLength(v uint16) { |
| 11296 | self.Length = v |
| 11297 | } |
| 11298 | |
| 11299 | func (self *BsnVrfCounterStatsEntry) GetVrf() uint32 { |
| 11300 | return self.Vrf |
| 11301 | } |
| 11302 | |
| 11303 | func (self *BsnVrfCounterStatsEntry) SetVrf(v uint32) { |
| 11304 | self.Vrf = v |
| 11305 | } |
| 11306 | |
| 11307 | func (self *BsnVrfCounterStatsEntry) GetValues() []*Uint64 { |
| 11308 | return self.Values |
| 11309 | } |
| 11310 | |
| 11311 | func (self *BsnVrfCounterStatsEntry) SetValues(v []*Uint64) { |
| 11312 | self.Values = v |
| 11313 | } |
| 11314 | |
| 11315 | func (self *BsnVrfCounterStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 11316 | |
| 11317 | encoder.PutUint16(uint16(self.Length)) |
| 11318 | encoder.Write(bytes.Repeat([]byte{0}, 2)) |
| 11319 | encoder.PutUint32(uint32(self.Vrf)) |
| 11320 | for _, obj := range self.Values { |
| 11321 | if err := obj.Serialize(encoder); err != nil { |
| 11322 | return err |
| 11323 | } |
| 11324 | } |
| 11325 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 11326 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 11327 | |
| 11328 | return nil |
| 11329 | } |
| 11330 | |
| 11331 | func DecodeBsnVrfCounterStatsEntry(decoder *goloxi.Decoder) (*BsnVrfCounterStatsEntry, error) { |
| 11332 | _bsnvrfcounterstatsentry := &BsnVrfCounterStatsEntry{} |
| 11333 | if decoder.Length() < 8 { |
| 11334 | return nil, fmt.Errorf("BsnVrfCounterStatsEntry packet too short: %d < 8", decoder.Length()) |
| 11335 | } |
| 11336 | _bsnvrfcounterstatsentry.Length = uint16(decoder.ReadUint16()) |
| 11337 | oldDecoder := decoder |
| 11338 | defer func() { decoder = oldDecoder }() |
| 11339 | decoder = decoder.SliceDecoder(int(_bsnvrfcounterstatsentry.Length), 2+0) |
| 11340 | decoder.Skip(2) |
| 11341 | _bsnvrfcounterstatsentry.Vrf = uint32(decoder.ReadUint32()) |
| 11342 | |
| 11343 | for decoder.Length() >= 8 { |
| 11344 | item, err := DecodeUint64(decoder) |
| 11345 | if err != nil { |
| 11346 | return nil, err |
| 11347 | } |
| 11348 | if item != nil { |
| 11349 | _bsnvrfcounterstatsentry.Values = append(_bsnvrfcounterstatsentry.Values, item) |
| 11350 | } |
| 11351 | } |
| 11352 | return _bsnvrfcounterstatsentry, nil |
| 11353 | } |
| 11354 | |
| 11355 | func NewBsnVrfCounterStatsEntry() *BsnVrfCounterStatsEntry { |
| 11356 | obj := &BsnVrfCounterStatsEntry{} |
| 11357 | return obj |
| 11358 | } |
| 11359 | |
| 11360 | type Bucket struct { |
| 11361 | Len uint16 |
| 11362 | Weight uint16 |
| 11363 | WatchPort Port |
| 11364 | WatchGroup uint32 |
| 11365 | Actions []goloxi.IAction |
| 11366 | } |
| 11367 | |
| 11368 | type IBucket interface { |
| 11369 | goloxi.Serializable |
| 11370 | GetLen() uint16 |
| 11371 | GetWeight() uint16 |
| 11372 | GetWatchPort() Port |
| 11373 | GetWatchGroup() uint32 |
| 11374 | GetActions() []goloxi.IAction |
| 11375 | } |
| 11376 | |
| 11377 | func (self *Bucket) GetLen() uint16 { |
| 11378 | return self.Len |
| 11379 | } |
| 11380 | |
| 11381 | func (self *Bucket) SetLen(v uint16) { |
| 11382 | self.Len = v |
| 11383 | } |
| 11384 | |
| 11385 | func (self *Bucket) GetWeight() uint16 { |
| 11386 | return self.Weight |
| 11387 | } |
| 11388 | |
| 11389 | func (self *Bucket) SetWeight(v uint16) { |
| 11390 | self.Weight = v |
| 11391 | } |
| 11392 | |
| 11393 | func (self *Bucket) GetWatchPort() Port { |
| 11394 | return self.WatchPort |
| 11395 | } |
| 11396 | |
| 11397 | func (self *Bucket) SetWatchPort(v Port) { |
| 11398 | self.WatchPort = v |
| 11399 | } |
| 11400 | |
| 11401 | func (self *Bucket) GetWatchGroup() uint32 { |
| 11402 | return self.WatchGroup |
| 11403 | } |
| 11404 | |
| 11405 | func (self *Bucket) SetWatchGroup(v uint32) { |
| 11406 | self.WatchGroup = v |
| 11407 | } |
| 11408 | |
| 11409 | func (self *Bucket) GetActions() []goloxi.IAction { |
| 11410 | return self.Actions |
| 11411 | } |
| 11412 | |
| 11413 | func (self *Bucket) SetActions(v []goloxi.IAction) { |
| 11414 | self.Actions = v |
| 11415 | } |
| 11416 | |
| 11417 | func (self *Bucket) Serialize(encoder *goloxi.Encoder) error { |
| 11418 | |
| 11419 | encoder.PutUint16(uint16(self.Len)) |
| 11420 | encoder.PutUint16(uint16(self.Weight)) |
| 11421 | self.WatchPort.Serialize(encoder) |
| 11422 | encoder.PutUint32(uint32(self.WatchGroup)) |
| 11423 | encoder.Write(bytes.Repeat([]byte{0}, 4)) |
| 11424 | for _, obj := range self.Actions { |
| 11425 | if err := obj.Serialize(encoder); err != nil { |
| 11426 | return err |
| 11427 | } |
| 11428 | } |
| 11429 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 11430 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 11431 | |
| 11432 | return nil |
| 11433 | } |
| 11434 | |
| 11435 | func DecodeBucket(decoder *goloxi.Decoder) (*Bucket, error) { |
| 11436 | _bucket := &Bucket{} |
| 11437 | if decoder.Length() < 16 { |
| 11438 | return nil, fmt.Errorf("Bucket packet too short: %d < 16", decoder.Length()) |
| 11439 | } |
| 11440 | _bucket.Len = uint16(decoder.ReadUint16()) |
| 11441 | oldDecoder := decoder |
| 11442 | defer func() { decoder = oldDecoder }() |
| 11443 | decoder = decoder.SliceDecoder(int(_bucket.Len), 2+0) |
| 11444 | _bucket.Weight = uint16(decoder.ReadUint16()) |
| 11445 | _bucket.WatchPort.Decode(decoder) |
| 11446 | _bucket.WatchGroup = uint32(decoder.ReadUint32()) |
| 11447 | decoder.Skip(4) |
| 11448 | |
| 11449 | for decoder.Length() >= 8 { |
| 11450 | item, err := DecodeAction(decoder) |
| 11451 | if err != nil { |
| 11452 | return nil, err |
| 11453 | } |
| 11454 | if item != nil { |
| 11455 | _bucket.Actions = append(_bucket.Actions, item) |
| 11456 | } |
| 11457 | } |
| 11458 | return _bucket, nil |
| 11459 | } |
| 11460 | |
| 11461 | func NewBucket() *Bucket { |
| 11462 | obj := &Bucket{} |
| 11463 | return obj |
| 11464 | } |
| 11465 | |
| 11466 | type BucketCounter struct { |
| 11467 | PacketCount uint64 |
| 11468 | ByteCount uint64 |
| 11469 | } |
| 11470 | |
| 11471 | type IBucketCounter interface { |
| 11472 | goloxi.Serializable |
| 11473 | GetPacketCount() uint64 |
| 11474 | GetByteCount() uint64 |
| 11475 | } |
| 11476 | |
| 11477 | func (self *BucketCounter) GetPacketCount() uint64 { |
| 11478 | return self.PacketCount |
| 11479 | } |
| 11480 | |
| 11481 | func (self *BucketCounter) SetPacketCount(v uint64) { |
| 11482 | self.PacketCount = v |
| 11483 | } |
| 11484 | |
| 11485 | func (self *BucketCounter) GetByteCount() uint64 { |
| 11486 | return self.ByteCount |
| 11487 | } |
| 11488 | |
| 11489 | func (self *BucketCounter) SetByteCount(v uint64) { |
| 11490 | self.ByteCount = v |
| 11491 | } |
| 11492 | |
| 11493 | func (self *BucketCounter) Serialize(encoder *goloxi.Encoder) error { |
| 11494 | |
| 11495 | encoder.PutUint64(uint64(self.PacketCount)) |
| 11496 | encoder.PutUint64(uint64(self.ByteCount)) |
| 11497 | |
| 11498 | return nil |
| 11499 | } |
| 11500 | |
| 11501 | func DecodeBucketCounter(decoder *goloxi.Decoder) (*BucketCounter, error) { |
| 11502 | _bucketcounter := &BucketCounter{} |
| 11503 | if decoder.Length() < 16 { |
| 11504 | return nil, fmt.Errorf("BucketCounter packet too short: %d < 16", decoder.Length()) |
| 11505 | } |
| 11506 | _bucketcounter.PacketCount = uint64(decoder.ReadUint64()) |
| 11507 | _bucketcounter.ByteCount = uint64(decoder.ReadUint64()) |
| 11508 | return _bucketcounter, nil |
| 11509 | } |
| 11510 | |
| 11511 | func NewBucketCounter() *BucketCounter { |
| 11512 | obj := &BucketCounter{} |
| 11513 | return obj |
| 11514 | } |
| 11515 | |
| 11516 | type EdPropHeader struct { |
| 11517 | PropClass uint16 |
| 11518 | } |
| 11519 | |
| 11520 | type IEdPropHeader interface { |
| 11521 | goloxi.Serializable |
| 11522 | GetPropClass() uint16 |
| 11523 | } |
| 11524 | |
| 11525 | func (self *EdPropHeader) GetPropClass() uint16 { |
| 11526 | return self.PropClass |
| 11527 | } |
| 11528 | |
| 11529 | func (self *EdPropHeader) SetPropClass(v uint16) { |
| 11530 | self.PropClass = v |
| 11531 | } |
| 11532 | |
| 11533 | func (self *EdPropHeader) Serialize(encoder *goloxi.Encoder) error { |
| 11534 | |
| 11535 | encoder.PutUint16(uint16(self.PropClass)) |
| 11536 | |
| 11537 | return nil |
| 11538 | } |
| 11539 | |
| 11540 | func DecodeEdPropHeader(decoder *goloxi.Decoder) (IEdPropHeader, error) { |
| 11541 | _edpropheader := &EdPropHeader{} |
| 11542 | if decoder.Length() < 2 { |
| 11543 | return nil, fmt.Errorf("EdPropHeader packet too short: %d < 2", decoder.Length()) |
| 11544 | } |
| 11545 | _edpropheader.PropClass = uint16(decoder.ReadUint16()) |
| 11546 | |
| 11547 | switch _edpropheader.PropClass { |
| 11548 | case 4: |
| 11549 | return DecodeEdPropNsh(_edpropheader, decoder) |
| 11550 | default: |
| 11551 | return nil, fmt.Errorf("Invalid type '%d' for 'EdPropHeader'", _edpropheader.PropClass) |
| 11552 | } |
| 11553 | } |
| 11554 | |
| 11555 | func NewEdPropHeader(_prop_class uint16) *EdPropHeader { |
| 11556 | obj := &EdPropHeader{} |
| 11557 | obj.PropClass = _prop_class |
| 11558 | return obj |
| 11559 | } |
| 11560 | |
| 11561 | type EdPropNsh struct { |
| 11562 | *EdPropHeader |
| 11563 | Type uint8 |
| 11564 | Len uint8 |
| 11565 | } |
| 11566 | |
| 11567 | type IEdPropNsh interface { |
| 11568 | IEdPropHeader |
| 11569 | GetType() uint8 |
| 11570 | GetLen() uint8 |
| 11571 | } |
| 11572 | |
| 11573 | func (self *EdPropNsh) GetType() uint8 { |
| 11574 | return self.Type |
| 11575 | } |
| 11576 | |
| 11577 | func (self *EdPropNsh) SetType(v uint8) { |
| 11578 | self.Type = v |
| 11579 | } |
| 11580 | |
| 11581 | func (self *EdPropNsh) GetLen() uint8 { |
| 11582 | return self.Len |
| 11583 | } |
| 11584 | |
| 11585 | func (self *EdPropNsh) SetLen(v uint8) { |
| 11586 | self.Len = v |
| 11587 | } |
| 11588 | |
| 11589 | func (self *EdPropNsh) Serialize(encoder *goloxi.Encoder) error { |
| 11590 | if err := self.EdPropHeader.Serialize(encoder); err != nil { |
| 11591 | return err |
| 11592 | } |
| 11593 | |
| 11594 | encoder.PutUint8(uint8(self.Type)) |
| 11595 | encoder.PutUint8(uint8(self.Len)) |
| 11596 | |
| 11597 | encoder.SkipAlign() |
| 11598 | |
| 11599 | return nil |
| 11600 | } |
| 11601 | |
| 11602 | func DecodeEdPropNsh(parent *EdPropHeader, decoder *goloxi.Decoder) (IEdPropNsh, error) { |
| 11603 | _edpropnsh := &EdPropNsh{EdPropHeader: parent} |
| 11604 | if decoder.Length() < 2 { |
| 11605 | return nil, fmt.Errorf("EdPropNsh packet too short: %d < 2", decoder.Length()) |
| 11606 | } |
| 11607 | defer decoder.SkipAlign() |
| 11608 | |
| 11609 | _edpropnsh.Type = uint8(decoder.ReadByte()) |
| 11610 | _edpropnsh.Len = uint8(decoder.ReadByte()) |
| 11611 | oldDecoder := decoder |
| 11612 | defer func() { decoder = oldDecoder }() |
| 11613 | decoder = decoder.SliceDecoder(int(((_edpropnsh.Len)+7)/8*8), 1+3) |
| 11614 | |
| 11615 | switch _edpropnsh.Type { |
| 11616 | case 1: |
| 11617 | return DecodeEdPropNshMdType(_edpropnsh, decoder) |
| 11618 | case 2: |
| 11619 | return DecodeEdPropNshTlv(_edpropnsh, decoder) |
| 11620 | default: |
| 11621 | return nil, fmt.Errorf("Invalid type '%d' for 'EdPropNsh'", _edpropnsh.Type) |
| 11622 | } |
| 11623 | } |
| 11624 | |
| 11625 | func NewEdPropNsh(_type uint8) *EdPropNsh { |
| 11626 | obj := &EdPropNsh{ |
| 11627 | EdPropHeader: NewEdPropHeader(4), |
| 11628 | } |
| 11629 | obj.Type = _type |
| 11630 | return obj |
| 11631 | } |
| 11632 | |
| 11633 | type EdPropNshMdType struct { |
| 11634 | *EdPropNsh |
| 11635 | MdType uint8 |
| 11636 | } |
| 11637 | |
| 11638 | type IEdPropNshMdType interface { |
| 11639 | IEdPropNsh |
| 11640 | GetMdType() uint8 |
| 11641 | } |
| 11642 | |
| 11643 | func (self *EdPropNshMdType) GetMdType() uint8 { |
| 11644 | return self.MdType |
| 11645 | } |
| 11646 | |
| 11647 | func (self *EdPropNshMdType) SetMdType(v uint8) { |
| 11648 | self.MdType = v |
| 11649 | } |
| 11650 | |
| 11651 | func (self *EdPropNshMdType) Serialize(encoder *goloxi.Encoder) error { |
| 11652 | if err := self.EdPropNsh.Serialize(encoder); err != nil { |
| 11653 | return err |
| 11654 | } |
| 11655 | |
| 11656 | encoder.PutUint8(uint8(self.MdType)) |
| 11657 | encoder.Write(bytes.Repeat([]byte{0}, 3)) |
| 11658 | |
| 11659 | encoder.Bytes()[3] = uint8(len(encoder.Bytes())) |
| 11660 | |
| 11661 | return nil |
| 11662 | } |
| 11663 | |
| 11664 | func DecodeEdPropNshMdType(parent *EdPropNsh, decoder *goloxi.Decoder) (*EdPropNshMdType, error) { |
| 11665 | _edpropnshmdtype := &EdPropNshMdType{EdPropNsh: parent} |
| 11666 | if decoder.Length() < 4 { |
| 11667 | return nil, fmt.Errorf("EdPropNshMdType packet too short: %d < 4", decoder.Length()) |
| 11668 | } |
| 11669 | _edpropnshmdtype.MdType = uint8(decoder.ReadByte()) |
| 11670 | decoder.Skip(3) |
| 11671 | return _edpropnshmdtype, nil |
| 11672 | } |
| 11673 | |
| 11674 | func NewEdPropNshMdType() *EdPropNshMdType { |
| 11675 | obj := &EdPropNshMdType{ |
| 11676 | EdPropNsh: NewEdPropNsh(1), |
| 11677 | } |
| 11678 | return obj |
| 11679 | } |
| 11680 | |
| 11681 | type EdPropNshTlv struct { |
| 11682 | *EdPropNsh |
| 11683 | TlvClass uint16 |
| 11684 | TlvType uint8 |
| 11685 | TlvLen uint8 |
| 11686 | Value []byte |
| 11687 | } |
| 11688 | |
| 11689 | type IEdPropNshTlv interface { |
| 11690 | IEdPropNsh |
| 11691 | GetTlvClass() uint16 |
| 11692 | GetTlvType() uint8 |
| 11693 | GetTlvLen() uint8 |
| 11694 | GetValue() []byte |
| 11695 | } |
| 11696 | |
| 11697 | func (self *EdPropNshTlv) GetTlvClass() uint16 { |
| 11698 | return self.TlvClass |
| 11699 | } |
| 11700 | |
| 11701 | func (self *EdPropNshTlv) SetTlvClass(v uint16) { |
| 11702 | self.TlvClass = v |
| 11703 | } |
| 11704 | |
| 11705 | func (self *EdPropNshTlv) GetTlvType() uint8 { |
| 11706 | return self.TlvType |
| 11707 | } |
| 11708 | |
| 11709 | func (self *EdPropNshTlv) SetTlvType(v uint8) { |
| 11710 | self.TlvType = v |
| 11711 | } |
| 11712 | |
| 11713 | func (self *EdPropNshTlv) GetTlvLen() uint8 { |
| 11714 | return self.TlvLen |
| 11715 | } |
| 11716 | |
| 11717 | func (self *EdPropNshTlv) SetTlvLen(v uint8) { |
| 11718 | self.TlvLen = v |
| 11719 | } |
| 11720 | |
| 11721 | func (self *EdPropNshTlv) GetValue() []byte { |
| 11722 | return self.Value |
| 11723 | } |
| 11724 | |
| 11725 | func (self *EdPropNshTlv) SetValue(v []byte) { |
| 11726 | self.Value = v |
| 11727 | } |
| 11728 | |
| 11729 | func (self *EdPropNshTlv) Serialize(encoder *goloxi.Encoder) error { |
| 11730 | if err := self.EdPropNsh.Serialize(encoder); err != nil { |
| 11731 | return err |
| 11732 | } |
| 11733 | |
| 11734 | encoder.PutUint16(uint16(self.TlvClass)) |
| 11735 | encoder.PutUint8(uint8(self.TlvType)) |
| 11736 | encoder.PutUint8(uint8(self.TlvLen)) |
| 11737 | encoder.Write(self.Value) |
| 11738 | |
| 11739 | encoder.Bytes()[3] = uint8(len(encoder.Bytes())) |
| 11740 | |
| 11741 | return nil |
| 11742 | } |
| 11743 | |
| 11744 | func DecodeEdPropNshTlv(parent *EdPropNsh, decoder *goloxi.Decoder) (*EdPropNshTlv, error) { |
| 11745 | _edpropnshtlv := &EdPropNshTlv{EdPropNsh: parent} |
| 11746 | if decoder.Length() < 4 { |
| 11747 | return nil, fmt.Errorf("EdPropNshTlv packet too short: %d < 4", decoder.Length()) |
| 11748 | } |
| 11749 | _edpropnshtlv.TlvClass = uint16(decoder.ReadUint16()) |
| 11750 | _edpropnshtlv.TlvType = uint8(decoder.ReadByte()) |
| 11751 | _edpropnshtlv.TlvLen = uint8(decoder.ReadByte()) |
| 11752 | _edpropnshtlv.Value = decoder.SliceDecoder(int(_edpropnshtlv.TlvLen), 0).Read(int(_edpropnshtlv.TlvLen)) |
| 11753 | return _edpropnshtlv, nil |
| 11754 | } |
| 11755 | |
| 11756 | func NewEdPropNshTlv() *EdPropNshTlv { |
| 11757 | obj := &EdPropNshTlv{ |
| 11758 | EdPropNsh: NewEdPropNsh(2), |
| 11759 | } |
| 11760 | return obj |
| 11761 | } |
| 11762 | |
| 11763 | type FlowModSpec struct { |
| 11764 | SrcDst uint8 |
| 11765 | NBits uint8 |
| 11766 | } |
| 11767 | |
| 11768 | type IFlowModSpec interface { |
| 11769 | goloxi.Serializable |
| 11770 | GetSrcDst() uint8 |
| 11771 | GetNBits() uint8 |
| 11772 | } |
| 11773 | |
| 11774 | func (self *FlowModSpec) GetSrcDst() uint8 { |
| 11775 | return self.SrcDst |
| 11776 | } |
| 11777 | |
| 11778 | func (self *FlowModSpec) SetSrcDst(v uint8) { |
| 11779 | self.SrcDst = v |
| 11780 | } |
| 11781 | |
| 11782 | func (self *FlowModSpec) GetNBits() uint8 { |
| 11783 | return self.NBits |
| 11784 | } |
| 11785 | |
| 11786 | func (self *FlowModSpec) SetNBits(v uint8) { |
| 11787 | self.NBits = v |
| 11788 | } |
| 11789 | |
| 11790 | func (self *FlowModSpec) Serialize(encoder *goloxi.Encoder) error { |
| 11791 | |
| 11792 | encoder.PutUint8(uint8(self.SrcDst)) |
| 11793 | encoder.PutUint8(uint8(self.NBits)) |
| 11794 | |
| 11795 | return nil |
| 11796 | } |
| 11797 | |
| 11798 | func DecodeFlowModSpec(decoder *goloxi.Decoder) (IFlowModSpec, error) { |
| 11799 | _flowmodspec := &FlowModSpec{} |
| 11800 | if decoder.Length() < 2 { |
| 11801 | return nil, fmt.Errorf("FlowModSpec packet too short: %d < 2", decoder.Length()) |
| 11802 | } |
| 11803 | _flowmodspec.SrcDst = uint8(decoder.ReadByte()) |
| 11804 | _flowmodspec.NBits = uint8(decoder.ReadByte()) |
| 11805 | if _flowmodspec.SrcDst == 0 && _flowmodspec.NBits == 0 { |
| 11806 | return nil, nil |
| 11807 | } |
| 11808 | |
| 11809 | switch _flowmodspec.SrcDst { |
| 11810 | case 0: |
| 11811 | return DecodeFlowModSpecSrc0Dst0(_flowmodspec, decoder) |
| 11812 | case 8: |
| 11813 | return DecodeFlowModSpecSrc0Dst1(_flowmodspec, decoder) |
| 11814 | case 40: |
| 11815 | return DecodeFlowModSpecSrc1Dst1(_flowmodspec, decoder) |
| 11816 | case 16: |
| 11817 | return DecodeFlowModSpecSrc0Dst2(_flowmodspec, decoder) |
| 11818 | case 32: |
| 11819 | return DecodeFlowModSpecSrc1Dst0(_flowmodspec, decoder) |
| 11820 | default: |
| 11821 | return nil, fmt.Errorf("Invalid type '%d' for 'FlowModSpec'", _flowmodspec.SrcDst) |
| 11822 | } |
| 11823 | } |
| 11824 | |
| 11825 | func NewFlowModSpec(_src_dst uint8) *FlowModSpec { |
| 11826 | obj := &FlowModSpec{} |
| 11827 | obj.SrcDst = _src_dst |
| 11828 | return obj |
| 11829 | } |
| 11830 | |
| 11831 | type FlowModSpecSrc0Dst0 struct { |
| 11832 | *FlowModSpec |
| 11833 | Src goloxi.IOxmId |
| 11834 | SrcOfs uint16 |
| 11835 | Dst goloxi.IOxmId |
| 11836 | DstOfs uint16 |
| 11837 | } |
| 11838 | |
| 11839 | type IFlowModSpecSrc0Dst0 interface { |
| 11840 | IFlowModSpec |
| 11841 | GetSrc() goloxi.IOxmId |
| 11842 | GetSrcOfs() uint16 |
| 11843 | GetDst() goloxi.IOxmId |
| 11844 | GetDstOfs() uint16 |
| 11845 | } |
| 11846 | |
| 11847 | func (self *FlowModSpecSrc0Dst0) GetSrc() goloxi.IOxmId { |
| 11848 | return self.Src |
| 11849 | } |
| 11850 | |
| 11851 | func (self *FlowModSpecSrc0Dst0) SetSrc(v goloxi.IOxmId) { |
| 11852 | self.Src = v |
| 11853 | } |
| 11854 | |
| 11855 | func (self *FlowModSpecSrc0Dst0) GetSrcOfs() uint16 { |
| 11856 | return self.SrcOfs |
| 11857 | } |
| 11858 | |
| 11859 | func (self *FlowModSpecSrc0Dst0) SetSrcOfs(v uint16) { |
| 11860 | self.SrcOfs = v |
| 11861 | } |
| 11862 | |
| 11863 | func (self *FlowModSpecSrc0Dst0) GetDst() goloxi.IOxmId { |
| 11864 | return self.Dst |
| 11865 | } |
| 11866 | |
| 11867 | func (self *FlowModSpecSrc0Dst0) SetDst(v goloxi.IOxmId) { |
| 11868 | self.Dst = v |
| 11869 | } |
| 11870 | |
| 11871 | func (self *FlowModSpecSrc0Dst0) GetDstOfs() uint16 { |
| 11872 | return self.DstOfs |
| 11873 | } |
| 11874 | |
| 11875 | func (self *FlowModSpecSrc0Dst0) SetDstOfs(v uint16) { |
| 11876 | self.DstOfs = v |
| 11877 | } |
| 11878 | |
| 11879 | func (self *FlowModSpecSrc0Dst0) Serialize(encoder *goloxi.Encoder) error { |
| 11880 | if err := self.FlowModSpec.Serialize(encoder); err != nil { |
| 11881 | return err |
| 11882 | } |
| 11883 | |
| 11884 | self.Src.Serialize(encoder) |
| 11885 | encoder.PutUint16(uint16(self.SrcOfs)) |
| 11886 | self.Dst.Serialize(encoder) |
| 11887 | encoder.PutUint16(uint16(self.DstOfs)) |
| 11888 | |
| 11889 | return nil |
| 11890 | } |
| 11891 | |
| 11892 | func DecodeFlowModSpecSrc0Dst0(parent *FlowModSpec, decoder *goloxi.Decoder) (IFlowModSpecSrc0Dst0, error) { |
| 11893 | _flowmodspecsrc0dst0 := &FlowModSpecSrc0Dst0{FlowModSpec: parent} |
| 11894 | if decoder.Length() < 12 { |
| 11895 | return nil, fmt.Errorf("FlowModSpecSrc0Dst0 packet too short: %d < 12", decoder.Length()) |
| 11896 | } |
| 11897 | if obj, err := DecodeOxmId(decoder); err != nil { |
| 11898 | return nil, err |
| 11899 | } else { |
| 11900 | _flowmodspecsrc0dst0.Src = obj |
| 11901 | } |
| 11902 | |
| 11903 | _flowmodspecsrc0dst0.SrcOfs = uint16(decoder.ReadUint16()) |
| 11904 | if obj, err := DecodeOxmId(decoder); err != nil { |
| 11905 | return nil, err |
| 11906 | } else { |
| 11907 | _flowmodspecsrc0dst0.Dst = obj |
| 11908 | } |
| 11909 | |
| 11910 | _flowmodspecsrc0dst0.DstOfs = uint16(decoder.ReadUint16()) |
| 11911 | return _flowmodspecsrc0dst0, nil |
| 11912 | } |
| 11913 | |
| 11914 | func NewFlowModSpecSrc0Dst0(_n_bits uint8) *FlowModSpecSrc0Dst0 { |
| 11915 | obj := &FlowModSpecSrc0Dst0{ |
| 11916 | FlowModSpec: NewFlowModSpec(0), |
| 11917 | } |
| 11918 | obj.NBits = _n_bits |
| 11919 | return obj |
| 11920 | } |
| 11921 | |
| 11922 | type FlowModSpecSrc0Dst1 struct { |
| 11923 | *FlowModSpec |
| 11924 | Src goloxi.IOxmId |
| 11925 | SrcOfs uint16 |
| 11926 | Dst goloxi.IOxmId |
| 11927 | DstOfs uint16 |
| 11928 | } |
| 11929 | |
| 11930 | type IFlowModSpecSrc0Dst1 interface { |
| 11931 | IFlowModSpec |
| 11932 | GetSrc() goloxi.IOxmId |
| 11933 | GetSrcOfs() uint16 |
| 11934 | GetDst() goloxi.IOxmId |
| 11935 | GetDstOfs() uint16 |
| 11936 | } |
| 11937 | |
| 11938 | func (self *FlowModSpecSrc0Dst1) GetSrc() goloxi.IOxmId { |
| 11939 | return self.Src |
| 11940 | } |
| 11941 | |
| 11942 | func (self *FlowModSpecSrc0Dst1) SetSrc(v goloxi.IOxmId) { |
| 11943 | self.Src = v |
| 11944 | } |
| 11945 | |
| 11946 | func (self *FlowModSpecSrc0Dst1) GetSrcOfs() uint16 { |
| 11947 | return self.SrcOfs |
| 11948 | } |
| 11949 | |
| 11950 | func (self *FlowModSpecSrc0Dst1) SetSrcOfs(v uint16) { |
| 11951 | self.SrcOfs = v |
| 11952 | } |
| 11953 | |
| 11954 | func (self *FlowModSpecSrc0Dst1) GetDst() goloxi.IOxmId { |
| 11955 | return self.Dst |
| 11956 | } |
| 11957 | |
| 11958 | func (self *FlowModSpecSrc0Dst1) SetDst(v goloxi.IOxmId) { |
| 11959 | self.Dst = v |
| 11960 | } |
| 11961 | |
| 11962 | func (self *FlowModSpecSrc0Dst1) GetDstOfs() uint16 { |
| 11963 | return self.DstOfs |
| 11964 | } |
| 11965 | |
| 11966 | func (self *FlowModSpecSrc0Dst1) SetDstOfs(v uint16) { |
| 11967 | self.DstOfs = v |
| 11968 | } |
| 11969 | |
| 11970 | func (self *FlowModSpecSrc0Dst1) Serialize(encoder *goloxi.Encoder) error { |
| 11971 | if err := self.FlowModSpec.Serialize(encoder); err != nil { |
| 11972 | return err |
| 11973 | } |
| 11974 | |
| 11975 | self.Src.Serialize(encoder) |
| 11976 | encoder.PutUint16(uint16(self.SrcOfs)) |
| 11977 | self.Dst.Serialize(encoder) |
| 11978 | encoder.PutUint16(uint16(self.DstOfs)) |
| 11979 | |
| 11980 | return nil |
| 11981 | } |
| 11982 | |
| 11983 | func DecodeFlowModSpecSrc0Dst1(parent *FlowModSpec, decoder *goloxi.Decoder) (*FlowModSpecSrc0Dst1, error) { |
| 11984 | _flowmodspecsrc0dst1 := &FlowModSpecSrc0Dst1{FlowModSpec: parent} |
| 11985 | if decoder.Length() < 12 { |
| 11986 | return nil, fmt.Errorf("FlowModSpecSrc0Dst1 packet too short: %d < 12", decoder.Length()) |
| 11987 | } |
| 11988 | if obj, err := DecodeOxmId(decoder); err != nil { |
| 11989 | return nil, err |
| 11990 | } else { |
| 11991 | _flowmodspecsrc0dst1.Src = obj |
| 11992 | } |
| 11993 | |
| 11994 | _flowmodspecsrc0dst1.SrcOfs = uint16(decoder.ReadUint16()) |
| 11995 | if obj, err := DecodeOxmId(decoder); err != nil { |
| 11996 | return nil, err |
| 11997 | } else { |
| 11998 | _flowmodspecsrc0dst1.Dst = obj |
| 11999 | } |
| 12000 | |
| 12001 | _flowmodspecsrc0dst1.DstOfs = uint16(decoder.ReadUint16()) |
| 12002 | return _flowmodspecsrc0dst1, nil |
| 12003 | } |
| 12004 | |
| 12005 | func NewFlowModSpecSrc0Dst1() *FlowModSpecSrc0Dst1 { |
| 12006 | obj := &FlowModSpecSrc0Dst1{ |
| 12007 | FlowModSpec: NewFlowModSpec(8), |
| 12008 | } |
| 12009 | return obj |
| 12010 | } |
| 12011 | |
| 12012 | type FlowModSpecSrc0Dst2 struct { |
| 12013 | *FlowModSpec |
| 12014 | Src goloxi.IOxmId |
| 12015 | SrcOfs uint16 |
| 12016 | } |
| 12017 | |
| 12018 | type IFlowModSpecSrc0Dst2 interface { |
| 12019 | IFlowModSpec |
| 12020 | GetSrc() goloxi.IOxmId |
| 12021 | GetSrcOfs() uint16 |
| 12022 | } |
| 12023 | |
| 12024 | func (self *FlowModSpecSrc0Dst2) GetSrc() goloxi.IOxmId { |
| 12025 | return self.Src |
| 12026 | } |
| 12027 | |
| 12028 | func (self *FlowModSpecSrc0Dst2) SetSrc(v goloxi.IOxmId) { |
| 12029 | self.Src = v |
| 12030 | } |
| 12031 | |
| 12032 | func (self *FlowModSpecSrc0Dst2) GetSrcOfs() uint16 { |
| 12033 | return self.SrcOfs |
| 12034 | } |
| 12035 | |
| 12036 | func (self *FlowModSpecSrc0Dst2) SetSrcOfs(v uint16) { |
| 12037 | self.SrcOfs = v |
| 12038 | } |
| 12039 | |
| 12040 | func (self *FlowModSpecSrc0Dst2) Serialize(encoder *goloxi.Encoder) error { |
| 12041 | if err := self.FlowModSpec.Serialize(encoder); err != nil { |
| 12042 | return err |
| 12043 | } |
| 12044 | |
| 12045 | self.Src.Serialize(encoder) |
| 12046 | encoder.PutUint16(uint16(self.SrcOfs)) |
| 12047 | |
| 12048 | return nil |
| 12049 | } |
| 12050 | |
| 12051 | func DecodeFlowModSpecSrc0Dst2(parent *FlowModSpec, decoder *goloxi.Decoder) (*FlowModSpecSrc0Dst2, error) { |
| 12052 | _flowmodspecsrc0dst2 := &FlowModSpecSrc0Dst2{FlowModSpec: parent} |
| 12053 | if decoder.Length() < 6 { |
| 12054 | return nil, fmt.Errorf("FlowModSpecSrc0Dst2 packet too short: %d < 6", decoder.Length()) |
| 12055 | } |
| 12056 | if obj, err := DecodeOxmId(decoder); err != nil { |
| 12057 | return nil, err |
| 12058 | } else { |
| 12059 | _flowmodspecsrc0dst2.Src = obj |
| 12060 | } |
| 12061 | |
| 12062 | _flowmodspecsrc0dst2.SrcOfs = uint16(decoder.ReadUint16()) |
| 12063 | return _flowmodspecsrc0dst2, nil |
| 12064 | } |
| 12065 | |
| 12066 | func NewFlowModSpecSrc0Dst2() *FlowModSpecSrc0Dst2 { |
| 12067 | obj := &FlowModSpecSrc0Dst2{ |
| 12068 | FlowModSpec: NewFlowModSpec(16), |
| 12069 | } |
| 12070 | return obj |
| 12071 | } |
| 12072 | |
| 12073 | type FlowModSpecSrc1Dst0 struct { |
| 12074 | *FlowModSpec |
| 12075 | Src []byte |
| 12076 | Dst goloxi.IOxmId |
| 12077 | DstOfs uint16 |
| 12078 | } |
| 12079 | |
| 12080 | type IFlowModSpecSrc1Dst0 interface { |
| 12081 | IFlowModSpec |
| 12082 | GetSrc() []byte |
| 12083 | GetDst() goloxi.IOxmId |
| 12084 | GetDstOfs() uint16 |
| 12085 | } |
| 12086 | |
| 12087 | func (self *FlowModSpecSrc1Dst0) GetSrc() []byte { |
| 12088 | return self.Src |
| 12089 | } |
| 12090 | |
| 12091 | func (self *FlowModSpecSrc1Dst0) SetSrc(v []byte) { |
| 12092 | self.Src = v |
| 12093 | } |
| 12094 | |
| 12095 | func (self *FlowModSpecSrc1Dst0) GetDst() goloxi.IOxmId { |
| 12096 | return self.Dst |
| 12097 | } |
| 12098 | |
| 12099 | func (self *FlowModSpecSrc1Dst0) SetDst(v goloxi.IOxmId) { |
| 12100 | self.Dst = v |
| 12101 | } |
| 12102 | |
| 12103 | func (self *FlowModSpecSrc1Dst0) GetDstOfs() uint16 { |
| 12104 | return self.DstOfs |
| 12105 | } |
| 12106 | |
| 12107 | func (self *FlowModSpecSrc1Dst0) SetDstOfs(v uint16) { |
| 12108 | self.DstOfs = v |
| 12109 | } |
| 12110 | |
| 12111 | func (self *FlowModSpecSrc1Dst0) Serialize(encoder *goloxi.Encoder) error { |
| 12112 | if err := self.FlowModSpec.Serialize(encoder); err != nil { |
| 12113 | return err |
| 12114 | } |
| 12115 | |
| 12116 | encoder.Write(self.Src) |
| 12117 | self.Dst.Serialize(encoder) |
| 12118 | encoder.PutUint16(uint16(self.DstOfs)) |
| 12119 | |
| 12120 | return nil |
| 12121 | } |
| 12122 | |
| 12123 | func DecodeFlowModSpecSrc1Dst0(parent *FlowModSpec, decoder *goloxi.Decoder) (*FlowModSpecSrc1Dst0, error) { |
| 12124 | _flowmodspecsrc1dst0 := &FlowModSpecSrc1Dst0{FlowModSpec: parent} |
| 12125 | if decoder.Length() < 6 { |
| 12126 | return nil, fmt.Errorf("FlowModSpecSrc1Dst0 packet too short: %d < 6", decoder.Length()) |
| 12127 | } |
| 12128 | _flowmodspecsrc1dst0.Src = decoder.SliceDecoder(int((_flowmodspecsrc1dst0.NBits+15)/16*2), 0).Read(int(_flowmodspecsrc1dst0.NBits)) |
| 12129 | if obj, err := DecodeOxmId(decoder); err != nil { |
| 12130 | return nil, err |
| 12131 | } else { |
| 12132 | _flowmodspecsrc1dst0.Dst = obj |
| 12133 | } |
| 12134 | |
| 12135 | _flowmodspecsrc1dst0.DstOfs = uint16(decoder.ReadUint16()) |
| 12136 | return _flowmodspecsrc1dst0, nil |
| 12137 | } |
| 12138 | |
| 12139 | func NewFlowModSpecSrc1Dst0() *FlowModSpecSrc1Dst0 { |
| 12140 | obj := &FlowModSpecSrc1Dst0{ |
| 12141 | FlowModSpec: NewFlowModSpec(32), |
| 12142 | } |
| 12143 | return obj |
| 12144 | } |
| 12145 | |
| 12146 | type FlowModSpecSrc1Dst1 struct { |
| 12147 | *FlowModSpec |
| 12148 | Src []byte |
| 12149 | Dst goloxi.IOxmId |
| 12150 | DstOfs uint16 |
| 12151 | } |
| 12152 | |
| 12153 | type IFlowModSpecSrc1Dst1 interface { |
| 12154 | IFlowModSpec |
| 12155 | GetSrc() []byte |
| 12156 | GetDst() goloxi.IOxmId |
| 12157 | GetDstOfs() uint16 |
| 12158 | } |
| 12159 | |
| 12160 | func (self *FlowModSpecSrc1Dst1) GetSrc() []byte { |
| 12161 | return self.Src |
| 12162 | } |
| 12163 | |
| 12164 | func (self *FlowModSpecSrc1Dst1) SetSrc(v []byte) { |
| 12165 | self.Src = v |
| 12166 | } |
| 12167 | |
| 12168 | func (self *FlowModSpecSrc1Dst1) GetDst() goloxi.IOxmId { |
| 12169 | return self.Dst |
| 12170 | } |
| 12171 | |
| 12172 | func (self *FlowModSpecSrc1Dst1) SetDst(v goloxi.IOxmId) { |
| 12173 | self.Dst = v |
| 12174 | } |
| 12175 | |
| 12176 | func (self *FlowModSpecSrc1Dst1) GetDstOfs() uint16 { |
| 12177 | return self.DstOfs |
| 12178 | } |
| 12179 | |
| 12180 | func (self *FlowModSpecSrc1Dst1) SetDstOfs(v uint16) { |
| 12181 | self.DstOfs = v |
| 12182 | } |
| 12183 | |
| 12184 | func (self *FlowModSpecSrc1Dst1) Serialize(encoder *goloxi.Encoder) error { |
| 12185 | if err := self.FlowModSpec.Serialize(encoder); err != nil { |
| 12186 | return err |
| 12187 | } |
| 12188 | |
| 12189 | encoder.Write(self.Src) |
| 12190 | self.Dst.Serialize(encoder) |
| 12191 | encoder.PutUint16(uint16(self.DstOfs)) |
| 12192 | |
| 12193 | return nil |
| 12194 | } |
| 12195 | |
| 12196 | func DecodeFlowModSpecSrc1Dst1(parent *FlowModSpec, decoder *goloxi.Decoder) (*FlowModSpecSrc1Dst1, error) { |
| 12197 | _flowmodspecsrc1dst1 := &FlowModSpecSrc1Dst1{FlowModSpec: parent} |
| 12198 | if decoder.Length() < 6 { |
| 12199 | return nil, fmt.Errorf("FlowModSpecSrc1Dst1 packet too short: %d < 6", decoder.Length()) |
| 12200 | } |
| 12201 | _flowmodspecsrc1dst1.Src = decoder.SliceDecoder(int((_flowmodspecsrc1dst1.NBits+15)/16*2), 0).Read(int(_flowmodspecsrc1dst1.NBits)) |
| 12202 | if obj, err := DecodeOxmId(decoder); err != nil { |
| 12203 | return nil, err |
| 12204 | } else { |
| 12205 | _flowmodspecsrc1dst1.Dst = obj |
| 12206 | } |
| 12207 | |
| 12208 | _flowmodspecsrc1dst1.DstOfs = uint16(decoder.ReadUint16()) |
| 12209 | return _flowmodspecsrc1dst1, nil |
| 12210 | } |
| 12211 | |
| 12212 | func NewFlowModSpecSrc1Dst1() *FlowModSpecSrc1Dst1 { |
| 12213 | obj := &FlowModSpecSrc1Dst1{ |
| 12214 | FlowModSpec: NewFlowModSpec(40), |
| 12215 | } |
| 12216 | return obj |
| 12217 | } |
| 12218 | |
| 12219 | type FlowStatsEntry struct { |
| 12220 | Length uint16 |
| 12221 | TableId uint8 |
| 12222 | DurationSec uint32 |
| 12223 | DurationNsec uint32 |
| 12224 | Priority uint16 |
| 12225 | IdleTimeout uint16 |
| 12226 | HardTimeout uint16 |
| 12227 | Flags FlowModFlags |
| 12228 | Cookie uint64 |
| 12229 | PacketCount uint64 |
| 12230 | ByteCount uint64 |
| 12231 | Match Match |
| 12232 | Instructions []IInstruction |
| 12233 | } |
| 12234 | |
| 12235 | type IFlowStatsEntry interface { |
| 12236 | goloxi.Serializable |
| 12237 | GetLength() uint16 |
| 12238 | GetTableId() uint8 |
| 12239 | GetDurationSec() uint32 |
| 12240 | GetDurationNsec() uint32 |
| 12241 | GetPriority() uint16 |
| 12242 | GetIdleTimeout() uint16 |
| 12243 | GetHardTimeout() uint16 |
| 12244 | GetFlags() FlowModFlags |
| 12245 | GetCookie() uint64 |
| 12246 | GetPacketCount() uint64 |
| 12247 | GetByteCount() uint64 |
| 12248 | GetMatch() Match |
| 12249 | GetInstructions() []IInstruction |
| 12250 | } |
| 12251 | |
| 12252 | func (self *FlowStatsEntry) GetLength() uint16 { |
| 12253 | return self.Length |
| 12254 | } |
| 12255 | |
| 12256 | func (self *FlowStatsEntry) SetLength(v uint16) { |
| 12257 | self.Length = v |
| 12258 | } |
| 12259 | |
| 12260 | func (self *FlowStatsEntry) GetTableId() uint8 { |
| 12261 | return self.TableId |
| 12262 | } |
| 12263 | |
| 12264 | func (self *FlowStatsEntry) SetTableId(v uint8) { |
| 12265 | self.TableId = v |
| 12266 | } |
| 12267 | |
| 12268 | func (self *FlowStatsEntry) GetDurationSec() uint32 { |
| 12269 | return self.DurationSec |
| 12270 | } |
| 12271 | |
| 12272 | func (self *FlowStatsEntry) SetDurationSec(v uint32) { |
| 12273 | self.DurationSec = v |
| 12274 | } |
| 12275 | |
| 12276 | func (self *FlowStatsEntry) GetDurationNsec() uint32 { |
| 12277 | return self.DurationNsec |
| 12278 | } |
| 12279 | |
| 12280 | func (self *FlowStatsEntry) SetDurationNsec(v uint32) { |
| 12281 | self.DurationNsec = v |
| 12282 | } |
| 12283 | |
| 12284 | func (self *FlowStatsEntry) GetPriority() uint16 { |
| 12285 | return self.Priority |
| 12286 | } |
| 12287 | |
| 12288 | func (self *FlowStatsEntry) SetPriority(v uint16) { |
| 12289 | self.Priority = v |
| 12290 | } |
| 12291 | |
| 12292 | func (self *FlowStatsEntry) GetIdleTimeout() uint16 { |
| 12293 | return self.IdleTimeout |
| 12294 | } |
| 12295 | |
| 12296 | func (self *FlowStatsEntry) SetIdleTimeout(v uint16) { |
| 12297 | self.IdleTimeout = v |
| 12298 | } |
| 12299 | |
| 12300 | func (self *FlowStatsEntry) GetHardTimeout() uint16 { |
| 12301 | return self.HardTimeout |
| 12302 | } |
| 12303 | |
| 12304 | func (self *FlowStatsEntry) SetHardTimeout(v uint16) { |
| 12305 | self.HardTimeout = v |
| 12306 | } |
| 12307 | |
| 12308 | func (self *FlowStatsEntry) GetFlags() FlowModFlags { |
| 12309 | return self.Flags |
| 12310 | } |
| 12311 | |
| 12312 | func (self *FlowStatsEntry) SetFlags(v FlowModFlags) { |
| 12313 | self.Flags = v |
| 12314 | } |
| 12315 | |
| 12316 | func (self *FlowStatsEntry) GetCookie() uint64 { |
| 12317 | return self.Cookie |
| 12318 | } |
| 12319 | |
| 12320 | func (self *FlowStatsEntry) SetCookie(v uint64) { |
| 12321 | self.Cookie = v |
| 12322 | } |
| 12323 | |
| 12324 | func (self *FlowStatsEntry) GetPacketCount() uint64 { |
| 12325 | return self.PacketCount |
| 12326 | } |
| 12327 | |
| 12328 | func (self *FlowStatsEntry) SetPacketCount(v uint64) { |
| 12329 | self.PacketCount = v |
| 12330 | } |
| 12331 | |
| 12332 | func (self *FlowStatsEntry) GetByteCount() uint64 { |
| 12333 | return self.ByteCount |
| 12334 | } |
| 12335 | |
| 12336 | func (self *FlowStatsEntry) SetByteCount(v uint64) { |
| 12337 | self.ByteCount = v |
| 12338 | } |
| 12339 | |
| 12340 | func (self *FlowStatsEntry) GetMatch() Match { |
| 12341 | return self.Match |
| 12342 | } |
| 12343 | |
| 12344 | func (self *FlowStatsEntry) SetMatch(v Match) { |
| 12345 | self.Match = v |
| 12346 | } |
| 12347 | |
| 12348 | func (self *FlowStatsEntry) GetInstructions() []IInstruction { |
| 12349 | return self.Instructions |
| 12350 | } |
| 12351 | |
| 12352 | func (self *FlowStatsEntry) SetInstructions(v []IInstruction) { |
| 12353 | self.Instructions = v |
| 12354 | } |
| 12355 | |
| 12356 | func (self *FlowStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 12357 | |
| 12358 | encoder.PutUint16(uint16(self.Length)) |
| 12359 | encoder.PutUint8(uint8(self.TableId)) |
| 12360 | encoder.Write(bytes.Repeat([]byte{0}, 1)) |
| 12361 | encoder.PutUint32(uint32(self.DurationSec)) |
| 12362 | encoder.PutUint32(uint32(self.DurationNsec)) |
| 12363 | encoder.PutUint16(uint16(self.Priority)) |
| 12364 | encoder.PutUint16(uint16(self.IdleTimeout)) |
| 12365 | encoder.PutUint16(uint16(self.HardTimeout)) |
| 12366 | encoder.PutUint16(uint16(self.Flags)) |
| 12367 | encoder.Write(bytes.Repeat([]byte{0}, 4)) |
| 12368 | encoder.PutUint64(uint64(self.Cookie)) |
| 12369 | encoder.PutUint64(uint64(self.PacketCount)) |
| 12370 | encoder.PutUint64(uint64(self.ByteCount)) |
| 12371 | if err := self.Match.Serialize(encoder); err != nil { |
| 12372 | return err |
| 12373 | } |
| 12374 | |
| 12375 | for _, obj := range self.Instructions { |
| 12376 | if err := obj.Serialize(encoder); err != nil { |
| 12377 | return err |
| 12378 | } |
| 12379 | } |
| 12380 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 12381 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 12382 | |
| 12383 | return nil |
| 12384 | } |
| 12385 | |
| 12386 | func DecodeFlowStatsEntry(decoder *goloxi.Decoder) (*FlowStatsEntry, error) { |
| 12387 | _flowstatsentry := &FlowStatsEntry{} |
| 12388 | if decoder.Length() < 56 { |
| 12389 | return nil, fmt.Errorf("FlowStatsEntry packet too short: %d < 56", decoder.Length()) |
| 12390 | } |
| 12391 | _flowstatsentry.Length = uint16(decoder.ReadUint16()) |
| 12392 | oldDecoder := decoder |
| 12393 | defer func() { decoder = oldDecoder }() |
| 12394 | decoder = decoder.SliceDecoder(int(_flowstatsentry.Length), 2+0) |
| 12395 | _flowstatsentry.TableId = uint8(decoder.ReadByte()) |
| 12396 | decoder.Skip(1) |
| 12397 | _flowstatsentry.DurationSec = uint32(decoder.ReadUint32()) |
| 12398 | _flowstatsentry.DurationNsec = uint32(decoder.ReadUint32()) |
| 12399 | _flowstatsentry.Priority = uint16(decoder.ReadUint16()) |
| 12400 | _flowstatsentry.IdleTimeout = uint16(decoder.ReadUint16()) |
| 12401 | _flowstatsentry.HardTimeout = uint16(decoder.ReadUint16()) |
| 12402 | _flowstatsentry.Flags = FlowModFlags(decoder.ReadUint16()) |
| 12403 | decoder.Skip(4) |
| 12404 | _flowstatsentry.Cookie = uint64(decoder.ReadUint64()) |
| 12405 | _flowstatsentry.PacketCount = uint64(decoder.ReadUint64()) |
| 12406 | _flowstatsentry.ByteCount = uint64(decoder.ReadUint64()) |
| 12407 | if err := _flowstatsentry.Match.Decode(decoder); err != nil { |
| 12408 | return nil, err |
| 12409 | } |
| 12410 | |
| 12411 | decoder.SkipAlign() |
| 12412 | |
| 12413 | for decoder.Length() >= 4 { |
| 12414 | item, err := DecodeInstruction(decoder) |
| 12415 | if err != nil { |
| 12416 | return nil, err |
| 12417 | } |
| 12418 | if item != nil { |
| 12419 | _flowstatsentry.Instructions = append(_flowstatsentry.Instructions, item) |
| 12420 | } |
| 12421 | } |
| 12422 | return _flowstatsentry, nil |
| 12423 | } |
| 12424 | |
| 12425 | func NewFlowStatsEntry() *FlowStatsEntry { |
| 12426 | obj := &FlowStatsEntry{} |
| 12427 | return obj |
| 12428 | } |
| 12429 | |
| 12430 | type GroupDescStatsEntry struct { |
| 12431 | Length uint16 |
| 12432 | GroupType GroupType |
| 12433 | GroupId uint32 |
| 12434 | Buckets []*Bucket |
| 12435 | } |
| 12436 | |
| 12437 | type IGroupDescStatsEntry interface { |
| 12438 | goloxi.Serializable |
| 12439 | GetLength() uint16 |
| 12440 | GetGroupType() GroupType |
| 12441 | GetGroupId() uint32 |
| 12442 | GetBuckets() []*Bucket |
| 12443 | } |
| 12444 | |
| 12445 | func (self *GroupDescStatsEntry) GetLength() uint16 { |
| 12446 | return self.Length |
| 12447 | } |
| 12448 | |
| 12449 | func (self *GroupDescStatsEntry) SetLength(v uint16) { |
| 12450 | self.Length = v |
| 12451 | } |
| 12452 | |
| 12453 | func (self *GroupDescStatsEntry) GetGroupType() GroupType { |
| 12454 | return self.GroupType |
| 12455 | } |
| 12456 | |
| 12457 | func (self *GroupDescStatsEntry) SetGroupType(v GroupType) { |
| 12458 | self.GroupType = v |
| 12459 | } |
| 12460 | |
| 12461 | func (self *GroupDescStatsEntry) GetGroupId() uint32 { |
| 12462 | return self.GroupId |
| 12463 | } |
| 12464 | |
| 12465 | func (self *GroupDescStatsEntry) SetGroupId(v uint32) { |
| 12466 | self.GroupId = v |
| 12467 | } |
| 12468 | |
| 12469 | func (self *GroupDescStatsEntry) GetBuckets() []*Bucket { |
| 12470 | return self.Buckets |
| 12471 | } |
| 12472 | |
| 12473 | func (self *GroupDescStatsEntry) SetBuckets(v []*Bucket) { |
| 12474 | self.Buckets = v |
| 12475 | } |
| 12476 | |
| 12477 | func (self *GroupDescStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 12478 | |
| 12479 | encoder.PutUint16(uint16(self.Length)) |
| 12480 | encoder.PutUint8(uint8(self.GroupType)) |
| 12481 | encoder.Write(bytes.Repeat([]byte{0}, 1)) |
| 12482 | encoder.PutUint32(uint32(self.GroupId)) |
| 12483 | for _, obj := range self.Buckets { |
| 12484 | if err := obj.Serialize(encoder); err != nil { |
| 12485 | return err |
| 12486 | } |
| 12487 | } |
| 12488 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 12489 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 12490 | |
| 12491 | return nil |
| 12492 | } |
| 12493 | |
| 12494 | func DecodeGroupDescStatsEntry(decoder *goloxi.Decoder) (*GroupDescStatsEntry, error) { |
| 12495 | _groupdescstatsentry := &GroupDescStatsEntry{} |
| 12496 | if decoder.Length() < 8 { |
| 12497 | return nil, fmt.Errorf("GroupDescStatsEntry packet too short: %d < 8", decoder.Length()) |
| 12498 | } |
| 12499 | _groupdescstatsentry.Length = uint16(decoder.ReadUint16()) |
| 12500 | oldDecoder := decoder |
| 12501 | defer func() { decoder = oldDecoder }() |
| 12502 | decoder = decoder.SliceDecoder(int(_groupdescstatsentry.Length), 2+0) |
| 12503 | _groupdescstatsentry.GroupType = GroupType(decoder.ReadByte()) |
| 12504 | decoder.Skip(1) |
| 12505 | _groupdescstatsentry.GroupId = uint32(decoder.ReadUint32()) |
| 12506 | |
| 12507 | for decoder.Length() >= 16 { |
| 12508 | item, err := DecodeBucket(decoder) |
| 12509 | if err != nil { |
| 12510 | return nil, err |
| 12511 | } |
| 12512 | if item != nil { |
| 12513 | _groupdescstatsentry.Buckets = append(_groupdescstatsentry.Buckets, item) |
| 12514 | } |
| 12515 | } |
| 12516 | return _groupdescstatsentry, nil |
| 12517 | } |
| 12518 | |
| 12519 | func NewGroupDescStatsEntry() *GroupDescStatsEntry { |
| 12520 | obj := &GroupDescStatsEntry{} |
| 12521 | return obj |
| 12522 | } |
| 12523 | |
| 12524 | type GroupStatsEntry struct { |
| 12525 | Length uint16 |
| 12526 | GroupId uint32 |
| 12527 | RefCount uint32 |
| 12528 | PacketCount uint64 |
| 12529 | ByteCount uint64 |
| 12530 | DurationSec uint32 |
| 12531 | DurationNsec uint32 |
| 12532 | BucketStats []*BucketCounter |
| 12533 | } |
| 12534 | |
| 12535 | type IGroupStatsEntry interface { |
| 12536 | goloxi.Serializable |
| 12537 | GetLength() uint16 |
| 12538 | GetGroupId() uint32 |
| 12539 | GetRefCount() uint32 |
| 12540 | GetPacketCount() uint64 |
| 12541 | GetByteCount() uint64 |
| 12542 | GetDurationSec() uint32 |
| 12543 | GetDurationNsec() uint32 |
| 12544 | GetBucketStats() []*BucketCounter |
| 12545 | } |
| 12546 | |
| 12547 | func (self *GroupStatsEntry) GetLength() uint16 { |
| 12548 | return self.Length |
| 12549 | } |
| 12550 | |
| 12551 | func (self *GroupStatsEntry) SetLength(v uint16) { |
| 12552 | self.Length = v |
| 12553 | } |
| 12554 | |
| 12555 | func (self *GroupStatsEntry) GetGroupId() uint32 { |
| 12556 | return self.GroupId |
| 12557 | } |
| 12558 | |
| 12559 | func (self *GroupStatsEntry) SetGroupId(v uint32) { |
| 12560 | self.GroupId = v |
| 12561 | } |
| 12562 | |
| 12563 | func (self *GroupStatsEntry) GetRefCount() uint32 { |
| 12564 | return self.RefCount |
| 12565 | } |
| 12566 | |
| 12567 | func (self *GroupStatsEntry) SetRefCount(v uint32) { |
| 12568 | self.RefCount = v |
| 12569 | } |
| 12570 | |
| 12571 | func (self *GroupStatsEntry) GetPacketCount() uint64 { |
| 12572 | return self.PacketCount |
| 12573 | } |
| 12574 | |
| 12575 | func (self *GroupStatsEntry) SetPacketCount(v uint64) { |
| 12576 | self.PacketCount = v |
| 12577 | } |
| 12578 | |
| 12579 | func (self *GroupStatsEntry) GetByteCount() uint64 { |
| 12580 | return self.ByteCount |
| 12581 | } |
| 12582 | |
| 12583 | func (self *GroupStatsEntry) SetByteCount(v uint64) { |
| 12584 | self.ByteCount = v |
| 12585 | } |
| 12586 | |
| 12587 | func (self *GroupStatsEntry) GetDurationSec() uint32 { |
| 12588 | return self.DurationSec |
| 12589 | } |
| 12590 | |
| 12591 | func (self *GroupStatsEntry) SetDurationSec(v uint32) { |
| 12592 | self.DurationSec = v |
| 12593 | } |
| 12594 | |
| 12595 | func (self *GroupStatsEntry) GetDurationNsec() uint32 { |
| 12596 | return self.DurationNsec |
| 12597 | } |
| 12598 | |
| 12599 | func (self *GroupStatsEntry) SetDurationNsec(v uint32) { |
| 12600 | self.DurationNsec = v |
| 12601 | } |
| 12602 | |
| 12603 | func (self *GroupStatsEntry) GetBucketStats() []*BucketCounter { |
| 12604 | return self.BucketStats |
| 12605 | } |
| 12606 | |
| 12607 | func (self *GroupStatsEntry) SetBucketStats(v []*BucketCounter) { |
| 12608 | self.BucketStats = v |
| 12609 | } |
| 12610 | |
| 12611 | func (self *GroupStatsEntry) Serialize(encoder *goloxi.Encoder) error { |
| 12612 | |
| 12613 | encoder.PutUint16(uint16(self.Length)) |
| 12614 | encoder.Write(bytes.Repeat([]byte{0}, 2)) |
| 12615 | encoder.PutUint32(uint32(self.GroupId)) |
| 12616 | encoder.PutUint32(uint32(self.RefCount)) |
| 12617 | encoder.Write(bytes.Repeat([]byte{0}, 4)) |
| 12618 | encoder.PutUint64(uint64(self.PacketCount)) |
| 12619 | encoder.PutUint64(uint64(self.ByteCount)) |
| 12620 | encoder.PutUint32(uint32(self.DurationSec)) |
| 12621 | encoder.PutUint32(uint32(self.DurationNsec)) |
| 12622 | for _, obj := range self.BucketStats { |
| 12623 | if err := obj.Serialize(encoder); err != nil { |
| 12624 | return err |
| 12625 | } |
| 12626 | } |
| 12627 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 12628 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 12629 | |
| 12630 | return nil |
| 12631 | } |
| 12632 | |
| 12633 | func DecodeGroupStatsEntry(decoder *goloxi.Decoder) (*GroupStatsEntry, error) { |
| 12634 | _groupstatsentry := &GroupStatsEntry{} |
| 12635 | if decoder.Length() < 40 { |
| 12636 | return nil, fmt.Errorf("GroupStatsEntry packet too short: %d < 40", decoder.Length()) |
| 12637 | } |
| 12638 | _groupstatsentry.Length = uint16(decoder.ReadUint16()) |
| 12639 | oldDecoder := decoder |
| 12640 | defer func() { decoder = oldDecoder }() |
| 12641 | decoder = decoder.SliceDecoder(int(_groupstatsentry.Length), 2+0) |
| 12642 | decoder.Skip(2) |
| 12643 | _groupstatsentry.GroupId = uint32(decoder.ReadUint32()) |
| 12644 | _groupstatsentry.RefCount = uint32(decoder.ReadUint32()) |
| 12645 | decoder.Skip(4) |
| 12646 | _groupstatsentry.PacketCount = uint64(decoder.ReadUint64()) |
| 12647 | _groupstatsentry.ByteCount = uint64(decoder.ReadUint64()) |
| 12648 | _groupstatsentry.DurationSec = uint32(decoder.ReadUint32()) |
| 12649 | _groupstatsentry.DurationNsec = uint32(decoder.ReadUint32()) |
| 12650 | |
| 12651 | for decoder.Length() >= 16 { |
| 12652 | item, err := DecodeBucketCounter(decoder) |
| 12653 | if err != nil { |
| 12654 | return nil, err |
| 12655 | } |
| 12656 | if item != nil { |
| 12657 | _groupstatsentry.BucketStats = append(_groupstatsentry.BucketStats, item) |
| 12658 | } |
| 12659 | } |
| 12660 | return _groupstatsentry, nil |
| 12661 | } |
| 12662 | |
| 12663 | func NewGroupStatsEntry() *GroupStatsEntry { |
| 12664 | obj := &GroupStatsEntry{} |
| 12665 | return obj |
| 12666 | } |
| 12667 | |
| 12668 | type HelloElem struct { |
| 12669 | Type uint16 |
| 12670 | Length uint16 |
| 12671 | } |
| 12672 | |
| 12673 | type IHelloElem interface { |
| 12674 | goloxi.Serializable |
| 12675 | GetType() uint16 |
| 12676 | GetLength() uint16 |
| 12677 | } |
| 12678 | |
| 12679 | func (self *HelloElem) GetType() uint16 { |
| 12680 | return self.Type |
| 12681 | } |
| 12682 | |
| 12683 | func (self *HelloElem) SetType(v uint16) { |
| 12684 | self.Type = v |
| 12685 | } |
| 12686 | |
| 12687 | func (self *HelloElem) GetLength() uint16 { |
| 12688 | return self.Length |
| 12689 | } |
| 12690 | |
| 12691 | func (self *HelloElem) SetLength(v uint16) { |
| 12692 | self.Length = v |
| 12693 | } |
| 12694 | |
| 12695 | func (self *HelloElem) Serialize(encoder *goloxi.Encoder) error { |
| 12696 | |
| 12697 | encoder.PutUint16(uint16(self.Type)) |
| 12698 | encoder.PutUint16(uint16(self.Length)) |
| 12699 | |
| 12700 | return nil |
| 12701 | } |
| 12702 | |
| 12703 | func DecodeHelloElem(decoder *goloxi.Decoder) (IHelloElem, error) { |
| 12704 | _helloelem := &HelloElem{} |
| 12705 | if decoder.Length() < 4 { |
| 12706 | return nil, fmt.Errorf("HelloElem packet too short: %d < 4", decoder.Length()) |
| 12707 | } |
| 12708 | _helloelem.Type = uint16(decoder.ReadUint16()) |
| 12709 | _helloelem.Length = uint16(decoder.ReadUint16()) |
| 12710 | oldDecoder := decoder |
| 12711 | defer func() { decoder = oldDecoder }() |
| 12712 | decoder = decoder.SliceDecoder(int(_helloelem.Length), 2+2) |
| 12713 | |
| 12714 | switch _helloelem.Type { |
| 12715 | case 1: |
| 12716 | return DecodeHelloElemVersionbitmap(_helloelem, decoder) |
| 12717 | default: |
| 12718 | return nil, fmt.Errorf("Invalid type '%d' for 'HelloElem'", _helloelem.Type) |
| 12719 | } |
| 12720 | } |
| 12721 | |
| 12722 | func NewHelloElem(_type uint16) *HelloElem { |
| 12723 | obj := &HelloElem{} |
| 12724 | obj.Type = _type |
| 12725 | return obj |
| 12726 | } |
| 12727 | |
| 12728 | type HelloElemVersionbitmap struct { |
| 12729 | *HelloElem |
| 12730 | Bitmaps []*Uint32 |
| 12731 | } |
| 12732 | |
| 12733 | type IHelloElemVersionbitmap interface { |
| 12734 | IHelloElem |
| 12735 | GetBitmaps() []*Uint32 |
| 12736 | } |
| 12737 | |
| 12738 | func (self *HelloElemVersionbitmap) GetBitmaps() []*Uint32 { |
| 12739 | return self.Bitmaps |
| 12740 | } |
| 12741 | |
| 12742 | func (self *HelloElemVersionbitmap) SetBitmaps(v []*Uint32) { |
| 12743 | self.Bitmaps = v |
| 12744 | } |
| 12745 | |
| 12746 | func (self *HelloElemVersionbitmap) Serialize(encoder *goloxi.Encoder) error { |
| 12747 | if err := self.HelloElem.Serialize(encoder); err != nil { |
| 12748 | return err |
| 12749 | } |
| 12750 | |
| 12751 | for _, obj := range self.Bitmaps { |
| 12752 | if err := obj.Serialize(encoder); err != nil { |
| 12753 | return err |
| 12754 | } |
| 12755 | } |
| 12756 | |
| 12757 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 12758 | |
| 12759 | return nil |
| 12760 | } |
| 12761 | |
| 12762 | func DecodeHelloElemVersionbitmap(parent *HelloElem, decoder *goloxi.Decoder) (*HelloElemVersionbitmap, error) { |
| 12763 | _helloelemversionbitmap := &HelloElemVersionbitmap{HelloElem: parent} |
| 12764 | |
| 12765 | for decoder.Length() >= 4 { |
| 12766 | item, err := DecodeUint32(decoder) |
| 12767 | if err != nil { |
| 12768 | return nil, err |
| 12769 | } |
| 12770 | if item != nil { |
| 12771 | _helloelemversionbitmap.Bitmaps = append(_helloelemversionbitmap.Bitmaps, item) |
| 12772 | } |
| 12773 | } |
| 12774 | return _helloelemversionbitmap, nil |
| 12775 | } |
| 12776 | |
| 12777 | func NewHelloElemVersionbitmap() *HelloElemVersionbitmap { |
| 12778 | obj := &HelloElemVersionbitmap{ |
| 12779 | HelloElem: NewHelloElem(1), |
| 12780 | } |
| 12781 | return obj |
| 12782 | } |
| 12783 | |
| 12784 | type InstructionId struct { |
| 12785 | Type uint16 |
| 12786 | Len uint16 |
| 12787 | } |
| 12788 | |
| 12789 | type IInstructionId interface { |
| 12790 | goloxi.Serializable |
| 12791 | GetType() uint16 |
| 12792 | GetLen() uint16 |
| 12793 | } |
| 12794 | |
| 12795 | func (self *InstructionId) GetType() uint16 { |
| 12796 | return self.Type |
| 12797 | } |
| 12798 | |
| 12799 | func (self *InstructionId) SetType(v uint16) { |
| 12800 | self.Type = v |
| 12801 | } |
| 12802 | |
| 12803 | func (self *InstructionId) GetLen() uint16 { |
| 12804 | return self.Len |
| 12805 | } |
| 12806 | |
| 12807 | func (self *InstructionId) SetLen(v uint16) { |
| 12808 | self.Len = v |
| 12809 | } |
| 12810 | |
| 12811 | func (self *InstructionId) Serialize(encoder *goloxi.Encoder) error { |
| 12812 | |
| 12813 | encoder.PutUint16(uint16(self.Type)) |
| 12814 | encoder.PutUint16(uint16(self.Len)) |
| 12815 | |
| 12816 | return nil |
| 12817 | } |
| 12818 | |
| 12819 | func DecodeInstructionId(decoder *goloxi.Decoder) (IInstructionId, error) { |
| 12820 | _instructionid := &InstructionId{} |
| 12821 | if decoder.Length() < 4 { |
| 12822 | return nil, fmt.Errorf("InstructionId packet too short: %d < 4", decoder.Length()) |
| 12823 | } |
| 12824 | _instructionid.Type = uint16(decoder.ReadUint16()) |
| 12825 | _instructionid.Len = uint16(decoder.ReadUint16()) |
| 12826 | oldDecoder := decoder |
| 12827 | defer func() { decoder = oldDecoder }() |
| 12828 | decoder = decoder.SliceDecoder(int(_instructionid.Len), 2+2) |
| 12829 | |
| 12830 | switch _instructionid.Type { |
| 12831 | case 1: |
| 12832 | return DecodeInstructionIdGotoTable(_instructionid, decoder) |
| 12833 | case 2: |
| 12834 | return DecodeInstructionIdWriteMetadata(_instructionid, decoder) |
| 12835 | case 3: |
| 12836 | return DecodeInstructionIdWriteActions(_instructionid, decoder) |
| 12837 | case 4: |
| 12838 | return DecodeInstructionIdApplyActions(_instructionid, decoder) |
| 12839 | case 5: |
| 12840 | return DecodeInstructionIdClearActions(_instructionid, decoder) |
| 12841 | case 6: |
| 12842 | return DecodeInstructionIdMeter(_instructionid, decoder) |
| 12843 | case 65535: |
| 12844 | return DecodeInstructionIdExperimenter(_instructionid, decoder) |
| 12845 | default: |
| 12846 | return nil, fmt.Errorf("Invalid type '%d' for 'InstructionId'", _instructionid.Type) |
| 12847 | } |
| 12848 | } |
| 12849 | |
| 12850 | func NewInstructionId(_type uint16) *InstructionId { |
| 12851 | obj := &InstructionId{} |
| 12852 | obj.Type = _type |
| 12853 | return obj |
| 12854 | } |
| 12855 | |
| 12856 | type InstructionIdApplyActions struct { |
| 12857 | *InstructionId |
| 12858 | } |
| 12859 | |
| 12860 | type IInstructionIdApplyActions interface { |
| 12861 | IInstructionId |
| 12862 | } |
| 12863 | |
| 12864 | func (self *InstructionIdApplyActions) Serialize(encoder *goloxi.Encoder) error { |
| 12865 | if err := self.InstructionId.Serialize(encoder); err != nil { |
| 12866 | return err |
| 12867 | } |
| 12868 | |
| 12869 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 12870 | |
| 12871 | return nil |
| 12872 | } |
| 12873 | |
| 12874 | func DecodeInstructionIdApplyActions(parent *InstructionId, decoder *goloxi.Decoder) (*InstructionIdApplyActions, error) { |
| 12875 | _instructionidapplyactions := &InstructionIdApplyActions{InstructionId: parent} |
| 12876 | return _instructionidapplyactions, nil |
| 12877 | } |
| 12878 | |
| 12879 | func NewInstructionIdApplyActions() *InstructionIdApplyActions { |
| 12880 | obj := &InstructionIdApplyActions{ |
| 12881 | InstructionId: NewInstructionId(4), |
| 12882 | } |
| 12883 | return obj |
| 12884 | } |
| 12885 | |
| 12886 | type InstructionIdExperimenter struct { |
| 12887 | *InstructionId |
| 12888 | Experimenter uint32 |
| 12889 | } |
| 12890 | |
| 12891 | type IInstructionIdExperimenter interface { |
| 12892 | IInstructionId |
| 12893 | GetExperimenter() uint32 |
| 12894 | } |
| 12895 | |
| 12896 | func (self *InstructionIdExperimenter) GetExperimenter() uint32 { |
| 12897 | return self.Experimenter |
| 12898 | } |
| 12899 | |
| 12900 | func (self *InstructionIdExperimenter) SetExperimenter(v uint32) { |
| 12901 | self.Experimenter = v |
| 12902 | } |
| 12903 | |
| 12904 | func (self *InstructionIdExperimenter) Serialize(encoder *goloxi.Encoder) error { |
| 12905 | if err := self.InstructionId.Serialize(encoder); err != nil { |
| 12906 | return err |
| 12907 | } |
| 12908 | |
| 12909 | encoder.PutUint32(uint32(self.Experimenter)) |
| 12910 | |
| 12911 | return nil |
| 12912 | } |
| 12913 | |
| 12914 | func DecodeInstructionIdExperimenter(parent *InstructionId, decoder *goloxi.Decoder) (IInstructionIdExperimenter, error) { |
| 12915 | _instructionidexperimenter := &InstructionIdExperimenter{InstructionId: parent} |
| 12916 | if decoder.Length() < 4 { |
| 12917 | return nil, fmt.Errorf("InstructionIdExperimenter packet too short: %d < 4", decoder.Length()) |
| 12918 | } |
| 12919 | _instructionidexperimenter.Experimenter = uint32(decoder.ReadUint32()) |
| 12920 | |
| 12921 | switch _instructionidexperimenter.Experimenter { |
| 12922 | case 6035143: |
| 12923 | return DecodeInstructionIdBsn(_instructionidexperimenter, decoder) |
| 12924 | default: |
| 12925 | return nil, fmt.Errorf("Invalid type '%d' for 'InstructionIdExperimenter'", _instructionidexperimenter.Experimenter) |
| 12926 | } |
| 12927 | } |
| 12928 | |
| 12929 | func NewInstructionIdExperimenter(_experimenter uint32) *InstructionIdExperimenter { |
| 12930 | obj := &InstructionIdExperimenter{ |
| 12931 | InstructionId: NewInstructionId(65535), |
| 12932 | } |
| 12933 | obj.Experimenter = _experimenter |
| 12934 | return obj |
| 12935 | } |
| 12936 | |
| 12937 | type InstructionIdBsn struct { |
| 12938 | *InstructionIdExperimenter |
| 12939 | Subtype uint32 |
| 12940 | } |
| 12941 | |
| 12942 | type IInstructionIdBsn interface { |
| 12943 | IInstructionIdExperimenter |
| 12944 | GetSubtype() uint32 |
| 12945 | } |
| 12946 | |
| 12947 | func (self *InstructionIdBsn) GetSubtype() uint32 { |
| 12948 | return self.Subtype |
| 12949 | } |
| 12950 | |
| 12951 | func (self *InstructionIdBsn) SetSubtype(v uint32) { |
| 12952 | self.Subtype = v |
| 12953 | } |
| 12954 | |
| 12955 | func (self *InstructionIdBsn) Serialize(encoder *goloxi.Encoder) error { |
| 12956 | if err := self.InstructionIdExperimenter.Serialize(encoder); err != nil { |
| 12957 | return err |
| 12958 | } |
| 12959 | |
| 12960 | encoder.PutUint32(uint32(self.Subtype)) |
| 12961 | |
| 12962 | return nil |
| 12963 | } |
| 12964 | |
| 12965 | func DecodeInstructionIdBsn(parent *InstructionIdExperimenter, decoder *goloxi.Decoder) (IInstructionIdBsn, error) { |
| 12966 | _instructionidbsn := &InstructionIdBsn{InstructionIdExperimenter: parent} |
| 12967 | if decoder.Length() < 4 { |
| 12968 | return nil, fmt.Errorf("InstructionIdBsn packet too short: %d < 4", decoder.Length()) |
| 12969 | } |
| 12970 | _instructionidbsn.Subtype = uint32(decoder.ReadUint32()) |
| 12971 | |
| 12972 | switch _instructionidbsn.Subtype { |
| 12973 | case 0: |
| 12974 | return DecodeInstructionIdBsnDisableSrcMacCheck(_instructionidbsn, decoder) |
| 12975 | case 1: |
| 12976 | return DecodeInstructionIdBsnArpOffload(_instructionidbsn, decoder) |
| 12977 | case 2: |
| 12978 | return DecodeInstructionIdBsnDhcpOffload(_instructionidbsn, decoder) |
| 12979 | case 3: |
| 12980 | return DecodeInstructionIdBsnDisableSplitHorizonCheck(_instructionidbsn, decoder) |
| 12981 | case 4: |
| 12982 | return DecodeInstructionIdBsnPermit(_instructionidbsn, decoder) |
| 12983 | case 5: |
| 12984 | return DecodeInstructionIdBsnDeny(_instructionidbsn, decoder) |
| 12985 | case 6: |
| 12986 | return DecodeInstructionIdBsnPacketOfDeath(_instructionidbsn, decoder) |
| 12987 | case 7: |
| 12988 | return DecodeInstructionIdBsnPrioritizePdus(_instructionidbsn, decoder) |
| 12989 | case 8: |
| 12990 | return DecodeInstructionIdBsnRequireVlanXlate(_instructionidbsn, decoder) |
| 12991 | case 9: |
| 12992 | return DecodeInstructionIdBsnDisableVlanCounters(_instructionidbsn, decoder) |
| 12993 | case 10: |
| 12994 | return DecodeInstructionIdBsnSpanDestination(_instructionidbsn, decoder) |
| 12995 | case 11: |
| 12996 | return DecodeInstructionIdBsnAutoNegotiation(_instructionidbsn, decoder) |
| 12997 | case 12: |
| 12998 | return DecodeInstructionIdBsnInternalPriority(_instructionidbsn, decoder) |
| 12999 | case 13: |
| 13000 | return DecodeInstructionIdBsnDisableL3(_instructionidbsn, decoder) |
| 13001 | case 14: |
| 13002 | return DecodeInstructionIdBsnNdpOffload(_instructionidbsn, decoder) |
| 13003 | case 15: |
| 13004 | return DecodeInstructionIdBsnHashSelect(_instructionidbsn, decoder) |
| 13005 | case 16: |
| 13006 | return DecodeInstructionIdBsnDirectedBroadcast(_instructionidbsn, decoder) |
| 13007 | default: |
| 13008 | return nil, fmt.Errorf("Invalid type '%d' for 'InstructionIdBsn'", _instructionidbsn.Subtype) |
| 13009 | } |
| 13010 | } |
| 13011 | |
| 13012 | func NewInstructionIdBsn(_subtype uint32) *InstructionIdBsn { |
| 13013 | obj := &InstructionIdBsn{ |
| 13014 | InstructionIdExperimenter: NewInstructionIdExperimenter(6035143), |
| 13015 | } |
| 13016 | obj.Subtype = _subtype |
| 13017 | return obj |
| 13018 | } |
| 13019 | |
| 13020 | type InstructionIdBsnArpOffload struct { |
| 13021 | *InstructionIdBsn |
| 13022 | } |
| 13023 | |
| 13024 | type IInstructionIdBsnArpOffload interface { |
| 13025 | IInstructionIdBsn |
| 13026 | } |
| 13027 | |
| 13028 | func (self *InstructionIdBsnArpOffload) Serialize(encoder *goloxi.Encoder) error { |
| 13029 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13030 | return err |
| 13031 | } |
| 13032 | |
| 13033 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13034 | |
| 13035 | return nil |
| 13036 | } |
| 13037 | |
| 13038 | func DecodeInstructionIdBsnArpOffload(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnArpOffload, error) { |
| 13039 | _instructionidbsnarpoffload := &InstructionIdBsnArpOffload{InstructionIdBsn: parent} |
| 13040 | return _instructionidbsnarpoffload, nil |
| 13041 | } |
| 13042 | |
| 13043 | func NewInstructionIdBsnArpOffload() *InstructionIdBsnArpOffload { |
| 13044 | obj := &InstructionIdBsnArpOffload{ |
| 13045 | InstructionIdBsn: NewInstructionIdBsn(1), |
| 13046 | } |
| 13047 | return obj |
| 13048 | } |
| 13049 | |
| 13050 | type InstructionIdBsnAutoNegotiation struct { |
| 13051 | *InstructionIdBsn |
| 13052 | } |
| 13053 | |
| 13054 | type IInstructionIdBsnAutoNegotiation interface { |
| 13055 | IInstructionIdBsn |
| 13056 | } |
| 13057 | |
| 13058 | func (self *InstructionIdBsnAutoNegotiation) Serialize(encoder *goloxi.Encoder) error { |
| 13059 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13060 | return err |
| 13061 | } |
| 13062 | |
| 13063 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13064 | |
| 13065 | return nil |
| 13066 | } |
| 13067 | |
| 13068 | func DecodeInstructionIdBsnAutoNegotiation(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnAutoNegotiation, error) { |
| 13069 | _instructionidbsnautonegotiation := &InstructionIdBsnAutoNegotiation{InstructionIdBsn: parent} |
| 13070 | return _instructionidbsnautonegotiation, nil |
| 13071 | } |
| 13072 | |
| 13073 | func NewInstructionIdBsnAutoNegotiation() *InstructionIdBsnAutoNegotiation { |
| 13074 | obj := &InstructionIdBsnAutoNegotiation{ |
| 13075 | InstructionIdBsn: NewInstructionIdBsn(11), |
| 13076 | } |
| 13077 | return obj |
| 13078 | } |
| 13079 | |
| 13080 | type InstructionIdBsnDeny struct { |
| 13081 | *InstructionIdBsn |
| 13082 | } |
| 13083 | |
| 13084 | type IInstructionIdBsnDeny interface { |
| 13085 | IInstructionIdBsn |
| 13086 | } |
| 13087 | |
| 13088 | func (self *InstructionIdBsnDeny) Serialize(encoder *goloxi.Encoder) error { |
| 13089 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13090 | return err |
| 13091 | } |
| 13092 | |
| 13093 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13094 | |
| 13095 | return nil |
| 13096 | } |
| 13097 | |
| 13098 | func DecodeInstructionIdBsnDeny(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnDeny, error) { |
| 13099 | _instructionidbsndeny := &InstructionIdBsnDeny{InstructionIdBsn: parent} |
| 13100 | return _instructionidbsndeny, nil |
| 13101 | } |
| 13102 | |
| 13103 | func NewInstructionIdBsnDeny() *InstructionIdBsnDeny { |
| 13104 | obj := &InstructionIdBsnDeny{ |
| 13105 | InstructionIdBsn: NewInstructionIdBsn(5), |
| 13106 | } |
| 13107 | return obj |
| 13108 | } |
| 13109 | |
| 13110 | type InstructionIdBsnDhcpOffload struct { |
| 13111 | *InstructionIdBsn |
| 13112 | } |
| 13113 | |
| 13114 | type IInstructionIdBsnDhcpOffload interface { |
| 13115 | IInstructionIdBsn |
| 13116 | } |
| 13117 | |
| 13118 | func (self *InstructionIdBsnDhcpOffload) Serialize(encoder *goloxi.Encoder) error { |
| 13119 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13120 | return err |
| 13121 | } |
| 13122 | |
| 13123 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13124 | |
| 13125 | return nil |
| 13126 | } |
| 13127 | |
| 13128 | func DecodeInstructionIdBsnDhcpOffload(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnDhcpOffload, error) { |
| 13129 | _instructionidbsndhcpoffload := &InstructionIdBsnDhcpOffload{InstructionIdBsn: parent} |
| 13130 | return _instructionidbsndhcpoffload, nil |
| 13131 | } |
| 13132 | |
| 13133 | func NewInstructionIdBsnDhcpOffload() *InstructionIdBsnDhcpOffload { |
| 13134 | obj := &InstructionIdBsnDhcpOffload{ |
| 13135 | InstructionIdBsn: NewInstructionIdBsn(2), |
| 13136 | } |
| 13137 | return obj |
| 13138 | } |
| 13139 | |
| 13140 | type InstructionIdBsnDirectedBroadcast struct { |
| 13141 | *InstructionIdBsn |
| 13142 | } |
| 13143 | |
| 13144 | type IInstructionIdBsnDirectedBroadcast interface { |
| 13145 | IInstructionIdBsn |
| 13146 | } |
| 13147 | |
| 13148 | func (self *InstructionIdBsnDirectedBroadcast) Serialize(encoder *goloxi.Encoder) error { |
| 13149 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13150 | return err |
| 13151 | } |
| 13152 | |
| 13153 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13154 | |
| 13155 | return nil |
| 13156 | } |
| 13157 | |
| 13158 | func DecodeInstructionIdBsnDirectedBroadcast(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnDirectedBroadcast, error) { |
| 13159 | _instructionidbsndirectedbroadcast := &InstructionIdBsnDirectedBroadcast{InstructionIdBsn: parent} |
| 13160 | return _instructionidbsndirectedbroadcast, nil |
| 13161 | } |
| 13162 | |
| 13163 | func NewInstructionIdBsnDirectedBroadcast() *InstructionIdBsnDirectedBroadcast { |
| 13164 | obj := &InstructionIdBsnDirectedBroadcast{ |
| 13165 | InstructionIdBsn: NewInstructionIdBsn(16), |
| 13166 | } |
| 13167 | return obj |
| 13168 | } |
| 13169 | |
| 13170 | type InstructionIdBsnDisableL3 struct { |
| 13171 | *InstructionIdBsn |
| 13172 | } |
| 13173 | |
| 13174 | type IInstructionIdBsnDisableL3 interface { |
| 13175 | IInstructionIdBsn |
| 13176 | } |
| 13177 | |
| 13178 | func (self *InstructionIdBsnDisableL3) Serialize(encoder *goloxi.Encoder) error { |
| 13179 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13180 | return err |
| 13181 | } |
| 13182 | |
| 13183 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13184 | |
| 13185 | return nil |
| 13186 | } |
| 13187 | |
| 13188 | func DecodeInstructionIdBsnDisableL3(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnDisableL3, error) { |
| 13189 | _instructionidbsndisablel3 := &InstructionIdBsnDisableL3{InstructionIdBsn: parent} |
| 13190 | return _instructionidbsndisablel3, nil |
| 13191 | } |
| 13192 | |
| 13193 | func NewInstructionIdBsnDisableL3() *InstructionIdBsnDisableL3 { |
| 13194 | obj := &InstructionIdBsnDisableL3{ |
| 13195 | InstructionIdBsn: NewInstructionIdBsn(13), |
| 13196 | } |
| 13197 | return obj |
| 13198 | } |
| 13199 | |
| 13200 | type InstructionIdBsnDisableSplitHorizonCheck struct { |
| 13201 | *InstructionIdBsn |
| 13202 | } |
| 13203 | |
| 13204 | type IInstructionIdBsnDisableSplitHorizonCheck interface { |
| 13205 | IInstructionIdBsn |
| 13206 | } |
| 13207 | |
| 13208 | func (self *InstructionIdBsnDisableSplitHorizonCheck) Serialize(encoder *goloxi.Encoder) error { |
| 13209 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13210 | return err |
| 13211 | } |
| 13212 | |
| 13213 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13214 | |
| 13215 | return nil |
| 13216 | } |
| 13217 | |
| 13218 | func DecodeInstructionIdBsnDisableSplitHorizonCheck(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnDisableSplitHorizonCheck, error) { |
| 13219 | _instructionidbsndisablesplithorizoncheck := &InstructionIdBsnDisableSplitHorizonCheck{InstructionIdBsn: parent} |
| 13220 | return _instructionidbsndisablesplithorizoncheck, nil |
| 13221 | } |
| 13222 | |
| 13223 | func NewInstructionIdBsnDisableSplitHorizonCheck() *InstructionIdBsnDisableSplitHorizonCheck { |
| 13224 | obj := &InstructionIdBsnDisableSplitHorizonCheck{ |
| 13225 | InstructionIdBsn: NewInstructionIdBsn(3), |
| 13226 | } |
| 13227 | return obj |
| 13228 | } |
| 13229 | |
| 13230 | type InstructionIdBsnDisableSrcMacCheck struct { |
| 13231 | *InstructionIdBsn |
| 13232 | } |
| 13233 | |
| 13234 | type IInstructionIdBsnDisableSrcMacCheck interface { |
| 13235 | IInstructionIdBsn |
| 13236 | } |
| 13237 | |
| 13238 | func (self *InstructionIdBsnDisableSrcMacCheck) Serialize(encoder *goloxi.Encoder) error { |
| 13239 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13240 | return err |
| 13241 | } |
| 13242 | |
| 13243 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13244 | |
| 13245 | return nil |
| 13246 | } |
| 13247 | |
| 13248 | func DecodeInstructionIdBsnDisableSrcMacCheck(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnDisableSrcMacCheck, error) { |
| 13249 | _instructionidbsndisablesrcmaccheck := &InstructionIdBsnDisableSrcMacCheck{InstructionIdBsn: parent} |
| 13250 | return _instructionidbsndisablesrcmaccheck, nil |
| 13251 | } |
| 13252 | |
| 13253 | func NewInstructionIdBsnDisableSrcMacCheck() *InstructionIdBsnDisableSrcMacCheck { |
| 13254 | obj := &InstructionIdBsnDisableSrcMacCheck{ |
| 13255 | InstructionIdBsn: NewInstructionIdBsn(0), |
| 13256 | } |
| 13257 | return obj |
| 13258 | } |
| 13259 | |
| 13260 | type InstructionIdBsnDisableVlanCounters struct { |
| 13261 | *InstructionIdBsn |
| 13262 | } |
| 13263 | |
| 13264 | type IInstructionIdBsnDisableVlanCounters interface { |
| 13265 | IInstructionIdBsn |
| 13266 | } |
| 13267 | |
| 13268 | func (self *InstructionIdBsnDisableVlanCounters) Serialize(encoder *goloxi.Encoder) error { |
| 13269 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13270 | return err |
| 13271 | } |
| 13272 | |
| 13273 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13274 | |
| 13275 | return nil |
| 13276 | } |
| 13277 | |
| 13278 | func DecodeInstructionIdBsnDisableVlanCounters(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnDisableVlanCounters, error) { |
| 13279 | _instructionidbsndisablevlancounters := &InstructionIdBsnDisableVlanCounters{InstructionIdBsn: parent} |
| 13280 | return _instructionidbsndisablevlancounters, nil |
| 13281 | } |
| 13282 | |
| 13283 | func NewInstructionIdBsnDisableVlanCounters() *InstructionIdBsnDisableVlanCounters { |
| 13284 | obj := &InstructionIdBsnDisableVlanCounters{ |
| 13285 | InstructionIdBsn: NewInstructionIdBsn(9), |
| 13286 | } |
| 13287 | return obj |
| 13288 | } |
| 13289 | |
| 13290 | type InstructionIdBsnHashSelect struct { |
| 13291 | *InstructionIdBsn |
| 13292 | } |
| 13293 | |
| 13294 | type IInstructionIdBsnHashSelect interface { |
| 13295 | IInstructionIdBsn |
| 13296 | } |
| 13297 | |
| 13298 | func (self *InstructionIdBsnHashSelect) Serialize(encoder *goloxi.Encoder) error { |
| 13299 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13300 | return err |
| 13301 | } |
| 13302 | |
| 13303 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13304 | |
| 13305 | return nil |
| 13306 | } |
| 13307 | |
| 13308 | func DecodeInstructionIdBsnHashSelect(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnHashSelect, error) { |
| 13309 | _instructionidbsnhashselect := &InstructionIdBsnHashSelect{InstructionIdBsn: parent} |
| 13310 | return _instructionidbsnhashselect, nil |
| 13311 | } |
| 13312 | |
| 13313 | func NewInstructionIdBsnHashSelect() *InstructionIdBsnHashSelect { |
| 13314 | obj := &InstructionIdBsnHashSelect{ |
| 13315 | InstructionIdBsn: NewInstructionIdBsn(15), |
| 13316 | } |
| 13317 | return obj |
| 13318 | } |
| 13319 | |
| 13320 | type InstructionIdBsnInternalPriority struct { |
| 13321 | *InstructionIdBsn |
| 13322 | } |
| 13323 | |
| 13324 | type IInstructionIdBsnInternalPriority interface { |
| 13325 | IInstructionIdBsn |
| 13326 | } |
| 13327 | |
| 13328 | func (self *InstructionIdBsnInternalPriority) Serialize(encoder *goloxi.Encoder) error { |
| 13329 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13330 | return err |
| 13331 | } |
| 13332 | |
| 13333 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13334 | |
| 13335 | return nil |
| 13336 | } |
| 13337 | |
| 13338 | func DecodeInstructionIdBsnInternalPriority(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnInternalPriority, error) { |
| 13339 | _instructionidbsninternalpriority := &InstructionIdBsnInternalPriority{InstructionIdBsn: parent} |
| 13340 | return _instructionidbsninternalpriority, nil |
| 13341 | } |
| 13342 | |
| 13343 | func NewInstructionIdBsnInternalPriority() *InstructionIdBsnInternalPriority { |
| 13344 | obj := &InstructionIdBsnInternalPriority{ |
| 13345 | InstructionIdBsn: NewInstructionIdBsn(12), |
| 13346 | } |
| 13347 | return obj |
| 13348 | } |
| 13349 | |
| 13350 | type InstructionIdBsnNdpOffload struct { |
| 13351 | *InstructionIdBsn |
| 13352 | } |
| 13353 | |
| 13354 | type IInstructionIdBsnNdpOffload interface { |
| 13355 | IInstructionIdBsn |
| 13356 | } |
| 13357 | |
| 13358 | func (self *InstructionIdBsnNdpOffload) Serialize(encoder *goloxi.Encoder) error { |
| 13359 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13360 | return err |
| 13361 | } |
| 13362 | |
| 13363 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13364 | |
| 13365 | return nil |
| 13366 | } |
| 13367 | |
| 13368 | func DecodeInstructionIdBsnNdpOffload(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnNdpOffload, error) { |
| 13369 | _instructionidbsnndpoffload := &InstructionIdBsnNdpOffload{InstructionIdBsn: parent} |
| 13370 | return _instructionidbsnndpoffload, nil |
| 13371 | } |
| 13372 | |
| 13373 | func NewInstructionIdBsnNdpOffload() *InstructionIdBsnNdpOffload { |
| 13374 | obj := &InstructionIdBsnNdpOffload{ |
| 13375 | InstructionIdBsn: NewInstructionIdBsn(14), |
| 13376 | } |
| 13377 | return obj |
| 13378 | } |
| 13379 | |
| 13380 | type InstructionIdBsnPacketOfDeath struct { |
| 13381 | *InstructionIdBsn |
| 13382 | } |
| 13383 | |
| 13384 | type IInstructionIdBsnPacketOfDeath interface { |
| 13385 | IInstructionIdBsn |
| 13386 | } |
| 13387 | |
| 13388 | func (self *InstructionIdBsnPacketOfDeath) Serialize(encoder *goloxi.Encoder) error { |
| 13389 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13390 | return err |
| 13391 | } |
| 13392 | |
| 13393 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13394 | |
| 13395 | return nil |
| 13396 | } |
| 13397 | |
| 13398 | func DecodeInstructionIdBsnPacketOfDeath(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnPacketOfDeath, error) { |
| 13399 | _instructionidbsnpacketofdeath := &InstructionIdBsnPacketOfDeath{InstructionIdBsn: parent} |
| 13400 | return _instructionidbsnpacketofdeath, nil |
| 13401 | } |
| 13402 | |
| 13403 | func NewInstructionIdBsnPacketOfDeath() *InstructionIdBsnPacketOfDeath { |
| 13404 | obj := &InstructionIdBsnPacketOfDeath{ |
| 13405 | InstructionIdBsn: NewInstructionIdBsn(6), |
| 13406 | } |
| 13407 | return obj |
| 13408 | } |
| 13409 | |
| 13410 | type InstructionIdBsnPermit struct { |
| 13411 | *InstructionIdBsn |
| 13412 | } |
| 13413 | |
| 13414 | type IInstructionIdBsnPermit interface { |
| 13415 | IInstructionIdBsn |
| 13416 | } |
| 13417 | |
| 13418 | func (self *InstructionIdBsnPermit) Serialize(encoder *goloxi.Encoder) error { |
| 13419 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13420 | return err |
| 13421 | } |
| 13422 | |
| 13423 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13424 | |
| 13425 | return nil |
| 13426 | } |
| 13427 | |
| 13428 | func DecodeInstructionIdBsnPermit(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnPermit, error) { |
| 13429 | _instructionidbsnpermit := &InstructionIdBsnPermit{InstructionIdBsn: parent} |
| 13430 | return _instructionidbsnpermit, nil |
| 13431 | } |
| 13432 | |
| 13433 | func NewInstructionIdBsnPermit() *InstructionIdBsnPermit { |
| 13434 | obj := &InstructionIdBsnPermit{ |
| 13435 | InstructionIdBsn: NewInstructionIdBsn(4), |
| 13436 | } |
| 13437 | return obj |
| 13438 | } |
| 13439 | |
| 13440 | type InstructionIdBsnPrioritizePdus struct { |
| 13441 | *InstructionIdBsn |
| 13442 | } |
| 13443 | |
| 13444 | type IInstructionIdBsnPrioritizePdus interface { |
| 13445 | IInstructionIdBsn |
| 13446 | } |
| 13447 | |
| 13448 | func (self *InstructionIdBsnPrioritizePdus) Serialize(encoder *goloxi.Encoder) error { |
| 13449 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13450 | return err |
| 13451 | } |
| 13452 | |
| 13453 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13454 | |
| 13455 | return nil |
| 13456 | } |
| 13457 | |
| 13458 | func DecodeInstructionIdBsnPrioritizePdus(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnPrioritizePdus, error) { |
| 13459 | _instructionidbsnprioritizepdus := &InstructionIdBsnPrioritizePdus{InstructionIdBsn: parent} |
| 13460 | return _instructionidbsnprioritizepdus, nil |
| 13461 | } |
| 13462 | |
| 13463 | func NewInstructionIdBsnPrioritizePdus() *InstructionIdBsnPrioritizePdus { |
| 13464 | obj := &InstructionIdBsnPrioritizePdus{ |
| 13465 | InstructionIdBsn: NewInstructionIdBsn(7), |
| 13466 | } |
| 13467 | return obj |
| 13468 | } |
| 13469 | |
| 13470 | type InstructionIdBsnRequireVlanXlate struct { |
| 13471 | *InstructionIdBsn |
| 13472 | } |
| 13473 | |
| 13474 | type IInstructionIdBsnRequireVlanXlate interface { |
| 13475 | IInstructionIdBsn |
| 13476 | } |
| 13477 | |
| 13478 | func (self *InstructionIdBsnRequireVlanXlate) Serialize(encoder *goloxi.Encoder) error { |
| 13479 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13480 | return err |
| 13481 | } |
| 13482 | |
| 13483 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13484 | |
| 13485 | return nil |
| 13486 | } |
| 13487 | |
| 13488 | func DecodeInstructionIdBsnRequireVlanXlate(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnRequireVlanXlate, error) { |
| 13489 | _instructionidbsnrequirevlanxlate := &InstructionIdBsnRequireVlanXlate{InstructionIdBsn: parent} |
| 13490 | return _instructionidbsnrequirevlanxlate, nil |
| 13491 | } |
| 13492 | |
| 13493 | func NewInstructionIdBsnRequireVlanXlate() *InstructionIdBsnRequireVlanXlate { |
| 13494 | obj := &InstructionIdBsnRequireVlanXlate{ |
| 13495 | InstructionIdBsn: NewInstructionIdBsn(8), |
| 13496 | } |
| 13497 | return obj |
| 13498 | } |
| 13499 | |
| 13500 | type InstructionIdBsnSpanDestination struct { |
| 13501 | *InstructionIdBsn |
| 13502 | } |
| 13503 | |
| 13504 | type IInstructionIdBsnSpanDestination interface { |
| 13505 | IInstructionIdBsn |
| 13506 | } |
| 13507 | |
| 13508 | func (self *InstructionIdBsnSpanDestination) Serialize(encoder *goloxi.Encoder) error { |
| 13509 | if err := self.InstructionIdBsn.Serialize(encoder); err != nil { |
| 13510 | return err |
| 13511 | } |
| 13512 | |
| 13513 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13514 | |
| 13515 | return nil |
| 13516 | } |
| 13517 | |
| 13518 | func DecodeInstructionIdBsnSpanDestination(parent *InstructionIdBsn, decoder *goloxi.Decoder) (*InstructionIdBsnSpanDestination, error) { |
| 13519 | _instructionidbsnspandestination := &InstructionIdBsnSpanDestination{InstructionIdBsn: parent} |
| 13520 | return _instructionidbsnspandestination, nil |
| 13521 | } |
| 13522 | |
| 13523 | func NewInstructionIdBsnSpanDestination() *InstructionIdBsnSpanDestination { |
| 13524 | obj := &InstructionIdBsnSpanDestination{ |
| 13525 | InstructionIdBsn: NewInstructionIdBsn(10), |
| 13526 | } |
| 13527 | return obj |
| 13528 | } |
| 13529 | |
| 13530 | type InstructionIdClearActions struct { |
| 13531 | *InstructionId |
| 13532 | } |
| 13533 | |
| 13534 | type IInstructionIdClearActions interface { |
| 13535 | IInstructionId |
| 13536 | } |
| 13537 | |
| 13538 | func (self *InstructionIdClearActions) Serialize(encoder *goloxi.Encoder) error { |
| 13539 | if err := self.InstructionId.Serialize(encoder); err != nil { |
| 13540 | return err |
| 13541 | } |
| 13542 | |
| 13543 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13544 | |
| 13545 | return nil |
| 13546 | } |
| 13547 | |
| 13548 | func DecodeInstructionIdClearActions(parent *InstructionId, decoder *goloxi.Decoder) (*InstructionIdClearActions, error) { |
| 13549 | _instructionidclearactions := &InstructionIdClearActions{InstructionId: parent} |
| 13550 | return _instructionidclearactions, nil |
| 13551 | } |
| 13552 | |
| 13553 | func NewInstructionIdClearActions() *InstructionIdClearActions { |
| 13554 | obj := &InstructionIdClearActions{ |
| 13555 | InstructionId: NewInstructionId(5), |
| 13556 | } |
| 13557 | return obj |
| 13558 | } |
| 13559 | |
| 13560 | type InstructionIdGotoTable struct { |
| 13561 | *InstructionId |
| 13562 | } |
| 13563 | |
| 13564 | type IInstructionIdGotoTable interface { |
| 13565 | IInstructionId |
| 13566 | } |
| 13567 | |
| 13568 | func (self *InstructionIdGotoTable) Serialize(encoder *goloxi.Encoder) error { |
| 13569 | if err := self.InstructionId.Serialize(encoder); err != nil { |
| 13570 | return err |
| 13571 | } |
| 13572 | |
| 13573 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13574 | |
| 13575 | return nil |
| 13576 | } |
| 13577 | |
| 13578 | func DecodeInstructionIdGotoTable(parent *InstructionId, decoder *goloxi.Decoder) (*InstructionIdGotoTable, error) { |
| 13579 | _instructionidgototable := &InstructionIdGotoTable{InstructionId: parent} |
| 13580 | return _instructionidgototable, nil |
| 13581 | } |
| 13582 | |
| 13583 | func NewInstructionIdGotoTable() *InstructionIdGotoTable { |
| 13584 | obj := &InstructionIdGotoTable{ |
| 13585 | InstructionId: NewInstructionId(1), |
| 13586 | } |
| 13587 | return obj |
| 13588 | } |
| 13589 | |
| 13590 | type InstructionIdMeter struct { |
| 13591 | *InstructionId |
| 13592 | } |
| 13593 | |
| 13594 | type IInstructionIdMeter interface { |
| 13595 | IInstructionId |
| 13596 | } |
| 13597 | |
| 13598 | func (self *InstructionIdMeter) Serialize(encoder *goloxi.Encoder) error { |
| 13599 | if err := self.InstructionId.Serialize(encoder); err != nil { |
| 13600 | return err |
| 13601 | } |
| 13602 | |
| 13603 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13604 | |
| 13605 | return nil |
| 13606 | } |
| 13607 | |
| 13608 | func DecodeInstructionIdMeter(parent *InstructionId, decoder *goloxi.Decoder) (*InstructionIdMeter, error) { |
| 13609 | _instructionidmeter := &InstructionIdMeter{InstructionId: parent} |
| 13610 | return _instructionidmeter, nil |
| 13611 | } |
| 13612 | |
| 13613 | func NewInstructionIdMeter() *InstructionIdMeter { |
| 13614 | obj := &InstructionIdMeter{ |
| 13615 | InstructionId: NewInstructionId(6), |
| 13616 | } |
| 13617 | return obj |
| 13618 | } |
| 13619 | |
| 13620 | type InstructionIdWriteActions struct { |
| 13621 | *InstructionId |
| 13622 | } |
| 13623 | |
| 13624 | type IInstructionIdWriteActions interface { |
| 13625 | IInstructionId |
| 13626 | } |
| 13627 | |
| 13628 | func (self *InstructionIdWriteActions) Serialize(encoder *goloxi.Encoder) error { |
| 13629 | if err := self.InstructionId.Serialize(encoder); err != nil { |
| 13630 | return err |
| 13631 | } |
| 13632 | |
| 13633 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13634 | |
| 13635 | return nil |
| 13636 | } |
| 13637 | |
| 13638 | func DecodeInstructionIdWriteActions(parent *InstructionId, decoder *goloxi.Decoder) (*InstructionIdWriteActions, error) { |
| 13639 | _instructionidwriteactions := &InstructionIdWriteActions{InstructionId: parent} |
| 13640 | return _instructionidwriteactions, nil |
| 13641 | } |
| 13642 | |
| 13643 | func NewInstructionIdWriteActions() *InstructionIdWriteActions { |
| 13644 | obj := &InstructionIdWriteActions{ |
| 13645 | InstructionId: NewInstructionId(3), |
| 13646 | } |
| 13647 | return obj |
| 13648 | } |
| 13649 | |
| 13650 | type InstructionIdWriteMetadata struct { |
| 13651 | *InstructionId |
| 13652 | } |
| 13653 | |
| 13654 | type IInstructionIdWriteMetadata interface { |
| 13655 | IInstructionId |
| 13656 | } |
| 13657 | |
| 13658 | func (self *InstructionIdWriteMetadata) Serialize(encoder *goloxi.Encoder) error { |
| 13659 | if err := self.InstructionId.Serialize(encoder); err != nil { |
| 13660 | return err |
| 13661 | } |
| 13662 | |
| 13663 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13664 | |
| 13665 | return nil |
| 13666 | } |
| 13667 | |
| 13668 | func DecodeInstructionIdWriteMetadata(parent *InstructionId, decoder *goloxi.Decoder) (*InstructionIdWriteMetadata, error) { |
| 13669 | _instructionidwritemetadata := &InstructionIdWriteMetadata{InstructionId: parent} |
| 13670 | return _instructionidwritemetadata, nil |
| 13671 | } |
| 13672 | |
| 13673 | func NewInstructionIdWriteMetadata() *InstructionIdWriteMetadata { |
| 13674 | obj := &InstructionIdWriteMetadata{ |
| 13675 | InstructionId: NewInstructionId(2), |
| 13676 | } |
| 13677 | return obj |
| 13678 | } |
| 13679 | |
| 13680 | type MatchV3 struct { |
| 13681 | Type uint16 |
| 13682 | Length uint16 |
| 13683 | OxmList []goloxi.IOxm |
| 13684 | } |
| 13685 | |
| 13686 | type IMatchV3 interface { |
| 13687 | goloxi.Serializable |
| 13688 | GetType() uint16 |
| 13689 | GetLength() uint16 |
| 13690 | GetOxmList() []goloxi.IOxm |
| 13691 | } |
| 13692 | |
| 13693 | func (self *MatchV3) GetType() uint16 { |
| 13694 | return self.Type |
| 13695 | } |
| 13696 | |
| 13697 | func (self *MatchV3) SetType(v uint16) { |
| 13698 | self.Type = v |
| 13699 | } |
| 13700 | |
| 13701 | func (self *MatchV3) GetLength() uint16 { |
| 13702 | return self.Length |
| 13703 | } |
| 13704 | |
| 13705 | func (self *MatchV3) SetLength(v uint16) { |
| 13706 | self.Length = v |
| 13707 | } |
| 13708 | |
| 13709 | func (self *MatchV3) GetOxmList() []goloxi.IOxm { |
| 13710 | return self.OxmList |
| 13711 | } |
| 13712 | |
| 13713 | func (self *MatchV3) SetOxmList(v []goloxi.IOxm) { |
| 13714 | self.OxmList = v |
| 13715 | } |
| 13716 | |
| 13717 | func (self *MatchV3) Serialize(encoder *goloxi.Encoder) error { |
| 13718 | |
| 13719 | encoder.PutUint16(uint16(self.Type)) |
| 13720 | encoder.PutUint16(uint16(self.Length)) |
| 13721 | for _, obj := range self.OxmList { |
| 13722 | if err := obj.Serialize(encoder); err != nil { |
| 13723 | return err |
| 13724 | } |
| 13725 | } |
| 13726 | |
| 13727 | encoder.SkipAlign() |
| 13728 | |
| 13729 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13730 | |
| 13731 | return nil |
| 13732 | } |
| 13733 | func (self *MatchV3) Decode(decoder *goloxi.Decoder) error { |
| 13734 | if decoder.Length() < 4 { |
| 13735 | return fmt.Errorf("MatchV3 packet too short: %d < 4", decoder.Length()) |
| 13736 | } |
| 13737 | |
| 13738 | defer decoder.SkipAlign() |
| 13739 | |
| 13740 | self.Type = uint16(decoder.ReadUint16()) |
| 13741 | self.Length = uint16(decoder.ReadUint16()) |
| 13742 | oldDecoder := decoder |
| 13743 | defer func() { decoder = oldDecoder }() |
| 13744 | decoder = decoder.SliceDecoder(int(((self.Length)+7)/8*8), 2+2) |
| 13745 | |
| 13746 | for decoder.Length() >= 4 { |
| 13747 | item, err := DecodeOxm(decoder) |
| 13748 | if err != nil { |
| 13749 | return err |
| 13750 | } |
| 13751 | if item != nil { |
| 13752 | self.OxmList = append(self.OxmList, item) |
| 13753 | } |
| 13754 | } |
| 13755 | |
| 13756 | return nil |
| 13757 | } |
| 13758 | |
| 13759 | func NewMatchV3() *MatchV3 { |
| 13760 | obj := &MatchV3{} |
| 13761 | return obj |
| 13762 | } |
| 13763 | |
| 13764 | type MeterBand struct { |
| 13765 | Type uint16 |
| 13766 | Len uint16 |
| 13767 | } |
| 13768 | |
| 13769 | type IMeterBand interface { |
| 13770 | goloxi.Serializable |
| 13771 | GetType() uint16 |
| 13772 | GetLen() uint16 |
| 13773 | } |
| 13774 | |
| 13775 | func (self *MeterBand) GetType() uint16 { |
| 13776 | return self.Type |
| 13777 | } |
| 13778 | |
| 13779 | func (self *MeterBand) SetType(v uint16) { |
| 13780 | self.Type = v |
| 13781 | } |
| 13782 | |
| 13783 | func (self *MeterBand) GetLen() uint16 { |
| 13784 | return self.Len |
| 13785 | } |
| 13786 | |
| 13787 | func (self *MeterBand) SetLen(v uint16) { |
| 13788 | self.Len = v |
| 13789 | } |
| 13790 | |
| 13791 | func (self *MeterBand) Serialize(encoder *goloxi.Encoder) error { |
| 13792 | |
| 13793 | encoder.PutUint16(uint16(self.Type)) |
| 13794 | encoder.PutUint16(uint16(self.Len)) |
| 13795 | |
| 13796 | return nil |
| 13797 | } |
| 13798 | |
| 13799 | func DecodeMeterBand(decoder *goloxi.Decoder) (IMeterBand, error) { |
| 13800 | _meterband := &MeterBand{} |
| 13801 | if decoder.Length() < 4 { |
| 13802 | return nil, fmt.Errorf("MeterBand packet too short: %d < 4", decoder.Length()) |
| 13803 | } |
| 13804 | _meterband.Type = uint16(decoder.ReadUint16()) |
| 13805 | _meterband.Len = uint16(decoder.ReadUint16()) |
| 13806 | oldDecoder := decoder |
| 13807 | defer func() { decoder = oldDecoder }() |
| 13808 | decoder = decoder.SliceDecoder(int(_meterband.Len), 2+2) |
| 13809 | |
| 13810 | switch _meterband.Type { |
| 13811 | case 1: |
| 13812 | return DecodeMeterBandDrop(_meterband, decoder) |
| 13813 | case 2: |
| 13814 | return DecodeMeterBandDscpRemark(_meterband, decoder) |
| 13815 | case 65535: |
| 13816 | return DecodeMeterBandExperimenter(_meterband, decoder) |
| 13817 | default: |
| 13818 | return nil, fmt.Errorf("Invalid type '%d' for 'MeterBand'", _meterband.Type) |
| 13819 | } |
| 13820 | } |
| 13821 | |
| 13822 | func NewMeterBand(_type uint16) *MeterBand { |
| 13823 | obj := &MeterBand{} |
| 13824 | obj.Type = _type |
| 13825 | return obj |
| 13826 | } |
| 13827 | |
| 13828 | type MeterBandDrop struct { |
| 13829 | *MeterBand |
| 13830 | Rate uint32 |
| 13831 | BurstSize uint32 |
| 13832 | } |
| 13833 | |
| 13834 | type IMeterBandDrop interface { |
| 13835 | IMeterBand |
| 13836 | GetRate() uint32 |
| 13837 | GetBurstSize() uint32 |
| 13838 | } |
| 13839 | |
| 13840 | func (self *MeterBandDrop) GetRate() uint32 { |
| 13841 | return self.Rate |
| 13842 | } |
| 13843 | |
| 13844 | func (self *MeterBandDrop) SetRate(v uint32) { |
| 13845 | self.Rate = v |
| 13846 | } |
| 13847 | |
| 13848 | func (self *MeterBandDrop) GetBurstSize() uint32 { |
| 13849 | return self.BurstSize |
| 13850 | } |
| 13851 | |
| 13852 | func (self *MeterBandDrop) SetBurstSize(v uint32) { |
| 13853 | self.BurstSize = v |
| 13854 | } |
| 13855 | |
| 13856 | func (self *MeterBandDrop) Serialize(encoder *goloxi.Encoder) error { |
| 13857 | if err := self.MeterBand.Serialize(encoder); err != nil { |
| 13858 | return err |
| 13859 | } |
| 13860 | |
| 13861 | encoder.PutUint32(uint32(self.Rate)) |
| 13862 | encoder.PutUint32(uint32(self.BurstSize)) |
| 13863 | encoder.Write(bytes.Repeat([]byte{0}, 4)) |
| 13864 | |
| 13865 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13866 | |
| 13867 | return nil |
| 13868 | } |
| 13869 | |
| 13870 | func DecodeMeterBandDrop(parent *MeterBand, decoder *goloxi.Decoder) (*MeterBandDrop, error) { |
| 13871 | _meterbanddrop := &MeterBandDrop{MeterBand: parent} |
| 13872 | if decoder.Length() < 12 { |
| 13873 | return nil, fmt.Errorf("MeterBandDrop packet too short: %d < 12", decoder.Length()) |
| 13874 | } |
| 13875 | _meterbanddrop.Rate = uint32(decoder.ReadUint32()) |
| 13876 | _meterbanddrop.BurstSize = uint32(decoder.ReadUint32()) |
| 13877 | decoder.Skip(4) |
| 13878 | return _meterbanddrop, nil |
| 13879 | } |
| 13880 | |
| 13881 | func NewMeterBandDrop() *MeterBandDrop { |
| 13882 | obj := &MeterBandDrop{ |
| 13883 | MeterBand: NewMeterBand(1), |
| 13884 | } |
| 13885 | return obj |
| 13886 | } |
| 13887 | |
| 13888 | type MeterBandDscpRemark struct { |
| 13889 | *MeterBand |
| 13890 | Rate uint32 |
| 13891 | BurstSize uint32 |
| 13892 | PrecLevel uint8 |
| 13893 | } |
| 13894 | |
| 13895 | type IMeterBandDscpRemark interface { |
| 13896 | IMeterBand |
| 13897 | GetRate() uint32 |
| 13898 | GetBurstSize() uint32 |
| 13899 | GetPrecLevel() uint8 |
| 13900 | } |
| 13901 | |
| 13902 | func (self *MeterBandDscpRemark) GetRate() uint32 { |
| 13903 | return self.Rate |
| 13904 | } |
| 13905 | |
| 13906 | func (self *MeterBandDscpRemark) SetRate(v uint32) { |
| 13907 | self.Rate = v |
| 13908 | } |
| 13909 | |
| 13910 | func (self *MeterBandDscpRemark) GetBurstSize() uint32 { |
| 13911 | return self.BurstSize |
| 13912 | } |
| 13913 | |
| 13914 | func (self *MeterBandDscpRemark) SetBurstSize(v uint32) { |
| 13915 | self.BurstSize = v |
| 13916 | } |
| 13917 | |
| 13918 | func (self *MeterBandDscpRemark) GetPrecLevel() uint8 { |
| 13919 | return self.PrecLevel |
| 13920 | } |
| 13921 | |
| 13922 | func (self *MeterBandDscpRemark) SetPrecLevel(v uint8) { |
| 13923 | self.PrecLevel = v |
| 13924 | } |
| 13925 | |
| 13926 | func (self *MeterBandDscpRemark) Serialize(encoder *goloxi.Encoder) error { |
| 13927 | if err := self.MeterBand.Serialize(encoder); err != nil { |
| 13928 | return err |
| 13929 | } |
| 13930 | |
| 13931 | encoder.PutUint32(uint32(self.Rate)) |
| 13932 | encoder.PutUint32(uint32(self.BurstSize)) |
| 13933 | encoder.PutUint8(uint8(self.PrecLevel)) |
| 13934 | encoder.Write(bytes.Repeat([]byte{0}, 3)) |
| 13935 | |
| 13936 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 13937 | |
| 13938 | return nil |
| 13939 | } |
| 13940 | |
| 13941 | func DecodeMeterBandDscpRemark(parent *MeterBand, decoder *goloxi.Decoder) (*MeterBandDscpRemark, error) { |
| 13942 | _meterbanddscpremark := &MeterBandDscpRemark{MeterBand: parent} |
| 13943 | if decoder.Length() < 12 { |
| 13944 | return nil, fmt.Errorf("MeterBandDscpRemark packet too short: %d < 12", decoder.Length()) |
| 13945 | } |
| 13946 | _meterbanddscpremark.Rate = uint32(decoder.ReadUint32()) |
| 13947 | _meterbanddscpremark.BurstSize = uint32(decoder.ReadUint32()) |
| 13948 | _meterbanddscpremark.PrecLevel = uint8(decoder.ReadByte()) |
| 13949 | decoder.Skip(3) |
| 13950 | return _meterbanddscpremark, nil |
| 13951 | } |
| 13952 | |
| 13953 | func NewMeterBandDscpRemark() *MeterBandDscpRemark { |
| 13954 | obj := &MeterBandDscpRemark{ |
| 13955 | MeterBand: NewMeterBand(2), |
| 13956 | } |
| 13957 | return obj |
| 13958 | } |
| 13959 | |
| 13960 | type MeterBandExperimenter struct { |
| 13961 | *MeterBand |
| 13962 | Rate uint32 |
| 13963 | BurstSize uint32 |
| 13964 | Experimenter uint32 |
| 13965 | } |
| 13966 | |
| 13967 | type IMeterBandExperimenter interface { |
| 13968 | IMeterBand |
| 13969 | GetRate() uint32 |
| 13970 | GetBurstSize() uint32 |
| 13971 | GetExperimenter() uint32 |
| 13972 | } |
| 13973 | |
| 13974 | func (self *MeterBandExperimenter) GetRate() uint32 { |
| 13975 | return self.Rate |
| 13976 | } |
| 13977 | |
| 13978 | func (self *MeterBandExperimenter) SetRate(v uint32) { |
| 13979 | self.Rate = v |
| 13980 | } |
| 13981 | |
| 13982 | func (self *MeterBandExperimenter) GetBurstSize() uint32 { |
| 13983 | return self.BurstSize |
| 13984 | } |
| 13985 | |
| 13986 | func (self *MeterBandExperimenter) SetBurstSize(v uint32) { |
| 13987 | self.BurstSize = v |
| 13988 | } |
| 13989 | |
| 13990 | func (self *MeterBandExperimenter) GetExperimenter() uint32 { |
| 13991 | return self.Experimenter |
| 13992 | } |
| 13993 | |
| 13994 | func (self *MeterBandExperimenter) SetExperimenter(v uint32) { |
| 13995 | self.Experimenter = v |
| 13996 | } |
| 13997 | |
| 13998 | func (self *MeterBandExperimenter) Serialize(encoder *goloxi.Encoder) error { |
| 13999 | if err := self.MeterBand.Serialize(encoder); err != nil { |
| 14000 | return err |
| 14001 | } |
| 14002 | |
| 14003 | encoder.PutUint32(uint32(self.Rate)) |
| 14004 | encoder.PutUint32(uint32(self.BurstSize)) |
| 14005 | encoder.PutUint32(uint32(self.Experimenter)) |
| 14006 | |
| 14007 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
| 14008 | |
| 14009 | return nil |
| 14010 | } |
| 14011 | |
| 14012 | func DecodeMeterBandExperimenter(parent *MeterBand, decoder *goloxi.Decoder) (*MeterBandExperimenter, error) { |
| 14013 | _meterbandexperimenter := &MeterBandExperimenter{MeterBand: parent} |
| 14014 | if decoder.Length() < 12 { |
| 14015 | return nil, fmt.Errorf("MeterBandExperimenter packet too short: %d < 12", decoder.Length()) |
| 14016 | } |
| 14017 | _meterbandexperimenter.Rate = uint32(decoder.ReadUint32()) |
| 14018 | _meterbandexperimenter.BurstSize = uint32(decoder.ReadUint32()) |
| 14019 | _meterbandexperimenter.Experimenter = uint32(decoder.ReadUint32()) |
| 14020 | return _meterbandexperimenter, nil |
| 14021 | } |
| 14022 | |
| 14023 | func NewMeterBandExperimenter() *MeterBandExperimenter { |
| 14024 | obj := &MeterBandExperimenter{ |
| 14025 | MeterBand: NewMeterBand(65535), |
| 14026 | } |
| 14027 | return obj |
| 14028 | } |
| 14029 | |
| 14030 | type MeterBandStats struct { |
| 14031 | PacketBandCount uint64 |
| 14032 | ByteBandCount uint64 |
| 14033 | } |
| 14034 | |
| 14035 | type IMeterBandStats interface { |
| 14036 | goloxi.Serializable |
| 14037 | GetPacketBandCount() uint64 |
| 14038 | GetByteBandCount() uint64 |
| 14039 | } |
| 14040 | |
| 14041 | func (self *MeterBandStats) GetPacketBandCount() uint64 { |
| 14042 | return self.PacketBandCount |
| 14043 | } |
| 14044 | |
| 14045 | func (self *MeterBandStats) SetPacketBandCount(v uint64) { |
| 14046 | self.PacketBandCount = v |
| 14047 | } |
| 14048 | |
| 14049 | func (self *MeterBandStats) GetByteBandCount() uint64 { |
| 14050 | return self.ByteBandCount |
| 14051 | } |
| 14052 | |
| 14053 | func (self *MeterBandStats) SetByteBandCount(v uint64) { |
| 14054 | self.ByteBandCount = v |
| 14055 | } |
| 14056 | |
| 14057 | func (self *MeterBandStats) Serialize(encoder *goloxi.Encoder) error { |
| 14058 | |
| 14059 | encoder.PutUint64(uint64(self.PacketBandCount)) |
| 14060 | encoder.PutUint64(uint64(self.ByteBandCount)) |
| 14061 | |
| 14062 | return nil |
| 14063 | } |
| 14064 | |
| 14065 | func DecodeMeterBandStats(decoder *goloxi.Decoder) (*MeterBandStats, error) { |
| 14066 | _meterbandstats := &MeterBandStats{} |
| 14067 | if decoder.Length() < 16 { |
| 14068 | return nil, fmt.Errorf("MeterBandStats packet too short: %d < 16", decoder.Length()) |
| 14069 | } |
| 14070 | _meterbandstats.PacketBandCount = uint64(decoder.ReadUint64()) |
| 14071 | _meterbandstats.ByteBandCount = uint64(decoder.ReadUint64()) |
| 14072 | return _meterbandstats, nil |
| 14073 | } |
| 14074 | |
| 14075 | func NewMeterBandStats() *MeterBandStats { |
| 14076 | obj := &MeterBandStats{} |
| 14077 | return obj |
| 14078 | } |
| 14079 | |
| 14080 | type MeterConfig struct { |
| 14081 | Length uint16 |
| 14082 | Flags MeterFlags |
| 14083 | MeterId uint32 |
| 14084 | Entries []IMeterBand |
| 14085 | } |
| 14086 | |
| 14087 | type IMeterConfig interface { |
| 14088 | goloxi.Serializable |
| 14089 | GetLength() uint16 |
| 14090 | GetFlags() MeterFlags |
| 14091 | GetMeterId() uint32 |
| 14092 | GetEntries() []IMeterBand |
| 14093 | } |
| 14094 | |
| 14095 | func (self *MeterConfig) GetLength() uint16 { |
| 14096 | return self.Length |
| 14097 | } |
| 14098 | |
| 14099 | func (self *MeterConfig) SetLength(v uint16) { |
| 14100 | self.Length = v |
| 14101 | } |
| 14102 | |
| 14103 | func (self *MeterConfig) GetFlags() MeterFlags { |
| 14104 | return self.Flags |
| 14105 | } |
| 14106 | |
| 14107 | func (self *MeterConfig) SetFlags(v MeterFlags) { |
| 14108 | self.Flags = v |
| 14109 | } |
| 14110 | |
| 14111 | func (self *MeterConfig) GetMeterId() uint32 { |
| 14112 | return self.MeterId |
| 14113 | } |
| 14114 | |
| 14115 | func (self *MeterConfig) SetMeterId(v uint32) { |
| 14116 | self.MeterId = v |
| 14117 | } |
| 14118 | |
| 14119 | func (self *MeterConfig) GetEntries() []IMeterBand { |
| 14120 | return self.Entries |
| 14121 | } |
| 14122 | |
| 14123 | func (self *MeterConfig) SetEntries(v []IMeterBand) { |
| 14124 | self.Entries = v |
| 14125 | } |
| 14126 | |
| 14127 | func (self *MeterConfig) Serialize(encoder *goloxi.Encoder) error { |
| 14128 | |
| 14129 | encoder.PutUint16(uint16(self.Length)) |
| 14130 | encoder.PutUint16(uint16(self.Flags)) |
| 14131 | encoder.PutUint32(uint32(self.MeterId)) |
| 14132 | for _, obj := range self.Entries { |
| 14133 | if err := obj.Serialize(encoder); err != nil { |
| 14134 | return err |
| 14135 | } |
| 14136 | } |
| 14137 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 14138 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 14139 | |
| 14140 | return nil |
| 14141 | } |
| 14142 | |
| 14143 | func DecodeMeterConfig(decoder *goloxi.Decoder) (*MeterConfig, error) { |
| 14144 | _meterconfig := &MeterConfig{} |
| 14145 | if decoder.Length() < 8 { |
| 14146 | return nil, fmt.Errorf("MeterConfig packet too short: %d < 8", decoder.Length()) |
| 14147 | } |
| 14148 | _meterconfig.Length = uint16(decoder.ReadUint16()) |
| 14149 | oldDecoder := decoder |
| 14150 | defer func() { decoder = oldDecoder }() |
| 14151 | decoder = decoder.SliceDecoder(int(_meterconfig.Length), 2+0) |
| 14152 | _meterconfig.Flags = MeterFlags(decoder.ReadUint16()) |
| 14153 | _meterconfig.MeterId = uint32(decoder.ReadUint32()) |
| 14154 | |
| 14155 | for decoder.Length() >= 4 { |
| 14156 | item, err := DecodeMeterBand(decoder) |
| 14157 | if err != nil { |
| 14158 | return nil, err |
| 14159 | } |
| 14160 | if item != nil { |
| 14161 | _meterconfig.Entries = append(_meterconfig.Entries, item) |
| 14162 | } |
| 14163 | } |
| 14164 | return _meterconfig, nil |
| 14165 | } |
| 14166 | |
| 14167 | func NewMeterConfig() *MeterConfig { |
| 14168 | obj := &MeterConfig{} |
| 14169 | return obj |
| 14170 | } |
| 14171 | |
| 14172 | type MeterFeatures struct { |
| 14173 | MaxMeter uint32 |
| 14174 | BandTypes uint32 |
| 14175 | Capabilities uint32 |
| 14176 | MaxBands uint8 |
| 14177 | MaxColor uint8 |
| 14178 | } |
| 14179 | |
| 14180 | type IMeterFeatures interface { |
| 14181 | goloxi.Serializable |
| 14182 | GetMaxMeter() uint32 |
| 14183 | GetBandTypes() uint32 |
| 14184 | GetCapabilities() uint32 |
| 14185 | GetMaxBands() uint8 |
| 14186 | GetMaxColor() uint8 |
| 14187 | } |
| 14188 | |
| 14189 | func (self *MeterFeatures) GetMaxMeter() uint32 { |
| 14190 | return self.MaxMeter |
| 14191 | } |
| 14192 | |
| 14193 | func (self *MeterFeatures) SetMaxMeter(v uint32) { |
| 14194 | self.MaxMeter = v |
| 14195 | } |
| 14196 | |
| 14197 | func (self *MeterFeatures) GetBandTypes() uint32 { |
| 14198 | return self.BandTypes |
| 14199 | } |
| 14200 | |
| 14201 | func (self *MeterFeatures) SetBandTypes(v uint32) { |
| 14202 | self.BandTypes = v |
| 14203 | } |
| 14204 | |
| 14205 | func (self *MeterFeatures) GetCapabilities() uint32 { |
| 14206 | return self.Capabilities |
| 14207 | } |
| 14208 | |
| 14209 | func (self *MeterFeatures) SetCapabilities(v uint32) { |
| 14210 | self.Capabilities = v |
| 14211 | } |
| 14212 | |
| 14213 | func (self *MeterFeatures) GetMaxBands() uint8 { |
| 14214 | return self.MaxBands |
| 14215 | } |
| 14216 | |
| 14217 | func (self *MeterFeatures) SetMaxBands(v uint8) { |
| 14218 | self.MaxBands = v |
| 14219 | } |
| 14220 | |
| 14221 | func (self *MeterFeatures) GetMaxColor() uint8 { |
| 14222 | return self.MaxColor |
| 14223 | } |
| 14224 | |
| 14225 | func (self *MeterFeatures) SetMaxColor(v uint8) { |
| 14226 | self.MaxColor = v |
| 14227 | } |
| 14228 | |
| 14229 | func (self *MeterFeatures) Serialize(encoder *goloxi.Encoder) error { |
| 14230 | |
| 14231 | encoder.PutUint32(uint32(self.MaxMeter)) |
| 14232 | encoder.PutUint32(uint32(self.BandTypes)) |
| 14233 | encoder.PutUint32(uint32(self.Capabilities)) |
| 14234 | encoder.PutUint8(uint8(self.MaxBands)) |
| 14235 | encoder.PutUint8(uint8(self.MaxColor)) |
| 14236 | encoder.Write(bytes.Repeat([]byte{0}, 2)) |
| 14237 | |
| 14238 | return nil |
| 14239 | } |
| 14240 | func (self *MeterFeatures) Decode(decoder *goloxi.Decoder) error { |
| 14241 | if decoder.Length() < 16 { |
| 14242 | return fmt.Errorf("MeterFeatures packet too short: %d < 16", decoder.Length()) |
| 14243 | } |
| 14244 | |
| 14245 | self.MaxMeter = uint32(decoder.ReadUint32()) |
| 14246 | self.BandTypes = uint32(decoder.ReadUint32()) |
| 14247 | self.Capabilities = uint32(decoder.ReadUint32()) |
| 14248 | self.MaxBands = uint8(decoder.ReadByte()) |
| 14249 | self.MaxColor = uint8(decoder.ReadByte()) |
| 14250 | decoder.Skip(2) |
| 14251 | |
| 14252 | return nil |
| 14253 | } |
| 14254 | |
| 14255 | func NewMeterFeatures() *MeterFeatures { |
| 14256 | obj := &MeterFeatures{} |
| 14257 | return obj |
| 14258 | } |
| 14259 | |
| 14260 | type MeterStats struct { |
| 14261 | MeterId uint32 |
| 14262 | Len uint16 |
| 14263 | FlowCount uint32 |
| 14264 | PacketInCount uint64 |
| 14265 | ByteInCount uint64 |
| 14266 | DurationSec uint32 |
| 14267 | DurationNsec uint32 |
| 14268 | BandStats []*MeterBandStats |
| 14269 | } |
| 14270 | |
| 14271 | type IMeterStats interface { |
| 14272 | goloxi.Serializable |
| 14273 | GetMeterId() uint32 |
| 14274 | GetLen() uint16 |
| 14275 | GetFlowCount() uint32 |
| 14276 | GetPacketInCount() uint64 |
| 14277 | GetByteInCount() uint64 |
| 14278 | GetDurationSec() uint32 |
| 14279 | GetDurationNsec() uint32 |
| 14280 | GetBandStats() []*MeterBandStats |
| 14281 | } |
| 14282 | |
| 14283 | func (self *MeterStats) GetMeterId() uint32 { |
| 14284 | return self.MeterId |
| 14285 | } |
| 14286 | |
| 14287 | func (self *MeterStats) SetMeterId(v uint32) { |
| 14288 | self.MeterId = v |
| 14289 | } |
| 14290 | |
| 14291 | func (self *MeterStats) GetLen() uint16 { |
| 14292 | return self.Len |
| 14293 | } |
| 14294 | |
| 14295 | func (self *MeterStats) SetLen(v uint16) { |
| 14296 | self.Len = v |
| 14297 | } |
| 14298 | |
| 14299 | func (self *MeterStats) GetFlowCount() uint32 { |
| 14300 | return self.FlowCount |
| 14301 | } |
| 14302 | |
| 14303 | func (self *MeterStats) SetFlowCount(v uint32) { |
| 14304 | self.FlowCount = v |
| 14305 | } |
| 14306 | |
| 14307 | func (self *MeterStats) GetPacketInCount() uint64 { |
| 14308 | return self.PacketInCount |
| 14309 | } |
| 14310 | |
| 14311 | func (self *MeterStats) SetPacketInCount(v uint64) { |
| 14312 | self.PacketInCount = v |
| 14313 | } |
| 14314 | |
| 14315 | func (self *MeterStats) GetByteInCount() uint64 { |
| 14316 | return self.ByteInCount |
| 14317 | } |
| 14318 | |
| 14319 | func (self *MeterStats) SetByteInCount(v uint64) { |
| 14320 | self.ByteInCount = v |
| 14321 | } |
| 14322 | |
| 14323 | func (self *MeterStats) GetDurationSec() uint32 { |
| 14324 | return self.DurationSec |
| 14325 | } |
| 14326 | |
| 14327 | func (self *MeterStats) SetDurationSec(v uint32) { |
| 14328 | self.DurationSec = v |
| 14329 | } |
| 14330 | |
| 14331 | func (self *MeterStats) GetDurationNsec() uint32 { |
| 14332 | return self.DurationNsec |
| 14333 | } |
| 14334 | |
| 14335 | func (self *MeterStats) SetDurationNsec(v uint32) { |
| 14336 | self.DurationNsec = v |
| 14337 | } |
| 14338 | |
| 14339 | func (self *MeterStats) GetBandStats() []*MeterBandStats { |
| 14340 | return self.BandStats |
| 14341 | } |
| 14342 | |
| 14343 | func (self *MeterStats) SetBandStats(v []*MeterBandStats) { |
| 14344 | self.BandStats = v |
| 14345 | } |
| 14346 | |
| 14347 | func (self *MeterStats) Serialize(encoder *goloxi.Encoder) error { |
| 14348 | |
| 14349 | encoder.PutUint32(uint32(self.MeterId)) |
| 14350 | encoder.PutUint16(uint16(self.Len)) |
| 14351 | encoder.Write(bytes.Repeat([]byte{0}, 6)) |
| 14352 | encoder.PutUint32(uint32(self.FlowCount)) |
| 14353 | encoder.PutUint64(uint64(self.PacketInCount)) |
| 14354 | encoder.PutUint64(uint64(self.ByteInCount)) |
| 14355 | encoder.PutUint32(uint32(self.DurationSec)) |
| 14356 | encoder.PutUint32(uint32(self.DurationNsec)) |
| 14357 | for _, obj := range self.BandStats { |
| 14358 | if err := obj.Serialize(encoder); err != nil { |
| 14359 | return err |
| 14360 | } |
| 14361 | } |
| 14362 | |
| 14363 | binary.BigEndian.PutUint16(encoder.Bytes()[4:6], uint16(len(encoder.Bytes()))) |
| 14364 | |
| 14365 | return nil |
| 14366 | } |
| 14367 | |
| 14368 | func DecodeMeterStats(decoder *goloxi.Decoder) (*MeterStats, error) { |
| 14369 | _meterstats := &MeterStats{} |
| 14370 | if decoder.Length() < 40 { |
| 14371 | return nil, fmt.Errorf("MeterStats packet too short: %d < 40", decoder.Length()) |
| 14372 | } |
| 14373 | _meterstats.MeterId = uint32(decoder.ReadUint32()) |
| 14374 | _meterstats.Len = uint16(decoder.ReadUint16()) |
| 14375 | oldDecoder := decoder |
| 14376 | defer func() { decoder = oldDecoder }() |
| 14377 | decoder = decoder.SliceDecoder(int(_meterstats.Len), 2+4) |
| 14378 | decoder.Skip(6) |
| 14379 | _meterstats.FlowCount = uint32(decoder.ReadUint32()) |
| 14380 | _meterstats.PacketInCount = uint64(decoder.ReadUint64()) |
| 14381 | _meterstats.ByteInCount = uint64(decoder.ReadUint64()) |
| 14382 | _meterstats.DurationSec = uint32(decoder.ReadUint32()) |
| 14383 | _meterstats.DurationNsec = uint32(decoder.ReadUint32()) |
| 14384 | |
| 14385 | for decoder.Length() >= 16 { |
| 14386 | item, err := DecodeMeterBandStats(decoder) |
| 14387 | if err != nil { |
| 14388 | return nil, err |
| 14389 | } |
| 14390 | if item != nil { |
| 14391 | _meterstats.BandStats = append(_meterstats.BandStats, item) |
| 14392 | } |
| 14393 | } |
| 14394 | return _meterstats, nil |
| 14395 | } |
| 14396 | |
| 14397 | func NewMeterStats() *MeterStats { |
| 14398 | obj := &MeterStats{} |
| 14399 | return obj |
| 14400 | } |
| 14401 | |
| 14402 | type NiciraMatch struct { |
| 14403 | NxmEntries []goloxi.IOxm |
| 14404 | } |
| 14405 | |
| 14406 | type INiciraMatch interface { |
| 14407 | goloxi.Serializable |
| 14408 | GetNxmEntries() []goloxi.IOxm |
| 14409 | } |
| 14410 | |
| 14411 | func (self *NiciraMatch) GetNxmEntries() []goloxi.IOxm { |
| 14412 | return self.NxmEntries |
| 14413 | } |
| 14414 | |
| 14415 | func (self *NiciraMatch) SetNxmEntries(v []goloxi.IOxm) { |
| 14416 | self.NxmEntries = v |
| 14417 | } |
| 14418 | |
| 14419 | func (self *NiciraMatch) Serialize(encoder *goloxi.Encoder) error { |
| 14420 | |
| 14421 | for _, obj := range self.NxmEntries { |
| 14422 | if err := obj.Serialize(encoder); err != nil { |
| 14423 | return err |
| 14424 | } |
| 14425 | } |
| 14426 | |
| 14427 | encoder.SkipAlign() |
| 14428 | |
| 14429 | return nil |
| 14430 | } |
| 14431 | func (self *NiciraMatch) Decode(decoder *goloxi.Decoder) error { |
| 14432 | |
| 14433 | defer decoder.SkipAlign() |
| 14434 | |
| 14435 | for decoder.Length() >= 4 { |
| 14436 | item, err := DecodeOxm(decoder) |
| 14437 | if err != nil { |
| 14438 | return err |
| 14439 | } |
| 14440 | if item != nil { |
| 14441 | self.NxmEntries = append(self.NxmEntries, item) |
| 14442 | } |
| 14443 | } |
| 14444 | |
| 14445 | return nil |
| 14446 | } |
| 14447 | |
| 14448 | func NewNiciraMatch() *NiciraMatch { |
| 14449 | obj := &NiciraMatch{} |
| 14450 | return obj |
| 14451 | } |
| 14452 | |
| 14453 | type NiciraFlowStats struct { |
| 14454 | Length uint16 |
| 14455 | TableId uint8 |
| 14456 | DurationSec uint32 |
| 14457 | DurationNsec uint32 |
| 14458 | Priority uint16 |
| 14459 | IdleTimeout uint16 |
| 14460 | HardTimeout uint16 |
| 14461 | MatchLen uint16 |
| 14462 | IdleAge uint16 |
| 14463 | HardAge uint16 |
| 14464 | Cookie uint64 |
| 14465 | PacketCount uint64 |
| 14466 | ByteCount uint64 |
| 14467 | Match NiciraMatch |
| 14468 | Actions []goloxi.IAction |
| 14469 | } |
| 14470 | |
| 14471 | type INiciraFlowStats interface { |
| 14472 | goloxi.Serializable |
| 14473 | GetLength() uint16 |
| 14474 | GetTableId() uint8 |
| 14475 | GetDurationSec() uint32 |
| 14476 | GetDurationNsec() uint32 |
| 14477 | GetPriority() uint16 |
| 14478 | GetIdleTimeout() uint16 |
| 14479 | GetHardTimeout() uint16 |
| 14480 | GetMatchLen() uint16 |
| 14481 | GetIdleAge() uint16 |
| 14482 | GetHardAge() uint16 |
| 14483 | GetCookie() uint64 |
| 14484 | GetPacketCount() uint64 |
| 14485 | GetByteCount() uint64 |
| 14486 | GetMatch() NiciraMatch |
| 14487 | GetActions() []goloxi.IAction |
| 14488 | } |
| 14489 | |
| 14490 | func (self *NiciraFlowStats) GetLength() uint16 { |
| 14491 | return self.Length |
| 14492 | } |
| 14493 | |
| 14494 | func (self *NiciraFlowStats) SetLength(v uint16) { |
| 14495 | self.Length = v |
| 14496 | } |
| 14497 | |
| 14498 | func (self *NiciraFlowStats) GetTableId() uint8 { |
| 14499 | return self.TableId |
| 14500 | } |
| 14501 | |
| 14502 | func (self *NiciraFlowStats) SetTableId(v uint8) { |
| 14503 | self.TableId = v |
| 14504 | } |
| 14505 | |
| 14506 | func (self *NiciraFlowStats) GetDurationSec() uint32 { |
| 14507 | return self.DurationSec |
| 14508 | } |
| 14509 | |
| 14510 | func (self *NiciraFlowStats) SetDurationSec(v uint32) { |
| 14511 | self.DurationSec = v |
| 14512 | } |
| 14513 | |
| 14514 | func (self *NiciraFlowStats) GetDurationNsec() uint32 { |
| 14515 | return self.DurationNsec |
| 14516 | } |
| 14517 | |
| 14518 | func (self *NiciraFlowStats) SetDurationNsec(v uint32) { |
| 14519 | self.DurationNsec = v |
| 14520 | } |
| 14521 | |
| 14522 | func (self *NiciraFlowStats) GetPriority() uint16 { |
| 14523 | return self.Priority |
| 14524 | } |
| 14525 | |
| 14526 | func (self *NiciraFlowStats) SetPriority(v uint16) { |
| 14527 | self.Priority = v |
| 14528 | } |
| 14529 | |
| 14530 | func (self *NiciraFlowStats) GetIdleTimeout() uint16 { |
| 14531 | return self.IdleTimeout |
| 14532 | } |
| 14533 | |
| 14534 | func (self *NiciraFlowStats) SetIdleTimeout(v uint16) { |
| 14535 | self.IdleTimeout = v |
| 14536 | } |
| 14537 | |
| 14538 | func (self *NiciraFlowStats) GetHardTimeout() uint16 { |
| 14539 | return self.HardTimeout |
| 14540 | } |
| 14541 | |
| 14542 | func (self *NiciraFlowStats) SetHardTimeout(v uint16) { |
| 14543 | self.HardTimeout = v |
| 14544 | } |
| 14545 | |
| 14546 | func (self *NiciraFlowStats) GetMatchLen() uint16 { |
| 14547 | return self.MatchLen |
| 14548 | } |
| 14549 | |
| 14550 | func (self *NiciraFlowStats) SetMatchLen(v uint16) { |
| 14551 | self.MatchLen = v |
| 14552 | } |
| 14553 | |
| 14554 | func (self *NiciraFlowStats) GetIdleAge() uint16 { |
| 14555 | return self.IdleAge |
| 14556 | } |
| 14557 | |
| 14558 | func (self *NiciraFlowStats) SetIdleAge(v uint16) { |
| 14559 | self.IdleAge = v |
| 14560 | } |
| 14561 | |
| 14562 | func (self *NiciraFlowStats) GetHardAge() uint16 { |
| 14563 | return self.HardAge |
| 14564 | } |
| 14565 | |
| 14566 | func (self *NiciraFlowStats) SetHardAge(v uint16) { |
| 14567 | self.HardAge = v |
| 14568 | } |
| 14569 | |
| 14570 | func (self *NiciraFlowStats) GetCookie() uint64 { |
| 14571 | return self.Cookie |
| 14572 | } |
| 14573 | |
| 14574 | func (self *NiciraFlowStats) SetCookie(v uint64) { |
| 14575 | self.Cookie = v |
| 14576 | } |
| 14577 | |
| 14578 | func (self *NiciraFlowStats) GetPacketCount() uint64 { |
| 14579 | return self.PacketCount |
| 14580 | } |
| 14581 | |
| 14582 | func (self *NiciraFlowStats) SetPacketCount(v uint64) { |
| 14583 | self.PacketCount = v |
| 14584 | } |
| 14585 | |
| 14586 | func (self *NiciraFlowStats) GetByteCount() uint64 { |
| 14587 | return self.ByteCount |
| 14588 | } |
| 14589 | |
| 14590 | func (self *NiciraFlowStats) SetByteCount(v uint64) { |
| 14591 | self.ByteCount = v |
| 14592 | } |
| 14593 | |
| 14594 | func (self *NiciraFlowStats) GetMatch() NiciraMatch { |
| 14595 | return self.Match |
| 14596 | } |
| 14597 | |
| 14598 | func (self *NiciraFlowStats) SetMatch(v NiciraMatch) { |
| 14599 | self.Match = v |
| 14600 | } |
| 14601 | |
| 14602 | func (self *NiciraFlowStats) GetActions() []goloxi.IAction { |
| 14603 | return self.Actions |
| 14604 | } |
| 14605 | |
| 14606 | func (self *NiciraFlowStats) SetActions(v []goloxi.IAction) { |
| 14607 | self.Actions = v |
| 14608 | } |
| 14609 | |
| 14610 | func (self *NiciraFlowStats) Serialize(encoder *goloxi.Encoder) error { |
| 14611 | |
| 14612 | encoder.PutUint16(uint16(self.Length)) |
| 14613 | encoder.PutUint8(uint8(self.TableId)) |
| 14614 | encoder.Write(bytes.Repeat([]byte{0}, 1)) |
| 14615 | encoder.PutUint32(uint32(self.DurationSec)) |
| 14616 | encoder.PutUint32(uint32(self.DurationNsec)) |
| 14617 | encoder.PutUint16(uint16(self.Priority)) |
| 14618 | encoder.PutUint16(uint16(self.IdleTimeout)) |
| 14619 | encoder.PutUint16(uint16(self.HardTimeout)) |
| 14620 | encoder.PutUint16(uint16(self.MatchLen)) |
| 14621 | encoder.PutUint16(uint16(self.IdleAge)) |
| 14622 | encoder.PutUint16(uint16(self.HardAge)) |
| 14623 | encoder.PutUint64(uint64(self.Cookie)) |
| 14624 | encoder.PutUint64(uint64(self.PacketCount)) |
| 14625 | encoder.PutUint64(uint64(self.ByteCount)) |
| 14626 | if err := self.Match.Serialize(encoder); err != nil { |
| 14627 | return err |
| 14628 | } |
| 14629 | |
| 14630 | for _, obj := range self.Actions { |
| 14631 | if err := obj.Serialize(encoder); err != nil { |
| 14632 | return err |
| 14633 | } |
| 14634 | } |
| 14635 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 14636 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 14637 | |
| 14638 | return nil |
| 14639 | } |
| 14640 | |
| 14641 | func DecodeNiciraFlowStats(decoder *goloxi.Decoder) (*NiciraFlowStats, error) { |
| 14642 | _niciraflowstats := &NiciraFlowStats{} |
| 14643 | if decoder.Length() < 48 { |
| 14644 | return nil, fmt.Errorf("NiciraFlowStats packet too short: %d < 48", decoder.Length()) |
| 14645 | } |
| 14646 | _niciraflowstats.Length = uint16(decoder.ReadUint16()) |
| 14647 | oldDecoder := decoder |
| 14648 | defer func() { decoder = oldDecoder }() |
| 14649 | decoder = decoder.SliceDecoder(int(_niciraflowstats.Length), 2+0) |
| 14650 | _niciraflowstats.TableId = uint8(decoder.ReadByte()) |
| 14651 | decoder.Skip(1) |
| 14652 | _niciraflowstats.DurationSec = uint32(decoder.ReadUint32()) |
| 14653 | _niciraflowstats.DurationNsec = uint32(decoder.ReadUint32()) |
| 14654 | _niciraflowstats.Priority = uint16(decoder.ReadUint16()) |
| 14655 | _niciraflowstats.IdleTimeout = uint16(decoder.ReadUint16()) |
| 14656 | _niciraflowstats.HardTimeout = uint16(decoder.ReadUint16()) |
| 14657 | _niciraflowstats.MatchLen = uint16(decoder.ReadUint16()) |
| 14658 | _niciraflowstats.IdleAge = uint16(decoder.ReadUint16()) |
| 14659 | _niciraflowstats.HardAge = uint16(decoder.ReadUint16()) |
| 14660 | _niciraflowstats.Cookie = uint64(decoder.ReadUint64()) |
| 14661 | _niciraflowstats.PacketCount = uint64(decoder.ReadUint64()) |
| 14662 | _niciraflowstats.ByteCount = uint64(decoder.ReadUint64()) |
| 14663 | if err := _niciraflowstats.Match.Decode(decoder.SliceDecoder(int(_niciraflowstats.MatchLen), 0)); err != nil { |
| 14664 | return nil, err |
| 14665 | } |
| 14666 | |
| 14667 | decoder.SkipAlign() |
| 14668 | |
| 14669 | for decoder.Length() >= 8 { |
| 14670 | item, err := DecodeAction(decoder) |
| 14671 | if err != nil { |
| 14672 | return nil, err |
| 14673 | } |
| 14674 | if item != nil { |
| 14675 | _niciraflowstats.Actions = append(_niciraflowstats.Actions, item) |
| 14676 | } |
| 14677 | } |
| 14678 | return _niciraflowstats, nil |
| 14679 | } |
| 14680 | |
| 14681 | func NewNiciraFlowStats() *NiciraFlowStats { |
| 14682 | obj := &NiciraFlowStats{} |
| 14683 | return obj |
| 14684 | } |
| 14685 | |
| 14686 | type NiciraFlowUpdateEvent struct { |
| 14687 | Length uint16 |
| 14688 | Event uint16 |
| 14689 | } |
| 14690 | |
| 14691 | type INiciraFlowUpdateEvent interface { |
| 14692 | goloxi.Serializable |
| 14693 | GetLength() uint16 |
| 14694 | GetEvent() uint16 |
| 14695 | } |
| 14696 | |
| 14697 | func (self *NiciraFlowUpdateEvent) GetLength() uint16 { |
| 14698 | return self.Length |
| 14699 | } |
| 14700 | |
| 14701 | func (self *NiciraFlowUpdateEvent) SetLength(v uint16) { |
| 14702 | self.Length = v |
| 14703 | } |
| 14704 | |
| 14705 | func (self *NiciraFlowUpdateEvent) GetEvent() uint16 { |
| 14706 | return self.Event |
| 14707 | } |
| 14708 | |
| 14709 | func (self *NiciraFlowUpdateEvent) SetEvent(v uint16) { |
| 14710 | self.Event = v |
| 14711 | } |
| 14712 | |
| 14713 | func (self *NiciraFlowUpdateEvent) Serialize(encoder *goloxi.Encoder) error { |
| 14714 | |
| 14715 | encoder.PutUint16(uint16(self.Length)) |
| 14716 | encoder.PutUint16(uint16(self.Event)) |
| 14717 | |
| 14718 | return nil |
| 14719 | } |
| 14720 | |
| 14721 | func DecodeNiciraFlowUpdateEvent(decoder *goloxi.Decoder) (INiciraFlowUpdateEvent, error) { |
| 14722 | _niciraflowupdateevent := &NiciraFlowUpdateEvent{} |
| 14723 | if decoder.Length() < 4 { |
| 14724 | return nil, fmt.Errorf("NiciraFlowUpdateEvent packet too short: %d < 4", decoder.Length()) |
| 14725 | } |
| 14726 | _niciraflowupdateevent.Length = uint16(decoder.ReadUint16()) |
| 14727 | oldDecoder := decoder |
| 14728 | defer func() { decoder = oldDecoder }() |
| 14729 | decoder = decoder.SliceDecoder(int(_niciraflowupdateevent.Length), 2+0) |
| 14730 | _niciraflowupdateevent.Event = uint16(decoder.ReadUint16()) |
| 14731 | |
| 14732 | switch _niciraflowupdateevent.Event { |
| 14733 | case 0: |
| 14734 | return DecodeNiciraFlowUpdateFullAdd(_niciraflowupdateevent, decoder) |
| 14735 | case 1: |
| 14736 | return DecodeNiciraFlowUpdateFullDeleted(_niciraflowupdateevent, decoder) |
| 14737 | case 2: |
| 14738 | return DecodeNiciraFlowUpdateFullModified(_niciraflowupdateevent, decoder) |
| 14739 | default: |
| 14740 | return nil, fmt.Errorf("Invalid type '%d' for 'NiciraFlowUpdateEvent'", _niciraflowupdateevent.Event) |
| 14741 | } |
| 14742 | } |
| 14743 | |
| 14744 | func NewNiciraFlowUpdateEvent(_event uint16) *NiciraFlowUpdateEvent { |
| 14745 | obj := &NiciraFlowUpdateEvent{} |
| 14746 | obj.Event = _event |
| 14747 | return obj |
| 14748 | } |
| 14749 | |
| 14750 | type NiciraFlowUpdateFullAdd struct { |
| 14751 | *NiciraFlowUpdateEvent |
| 14752 | Reason uint16 |
| 14753 | Priority uint16 |
| 14754 | IdleTimeout uint16 |
| 14755 | HardTimeout uint16 |
| 14756 | MatchLen uint16 |
| 14757 | TableId uint8 |
| 14758 | Cookie uint64 |
| 14759 | Match NiciraMatch |
| 14760 | Actions []goloxi.IAction |
| 14761 | } |
| 14762 | |
| 14763 | type INiciraFlowUpdateFullAdd interface { |
| 14764 | INiciraFlowUpdateEvent |
| 14765 | GetReason() uint16 |
| 14766 | GetPriority() uint16 |
| 14767 | GetIdleTimeout() uint16 |
| 14768 | GetHardTimeout() uint16 |
| 14769 | GetMatchLen() uint16 |
| 14770 | GetTableId() uint8 |
| 14771 | GetCookie() uint64 |
| 14772 | GetMatch() NiciraMatch |
| 14773 | GetActions() []goloxi.IAction |
| 14774 | } |
| 14775 | |
| 14776 | func (self *NiciraFlowUpdateFullAdd) GetReason() uint16 { |
| 14777 | return self.Reason |
| 14778 | } |
| 14779 | |
| 14780 | func (self *NiciraFlowUpdateFullAdd) SetReason(v uint16) { |
| 14781 | self.Reason = v |
| 14782 | } |
| 14783 | |
| 14784 | func (self *NiciraFlowUpdateFullAdd) GetPriority() uint16 { |
| 14785 | return self.Priority |
| 14786 | } |
| 14787 | |
| 14788 | func (self *NiciraFlowUpdateFullAdd) SetPriority(v uint16) { |
| 14789 | self.Priority = v |
| 14790 | } |
| 14791 | |
| 14792 | func (self *NiciraFlowUpdateFullAdd) GetIdleTimeout() uint16 { |
| 14793 | return self.IdleTimeout |
| 14794 | } |
| 14795 | |
| 14796 | func (self *NiciraFlowUpdateFullAdd) SetIdleTimeout(v uint16) { |
| 14797 | self.IdleTimeout = v |
| 14798 | } |
| 14799 | |
| 14800 | func (self *NiciraFlowUpdateFullAdd) GetHardTimeout() uint16 { |
| 14801 | return self.HardTimeout |
| 14802 | } |
| 14803 | |
| 14804 | func (self *NiciraFlowUpdateFullAdd) SetHardTimeout(v uint16) { |
| 14805 | self.HardTimeout = v |
| 14806 | } |
| 14807 | |
| 14808 | func (self *NiciraFlowUpdateFullAdd) GetMatchLen() uint16 { |
| 14809 | return self.MatchLen |
| 14810 | } |
| 14811 | |
| 14812 | func (self *NiciraFlowUpdateFullAdd) SetMatchLen(v uint16) { |
| 14813 | self.MatchLen = v |
| 14814 | } |
| 14815 | |
| 14816 | func (self *NiciraFlowUpdateFullAdd) GetTableId() uint8 { |
| 14817 | return self.TableId |
| 14818 | } |
| 14819 | |
| 14820 | func (self *NiciraFlowUpdateFullAdd) SetTableId(v uint8) { |
| 14821 | self.TableId = v |
| 14822 | } |
| 14823 | |
| 14824 | func (self *NiciraFlowUpdateFullAdd) GetCookie() uint64 { |
| 14825 | return self.Cookie |
| 14826 | } |
| 14827 | |
| 14828 | func (self *NiciraFlowUpdateFullAdd) SetCookie(v uint64) { |
| 14829 | self.Cookie = v |
| 14830 | } |
| 14831 | |
| 14832 | func (self *NiciraFlowUpdateFullAdd) GetMatch() NiciraMatch { |
| 14833 | return self.Match |
| 14834 | } |
| 14835 | |
| 14836 | func (self *NiciraFlowUpdateFullAdd) SetMatch(v NiciraMatch) { |
| 14837 | self.Match = v |
| 14838 | } |
| 14839 | |
| 14840 | func (self *NiciraFlowUpdateFullAdd) GetActions() []goloxi.IAction { |
| 14841 | return self.Actions |
| 14842 | } |
| 14843 | |
| 14844 | func (self *NiciraFlowUpdateFullAdd) SetActions(v []goloxi.IAction) { |
| 14845 | self.Actions = v |
| 14846 | } |
| 14847 | |
| 14848 | func (self *NiciraFlowUpdateFullAdd) Serialize(encoder *goloxi.Encoder) error { |
| 14849 | if err := self.NiciraFlowUpdateEvent.Serialize(encoder); err != nil { |
| 14850 | return err |
| 14851 | } |
| 14852 | |
| 14853 | encoder.PutUint16(uint16(self.Reason)) |
| 14854 | encoder.PutUint16(uint16(self.Priority)) |
| 14855 | encoder.PutUint16(uint16(self.IdleTimeout)) |
| 14856 | encoder.PutUint16(uint16(self.HardTimeout)) |
| 14857 | encoder.PutUint16(uint16(self.MatchLen)) |
| 14858 | encoder.PutUint8(uint8(self.TableId)) |
| 14859 | encoder.Write(bytes.Repeat([]byte{0}, 1)) |
| 14860 | encoder.PutUint64(uint64(self.Cookie)) |
| 14861 | if err := self.Match.Serialize(encoder); err != nil { |
| 14862 | return err |
| 14863 | } |
| 14864 | |
| 14865 | for _, obj := range self.Actions { |
| 14866 | if err := obj.Serialize(encoder); err != nil { |
| 14867 | return err |
| 14868 | } |
| 14869 | } |
| 14870 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 14871 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 14872 | |
| 14873 | return nil |
| 14874 | } |
| 14875 | |
| 14876 | func DecodeNiciraFlowUpdateFullAdd(parent *NiciraFlowUpdateEvent, decoder *goloxi.Decoder) (*NiciraFlowUpdateFullAdd, error) { |
| 14877 | _niciraflowupdatefulladd := &NiciraFlowUpdateFullAdd{NiciraFlowUpdateEvent: parent} |
| 14878 | if decoder.Length() < 20 { |
| 14879 | return nil, fmt.Errorf("NiciraFlowUpdateFullAdd packet too short: %d < 20", decoder.Length()) |
| 14880 | } |
| 14881 | _niciraflowupdatefulladd.Reason = uint16(decoder.ReadUint16()) |
| 14882 | _niciraflowupdatefulladd.Priority = uint16(decoder.ReadUint16()) |
| 14883 | _niciraflowupdatefulladd.IdleTimeout = uint16(decoder.ReadUint16()) |
| 14884 | _niciraflowupdatefulladd.HardTimeout = uint16(decoder.ReadUint16()) |
| 14885 | _niciraflowupdatefulladd.MatchLen = uint16(decoder.ReadUint16()) |
| 14886 | _niciraflowupdatefulladd.TableId = uint8(decoder.ReadByte()) |
| 14887 | decoder.Skip(1) |
| 14888 | _niciraflowupdatefulladd.Cookie = uint64(decoder.ReadUint64()) |
| 14889 | if err := _niciraflowupdatefulladd.Match.Decode(decoder.SliceDecoder(int(_niciraflowupdatefulladd.MatchLen), 0)); err != nil { |
| 14890 | return nil, err |
| 14891 | } |
| 14892 | |
| 14893 | decoder.SkipAlign() |
| 14894 | |
| 14895 | for decoder.Length() >= 8 { |
| 14896 | item, err := DecodeAction(decoder) |
| 14897 | if err != nil { |
| 14898 | return nil, err |
| 14899 | } |
| 14900 | if item != nil { |
| 14901 | _niciraflowupdatefulladd.Actions = append(_niciraflowupdatefulladd.Actions, item) |
| 14902 | } |
| 14903 | } |
| 14904 | return _niciraflowupdatefulladd, nil |
| 14905 | } |
| 14906 | |
| 14907 | func NewNiciraFlowUpdateFullAdd() *NiciraFlowUpdateFullAdd { |
| 14908 | obj := &NiciraFlowUpdateFullAdd{ |
| 14909 | NiciraFlowUpdateEvent: NewNiciraFlowUpdateEvent(0), |
| 14910 | } |
| 14911 | return obj |
| 14912 | } |
| 14913 | |
| 14914 | type NiciraFlowUpdateFullDeleted struct { |
| 14915 | *NiciraFlowUpdateEvent |
| 14916 | Reason uint16 |
| 14917 | Priority uint16 |
| 14918 | IdleTimeout uint16 |
| 14919 | HardTimeout uint16 |
| 14920 | MatchLen uint16 |
| 14921 | TableId uint8 |
| 14922 | Cookie uint64 |
| 14923 | Match NiciraMatch |
| 14924 | Actions []goloxi.IAction |
| 14925 | } |
| 14926 | |
| 14927 | type INiciraFlowUpdateFullDeleted interface { |
| 14928 | INiciraFlowUpdateEvent |
| 14929 | GetReason() uint16 |
| 14930 | GetPriority() uint16 |
| 14931 | GetIdleTimeout() uint16 |
| 14932 | GetHardTimeout() uint16 |
| 14933 | GetMatchLen() uint16 |
| 14934 | GetTableId() uint8 |
| 14935 | GetCookie() uint64 |
| 14936 | GetMatch() NiciraMatch |
| 14937 | GetActions() []goloxi.IAction |
| 14938 | } |
| 14939 | |
| 14940 | func (self *NiciraFlowUpdateFullDeleted) GetReason() uint16 { |
| 14941 | return self.Reason |
| 14942 | } |
| 14943 | |
| 14944 | func (self *NiciraFlowUpdateFullDeleted) SetReason(v uint16) { |
| 14945 | self.Reason = v |
| 14946 | } |
| 14947 | |
| 14948 | func (self *NiciraFlowUpdateFullDeleted) GetPriority() uint16 { |
| 14949 | return self.Priority |
| 14950 | } |
| 14951 | |
| 14952 | func (self *NiciraFlowUpdateFullDeleted) SetPriority(v uint16) { |
| 14953 | self.Priority = v |
| 14954 | } |
| 14955 | |
| 14956 | func (self *NiciraFlowUpdateFullDeleted) GetIdleTimeout() uint16 { |
| 14957 | return self.IdleTimeout |
| 14958 | } |
| 14959 | |
| 14960 | func (self *NiciraFlowUpdateFullDeleted) SetIdleTimeout(v uint16) { |
| 14961 | self.IdleTimeout = v |
| 14962 | } |
| 14963 | |
| 14964 | func (self *NiciraFlowUpdateFullDeleted) GetHardTimeout() uint16 { |
| 14965 | return self.HardTimeout |
| 14966 | } |
| 14967 | |
| 14968 | func (self *NiciraFlowUpdateFullDeleted) SetHardTimeout(v uint16) { |
| 14969 | self.HardTimeout = v |
| 14970 | } |
| 14971 | |
| 14972 | func (self *NiciraFlowUpdateFullDeleted) GetMatchLen() uint16 { |
| 14973 | return self.MatchLen |
| 14974 | } |
| 14975 | |
| 14976 | func (self *NiciraFlowUpdateFullDeleted) SetMatchLen(v uint16) { |
| 14977 | self.MatchLen = v |
| 14978 | } |
| 14979 | |
| 14980 | func (self *NiciraFlowUpdateFullDeleted) GetTableId() uint8 { |
| 14981 | return self.TableId |
| 14982 | } |
| 14983 | |
| 14984 | func (self *NiciraFlowUpdateFullDeleted) SetTableId(v uint8) { |
| 14985 | self.TableId = v |
| 14986 | } |
| 14987 | |
| 14988 | func (self *NiciraFlowUpdateFullDeleted) GetCookie() uint64 { |
| 14989 | return self.Cookie |
| 14990 | } |
| 14991 | |
| 14992 | func (self *NiciraFlowUpdateFullDeleted) SetCookie(v uint64) { |
| 14993 | self.Cookie = v |
| 14994 | } |
| 14995 | |
| 14996 | func (self *NiciraFlowUpdateFullDeleted) GetMatch() NiciraMatch { |
| 14997 | return self.Match |
| 14998 | } |
| 14999 | |
| 15000 | func (self *NiciraFlowUpdateFullDeleted) SetMatch(v NiciraMatch) { |
| 15001 | self.Match = v |
| 15002 | } |
| 15003 | |
| 15004 | func (self *NiciraFlowUpdateFullDeleted) GetActions() []goloxi.IAction { |
| 15005 | return self.Actions |
| 15006 | } |
| 15007 | |
| 15008 | func (self *NiciraFlowUpdateFullDeleted) SetActions(v []goloxi.IAction) { |
| 15009 | self.Actions = v |
| 15010 | } |
| 15011 | |
| 15012 | func (self *NiciraFlowUpdateFullDeleted) Serialize(encoder *goloxi.Encoder) error { |
| 15013 | if err := self.NiciraFlowUpdateEvent.Serialize(encoder); err != nil { |
| 15014 | return err |
| 15015 | } |
| 15016 | |
| 15017 | encoder.PutUint16(uint16(self.Reason)) |
| 15018 | encoder.PutUint16(uint16(self.Priority)) |
| 15019 | encoder.PutUint16(uint16(self.IdleTimeout)) |
| 15020 | encoder.PutUint16(uint16(self.HardTimeout)) |
| 15021 | encoder.PutUint16(uint16(self.MatchLen)) |
| 15022 | encoder.PutUint8(uint8(self.TableId)) |
| 15023 | encoder.Write(bytes.Repeat([]byte{0}, 1)) |
| 15024 | encoder.PutUint64(uint64(self.Cookie)) |
| 15025 | if err := self.Match.Serialize(encoder); err != nil { |
| 15026 | return err |
| 15027 | } |
| 15028 | |
| 15029 | for _, obj := range self.Actions { |
| 15030 | if err := obj.Serialize(encoder); err != nil { |
| 15031 | return err |
| 15032 | } |
| 15033 | } |
| 15034 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 15035 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 15036 | |
| 15037 | return nil |
| 15038 | } |
| 15039 | |
| 15040 | func DecodeNiciraFlowUpdateFullDeleted(parent *NiciraFlowUpdateEvent, decoder *goloxi.Decoder) (*NiciraFlowUpdateFullDeleted, error) { |
| 15041 | _niciraflowupdatefulldeleted := &NiciraFlowUpdateFullDeleted{NiciraFlowUpdateEvent: parent} |
| 15042 | if decoder.Length() < 20 { |
| 15043 | return nil, fmt.Errorf("NiciraFlowUpdateFullDeleted packet too short: %d < 20", decoder.Length()) |
| 15044 | } |
| 15045 | _niciraflowupdatefulldeleted.Reason = uint16(decoder.ReadUint16()) |
| 15046 | _niciraflowupdatefulldeleted.Priority = uint16(decoder.ReadUint16()) |
| 15047 | _niciraflowupdatefulldeleted.IdleTimeout = uint16(decoder.ReadUint16()) |
| 15048 | _niciraflowupdatefulldeleted.HardTimeout = uint16(decoder.ReadUint16()) |
| 15049 | _niciraflowupdatefulldeleted.MatchLen = uint16(decoder.ReadUint16()) |
| 15050 | _niciraflowupdatefulldeleted.TableId = uint8(decoder.ReadByte()) |
| 15051 | decoder.Skip(1) |
| 15052 | _niciraflowupdatefulldeleted.Cookie = uint64(decoder.ReadUint64()) |
| 15053 | if err := _niciraflowupdatefulldeleted.Match.Decode(decoder.SliceDecoder(int(_niciraflowupdatefulldeleted.MatchLen), 0)); err != nil { |
| 15054 | return nil, err |
| 15055 | } |
| 15056 | |
| 15057 | decoder.SkipAlign() |
| 15058 | |
| 15059 | for decoder.Length() >= 8 { |
| 15060 | item, err := DecodeAction(decoder) |
| 15061 | if err != nil { |
| 15062 | return nil, err |
| 15063 | } |
| 15064 | if item != nil { |
| 15065 | _niciraflowupdatefulldeleted.Actions = append(_niciraflowupdatefulldeleted.Actions, item) |
| 15066 | } |
| 15067 | } |
| 15068 | return _niciraflowupdatefulldeleted, nil |
| 15069 | } |
| 15070 | |
| 15071 | func NewNiciraFlowUpdateFullDeleted() *NiciraFlowUpdateFullDeleted { |
| 15072 | obj := &NiciraFlowUpdateFullDeleted{ |
| 15073 | NiciraFlowUpdateEvent: NewNiciraFlowUpdateEvent(1), |
| 15074 | } |
| 15075 | return obj |
| 15076 | } |
| 15077 | |
| 15078 | type NiciraFlowUpdateFullModified struct { |
| 15079 | *NiciraFlowUpdateEvent |
| 15080 | Reason uint16 |
| 15081 | Priority uint16 |
| 15082 | IdleTimeout uint16 |
| 15083 | HardTimeout uint16 |
| 15084 | MatchLen uint16 |
| 15085 | TableId uint8 |
| 15086 | Cookie uint64 |
| 15087 | Match NiciraMatch |
| 15088 | Actions []goloxi.IAction |
| 15089 | } |
| 15090 | |
| 15091 | type INiciraFlowUpdateFullModified interface { |
| 15092 | INiciraFlowUpdateEvent |
| 15093 | GetReason() uint16 |
| 15094 | GetPriority() uint16 |
| 15095 | GetIdleTimeout() uint16 |
| 15096 | GetHardTimeout() uint16 |
| 15097 | GetMatchLen() uint16 |
| 15098 | GetTableId() uint8 |
| 15099 | GetCookie() uint64 |
| 15100 | GetMatch() NiciraMatch |
| 15101 | GetActions() []goloxi.IAction |
| 15102 | } |
| 15103 | |
| 15104 | func (self *NiciraFlowUpdateFullModified) GetReason() uint16 { |
| 15105 | return self.Reason |
| 15106 | } |
| 15107 | |
| 15108 | func (self *NiciraFlowUpdateFullModified) SetReason(v uint16) { |
| 15109 | self.Reason = v |
| 15110 | } |
| 15111 | |
| 15112 | func (self *NiciraFlowUpdateFullModified) GetPriority() uint16 { |
| 15113 | return self.Priority |
| 15114 | } |
| 15115 | |
| 15116 | func (self *NiciraFlowUpdateFullModified) SetPriority(v uint16) { |
| 15117 | self.Priority = v |
| 15118 | } |
| 15119 | |
| 15120 | func (self *NiciraFlowUpdateFullModified) GetIdleTimeout() uint16 { |
| 15121 | return self.IdleTimeout |
| 15122 | } |
| 15123 | |
| 15124 | func (self *NiciraFlowUpdateFullModified) SetIdleTimeout(v uint16) { |
| 15125 | self.IdleTimeout = v |
| 15126 | } |
| 15127 | |
| 15128 | func (self *NiciraFlowUpdateFullModified) GetHardTimeout() uint16 { |
| 15129 | return self.HardTimeout |
| 15130 | } |
| 15131 | |
| 15132 | func (self *NiciraFlowUpdateFullModified) SetHardTimeout(v uint16) { |
| 15133 | self.HardTimeout = v |
| 15134 | } |
| 15135 | |
| 15136 | func (self *NiciraFlowUpdateFullModified) GetMatchLen() uint16 { |
| 15137 | return self.MatchLen |
| 15138 | } |
| 15139 | |
| 15140 | func (self *NiciraFlowUpdateFullModified) SetMatchLen(v uint16) { |
| 15141 | self.MatchLen = v |
| 15142 | } |
| 15143 | |
| 15144 | func (self *NiciraFlowUpdateFullModified) GetTableId() uint8 { |
| 15145 | return self.TableId |
| 15146 | } |
| 15147 | |
| 15148 | func (self *NiciraFlowUpdateFullModified) SetTableId(v uint8) { |
| 15149 | self.TableId = v |
| 15150 | } |
| 15151 | |
| 15152 | func (self *NiciraFlowUpdateFullModified) GetCookie() uint64 { |
| 15153 | return self.Cookie |
| 15154 | } |
| 15155 | |
| 15156 | func (self *NiciraFlowUpdateFullModified) SetCookie(v uint64) { |
| 15157 | self.Cookie = v |
| 15158 | } |
| 15159 | |
| 15160 | func (self *NiciraFlowUpdateFullModified) GetMatch() NiciraMatch { |
| 15161 | return self.Match |
| 15162 | } |
| 15163 | |
| 15164 | func (self *NiciraFlowUpdateFullModified) SetMatch(v NiciraMatch) { |
| 15165 | self.Match = v |
| 15166 | } |
| 15167 | |
| 15168 | func (self *NiciraFlowUpdateFullModified) GetActions() []goloxi.IAction { |
| 15169 | return self.Actions |
| 15170 | } |
| 15171 | |
| 15172 | func (self *NiciraFlowUpdateFullModified) SetActions(v []goloxi.IAction) { |
| 15173 | self.Actions = v |
| 15174 | } |
| 15175 | |
| 15176 | func (self *NiciraFlowUpdateFullModified) Serialize(encoder *goloxi.Encoder) error { |
| 15177 | if err := self.NiciraFlowUpdateEvent.Serialize(encoder); err != nil { |
| 15178 | return err |
| 15179 | } |
| 15180 | |
| 15181 | encoder.PutUint16(uint16(self.Reason)) |
| 15182 | encoder.PutUint16(uint16(self.Priority)) |
| 15183 | encoder.PutUint16(uint16(self.IdleTimeout)) |
| 15184 | encoder.PutUint16(uint16(self.HardTimeout)) |
| 15185 | encoder.PutUint16(uint16(self.MatchLen)) |
| 15186 | encoder.PutUint8(uint8(self.TableId)) |
| 15187 | encoder.Write(bytes.Repeat([]byte{0}, 1)) |
| 15188 | encoder.PutUint64(uint64(self.Cookie)) |
| 15189 | if err := self.Match.Serialize(encoder); err != nil { |
| 15190 | return err |
| 15191 | } |
| 15192 | |
| 15193 | for _, obj := range self.Actions { |
| 15194 | if err := obj.Serialize(encoder); err != nil { |
| 15195 | return err |
| 15196 | } |
| 15197 | } |
| 15198 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 15199 | binary.BigEndian.PutUint16(encoder.Bytes()[2:4], uint16(len(encoder.Bytes()))) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 15200 | |
| 15201 | return nil |
| 15202 | } |
| 15203 | |
| 15204 | func DecodeNiciraFlowUpdateFullModified(parent *NiciraFlowUpdateEvent, decoder *goloxi.Decoder) (*NiciraFlowUpdateFullModified, error) { |
| 15205 | _niciraflowupdatefullmodified := &NiciraFlowUpdateFullModified{NiciraFlowUpdateEvent: parent} |
| 15206 | if decoder.Length() < 20 { |
| 15207 | return nil, fmt.Errorf("NiciraFlowUpdateFullModified packet too short: %d < 20", decoder.Length()) |
| 15208 | } |
| 15209 | _niciraflowupdatefullmodified.Reason = uint16(decoder.ReadUint16()) |
| 15210 | _niciraflowupdatefullmodified.Priority = uint16(decoder.ReadUint16()) |
| 15211 | _niciraflowupdatefullmodified.IdleTimeout = uint16(decoder.ReadUint16()) |
| 15212 | _niciraflowupdatefullmodified.HardTimeout = uint16(decoder.ReadUint16()) |
| 15213 | _niciraflowupdatefullmodified.MatchLen = uint16(decoder.ReadUint16()) |
| 15214 | _niciraflowupdatefullmodified.TableId = uint8(decoder.ReadByte()) |
| 15215 | decoder.Skip(1) |
| 15216 | _niciraflowupdatefullmodified.Cookie = uint64(decoder.ReadUint64()) |
| 15217 | if err := _niciraflowupdatefullmodified.Match.Decode(decoder.SliceDecoder(int(_niciraflowupdatefullmodified.MatchLen), 0)); err != nil { |
| 15218 | return nil, err |
| 15219 | } |
| 15220 | |
| 15221 | decoder.SkipAlign() |
| 15222 | |
| 15223 | for decoder.Length() >= 8 { |
| 15224 | item, err := DecodeAction(decoder) |
| 15225 | if err != nil { |
| 15226 | return nil, err |
| 15227 | } |
| 15228 | if item != nil { |
| 15229 | _niciraflowupdatefullmodified.Actions = append(_niciraflowupdatefullmodified.Actions, item) |
| 15230 | } |
| 15231 | } |
| 15232 | return _niciraflowupdatefullmodified, nil |
| 15233 | } |
| 15234 | |
| 15235 | func NewNiciraFlowUpdateFullModified() *NiciraFlowUpdateFullModified { |
| 15236 | obj := &NiciraFlowUpdateFullModified{ |
| 15237 | NiciraFlowUpdateEvent: NewNiciraFlowUpdateEvent(2), |
| 15238 | } |
| 15239 | return obj |
| 15240 | } |
| 15241 | |
| 15242 | type OxmIdArpOp struct { |
| 15243 | *OxmId |
| 15244 | } |
| 15245 | |
| 15246 | type IOxmIdArpOp interface { |
| 15247 | IOxmId |
| 15248 | } |
| 15249 | |
| 15250 | func (self *OxmIdArpOp) Serialize(encoder *goloxi.Encoder) error { |
| 15251 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15252 | return err |
| 15253 | } |
| 15254 | |
| 15255 | return nil |
| 15256 | } |
| 15257 | |
| 15258 | func DecodeOxmIdArpOp(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdArpOp, error) { |
| 15259 | _oxmidarpop := &OxmIdArpOp{OxmId: parent} |
| 15260 | return _oxmidarpop, nil |
| 15261 | } |
| 15262 | |
| 15263 | func NewOxmIdArpOp() *OxmIdArpOp { |
| 15264 | obj := &OxmIdArpOp{ |
| 15265 | OxmId: NewOxmId(7682), |
| 15266 | } |
| 15267 | return obj |
| 15268 | } |
| 15269 | func (self *OxmIdArpOp) GetOXMName() string { |
| 15270 | return "arp_op" |
| 15271 | } |
| 15272 | |
| 15273 | func (self *OxmIdArpOp) MarshalJSON() ([]byte, error) { |
| 15274 | if self.TypeLen == 0 { |
| 15275 | return []byte("\"\""), nil |
| 15276 | } else { |
| 15277 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15278 | } |
| 15279 | } |
| 15280 | |
| 15281 | type OxmIdArpSha struct { |
| 15282 | *OxmId |
| 15283 | } |
| 15284 | |
| 15285 | type IOxmIdArpSha interface { |
| 15286 | IOxmId |
| 15287 | } |
| 15288 | |
| 15289 | func (self *OxmIdArpSha) Serialize(encoder *goloxi.Encoder) error { |
| 15290 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15291 | return err |
| 15292 | } |
| 15293 | |
| 15294 | return nil |
| 15295 | } |
| 15296 | |
| 15297 | func DecodeOxmIdArpSha(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdArpSha, error) { |
| 15298 | _oxmidarpsha := &OxmIdArpSha{OxmId: parent} |
| 15299 | return _oxmidarpsha, nil |
| 15300 | } |
| 15301 | |
| 15302 | func NewOxmIdArpSha() *OxmIdArpSha { |
| 15303 | obj := &OxmIdArpSha{ |
| 15304 | OxmId: NewOxmId(74246), |
| 15305 | } |
| 15306 | return obj |
| 15307 | } |
| 15308 | func (self *OxmIdArpSha) GetOXMName() string { |
| 15309 | return "arp_sha" |
| 15310 | } |
| 15311 | |
| 15312 | func (self *OxmIdArpSha) MarshalJSON() ([]byte, error) { |
| 15313 | if self.TypeLen == 0 { |
| 15314 | return []byte("\"\""), nil |
| 15315 | } else { |
| 15316 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15317 | } |
| 15318 | } |
| 15319 | |
| 15320 | type OxmIdArpShaMasked struct { |
| 15321 | *OxmId |
| 15322 | } |
| 15323 | |
| 15324 | type IOxmIdArpShaMasked interface { |
| 15325 | IOxmId |
| 15326 | } |
| 15327 | |
| 15328 | func (self *OxmIdArpShaMasked) Serialize(encoder *goloxi.Encoder) error { |
| 15329 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15330 | return err |
| 15331 | } |
| 15332 | |
| 15333 | return nil |
| 15334 | } |
| 15335 | |
| 15336 | func DecodeOxmIdArpShaMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdArpShaMasked, error) { |
| 15337 | _oxmidarpshamasked := &OxmIdArpShaMasked{OxmId: parent} |
| 15338 | return _oxmidarpshamasked, nil |
| 15339 | } |
| 15340 | |
| 15341 | func NewOxmIdArpShaMasked() *OxmIdArpShaMasked { |
| 15342 | obj := &OxmIdArpShaMasked{ |
| 15343 | OxmId: NewOxmId(74507), |
| 15344 | } |
| 15345 | return obj |
| 15346 | } |
| 15347 | func (self *OxmIdArpShaMasked) GetOXMName() string { |
| 15348 | return "arp_sha_masked" |
| 15349 | } |
| 15350 | |
| 15351 | func (self *OxmIdArpShaMasked) MarshalJSON() ([]byte, error) { |
| 15352 | if self.TypeLen == 0 { |
| 15353 | return []byte("\"\""), nil |
| 15354 | } else { |
| 15355 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15356 | } |
| 15357 | } |
| 15358 | |
| 15359 | type OxmIdArpSpa struct { |
| 15360 | *OxmId |
| 15361 | } |
| 15362 | |
| 15363 | type IOxmIdArpSpa interface { |
| 15364 | IOxmId |
| 15365 | } |
| 15366 | |
| 15367 | func (self *OxmIdArpSpa) Serialize(encoder *goloxi.Encoder) error { |
| 15368 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15369 | return err |
| 15370 | } |
| 15371 | |
| 15372 | return nil |
| 15373 | } |
| 15374 | |
| 15375 | func DecodeOxmIdArpSpa(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdArpSpa, error) { |
| 15376 | _oxmidarpspa := &OxmIdArpSpa{OxmId: parent} |
| 15377 | return _oxmidarpspa, nil |
| 15378 | } |
| 15379 | |
| 15380 | func NewOxmIdArpSpa() *OxmIdArpSpa { |
| 15381 | obj := &OxmIdArpSpa{ |
| 15382 | OxmId: NewOxmId(8196), |
| 15383 | } |
| 15384 | return obj |
| 15385 | } |
| 15386 | func (self *OxmIdArpSpa) GetOXMName() string { |
| 15387 | return "arp_spa" |
| 15388 | } |
| 15389 | |
| 15390 | func (self *OxmIdArpSpa) MarshalJSON() ([]byte, error) { |
| 15391 | if self.TypeLen == 0 { |
| 15392 | return []byte("\"\""), nil |
| 15393 | } else { |
| 15394 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15395 | } |
| 15396 | } |
| 15397 | |
| 15398 | type OxmIdArpSpaMasked struct { |
| 15399 | *OxmId |
| 15400 | } |
| 15401 | |
| 15402 | type IOxmIdArpSpaMasked interface { |
| 15403 | IOxmId |
| 15404 | } |
| 15405 | |
| 15406 | func (self *OxmIdArpSpaMasked) Serialize(encoder *goloxi.Encoder) error { |
| 15407 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15408 | return err |
| 15409 | } |
| 15410 | |
| 15411 | return nil |
| 15412 | } |
| 15413 | |
| 15414 | func DecodeOxmIdArpSpaMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdArpSpaMasked, error) { |
| 15415 | _oxmidarpspamasked := &OxmIdArpSpaMasked{OxmId: parent} |
| 15416 | return _oxmidarpspamasked, nil |
| 15417 | } |
| 15418 | |
| 15419 | func NewOxmIdArpSpaMasked() *OxmIdArpSpaMasked { |
| 15420 | obj := &OxmIdArpSpaMasked{ |
| 15421 | OxmId: NewOxmId(8452), |
| 15422 | } |
| 15423 | return obj |
| 15424 | } |
| 15425 | func (self *OxmIdArpSpaMasked) GetOXMName() string { |
| 15426 | return "arp_spa_masked" |
| 15427 | } |
| 15428 | |
| 15429 | func (self *OxmIdArpSpaMasked) MarshalJSON() ([]byte, error) { |
| 15430 | if self.TypeLen == 0 { |
| 15431 | return []byte("\"\""), nil |
| 15432 | } else { |
| 15433 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15434 | } |
| 15435 | } |
| 15436 | |
| 15437 | type OxmIdArpTha struct { |
| 15438 | *OxmId |
| 15439 | } |
| 15440 | |
| 15441 | type IOxmIdArpTha interface { |
| 15442 | IOxmId |
| 15443 | } |
| 15444 | |
| 15445 | func (self *OxmIdArpTha) Serialize(encoder *goloxi.Encoder) error { |
| 15446 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15447 | return err |
| 15448 | } |
| 15449 | |
| 15450 | return nil |
| 15451 | } |
| 15452 | |
| 15453 | func DecodeOxmIdArpTha(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdArpTha, error) { |
| 15454 | _oxmidarptha := &OxmIdArpTha{OxmId: parent} |
| 15455 | return _oxmidarptha, nil |
| 15456 | } |
| 15457 | |
| 15458 | func NewOxmIdArpTha() *OxmIdArpTha { |
| 15459 | obj := &OxmIdArpTha{ |
| 15460 | OxmId: NewOxmId(74758), |
| 15461 | } |
| 15462 | return obj |
| 15463 | } |
| 15464 | func (self *OxmIdArpTha) GetOXMName() string { |
| 15465 | return "arp_tha" |
| 15466 | } |
| 15467 | |
| 15468 | func (self *OxmIdArpTha) MarshalJSON() ([]byte, error) { |
| 15469 | if self.TypeLen == 0 { |
| 15470 | return []byte("\"\""), nil |
| 15471 | } else { |
| 15472 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15473 | } |
| 15474 | } |
| 15475 | |
| 15476 | type OxmIdArpThaMasked struct { |
| 15477 | *OxmId |
| 15478 | } |
| 15479 | |
| 15480 | type IOxmIdArpThaMasked interface { |
| 15481 | IOxmId |
| 15482 | } |
| 15483 | |
| 15484 | func (self *OxmIdArpThaMasked) Serialize(encoder *goloxi.Encoder) error { |
| 15485 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15486 | return err |
| 15487 | } |
| 15488 | |
| 15489 | return nil |
| 15490 | } |
| 15491 | |
| 15492 | func DecodeOxmIdArpThaMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdArpThaMasked, error) { |
| 15493 | _oxmidarpthamasked := &OxmIdArpThaMasked{OxmId: parent} |
| 15494 | return _oxmidarpthamasked, nil |
| 15495 | } |
| 15496 | |
| 15497 | func NewOxmIdArpThaMasked() *OxmIdArpThaMasked { |
| 15498 | obj := &OxmIdArpThaMasked{ |
| 15499 | OxmId: NewOxmId(75019), |
| 15500 | } |
| 15501 | return obj |
| 15502 | } |
| 15503 | func (self *OxmIdArpThaMasked) GetOXMName() string { |
| 15504 | return "arp_tha_masked" |
| 15505 | } |
| 15506 | |
| 15507 | func (self *OxmIdArpThaMasked) MarshalJSON() ([]byte, error) { |
| 15508 | if self.TypeLen == 0 { |
| 15509 | return []byte("\"\""), nil |
| 15510 | } else { |
| 15511 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15512 | } |
| 15513 | } |
| 15514 | |
| 15515 | type OxmIdArpTpa struct { |
| 15516 | *OxmId |
| 15517 | } |
| 15518 | |
| 15519 | type IOxmIdArpTpa interface { |
| 15520 | IOxmId |
| 15521 | } |
| 15522 | |
| 15523 | func (self *OxmIdArpTpa) Serialize(encoder *goloxi.Encoder) error { |
| 15524 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15525 | return err |
| 15526 | } |
| 15527 | |
| 15528 | return nil |
| 15529 | } |
| 15530 | |
| 15531 | func DecodeOxmIdArpTpa(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdArpTpa, error) { |
| 15532 | _oxmidarptpa := &OxmIdArpTpa{OxmId: parent} |
| 15533 | return _oxmidarptpa, nil |
| 15534 | } |
| 15535 | |
| 15536 | func NewOxmIdArpTpa() *OxmIdArpTpa { |
| 15537 | obj := &OxmIdArpTpa{ |
| 15538 | OxmId: NewOxmId(8708), |
| 15539 | } |
| 15540 | return obj |
| 15541 | } |
| 15542 | func (self *OxmIdArpTpa) GetOXMName() string { |
| 15543 | return "arp_tpa" |
| 15544 | } |
| 15545 | |
| 15546 | func (self *OxmIdArpTpa) MarshalJSON() ([]byte, error) { |
| 15547 | if self.TypeLen == 0 { |
| 15548 | return []byte("\"\""), nil |
| 15549 | } else { |
| 15550 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15551 | } |
| 15552 | } |
| 15553 | |
| 15554 | type OxmIdArpTpaMasked struct { |
| 15555 | *OxmId |
| 15556 | } |
| 15557 | |
| 15558 | type IOxmIdArpTpaMasked interface { |
| 15559 | IOxmId |
| 15560 | } |
| 15561 | |
| 15562 | func (self *OxmIdArpTpaMasked) Serialize(encoder *goloxi.Encoder) error { |
| 15563 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15564 | return err |
| 15565 | } |
| 15566 | |
| 15567 | return nil |
| 15568 | } |
| 15569 | |
| 15570 | func DecodeOxmIdArpTpaMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdArpTpaMasked, error) { |
| 15571 | _oxmidarptpamasked := &OxmIdArpTpaMasked{OxmId: parent} |
| 15572 | return _oxmidarptpamasked, nil |
| 15573 | } |
| 15574 | |
| 15575 | func NewOxmIdArpTpaMasked() *OxmIdArpTpaMasked { |
| 15576 | obj := &OxmIdArpTpaMasked{ |
| 15577 | OxmId: NewOxmId(8968), |
| 15578 | } |
| 15579 | return obj |
| 15580 | } |
| 15581 | func (self *OxmIdArpTpaMasked) GetOXMName() string { |
| 15582 | return "arp_tpa_masked" |
| 15583 | } |
| 15584 | |
| 15585 | func (self *OxmIdArpTpaMasked) MarshalJSON() ([]byte, error) { |
| 15586 | if self.TypeLen == 0 { |
| 15587 | return []byte("\"\""), nil |
| 15588 | } else { |
| 15589 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15590 | } |
| 15591 | } |
| 15592 | |
| 15593 | type OxmIdConjId struct { |
| 15594 | *OxmId |
| 15595 | } |
| 15596 | |
| 15597 | type IOxmIdConjId interface { |
| 15598 | IOxmId |
| 15599 | } |
| 15600 | |
| 15601 | func (self *OxmIdConjId) Serialize(encoder *goloxi.Encoder) error { |
| 15602 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15603 | return err |
| 15604 | } |
| 15605 | |
| 15606 | return nil |
| 15607 | } |
| 15608 | |
| 15609 | func DecodeOxmIdConjId(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdConjId, error) { |
| 15610 | _oxmidconjid := &OxmIdConjId{OxmId: parent} |
| 15611 | return _oxmidconjid, nil |
| 15612 | } |
| 15613 | |
| 15614 | func NewOxmIdConjId() *OxmIdConjId { |
| 15615 | obj := &OxmIdConjId{ |
| 15616 | OxmId: NewOxmId(84484), |
| 15617 | } |
| 15618 | return obj |
| 15619 | } |
| 15620 | func (self *OxmIdConjId) GetOXMName() string { |
| 15621 | return "conj_id" |
| 15622 | } |
| 15623 | |
| 15624 | func (self *OxmIdConjId) MarshalJSON() ([]byte, error) { |
| 15625 | if self.TypeLen == 0 { |
| 15626 | return []byte("\"\""), nil |
| 15627 | } else { |
| 15628 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15629 | } |
| 15630 | } |
| 15631 | |
| 15632 | type OxmIdCtIpv6Dst struct { |
| 15633 | *OxmId |
| 15634 | } |
| 15635 | |
| 15636 | type IOxmIdCtIpv6Dst interface { |
| 15637 | IOxmId |
| 15638 | } |
| 15639 | |
| 15640 | func (self *OxmIdCtIpv6Dst) Serialize(encoder *goloxi.Encoder) error { |
| 15641 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15642 | return err |
| 15643 | } |
| 15644 | |
| 15645 | return nil |
| 15646 | } |
| 15647 | |
| 15648 | func DecodeOxmIdCtIpv6Dst(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtIpv6Dst, error) { |
| 15649 | _oxmidctipv6dst := &OxmIdCtIpv6Dst{OxmId: parent} |
| 15650 | return _oxmidctipv6dst, nil |
| 15651 | } |
| 15652 | |
| 15653 | func NewOxmIdCtIpv6Dst() *OxmIdCtIpv6Dst { |
| 15654 | obj := &OxmIdCtIpv6Dst{ |
| 15655 | OxmId: NewOxmId(128528), |
| 15656 | } |
| 15657 | return obj |
| 15658 | } |
| 15659 | func (self *OxmIdCtIpv6Dst) GetOXMName() string { |
| 15660 | return "ct_ipv6_dst" |
| 15661 | } |
| 15662 | |
| 15663 | func (self *OxmIdCtIpv6Dst) MarshalJSON() ([]byte, error) { |
| 15664 | if self.TypeLen == 0 { |
| 15665 | return []byte("\"\""), nil |
| 15666 | } else { |
| 15667 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15668 | } |
| 15669 | } |
| 15670 | |
| 15671 | type OxmIdCtIpv6DstMasked struct { |
| 15672 | *OxmId |
| 15673 | } |
| 15674 | |
| 15675 | type IOxmIdCtIpv6DstMasked interface { |
| 15676 | IOxmId |
| 15677 | } |
| 15678 | |
| 15679 | func (self *OxmIdCtIpv6DstMasked) Serialize(encoder *goloxi.Encoder) error { |
| 15680 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15681 | return err |
| 15682 | } |
| 15683 | |
| 15684 | return nil |
| 15685 | } |
| 15686 | |
| 15687 | func DecodeOxmIdCtIpv6DstMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtIpv6DstMasked, error) { |
| 15688 | _oxmidctipv6dstmasked := &OxmIdCtIpv6DstMasked{OxmId: parent} |
| 15689 | return _oxmidctipv6dstmasked, nil |
| 15690 | } |
| 15691 | |
| 15692 | func NewOxmIdCtIpv6DstMasked() *OxmIdCtIpv6DstMasked { |
| 15693 | obj := &OxmIdCtIpv6DstMasked{ |
| 15694 | OxmId: NewOxmId(128800), |
| 15695 | } |
| 15696 | return obj |
| 15697 | } |
| 15698 | func (self *OxmIdCtIpv6DstMasked) GetOXMName() string { |
| 15699 | return "ct_ipv6_dst_masked" |
| 15700 | } |
| 15701 | |
| 15702 | func (self *OxmIdCtIpv6DstMasked) MarshalJSON() ([]byte, error) { |
| 15703 | if self.TypeLen == 0 { |
| 15704 | return []byte("\"\""), nil |
| 15705 | } else { |
| 15706 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15707 | } |
| 15708 | } |
| 15709 | |
| 15710 | type OxmIdCtIpv6Src struct { |
| 15711 | *OxmId |
| 15712 | } |
| 15713 | |
| 15714 | type IOxmIdCtIpv6Src interface { |
| 15715 | IOxmId |
| 15716 | } |
| 15717 | |
| 15718 | func (self *OxmIdCtIpv6Src) Serialize(encoder *goloxi.Encoder) error { |
| 15719 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15720 | return err |
| 15721 | } |
| 15722 | |
| 15723 | return nil |
| 15724 | } |
| 15725 | |
| 15726 | func DecodeOxmIdCtIpv6Src(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtIpv6Src, error) { |
| 15727 | _oxmidctipv6src := &OxmIdCtIpv6Src{OxmId: parent} |
| 15728 | return _oxmidctipv6src, nil |
| 15729 | } |
| 15730 | |
| 15731 | func NewOxmIdCtIpv6Src() *OxmIdCtIpv6Src { |
| 15732 | obj := &OxmIdCtIpv6Src{ |
| 15733 | OxmId: NewOxmId(128016), |
| 15734 | } |
| 15735 | return obj |
| 15736 | } |
| 15737 | func (self *OxmIdCtIpv6Src) GetOXMName() string { |
| 15738 | return "ct_ipv6_src" |
| 15739 | } |
| 15740 | |
| 15741 | func (self *OxmIdCtIpv6Src) MarshalJSON() ([]byte, error) { |
| 15742 | if self.TypeLen == 0 { |
| 15743 | return []byte("\"\""), nil |
| 15744 | } else { |
| 15745 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15746 | } |
| 15747 | } |
| 15748 | |
| 15749 | type OxmIdCtIpv6SrcMasked struct { |
| 15750 | *OxmId |
| 15751 | } |
| 15752 | |
| 15753 | type IOxmIdCtIpv6SrcMasked interface { |
| 15754 | IOxmId |
| 15755 | } |
| 15756 | |
| 15757 | func (self *OxmIdCtIpv6SrcMasked) Serialize(encoder *goloxi.Encoder) error { |
| 15758 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15759 | return err |
| 15760 | } |
| 15761 | |
| 15762 | return nil |
| 15763 | } |
| 15764 | |
| 15765 | func DecodeOxmIdCtIpv6SrcMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtIpv6SrcMasked, error) { |
| 15766 | _oxmidctipv6srcmasked := &OxmIdCtIpv6SrcMasked{OxmId: parent} |
| 15767 | return _oxmidctipv6srcmasked, nil |
| 15768 | } |
| 15769 | |
| 15770 | func NewOxmIdCtIpv6SrcMasked() *OxmIdCtIpv6SrcMasked { |
| 15771 | obj := &OxmIdCtIpv6SrcMasked{ |
| 15772 | OxmId: NewOxmId(128288), |
| 15773 | } |
| 15774 | return obj |
| 15775 | } |
| 15776 | func (self *OxmIdCtIpv6SrcMasked) GetOXMName() string { |
| 15777 | return "ct_ipv6_src_masked" |
| 15778 | } |
| 15779 | |
| 15780 | func (self *OxmIdCtIpv6SrcMasked) MarshalJSON() ([]byte, error) { |
| 15781 | if self.TypeLen == 0 { |
| 15782 | return []byte("\"\""), nil |
| 15783 | } else { |
| 15784 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15785 | } |
| 15786 | } |
| 15787 | |
| 15788 | type OxmIdCtLabel struct { |
| 15789 | *OxmId |
| 15790 | } |
| 15791 | |
| 15792 | type IOxmIdCtLabel interface { |
| 15793 | IOxmId |
| 15794 | } |
| 15795 | |
| 15796 | func (self *OxmIdCtLabel) Serialize(encoder *goloxi.Encoder) error { |
| 15797 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15798 | return err |
| 15799 | } |
| 15800 | |
| 15801 | return nil |
| 15802 | } |
| 15803 | |
| 15804 | func DecodeOxmIdCtLabel(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtLabel, error) { |
| 15805 | _oxmidctlabel := &OxmIdCtLabel{OxmId: parent} |
| 15806 | return _oxmidctlabel, nil |
| 15807 | } |
| 15808 | |
| 15809 | func NewOxmIdCtLabel() *OxmIdCtLabel { |
| 15810 | obj := &OxmIdCtLabel{ |
| 15811 | OxmId: NewOxmId(120848), |
| 15812 | } |
| 15813 | return obj |
| 15814 | } |
| 15815 | func (self *OxmIdCtLabel) GetOXMName() string { |
| 15816 | return "ct_label" |
| 15817 | } |
| 15818 | |
| 15819 | func (self *OxmIdCtLabel) MarshalJSON() ([]byte, error) { |
| 15820 | if self.TypeLen == 0 { |
| 15821 | return []byte("\"\""), nil |
| 15822 | } else { |
| 15823 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15824 | } |
| 15825 | } |
| 15826 | |
| 15827 | type OxmIdCtLabelMasked struct { |
| 15828 | *OxmId |
| 15829 | } |
| 15830 | |
| 15831 | type IOxmIdCtLabelMasked interface { |
| 15832 | IOxmId |
| 15833 | } |
| 15834 | |
| 15835 | func (self *OxmIdCtLabelMasked) Serialize(encoder *goloxi.Encoder) error { |
| 15836 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15837 | return err |
| 15838 | } |
| 15839 | |
| 15840 | return nil |
| 15841 | } |
| 15842 | |
| 15843 | func DecodeOxmIdCtLabelMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtLabelMasked, error) { |
| 15844 | _oxmidctlabelmasked := &OxmIdCtLabelMasked{OxmId: parent} |
| 15845 | return _oxmidctlabelmasked, nil |
| 15846 | } |
| 15847 | |
| 15848 | func NewOxmIdCtLabelMasked() *OxmIdCtLabelMasked { |
| 15849 | obj := &OxmIdCtLabelMasked{ |
| 15850 | OxmId: NewOxmId(121120), |
| 15851 | } |
| 15852 | return obj |
| 15853 | } |
| 15854 | func (self *OxmIdCtLabelMasked) GetOXMName() string { |
| 15855 | return "ct_label_masked" |
| 15856 | } |
| 15857 | |
| 15858 | func (self *OxmIdCtLabelMasked) MarshalJSON() ([]byte, error) { |
| 15859 | if self.TypeLen == 0 { |
| 15860 | return []byte("\"\""), nil |
| 15861 | } else { |
| 15862 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15863 | } |
| 15864 | } |
| 15865 | |
| 15866 | type OxmIdCtMark struct { |
| 15867 | *OxmId |
| 15868 | } |
| 15869 | |
| 15870 | type IOxmIdCtMark interface { |
| 15871 | IOxmId |
| 15872 | } |
| 15873 | |
| 15874 | func (self *OxmIdCtMark) Serialize(encoder *goloxi.Encoder) error { |
| 15875 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15876 | return err |
| 15877 | } |
| 15878 | |
| 15879 | return nil |
| 15880 | } |
| 15881 | |
| 15882 | func DecodeOxmIdCtMark(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtMark, error) { |
| 15883 | _oxmidctmark := &OxmIdCtMark{OxmId: parent} |
| 15884 | return _oxmidctmark, nil |
| 15885 | } |
| 15886 | |
| 15887 | func NewOxmIdCtMark() *OxmIdCtMark { |
| 15888 | obj := &OxmIdCtMark{ |
| 15889 | OxmId: NewOxmId(120324), |
| 15890 | } |
| 15891 | return obj |
| 15892 | } |
| 15893 | func (self *OxmIdCtMark) GetOXMName() string { |
| 15894 | return "ct_mark" |
| 15895 | } |
| 15896 | |
| 15897 | func (self *OxmIdCtMark) MarshalJSON() ([]byte, error) { |
| 15898 | if self.TypeLen == 0 { |
| 15899 | return []byte("\"\""), nil |
| 15900 | } else { |
| 15901 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15902 | } |
| 15903 | } |
| 15904 | |
| 15905 | type OxmIdCtMarkMasked struct { |
| 15906 | *OxmId |
| 15907 | } |
| 15908 | |
| 15909 | type IOxmIdCtMarkMasked interface { |
| 15910 | IOxmId |
| 15911 | } |
| 15912 | |
| 15913 | func (self *OxmIdCtMarkMasked) Serialize(encoder *goloxi.Encoder) error { |
| 15914 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15915 | return err |
| 15916 | } |
| 15917 | |
| 15918 | return nil |
| 15919 | } |
| 15920 | |
| 15921 | func DecodeOxmIdCtMarkMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtMarkMasked, error) { |
| 15922 | _oxmidctmarkmasked := &OxmIdCtMarkMasked{OxmId: parent} |
| 15923 | return _oxmidctmarkmasked, nil |
| 15924 | } |
| 15925 | |
| 15926 | func NewOxmIdCtMarkMasked() *OxmIdCtMarkMasked { |
| 15927 | obj := &OxmIdCtMarkMasked{ |
| 15928 | OxmId: NewOxmId(120584), |
| 15929 | } |
| 15930 | return obj |
| 15931 | } |
| 15932 | func (self *OxmIdCtMarkMasked) GetOXMName() string { |
| 15933 | return "ct_mark_masked" |
| 15934 | } |
| 15935 | |
| 15936 | func (self *OxmIdCtMarkMasked) MarshalJSON() ([]byte, error) { |
| 15937 | if self.TypeLen == 0 { |
| 15938 | return []byte("\"\""), nil |
| 15939 | } else { |
| 15940 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15941 | } |
| 15942 | } |
| 15943 | |
| 15944 | type OxmIdCtNwDst struct { |
| 15945 | *OxmId |
| 15946 | } |
| 15947 | |
| 15948 | type IOxmIdCtNwDst interface { |
| 15949 | IOxmId |
| 15950 | } |
| 15951 | |
| 15952 | func (self *OxmIdCtNwDst) Serialize(encoder *goloxi.Encoder) error { |
| 15953 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15954 | return err |
| 15955 | } |
| 15956 | |
| 15957 | return nil |
| 15958 | } |
| 15959 | |
| 15960 | func DecodeOxmIdCtNwDst(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtNwDst, error) { |
| 15961 | _oxmidctnwdst := &OxmIdCtNwDst{OxmId: parent} |
| 15962 | return _oxmidctnwdst, nil |
| 15963 | } |
| 15964 | |
| 15965 | func NewOxmIdCtNwDst() *OxmIdCtNwDst { |
| 15966 | obj := &OxmIdCtNwDst{ |
| 15967 | OxmId: NewOxmId(127492), |
| 15968 | } |
| 15969 | return obj |
| 15970 | } |
| 15971 | func (self *OxmIdCtNwDst) GetOXMName() string { |
| 15972 | return "ct_nw_dst" |
| 15973 | } |
| 15974 | |
| 15975 | func (self *OxmIdCtNwDst) MarshalJSON() ([]byte, error) { |
| 15976 | if self.TypeLen == 0 { |
| 15977 | return []byte("\"\""), nil |
| 15978 | } else { |
| 15979 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 15980 | } |
| 15981 | } |
| 15982 | |
| 15983 | type OxmIdCtNwDstMasked struct { |
| 15984 | *OxmId |
| 15985 | } |
| 15986 | |
| 15987 | type IOxmIdCtNwDstMasked interface { |
| 15988 | IOxmId |
| 15989 | } |
| 15990 | |
| 15991 | func (self *OxmIdCtNwDstMasked) Serialize(encoder *goloxi.Encoder) error { |
| 15992 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 15993 | return err |
| 15994 | } |
| 15995 | |
| 15996 | return nil |
| 15997 | } |
| 15998 | |
| 15999 | func DecodeOxmIdCtNwDstMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtNwDstMasked, error) { |
| 16000 | _oxmidctnwdstmasked := &OxmIdCtNwDstMasked{OxmId: parent} |
| 16001 | return _oxmidctnwdstmasked, nil |
| 16002 | } |
| 16003 | |
| 16004 | func NewOxmIdCtNwDstMasked() *OxmIdCtNwDstMasked { |
| 16005 | obj := &OxmIdCtNwDstMasked{ |
| 16006 | OxmId: NewOxmId(127752), |
| 16007 | } |
| 16008 | return obj |
| 16009 | } |
| 16010 | func (self *OxmIdCtNwDstMasked) GetOXMName() string { |
| 16011 | return "ct_nw_dst_masked" |
| 16012 | } |
| 16013 | |
| 16014 | func (self *OxmIdCtNwDstMasked) MarshalJSON() ([]byte, error) { |
| 16015 | if self.TypeLen == 0 { |
| 16016 | return []byte("\"\""), nil |
| 16017 | } else { |
| 16018 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16019 | } |
| 16020 | } |
| 16021 | |
| 16022 | type OxmIdCtNwProto struct { |
| 16023 | *OxmId |
| 16024 | } |
| 16025 | |
| 16026 | type IOxmIdCtNwProto interface { |
| 16027 | IOxmId |
| 16028 | } |
| 16029 | |
| 16030 | func (self *OxmIdCtNwProto) Serialize(encoder *goloxi.Encoder) error { |
| 16031 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16032 | return err |
| 16033 | } |
| 16034 | |
| 16035 | return nil |
| 16036 | } |
| 16037 | |
| 16038 | func DecodeOxmIdCtNwProto(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtNwProto, error) { |
| 16039 | _oxmidctnwproto := &OxmIdCtNwProto{OxmId: parent} |
| 16040 | return _oxmidctnwproto, nil |
| 16041 | } |
| 16042 | |
| 16043 | func NewOxmIdCtNwProto() *OxmIdCtNwProto { |
| 16044 | obj := &OxmIdCtNwProto{ |
| 16045 | OxmId: NewOxmId(126465), |
| 16046 | } |
| 16047 | return obj |
| 16048 | } |
| 16049 | func (self *OxmIdCtNwProto) GetOXMName() string { |
| 16050 | return "ct_nw_proto" |
| 16051 | } |
| 16052 | |
| 16053 | func (self *OxmIdCtNwProto) MarshalJSON() ([]byte, error) { |
| 16054 | if self.TypeLen == 0 { |
| 16055 | return []byte("\"\""), nil |
| 16056 | } else { |
| 16057 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16058 | } |
| 16059 | } |
| 16060 | |
| 16061 | type OxmIdCtNwSrc struct { |
| 16062 | *OxmId |
| 16063 | } |
| 16064 | |
| 16065 | type IOxmIdCtNwSrc interface { |
| 16066 | IOxmId |
| 16067 | } |
| 16068 | |
| 16069 | func (self *OxmIdCtNwSrc) Serialize(encoder *goloxi.Encoder) error { |
| 16070 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16071 | return err |
| 16072 | } |
| 16073 | |
| 16074 | return nil |
| 16075 | } |
| 16076 | |
| 16077 | func DecodeOxmIdCtNwSrc(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtNwSrc, error) { |
| 16078 | _oxmidctnwsrc := &OxmIdCtNwSrc{OxmId: parent} |
| 16079 | return _oxmidctnwsrc, nil |
| 16080 | } |
| 16081 | |
| 16082 | func NewOxmIdCtNwSrc() *OxmIdCtNwSrc { |
| 16083 | obj := &OxmIdCtNwSrc{ |
| 16084 | OxmId: NewOxmId(126980), |
| 16085 | } |
| 16086 | return obj |
| 16087 | } |
| 16088 | func (self *OxmIdCtNwSrc) GetOXMName() string { |
| 16089 | return "ct_nw_src" |
| 16090 | } |
| 16091 | |
| 16092 | func (self *OxmIdCtNwSrc) MarshalJSON() ([]byte, error) { |
| 16093 | if self.TypeLen == 0 { |
| 16094 | return []byte("\"\""), nil |
| 16095 | } else { |
| 16096 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16097 | } |
| 16098 | } |
| 16099 | |
| 16100 | type OxmIdCtNwSrcMasked struct { |
| 16101 | *OxmId |
| 16102 | } |
| 16103 | |
| 16104 | type IOxmIdCtNwSrcMasked interface { |
| 16105 | IOxmId |
| 16106 | } |
| 16107 | |
| 16108 | func (self *OxmIdCtNwSrcMasked) Serialize(encoder *goloxi.Encoder) error { |
| 16109 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16110 | return err |
| 16111 | } |
| 16112 | |
| 16113 | return nil |
| 16114 | } |
| 16115 | |
| 16116 | func DecodeOxmIdCtNwSrcMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtNwSrcMasked, error) { |
| 16117 | _oxmidctnwsrcmasked := &OxmIdCtNwSrcMasked{OxmId: parent} |
| 16118 | return _oxmidctnwsrcmasked, nil |
| 16119 | } |
| 16120 | |
| 16121 | func NewOxmIdCtNwSrcMasked() *OxmIdCtNwSrcMasked { |
| 16122 | obj := &OxmIdCtNwSrcMasked{ |
| 16123 | OxmId: NewOxmId(127240), |
| 16124 | } |
| 16125 | return obj |
| 16126 | } |
| 16127 | func (self *OxmIdCtNwSrcMasked) GetOXMName() string { |
| 16128 | return "ct_nw_src_masked" |
| 16129 | } |
| 16130 | |
| 16131 | func (self *OxmIdCtNwSrcMasked) MarshalJSON() ([]byte, error) { |
| 16132 | if self.TypeLen == 0 { |
| 16133 | return []byte("\"\""), nil |
| 16134 | } else { |
| 16135 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16136 | } |
| 16137 | } |
| 16138 | |
| 16139 | type OxmIdCtState struct { |
| 16140 | *OxmId |
| 16141 | } |
| 16142 | |
| 16143 | type IOxmIdCtState interface { |
| 16144 | IOxmId |
| 16145 | } |
| 16146 | |
| 16147 | func (self *OxmIdCtState) Serialize(encoder *goloxi.Encoder) error { |
| 16148 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16149 | return err |
| 16150 | } |
| 16151 | |
| 16152 | return nil |
| 16153 | } |
| 16154 | |
| 16155 | func DecodeOxmIdCtState(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtState, error) { |
| 16156 | _oxmidctstate := &OxmIdCtState{OxmId: parent} |
| 16157 | return _oxmidctstate, nil |
| 16158 | } |
| 16159 | |
| 16160 | func NewOxmIdCtState() *OxmIdCtState { |
| 16161 | obj := &OxmIdCtState{ |
| 16162 | OxmId: NewOxmId(119300), |
| 16163 | } |
| 16164 | return obj |
| 16165 | } |
| 16166 | func (self *OxmIdCtState) GetOXMName() string { |
| 16167 | return "ct_state" |
| 16168 | } |
| 16169 | |
| 16170 | func (self *OxmIdCtState) MarshalJSON() ([]byte, error) { |
| 16171 | if self.TypeLen == 0 { |
| 16172 | return []byte("\"\""), nil |
| 16173 | } else { |
| 16174 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16175 | } |
| 16176 | } |
| 16177 | |
| 16178 | type OxmIdCtStateMasked struct { |
| 16179 | *OxmId |
| 16180 | } |
| 16181 | |
| 16182 | type IOxmIdCtStateMasked interface { |
| 16183 | IOxmId |
| 16184 | } |
| 16185 | |
| 16186 | func (self *OxmIdCtStateMasked) Serialize(encoder *goloxi.Encoder) error { |
| 16187 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16188 | return err |
| 16189 | } |
| 16190 | |
| 16191 | return nil |
| 16192 | } |
| 16193 | |
| 16194 | func DecodeOxmIdCtStateMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtStateMasked, error) { |
| 16195 | _oxmidctstatemasked := &OxmIdCtStateMasked{OxmId: parent} |
| 16196 | return _oxmidctstatemasked, nil |
| 16197 | } |
| 16198 | |
| 16199 | func NewOxmIdCtStateMasked() *OxmIdCtStateMasked { |
| 16200 | obj := &OxmIdCtStateMasked{ |
| 16201 | OxmId: NewOxmId(119560), |
| 16202 | } |
| 16203 | return obj |
| 16204 | } |
| 16205 | func (self *OxmIdCtStateMasked) GetOXMName() string { |
| 16206 | return "ct_state_masked" |
| 16207 | } |
| 16208 | |
| 16209 | func (self *OxmIdCtStateMasked) MarshalJSON() ([]byte, error) { |
| 16210 | if self.TypeLen == 0 { |
| 16211 | return []byte("\"\""), nil |
| 16212 | } else { |
| 16213 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16214 | } |
| 16215 | } |
| 16216 | |
| 16217 | type OxmIdCtTpDst struct { |
| 16218 | *OxmId |
| 16219 | } |
| 16220 | |
| 16221 | type IOxmIdCtTpDst interface { |
| 16222 | IOxmId |
| 16223 | } |
| 16224 | |
| 16225 | func (self *OxmIdCtTpDst) Serialize(encoder *goloxi.Encoder) error { |
| 16226 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16227 | return err |
| 16228 | } |
| 16229 | |
| 16230 | return nil |
| 16231 | } |
| 16232 | |
| 16233 | func DecodeOxmIdCtTpDst(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtTpDst, error) { |
| 16234 | _oxmidcttpdst := &OxmIdCtTpDst{OxmId: parent} |
| 16235 | return _oxmidcttpdst, nil |
| 16236 | } |
| 16237 | |
| 16238 | func NewOxmIdCtTpDst() *OxmIdCtTpDst { |
| 16239 | obj := &OxmIdCtTpDst{ |
| 16240 | OxmId: NewOxmId(129538), |
| 16241 | } |
| 16242 | return obj |
| 16243 | } |
| 16244 | func (self *OxmIdCtTpDst) GetOXMName() string { |
| 16245 | return "ct_tp_dst" |
| 16246 | } |
| 16247 | |
| 16248 | func (self *OxmIdCtTpDst) MarshalJSON() ([]byte, error) { |
| 16249 | if self.TypeLen == 0 { |
| 16250 | return []byte("\"\""), nil |
| 16251 | } else { |
| 16252 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16253 | } |
| 16254 | } |
| 16255 | |
| 16256 | type OxmIdCtTpDstMasked struct { |
| 16257 | *OxmId |
| 16258 | } |
| 16259 | |
| 16260 | type IOxmIdCtTpDstMasked interface { |
| 16261 | IOxmId |
| 16262 | } |
| 16263 | |
| 16264 | func (self *OxmIdCtTpDstMasked) Serialize(encoder *goloxi.Encoder) error { |
| 16265 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16266 | return err |
| 16267 | } |
| 16268 | |
| 16269 | return nil |
| 16270 | } |
| 16271 | |
| 16272 | func DecodeOxmIdCtTpDstMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtTpDstMasked, error) { |
| 16273 | _oxmidcttpdstmasked := &OxmIdCtTpDstMasked{OxmId: parent} |
| 16274 | return _oxmidcttpdstmasked, nil |
| 16275 | } |
| 16276 | |
| 16277 | func NewOxmIdCtTpDstMasked() *OxmIdCtTpDstMasked { |
| 16278 | obj := &OxmIdCtTpDstMasked{ |
| 16279 | OxmId: NewOxmId(129796), |
| 16280 | } |
| 16281 | return obj |
| 16282 | } |
| 16283 | func (self *OxmIdCtTpDstMasked) GetOXMName() string { |
| 16284 | return "ct_tp_dst_masked" |
| 16285 | } |
| 16286 | |
| 16287 | func (self *OxmIdCtTpDstMasked) MarshalJSON() ([]byte, error) { |
| 16288 | if self.TypeLen == 0 { |
| 16289 | return []byte("\"\""), nil |
| 16290 | } else { |
| 16291 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16292 | } |
| 16293 | } |
| 16294 | |
| 16295 | type OxmIdCtTpSrc struct { |
| 16296 | *OxmId |
| 16297 | } |
| 16298 | |
| 16299 | type IOxmIdCtTpSrc interface { |
| 16300 | IOxmId |
| 16301 | } |
| 16302 | |
| 16303 | func (self *OxmIdCtTpSrc) Serialize(encoder *goloxi.Encoder) error { |
| 16304 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16305 | return err |
| 16306 | } |
| 16307 | |
| 16308 | return nil |
| 16309 | } |
| 16310 | |
| 16311 | func DecodeOxmIdCtTpSrc(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtTpSrc, error) { |
| 16312 | _oxmidcttpsrc := &OxmIdCtTpSrc{OxmId: parent} |
| 16313 | return _oxmidcttpsrc, nil |
| 16314 | } |
| 16315 | |
| 16316 | func NewOxmIdCtTpSrc() *OxmIdCtTpSrc { |
| 16317 | obj := &OxmIdCtTpSrc{ |
| 16318 | OxmId: NewOxmId(129026), |
| 16319 | } |
| 16320 | return obj |
| 16321 | } |
| 16322 | func (self *OxmIdCtTpSrc) GetOXMName() string { |
| 16323 | return "ct_tp_src" |
| 16324 | } |
| 16325 | |
| 16326 | func (self *OxmIdCtTpSrc) MarshalJSON() ([]byte, error) { |
| 16327 | if self.TypeLen == 0 { |
| 16328 | return []byte("\"\""), nil |
| 16329 | } else { |
| 16330 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16331 | } |
| 16332 | } |
| 16333 | |
| 16334 | type OxmIdCtTpSrcMasked struct { |
| 16335 | *OxmId |
| 16336 | } |
| 16337 | |
| 16338 | type IOxmIdCtTpSrcMasked interface { |
| 16339 | IOxmId |
| 16340 | } |
| 16341 | |
| 16342 | func (self *OxmIdCtTpSrcMasked) Serialize(encoder *goloxi.Encoder) error { |
| 16343 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16344 | return err |
| 16345 | } |
| 16346 | |
| 16347 | return nil |
| 16348 | } |
| 16349 | |
| 16350 | func DecodeOxmIdCtTpSrcMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtTpSrcMasked, error) { |
| 16351 | _oxmidcttpsrcmasked := &OxmIdCtTpSrcMasked{OxmId: parent} |
| 16352 | return _oxmidcttpsrcmasked, nil |
| 16353 | } |
| 16354 | |
| 16355 | func NewOxmIdCtTpSrcMasked() *OxmIdCtTpSrcMasked { |
| 16356 | obj := &OxmIdCtTpSrcMasked{ |
| 16357 | OxmId: NewOxmId(129284), |
| 16358 | } |
| 16359 | return obj |
| 16360 | } |
| 16361 | func (self *OxmIdCtTpSrcMasked) GetOXMName() string { |
| 16362 | return "ct_tp_src_masked" |
| 16363 | } |
| 16364 | |
| 16365 | func (self *OxmIdCtTpSrcMasked) MarshalJSON() ([]byte, error) { |
| 16366 | if self.TypeLen == 0 { |
| 16367 | return []byte("\"\""), nil |
| 16368 | } else { |
| 16369 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16370 | } |
| 16371 | } |
| 16372 | |
| 16373 | type OxmIdCtZone struct { |
| 16374 | *OxmId |
| 16375 | } |
| 16376 | |
| 16377 | type IOxmIdCtZone interface { |
| 16378 | IOxmId |
| 16379 | } |
| 16380 | |
| 16381 | func (self *OxmIdCtZone) Serialize(encoder *goloxi.Encoder) error { |
| 16382 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16383 | return err |
| 16384 | } |
| 16385 | |
| 16386 | return nil |
| 16387 | } |
| 16388 | |
| 16389 | func DecodeOxmIdCtZone(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdCtZone, error) { |
| 16390 | _oxmidctzone := &OxmIdCtZone{OxmId: parent} |
| 16391 | return _oxmidctzone, nil |
| 16392 | } |
| 16393 | |
| 16394 | func NewOxmIdCtZone() *OxmIdCtZone { |
| 16395 | obj := &OxmIdCtZone{ |
| 16396 | OxmId: NewOxmId(119810), |
| 16397 | } |
| 16398 | return obj |
| 16399 | } |
| 16400 | func (self *OxmIdCtZone) GetOXMName() string { |
| 16401 | return "ct_zone" |
| 16402 | } |
| 16403 | |
| 16404 | func (self *OxmIdCtZone) MarshalJSON() ([]byte, error) { |
| 16405 | if self.TypeLen == 0 { |
| 16406 | return []byte("\"\""), nil |
| 16407 | } else { |
| 16408 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16409 | } |
| 16410 | } |
| 16411 | |
| 16412 | type OxmIdDpHash struct { |
| 16413 | *OxmId |
| 16414 | } |
| 16415 | |
| 16416 | type IOxmIdDpHash interface { |
| 16417 | IOxmId |
| 16418 | } |
| 16419 | |
| 16420 | func (self *OxmIdDpHash) Serialize(encoder *goloxi.Encoder) error { |
| 16421 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16422 | return err |
| 16423 | } |
| 16424 | |
| 16425 | return nil |
| 16426 | } |
| 16427 | |
| 16428 | func DecodeOxmIdDpHash(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdDpHash, error) { |
| 16429 | _oxmiddphash := &OxmIdDpHash{OxmId: parent} |
| 16430 | return _oxmiddphash, nil |
| 16431 | } |
| 16432 | |
| 16433 | func NewOxmIdDpHash() *OxmIdDpHash { |
| 16434 | obj := &OxmIdDpHash{ |
| 16435 | OxmId: NewOxmId(83460), |
| 16436 | } |
| 16437 | return obj |
| 16438 | } |
| 16439 | func (self *OxmIdDpHash) GetOXMName() string { |
| 16440 | return "dp_hash" |
| 16441 | } |
| 16442 | |
| 16443 | func (self *OxmIdDpHash) MarshalJSON() ([]byte, error) { |
| 16444 | if self.TypeLen == 0 { |
| 16445 | return []byte("\"\""), nil |
| 16446 | } else { |
| 16447 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16448 | } |
| 16449 | } |
| 16450 | |
| 16451 | type OxmIdDpHashMasked struct { |
| 16452 | *OxmId |
| 16453 | } |
| 16454 | |
| 16455 | type IOxmIdDpHashMasked interface { |
| 16456 | IOxmId |
| 16457 | } |
| 16458 | |
| 16459 | func (self *OxmIdDpHashMasked) Serialize(encoder *goloxi.Encoder) error { |
| 16460 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16461 | return err |
| 16462 | } |
| 16463 | |
| 16464 | return nil |
| 16465 | } |
| 16466 | |
| 16467 | func DecodeOxmIdDpHashMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdDpHashMasked, error) { |
| 16468 | _oxmiddphashmasked := &OxmIdDpHashMasked{OxmId: parent} |
| 16469 | return _oxmiddphashmasked, nil |
| 16470 | } |
| 16471 | |
| 16472 | func NewOxmIdDpHashMasked() *OxmIdDpHashMasked { |
| 16473 | obj := &OxmIdDpHashMasked{ |
| 16474 | OxmId: NewOxmId(83720), |
| 16475 | } |
| 16476 | return obj |
| 16477 | } |
| 16478 | func (self *OxmIdDpHashMasked) GetOXMName() string { |
| 16479 | return "dp_hash_masked" |
| 16480 | } |
| 16481 | |
| 16482 | func (self *OxmIdDpHashMasked) MarshalJSON() ([]byte, error) { |
| 16483 | if self.TypeLen == 0 { |
| 16484 | return []byte("\"\""), nil |
| 16485 | } else { |
| 16486 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16487 | } |
| 16488 | } |
| 16489 | |
| 16490 | type OxmIdEthDst struct { |
| 16491 | *OxmId |
| 16492 | } |
| 16493 | |
| 16494 | type IOxmIdEthDst interface { |
| 16495 | IOxmId |
| 16496 | } |
| 16497 | |
| 16498 | func (self *OxmIdEthDst) Serialize(encoder *goloxi.Encoder) error { |
| 16499 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16500 | return err |
| 16501 | } |
| 16502 | |
| 16503 | return nil |
| 16504 | } |
| 16505 | |
| 16506 | func DecodeOxmIdEthDst(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdEthDst, error) { |
| 16507 | _oxmidethdst := &OxmIdEthDst{OxmId: parent} |
| 16508 | return _oxmidethdst, nil |
| 16509 | } |
| 16510 | |
| 16511 | func NewOxmIdEthDst() *OxmIdEthDst { |
| 16512 | obj := &OxmIdEthDst{ |
| 16513 | OxmId: NewOxmId(518), |
| 16514 | } |
| 16515 | return obj |
| 16516 | } |
| 16517 | func (self *OxmIdEthDst) GetOXMName() string { |
| 16518 | return "eth_dst" |
| 16519 | } |
| 16520 | |
| 16521 | func (self *OxmIdEthDst) MarshalJSON() ([]byte, error) { |
| 16522 | if self.TypeLen == 0 { |
| 16523 | return []byte("\"\""), nil |
| 16524 | } else { |
| 16525 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16526 | } |
| 16527 | } |
| 16528 | |
| 16529 | type OxmIdEthDstMasked struct { |
| 16530 | *OxmId |
| 16531 | } |
| 16532 | |
| 16533 | type IOxmIdEthDstMasked interface { |
| 16534 | IOxmId |
| 16535 | } |
| 16536 | |
| 16537 | func (self *OxmIdEthDstMasked) Serialize(encoder *goloxi.Encoder) error { |
| 16538 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16539 | return err |
| 16540 | } |
| 16541 | |
| 16542 | return nil |
| 16543 | } |
| 16544 | |
| 16545 | func DecodeOxmIdEthDstMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdEthDstMasked, error) { |
| 16546 | _oxmidethdstmasked := &OxmIdEthDstMasked{OxmId: parent} |
| 16547 | return _oxmidethdstmasked, nil |
| 16548 | } |
| 16549 | |
| 16550 | func NewOxmIdEthDstMasked() *OxmIdEthDstMasked { |
| 16551 | obj := &OxmIdEthDstMasked{ |
| 16552 | OxmId: NewOxmId(779), |
| 16553 | } |
| 16554 | return obj |
| 16555 | } |
| 16556 | func (self *OxmIdEthDstMasked) GetOXMName() string { |
| 16557 | return "eth_dst_masked" |
| 16558 | } |
| 16559 | |
| 16560 | func (self *OxmIdEthDstMasked) MarshalJSON() ([]byte, error) { |
| 16561 | if self.TypeLen == 0 { |
| 16562 | return []byte("\"\""), nil |
| 16563 | } else { |
| 16564 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16565 | } |
| 16566 | } |
| 16567 | |
| 16568 | type OxmIdEthSrc struct { |
| 16569 | *OxmId |
| 16570 | } |
| 16571 | |
| 16572 | type IOxmIdEthSrc interface { |
| 16573 | IOxmId |
| 16574 | } |
| 16575 | |
| 16576 | func (self *OxmIdEthSrc) Serialize(encoder *goloxi.Encoder) error { |
| 16577 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16578 | return err |
| 16579 | } |
| 16580 | |
| 16581 | return nil |
| 16582 | } |
| 16583 | |
| 16584 | func DecodeOxmIdEthSrc(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdEthSrc, error) { |
| 16585 | _oxmidethsrc := &OxmIdEthSrc{OxmId: parent} |
| 16586 | return _oxmidethsrc, nil |
| 16587 | } |
| 16588 | |
| 16589 | func NewOxmIdEthSrc() *OxmIdEthSrc { |
| 16590 | obj := &OxmIdEthSrc{ |
| 16591 | OxmId: NewOxmId(1030), |
| 16592 | } |
| 16593 | return obj |
| 16594 | } |
| 16595 | func (self *OxmIdEthSrc) GetOXMName() string { |
| 16596 | return "eth_src" |
| 16597 | } |
| 16598 | |
| 16599 | func (self *OxmIdEthSrc) MarshalJSON() ([]byte, error) { |
| 16600 | if self.TypeLen == 0 { |
| 16601 | return []byte("\"\""), nil |
| 16602 | } else { |
| 16603 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16604 | } |
| 16605 | } |
| 16606 | |
| 16607 | type OxmIdEthSrcMasked struct { |
| 16608 | *OxmId |
| 16609 | } |
| 16610 | |
| 16611 | type IOxmIdEthSrcMasked interface { |
| 16612 | IOxmId |
| 16613 | } |
| 16614 | |
| 16615 | func (self *OxmIdEthSrcMasked) Serialize(encoder *goloxi.Encoder) error { |
| 16616 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16617 | return err |
| 16618 | } |
| 16619 | |
| 16620 | return nil |
| 16621 | } |
| 16622 | |
| 16623 | func DecodeOxmIdEthSrcMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdEthSrcMasked, error) { |
| 16624 | _oxmidethsrcmasked := &OxmIdEthSrcMasked{OxmId: parent} |
| 16625 | return _oxmidethsrcmasked, nil |
| 16626 | } |
| 16627 | |
| 16628 | func NewOxmIdEthSrcMasked() *OxmIdEthSrcMasked { |
| 16629 | obj := &OxmIdEthSrcMasked{ |
| 16630 | OxmId: NewOxmId(1286), |
| 16631 | } |
| 16632 | return obj |
| 16633 | } |
| 16634 | func (self *OxmIdEthSrcMasked) GetOXMName() string { |
| 16635 | return "eth_src_masked" |
| 16636 | } |
| 16637 | |
| 16638 | func (self *OxmIdEthSrcMasked) MarshalJSON() ([]byte, error) { |
| 16639 | if self.TypeLen == 0 { |
| 16640 | return []byte("\"\""), nil |
| 16641 | } else { |
| 16642 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16643 | } |
| 16644 | } |
| 16645 | |
| 16646 | type OxmIdEthType struct { |
| 16647 | *OxmId |
| 16648 | } |
| 16649 | |
| 16650 | type IOxmIdEthType interface { |
| 16651 | IOxmId |
| 16652 | } |
| 16653 | |
| 16654 | func (self *OxmIdEthType) Serialize(encoder *goloxi.Encoder) error { |
| 16655 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16656 | return err |
| 16657 | } |
| 16658 | |
| 16659 | return nil |
| 16660 | } |
| 16661 | |
| 16662 | func DecodeOxmIdEthType(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdEthType, error) { |
| 16663 | _oxmidethtype := &OxmIdEthType{OxmId: parent} |
| 16664 | return _oxmidethtype, nil |
| 16665 | } |
| 16666 | |
| 16667 | func NewOxmIdEthType() *OxmIdEthType { |
| 16668 | obj := &OxmIdEthType{ |
| 16669 | OxmId: NewOxmId(1538), |
| 16670 | } |
| 16671 | return obj |
| 16672 | } |
| 16673 | func (self *OxmIdEthType) GetOXMName() string { |
| 16674 | return "eth_type" |
| 16675 | } |
| 16676 | |
| 16677 | func (self *OxmIdEthType) MarshalJSON() ([]byte, error) { |
| 16678 | if self.TypeLen == 0 { |
| 16679 | return []byte("\"\""), nil |
| 16680 | } else { |
| 16681 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16682 | } |
| 16683 | } |
| 16684 | |
| 16685 | type OxmIdIcmpCode struct { |
| 16686 | *OxmId |
| 16687 | } |
| 16688 | |
| 16689 | type IOxmIdIcmpCode interface { |
| 16690 | IOxmId |
| 16691 | } |
| 16692 | |
| 16693 | func (self *OxmIdIcmpCode) Serialize(encoder *goloxi.Encoder) error { |
| 16694 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16695 | return err |
| 16696 | } |
| 16697 | |
| 16698 | return nil |
| 16699 | } |
| 16700 | |
| 16701 | func DecodeOxmIdIcmpCode(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIcmpCode, error) { |
| 16702 | _oxmidicmpcode := &OxmIdIcmpCode{OxmId: parent} |
| 16703 | return _oxmidicmpcode, nil |
| 16704 | } |
| 16705 | |
| 16706 | func NewOxmIdIcmpCode() *OxmIdIcmpCode { |
| 16707 | obj := &OxmIdIcmpCode{ |
| 16708 | OxmId: NewOxmId(7169), |
| 16709 | } |
| 16710 | return obj |
| 16711 | } |
| 16712 | func (self *OxmIdIcmpCode) GetOXMName() string { |
| 16713 | return "icmp_code" |
| 16714 | } |
| 16715 | |
| 16716 | func (self *OxmIdIcmpCode) MarshalJSON() ([]byte, error) { |
| 16717 | if self.TypeLen == 0 { |
| 16718 | return []byte("\"\""), nil |
| 16719 | } else { |
| 16720 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16721 | } |
| 16722 | } |
| 16723 | |
| 16724 | type OxmIdIcmpType struct { |
| 16725 | *OxmId |
| 16726 | } |
| 16727 | |
| 16728 | type IOxmIdIcmpType interface { |
| 16729 | IOxmId |
| 16730 | } |
| 16731 | |
| 16732 | func (self *OxmIdIcmpType) Serialize(encoder *goloxi.Encoder) error { |
| 16733 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16734 | return err |
| 16735 | } |
| 16736 | |
| 16737 | return nil |
| 16738 | } |
| 16739 | |
| 16740 | func DecodeOxmIdIcmpType(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIcmpType, error) { |
| 16741 | _oxmidicmptype := &OxmIdIcmpType{OxmId: parent} |
| 16742 | return _oxmidicmptype, nil |
| 16743 | } |
| 16744 | |
| 16745 | func NewOxmIdIcmpType() *OxmIdIcmpType { |
| 16746 | obj := &OxmIdIcmpType{ |
| 16747 | OxmId: NewOxmId(6657), |
| 16748 | } |
| 16749 | return obj |
| 16750 | } |
| 16751 | func (self *OxmIdIcmpType) GetOXMName() string { |
| 16752 | return "icmp_type" |
| 16753 | } |
| 16754 | |
| 16755 | func (self *OxmIdIcmpType) MarshalJSON() ([]byte, error) { |
| 16756 | if self.TypeLen == 0 { |
| 16757 | return []byte("\"\""), nil |
| 16758 | } else { |
| 16759 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16760 | } |
| 16761 | } |
| 16762 | |
| 16763 | type OxmIdIcmpv6Code struct { |
| 16764 | *OxmId |
| 16765 | } |
| 16766 | |
| 16767 | type IOxmIdIcmpv6Code interface { |
| 16768 | IOxmId |
| 16769 | } |
| 16770 | |
| 16771 | func (self *OxmIdIcmpv6Code) Serialize(encoder *goloxi.Encoder) error { |
| 16772 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16773 | return err |
| 16774 | } |
| 16775 | |
| 16776 | return nil |
| 16777 | } |
| 16778 | |
| 16779 | func DecodeOxmIdIcmpv6Code(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIcmpv6Code, error) { |
| 16780 | _oxmidicmpv6code := &OxmIdIcmpv6Code{OxmId: parent} |
| 16781 | return _oxmidicmpv6code, nil |
| 16782 | } |
| 16783 | |
| 16784 | func NewOxmIdIcmpv6Code() *OxmIdIcmpv6Code { |
| 16785 | obj := &OxmIdIcmpv6Code{ |
| 16786 | OxmId: NewOxmId(76801), |
| 16787 | } |
| 16788 | return obj |
| 16789 | } |
| 16790 | func (self *OxmIdIcmpv6Code) GetOXMName() string { |
| 16791 | return "icmpv6_code" |
| 16792 | } |
| 16793 | |
| 16794 | func (self *OxmIdIcmpv6Code) MarshalJSON() ([]byte, error) { |
| 16795 | if self.TypeLen == 0 { |
| 16796 | return []byte("\"\""), nil |
| 16797 | } else { |
| 16798 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16799 | } |
| 16800 | } |
| 16801 | |
| 16802 | type OxmIdIcmpv6Type struct { |
| 16803 | *OxmId |
| 16804 | } |
| 16805 | |
| 16806 | type IOxmIdIcmpv6Type interface { |
| 16807 | IOxmId |
| 16808 | } |
| 16809 | |
| 16810 | func (self *OxmIdIcmpv6Type) Serialize(encoder *goloxi.Encoder) error { |
| 16811 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16812 | return err |
| 16813 | } |
| 16814 | |
| 16815 | return nil |
| 16816 | } |
| 16817 | |
| 16818 | func DecodeOxmIdIcmpv6Type(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIcmpv6Type, error) { |
| 16819 | _oxmidicmpv6type := &OxmIdIcmpv6Type{OxmId: parent} |
| 16820 | return _oxmidicmpv6type, nil |
| 16821 | } |
| 16822 | |
| 16823 | func NewOxmIdIcmpv6Type() *OxmIdIcmpv6Type { |
| 16824 | obj := &OxmIdIcmpv6Type{ |
| 16825 | OxmId: NewOxmId(76289), |
| 16826 | } |
| 16827 | return obj |
| 16828 | } |
| 16829 | func (self *OxmIdIcmpv6Type) GetOXMName() string { |
| 16830 | return "icmpv6_type" |
| 16831 | } |
| 16832 | |
| 16833 | func (self *OxmIdIcmpv6Type) MarshalJSON() ([]byte, error) { |
| 16834 | if self.TypeLen == 0 { |
| 16835 | return []byte("\"\""), nil |
| 16836 | } else { |
| 16837 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16838 | } |
| 16839 | } |
| 16840 | |
| 16841 | type OxmIdInPort struct { |
| 16842 | *OxmId |
| 16843 | } |
| 16844 | |
| 16845 | type IOxmIdInPort interface { |
| 16846 | IOxmId |
| 16847 | } |
| 16848 | |
| 16849 | func (self *OxmIdInPort) Serialize(encoder *goloxi.Encoder) error { |
| 16850 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16851 | return err |
| 16852 | } |
| 16853 | |
| 16854 | return nil |
| 16855 | } |
| 16856 | |
| 16857 | func DecodeOxmIdInPort(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdInPort, error) { |
| 16858 | _oxmidinport := &OxmIdInPort{OxmId: parent} |
| 16859 | return _oxmidinport, nil |
| 16860 | } |
| 16861 | |
| 16862 | func NewOxmIdInPort() *OxmIdInPort { |
| 16863 | obj := &OxmIdInPort{ |
| 16864 | OxmId: NewOxmId(2), |
| 16865 | } |
| 16866 | return obj |
| 16867 | } |
| 16868 | func (self *OxmIdInPort) GetOXMName() string { |
| 16869 | return "in_port" |
| 16870 | } |
| 16871 | |
| 16872 | func (self *OxmIdInPort) MarshalJSON() ([]byte, error) { |
| 16873 | if self.TypeLen == 0 { |
| 16874 | return []byte("\"\""), nil |
| 16875 | } else { |
| 16876 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16877 | } |
| 16878 | } |
| 16879 | |
| 16880 | type OxmIdIpDst struct { |
| 16881 | *OxmId |
| 16882 | } |
| 16883 | |
| 16884 | type IOxmIdIpDst interface { |
| 16885 | IOxmId |
| 16886 | } |
| 16887 | |
| 16888 | func (self *OxmIdIpDst) Serialize(encoder *goloxi.Encoder) error { |
| 16889 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16890 | return err |
| 16891 | } |
| 16892 | |
| 16893 | return nil |
| 16894 | } |
| 16895 | |
| 16896 | func DecodeOxmIdIpDst(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIpDst, error) { |
| 16897 | _oxmidipdst := &OxmIdIpDst{OxmId: parent} |
| 16898 | return _oxmidipdst, nil |
| 16899 | } |
| 16900 | |
| 16901 | func NewOxmIdIpDst() *OxmIdIpDst { |
| 16902 | obj := &OxmIdIpDst{ |
| 16903 | OxmId: NewOxmId(4100), |
| 16904 | } |
| 16905 | return obj |
| 16906 | } |
| 16907 | func (self *OxmIdIpDst) GetOXMName() string { |
| 16908 | return "ip_dst" |
| 16909 | } |
| 16910 | |
| 16911 | func (self *OxmIdIpDst) MarshalJSON() ([]byte, error) { |
| 16912 | if self.TypeLen == 0 { |
| 16913 | return []byte("\"\""), nil |
| 16914 | } else { |
| 16915 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16916 | } |
| 16917 | } |
| 16918 | |
| 16919 | type OxmIdIpDstMasked struct { |
| 16920 | *OxmId |
| 16921 | } |
| 16922 | |
| 16923 | type IOxmIdIpDstMasked interface { |
| 16924 | IOxmId |
| 16925 | } |
| 16926 | |
| 16927 | func (self *OxmIdIpDstMasked) Serialize(encoder *goloxi.Encoder) error { |
| 16928 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16929 | return err |
| 16930 | } |
| 16931 | |
| 16932 | return nil |
| 16933 | } |
| 16934 | |
| 16935 | func DecodeOxmIdIpDstMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIpDstMasked, error) { |
| 16936 | _oxmidipdstmasked := &OxmIdIpDstMasked{OxmId: parent} |
| 16937 | return _oxmidipdstmasked, nil |
| 16938 | } |
| 16939 | |
| 16940 | func NewOxmIdIpDstMasked() *OxmIdIpDstMasked { |
| 16941 | obj := &OxmIdIpDstMasked{ |
| 16942 | OxmId: NewOxmId(4360), |
| 16943 | } |
| 16944 | return obj |
| 16945 | } |
| 16946 | func (self *OxmIdIpDstMasked) GetOXMName() string { |
| 16947 | return "ip_dst_masked" |
| 16948 | } |
| 16949 | |
| 16950 | func (self *OxmIdIpDstMasked) MarshalJSON() ([]byte, error) { |
| 16951 | if self.TypeLen == 0 { |
| 16952 | return []byte("\"\""), nil |
| 16953 | } else { |
| 16954 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16955 | } |
| 16956 | } |
| 16957 | |
| 16958 | type OxmIdIpFrag struct { |
| 16959 | *OxmId |
| 16960 | } |
| 16961 | |
| 16962 | type IOxmIdIpFrag interface { |
| 16963 | IOxmId |
| 16964 | } |
| 16965 | |
| 16966 | func (self *OxmIdIpFrag) Serialize(encoder *goloxi.Encoder) error { |
| 16967 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 16968 | return err |
| 16969 | } |
| 16970 | |
| 16971 | return nil |
| 16972 | } |
| 16973 | |
| 16974 | func DecodeOxmIdIpFrag(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIpFrag, error) { |
| 16975 | _oxmidipfrag := &OxmIdIpFrag{OxmId: parent} |
| 16976 | return _oxmidipfrag, nil |
| 16977 | } |
| 16978 | |
| 16979 | func NewOxmIdIpFrag() *OxmIdIpFrag { |
| 16980 | obj := &OxmIdIpFrag{ |
| 16981 | OxmId: NewOxmId(78849), |
| 16982 | } |
| 16983 | return obj |
| 16984 | } |
| 16985 | func (self *OxmIdIpFrag) GetOXMName() string { |
| 16986 | return "ip_frag" |
| 16987 | } |
| 16988 | |
| 16989 | func (self *OxmIdIpFrag) MarshalJSON() ([]byte, error) { |
| 16990 | if self.TypeLen == 0 { |
| 16991 | return []byte("\"\""), nil |
| 16992 | } else { |
| 16993 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 16994 | } |
| 16995 | } |
| 16996 | |
| 16997 | type OxmIdIpFragMasked struct { |
| 16998 | *OxmId |
| 16999 | } |
| 17000 | |
| 17001 | type IOxmIdIpFragMasked interface { |
| 17002 | IOxmId |
| 17003 | } |
| 17004 | |
| 17005 | func (self *OxmIdIpFragMasked) Serialize(encoder *goloxi.Encoder) error { |
| 17006 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17007 | return err |
| 17008 | } |
| 17009 | |
| 17010 | return nil |
| 17011 | } |
| 17012 | |
| 17013 | func DecodeOxmIdIpFragMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIpFragMasked, error) { |
| 17014 | _oxmidipfragmasked := &OxmIdIpFragMasked{OxmId: parent} |
| 17015 | return _oxmidipfragmasked, nil |
| 17016 | } |
| 17017 | |
| 17018 | func NewOxmIdIpFragMasked() *OxmIdIpFragMasked { |
| 17019 | obj := &OxmIdIpFragMasked{ |
| 17020 | OxmId: NewOxmId(79106), |
| 17021 | } |
| 17022 | return obj |
| 17023 | } |
| 17024 | func (self *OxmIdIpFragMasked) GetOXMName() string { |
| 17025 | return "ip_frag_masked" |
| 17026 | } |
| 17027 | |
| 17028 | func (self *OxmIdIpFragMasked) MarshalJSON() ([]byte, error) { |
| 17029 | if self.TypeLen == 0 { |
| 17030 | return []byte("\"\""), nil |
| 17031 | } else { |
| 17032 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17033 | } |
| 17034 | } |
| 17035 | |
| 17036 | type OxmIdIpSrc struct { |
| 17037 | *OxmId |
| 17038 | } |
| 17039 | |
| 17040 | type IOxmIdIpSrc interface { |
| 17041 | IOxmId |
| 17042 | } |
| 17043 | |
| 17044 | func (self *OxmIdIpSrc) Serialize(encoder *goloxi.Encoder) error { |
| 17045 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17046 | return err |
| 17047 | } |
| 17048 | |
| 17049 | return nil |
| 17050 | } |
| 17051 | |
| 17052 | func DecodeOxmIdIpSrc(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIpSrc, error) { |
| 17053 | _oxmidipsrc := &OxmIdIpSrc{OxmId: parent} |
| 17054 | return _oxmidipsrc, nil |
| 17055 | } |
| 17056 | |
| 17057 | func NewOxmIdIpSrc() *OxmIdIpSrc { |
| 17058 | obj := &OxmIdIpSrc{ |
| 17059 | OxmId: NewOxmId(3588), |
| 17060 | } |
| 17061 | return obj |
| 17062 | } |
| 17063 | func (self *OxmIdIpSrc) GetOXMName() string { |
| 17064 | return "ip_src" |
| 17065 | } |
| 17066 | |
| 17067 | func (self *OxmIdIpSrc) MarshalJSON() ([]byte, error) { |
| 17068 | if self.TypeLen == 0 { |
| 17069 | return []byte("\"\""), nil |
| 17070 | } else { |
| 17071 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17072 | } |
| 17073 | } |
| 17074 | |
| 17075 | type OxmIdIpSrcMasked struct { |
| 17076 | *OxmId |
| 17077 | } |
| 17078 | |
| 17079 | type IOxmIdIpSrcMasked interface { |
| 17080 | IOxmId |
| 17081 | } |
| 17082 | |
| 17083 | func (self *OxmIdIpSrcMasked) Serialize(encoder *goloxi.Encoder) error { |
| 17084 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17085 | return err |
| 17086 | } |
| 17087 | |
| 17088 | return nil |
| 17089 | } |
| 17090 | |
| 17091 | func DecodeOxmIdIpSrcMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIpSrcMasked, error) { |
| 17092 | _oxmidipsrcmasked := &OxmIdIpSrcMasked{OxmId: parent} |
| 17093 | return _oxmidipsrcmasked, nil |
| 17094 | } |
| 17095 | |
| 17096 | func NewOxmIdIpSrcMasked() *OxmIdIpSrcMasked { |
| 17097 | obj := &OxmIdIpSrcMasked{ |
| 17098 | OxmId: NewOxmId(3848), |
| 17099 | } |
| 17100 | return obj |
| 17101 | } |
| 17102 | func (self *OxmIdIpSrcMasked) GetOXMName() string { |
| 17103 | return "ip_src_masked" |
| 17104 | } |
| 17105 | |
| 17106 | func (self *OxmIdIpSrcMasked) MarshalJSON() ([]byte, error) { |
| 17107 | if self.TypeLen == 0 { |
| 17108 | return []byte("\"\""), nil |
| 17109 | } else { |
| 17110 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17111 | } |
| 17112 | } |
| 17113 | |
| 17114 | type OxmIdIpv6Dst struct { |
| 17115 | *OxmId |
| 17116 | } |
| 17117 | |
| 17118 | type IOxmIdIpv6Dst interface { |
| 17119 | IOxmId |
| 17120 | } |
| 17121 | |
| 17122 | func (self *OxmIdIpv6Dst) Serialize(encoder *goloxi.Encoder) error { |
| 17123 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17124 | return err |
| 17125 | } |
| 17126 | |
| 17127 | return nil |
| 17128 | } |
| 17129 | |
| 17130 | func DecodeOxmIdIpv6Dst(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIpv6Dst, error) { |
| 17131 | _oxmidipv6dst := &OxmIdIpv6Dst{OxmId: parent} |
| 17132 | return _oxmidipv6dst, nil |
| 17133 | } |
| 17134 | |
| 17135 | func NewOxmIdIpv6Dst() *OxmIdIpv6Dst { |
| 17136 | obj := &OxmIdIpv6Dst{ |
| 17137 | OxmId: NewOxmId(75792), |
| 17138 | } |
| 17139 | return obj |
| 17140 | } |
| 17141 | func (self *OxmIdIpv6Dst) GetOXMName() string { |
| 17142 | return "ipv6_dst" |
| 17143 | } |
| 17144 | |
| 17145 | func (self *OxmIdIpv6Dst) MarshalJSON() ([]byte, error) { |
| 17146 | if self.TypeLen == 0 { |
| 17147 | return []byte("\"\""), nil |
| 17148 | } else { |
| 17149 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17150 | } |
| 17151 | } |
| 17152 | |
| 17153 | type OxmIdIpv6DstMasked struct { |
| 17154 | *OxmId |
| 17155 | } |
| 17156 | |
| 17157 | type IOxmIdIpv6DstMasked interface { |
| 17158 | IOxmId |
| 17159 | } |
| 17160 | |
| 17161 | func (self *OxmIdIpv6DstMasked) Serialize(encoder *goloxi.Encoder) error { |
| 17162 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17163 | return err |
| 17164 | } |
| 17165 | |
| 17166 | return nil |
| 17167 | } |
| 17168 | |
| 17169 | func DecodeOxmIdIpv6DstMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIpv6DstMasked, error) { |
| 17170 | _oxmidipv6dstmasked := &OxmIdIpv6DstMasked{OxmId: parent} |
| 17171 | return _oxmidipv6dstmasked, nil |
| 17172 | } |
| 17173 | |
| 17174 | func NewOxmIdIpv6DstMasked() *OxmIdIpv6DstMasked { |
| 17175 | obj := &OxmIdIpv6DstMasked{ |
| 17176 | OxmId: NewOxmId(76064), |
| 17177 | } |
| 17178 | return obj |
| 17179 | } |
| 17180 | func (self *OxmIdIpv6DstMasked) GetOXMName() string { |
| 17181 | return "ipv6_dst_masked" |
| 17182 | } |
| 17183 | |
| 17184 | func (self *OxmIdIpv6DstMasked) MarshalJSON() ([]byte, error) { |
| 17185 | if self.TypeLen == 0 { |
| 17186 | return []byte("\"\""), nil |
| 17187 | } else { |
| 17188 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17189 | } |
| 17190 | } |
| 17191 | |
| 17192 | type OxmIdIpv6Label struct { |
| 17193 | *OxmId |
| 17194 | } |
| 17195 | |
| 17196 | type IOxmIdIpv6Label interface { |
| 17197 | IOxmId |
| 17198 | } |
| 17199 | |
| 17200 | func (self *OxmIdIpv6Label) Serialize(encoder *goloxi.Encoder) error { |
| 17201 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17202 | return err |
| 17203 | } |
| 17204 | |
| 17205 | return nil |
| 17206 | } |
| 17207 | |
| 17208 | func DecodeOxmIdIpv6Label(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIpv6Label, error) { |
| 17209 | _oxmidipv6label := &OxmIdIpv6Label{OxmId: parent} |
| 17210 | return _oxmidipv6label, nil |
| 17211 | } |
| 17212 | |
| 17213 | func NewOxmIdIpv6Label() *OxmIdIpv6Label { |
| 17214 | obj := &OxmIdIpv6Label{ |
| 17215 | OxmId: NewOxmId(79364), |
| 17216 | } |
| 17217 | return obj |
| 17218 | } |
| 17219 | func (self *OxmIdIpv6Label) GetOXMName() string { |
| 17220 | return "ipv6_label" |
| 17221 | } |
| 17222 | |
| 17223 | func (self *OxmIdIpv6Label) MarshalJSON() ([]byte, error) { |
| 17224 | if self.TypeLen == 0 { |
| 17225 | return []byte("\"\""), nil |
| 17226 | } else { |
| 17227 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17228 | } |
| 17229 | } |
| 17230 | |
| 17231 | type OxmIdIpv6LabelMasked struct { |
| 17232 | *OxmId |
| 17233 | } |
| 17234 | |
| 17235 | type IOxmIdIpv6LabelMasked interface { |
| 17236 | IOxmId |
| 17237 | } |
| 17238 | |
| 17239 | func (self *OxmIdIpv6LabelMasked) Serialize(encoder *goloxi.Encoder) error { |
| 17240 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17241 | return err |
| 17242 | } |
| 17243 | |
| 17244 | return nil |
| 17245 | } |
| 17246 | |
| 17247 | func DecodeOxmIdIpv6LabelMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIpv6LabelMasked, error) { |
| 17248 | _oxmidipv6labelmasked := &OxmIdIpv6LabelMasked{OxmId: parent} |
| 17249 | return _oxmidipv6labelmasked, nil |
| 17250 | } |
| 17251 | |
| 17252 | func NewOxmIdIpv6LabelMasked() *OxmIdIpv6LabelMasked { |
| 17253 | obj := &OxmIdIpv6LabelMasked{ |
| 17254 | OxmId: NewOxmId(79624), |
| 17255 | } |
| 17256 | return obj |
| 17257 | } |
| 17258 | func (self *OxmIdIpv6LabelMasked) GetOXMName() string { |
| 17259 | return "ipv6_label_masked" |
| 17260 | } |
| 17261 | |
| 17262 | func (self *OxmIdIpv6LabelMasked) MarshalJSON() ([]byte, error) { |
| 17263 | if self.TypeLen == 0 { |
| 17264 | return []byte("\"\""), nil |
| 17265 | } else { |
| 17266 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17267 | } |
| 17268 | } |
| 17269 | |
| 17270 | type OxmIdIpv6Src struct { |
| 17271 | *OxmId |
| 17272 | } |
| 17273 | |
| 17274 | type IOxmIdIpv6Src interface { |
| 17275 | IOxmId |
| 17276 | } |
| 17277 | |
| 17278 | func (self *OxmIdIpv6Src) Serialize(encoder *goloxi.Encoder) error { |
| 17279 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17280 | return err |
| 17281 | } |
| 17282 | |
| 17283 | return nil |
| 17284 | } |
| 17285 | |
| 17286 | func DecodeOxmIdIpv6Src(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIpv6Src, error) { |
| 17287 | _oxmidipv6src := &OxmIdIpv6Src{OxmId: parent} |
| 17288 | return _oxmidipv6src, nil |
| 17289 | } |
| 17290 | |
| 17291 | func NewOxmIdIpv6Src() *OxmIdIpv6Src { |
| 17292 | obj := &OxmIdIpv6Src{ |
| 17293 | OxmId: NewOxmId(75280), |
| 17294 | } |
| 17295 | return obj |
| 17296 | } |
| 17297 | func (self *OxmIdIpv6Src) GetOXMName() string { |
| 17298 | return "ipv6_src" |
| 17299 | } |
| 17300 | |
| 17301 | func (self *OxmIdIpv6Src) MarshalJSON() ([]byte, error) { |
| 17302 | if self.TypeLen == 0 { |
| 17303 | return []byte("\"\""), nil |
| 17304 | } else { |
| 17305 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17306 | } |
| 17307 | } |
| 17308 | |
| 17309 | type OxmIdIpv6SrcMasked struct { |
| 17310 | *OxmId |
| 17311 | } |
| 17312 | |
| 17313 | type IOxmIdIpv6SrcMasked interface { |
| 17314 | IOxmId |
| 17315 | } |
| 17316 | |
| 17317 | func (self *OxmIdIpv6SrcMasked) Serialize(encoder *goloxi.Encoder) error { |
| 17318 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17319 | return err |
| 17320 | } |
| 17321 | |
| 17322 | return nil |
| 17323 | } |
| 17324 | |
| 17325 | func DecodeOxmIdIpv6SrcMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdIpv6SrcMasked, error) { |
| 17326 | _oxmidipv6srcmasked := &OxmIdIpv6SrcMasked{OxmId: parent} |
| 17327 | return _oxmidipv6srcmasked, nil |
| 17328 | } |
| 17329 | |
| 17330 | func NewOxmIdIpv6SrcMasked() *OxmIdIpv6SrcMasked { |
| 17331 | obj := &OxmIdIpv6SrcMasked{ |
| 17332 | OxmId: NewOxmId(75552), |
| 17333 | } |
| 17334 | return obj |
| 17335 | } |
| 17336 | func (self *OxmIdIpv6SrcMasked) GetOXMName() string { |
| 17337 | return "ipv6_src_masked" |
| 17338 | } |
| 17339 | |
| 17340 | func (self *OxmIdIpv6SrcMasked) MarshalJSON() ([]byte, error) { |
| 17341 | if self.TypeLen == 0 { |
| 17342 | return []byte("\"\""), nil |
| 17343 | } else { |
| 17344 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17345 | } |
| 17346 | } |
| 17347 | |
| 17348 | type OxmIdMplsTtl struct { |
| 17349 | *OxmId |
| 17350 | } |
| 17351 | |
| 17352 | type IOxmIdMplsTtl interface { |
| 17353 | IOxmId |
| 17354 | } |
| 17355 | |
| 17356 | func (self *OxmIdMplsTtl) Serialize(encoder *goloxi.Encoder) error { |
| 17357 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17358 | return err |
| 17359 | } |
| 17360 | |
| 17361 | return nil |
| 17362 | } |
| 17363 | |
| 17364 | func DecodeOxmIdMplsTtl(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdMplsTtl, error) { |
| 17365 | _oxmidmplsttl := &OxmIdMplsTtl{OxmId: parent} |
| 17366 | return _oxmidmplsttl, nil |
| 17367 | } |
| 17368 | |
| 17369 | func NewOxmIdMplsTtl() *OxmIdMplsTtl { |
| 17370 | obj := &OxmIdMplsTtl{ |
| 17371 | OxmId: NewOxmId(80897), |
| 17372 | } |
| 17373 | return obj |
| 17374 | } |
| 17375 | func (self *OxmIdMplsTtl) GetOXMName() string { |
| 17376 | return "mpls_ttl" |
| 17377 | } |
| 17378 | |
| 17379 | func (self *OxmIdMplsTtl) MarshalJSON() ([]byte, error) { |
| 17380 | if self.TypeLen == 0 { |
| 17381 | return []byte("\"\""), nil |
| 17382 | } else { |
| 17383 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17384 | } |
| 17385 | } |
| 17386 | |
| 17387 | type OxmIdNdSll struct { |
| 17388 | *OxmId |
| 17389 | } |
| 17390 | |
| 17391 | type IOxmIdNdSll interface { |
| 17392 | IOxmId |
| 17393 | } |
| 17394 | |
| 17395 | func (self *OxmIdNdSll) Serialize(encoder *goloxi.Encoder) error { |
| 17396 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17397 | return err |
| 17398 | } |
| 17399 | |
| 17400 | return nil |
| 17401 | } |
| 17402 | |
| 17403 | func DecodeOxmIdNdSll(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdNdSll, error) { |
| 17404 | _oxmidndsll := &OxmIdNdSll{OxmId: parent} |
| 17405 | return _oxmidndsll, nil |
| 17406 | } |
| 17407 | |
| 17408 | func NewOxmIdNdSll() *OxmIdNdSll { |
| 17409 | obj := &OxmIdNdSll{ |
| 17410 | OxmId: NewOxmId(77830), |
| 17411 | } |
| 17412 | return obj |
| 17413 | } |
| 17414 | func (self *OxmIdNdSll) GetOXMName() string { |
| 17415 | return "nd_sll" |
| 17416 | } |
| 17417 | |
| 17418 | func (self *OxmIdNdSll) MarshalJSON() ([]byte, error) { |
| 17419 | if self.TypeLen == 0 { |
| 17420 | return []byte("\"\""), nil |
| 17421 | } else { |
| 17422 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17423 | } |
| 17424 | } |
| 17425 | |
| 17426 | type OxmIdNdSllMasked struct { |
| 17427 | *OxmId |
| 17428 | } |
| 17429 | |
| 17430 | type IOxmIdNdSllMasked interface { |
| 17431 | IOxmId |
| 17432 | } |
| 17433 | |
| 17434 | func (self *OxmIdNdSllMasked) Serialize(encoder *goloxi.Encoder) error { |
| 17435 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17436 | return err |
| 17437 | } |
| 17438 | |
| 17439 | return nil |
| 17440 | } |
| 17441 | |
| 17442 | func DecodeOxmIdNdSllMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdNdSllMasked, error) { |
| 17443 | _oxmidndsllmasked := &OxmIdNdSllMasked{OxmId: parent} |
| 17444 | return _oxmidndsllmasked, nil |
| 17445 | } |
| 17446 | |
| 17447 | func NewOxmIdNdSllMasked() *OxmIdNdSllMasked { |
| 17448 | obj := &OxmIdNdSllMasked{ |
| 17449 | OxmId: NewOxmId(78091), |
| 17450 | } |
| 17451 | return obj |
| 17452 | } |
| 17453 | func (self *OxmIdNdSllMasked) GetOXMName() string { |
| 17454 | return "nd_sll_masked" |
| 17455 | } |
| 17456 | |
| 17457 | func (self *OxmIdNdSllMasked) MarshalJSON() ([]byte, error) { |
| 17458 | if self.TypeLen == 0 { |
| 17459 | return []byte("\"\""), nil |
| 17460 | } else { |
| 17461 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17462 | } |
| 17463 | } |
| 17464 | |
| 17465 | type OxmIdNdTarget struct { |
| 17466 | *OxmId |
| 17467 | } |
| 17468 | |
| 17469 | type IOxmIdNdTarget interface { |
| 17470 | IOxmId |
| 17471 | } |
| 17472 | |
| 17473 | func (self *OxmIdNdTarget) Serialize(encoder *goloxi.Encoder) error { |
| 17474 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17475 | return err |
| 17476 | } |
| 17477 | |
| 17478 | return nil |
| 17479 | } |
| 17480 | |
| 17481 | func DecodeOxmIdNdTarget(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdNdTarget, error) { |
| 17482 | _oxmidndtarget := &OxmIdNdTarget{OxmId: parent} |
| 17483 | return _oxmidndtarget, nil |
| 17484 | } |
| 17485 | |
| 17486 | func NewOxmIdNdTarget() *OxmIdNdTarget { |
| 17487 | obj := &OxmIdNdTarget{ |
| 17488 | OxmId: NewOxmId(77328), |
| 17489 | } |
| 17490 | return obj |
| 17491 | } |
| 17492 | func (self *OxmIdNdTarget) GetOXMName() string { |
| 17493 | return "nd_target" |
| 17494 | } |
| 17495 | |
| 17496 | func (self *OxmIdNdTarget) MarshalJSON() ([]byte, error) { |
| 17497 | if self.TypeLen == 0 { |
| 17498 | return []byte("\"\""), nil |
| 17499 | } else { |
| 17500 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17501 | } |
| 17502 | } |
| 17503 | |
| 17504 | type OxmIdNdTargetMasked struct { |
| 17505 | *OxmId |
| 17506 | } |
| 17507 | |
| 17508 | type IOxmIdNdTargetMasked interface { |
| 17509 | IOxmId |
| 17510 | } |
| 17511 | |
| 17512 | func (self *OxmIdNdTargetMasked) Serialize(encoder *goloxi.Encoder) error { |
| 17513 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17514 | return err |
| 17515 | } |
| 17516 | |
| 17517 | return nil |
| 17518 | } |
| 17519 | |
| 17520 | func DecodeOxmIdNdTargetMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdNdTargetMasked, error) { |
| 17521 | _oxmidndtargetmasked := &OxmIdNdTargetMasked{OxmId: parent} |
| 17522 | return _oxmidndtargetmasked, nil |
| 17523 | } |
| 17524 | |
| 17525 | func NewOxmIdNdTargetMasked() *OxmIdNdTargetMasked { |
| 17526 | obj := &OxmIdNdTargetMasked{ |
| 17527 | OxmId: NewOxmId(77600), |
| 17528 | } |
| 17529 | return obj |
| 17530 | } |
| 17531 | func (self *OxmIdNdTargetMasked) GetOXMName() string { |
| 17532 | return "nd_target_masked" |
| 17533 | } |
| 17534 | |
| 17535 | func (self *OxmIdNdTargetMasked) MarshalJSON() ([]byte, error) { |
| 17536 | if self.TypeLen == 0 { |
| 17537 | return []byte("\"\""), nil |
| 17538 | } else { |
| 17539 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17540 | } |
| 17541 | } |
| 17542 | |
| 17543 | type OxmIdNdTll struct { |
| 17544 | *OxmId |
| 17545 | } |
| 17546 | |
| 17547 | type IOxmIdNdTll interface { |
| 17548 | IOxmId |
| 17549 | } |
| 17550 | |
| 17551 | func (self *OxmIdNdTll) Serialize(encoder *goloxi.Encoder) error { |
| 17552 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17553 | return err |
| 17554 | } |
| 17555 | |
| 17556 | return nil |
| 17557 | } |
| 17558 | |
| 17559 | func DecodeOxmIdNdTll(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdNdTll, error) { |
| 17560 | _oxmidndtll := &OxmIdNdTll{OxmId: parent} |
| 17561 | return _oxmidndtll, nil |
| 17562 | } |
| 17563 | |
| 17564 | func NewOxmIdNdTll() *OxmIdNdTll { |
| 17565 | obj := &OxmIdNdTll{ |
| 17566 | OxmId: NewOxmId(78342), |
| 17567 | } |
| 17568 | return obj |
| 17569 | } |
| 17570 | func (self *OxmIdNdTll) GetOXMName() string { |
| 17571 | return "nd_tll" |
| 17572 | } |
| 17573 | |
| 17574 | func (self *OxmIdNdTll) MarshalJSON() ([]byte, error) { |
| 17575 | if self.TypeLen == 0 { |
| 17576 | return []byte("\"\""), nil |
| 17577 | } else { |
| 17578 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17579 | } |
| 17580 | } |
| 17581 | |
| 17582 | type OxmIdNdTllMasked struct { |
| 17583 | *OxmId |
| 17584 | } |
| 17585 | |
| 17586 | type IOxmIdNdTllMasked interface { |
| 17587 | IOxmId |
| 17588 | } |
| 17589 | |
| 17590 | func (self *OxmIdNdTllMasked) Serialize(encoder *goloxi.Encoder) error { |
| 17591 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17592 | return err |
| 17593 | } |
| 17594 | |
| 17595 | return nil |
| 17596 | } |
| 17597 | |
| 17598 | func DecodeOxmIdNdTllMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdNdTllMasked, error) { |
| 17599 | _oxmidndtllmasked := &OxmIdNdTllMasked{OxmId: parent} |
| 17600 | return _oxmidndtllmasked, nil |
| 17601 | } |
| 17602 | |
| 17603 | func NewOxmIdNdTllMasked() *OxmIdNdTllMasked { |
| 17604 | obj := &OxmIdNdTllMasked{ |
| 17605 | OxmId: NewOxmId(78603), |
| 17606 | } |
| 17607 | return obj |
| 17608 | } |
| 17609 | func (self *OxmIdNdTllMasked) GetOXMName() string { |
| 17610 | return "nd_tll_masked" |
| 17611 | } |
| 17612 | |
| 17613 | func (self *OxmIdNdTllMasked) MarshalJSON() ([]byte, error) { |
| 17614 | if self.TypeLen == 0 { |
| 17615 | return []byte("\"\""), nil |
| 17616 | } else { |
| 17617 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17618 | } |
| 17619 | } |
| 17620 | |
| 17621 | type OxmIdNwEcn struct { |
| 17622 | *OxmId |
| 17623 | } |
| 17624 | |
| 17625 | type IOxmIdNwEcn interface { |
| 17626 | IOxmId |
| 17627 | } |
| 17628 | |
| 17629 | func (self *OxmIdNwEcn) Serialize(encoder *goloxi.Encoder) error { |
| 17630 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17631 | return err |
| 17632 | } |
| 17633 | |
| 17634 | return nil |
| 17635 | } |
| 17636 | |
| 17637 | func DecodeOxmIdNwEcn(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdNwEcn, error) { |
| 17638 | _oxmidnwecn := &OxmIdNwEcn{OxmId: parent} |
| 17639 | return _oxmidnwecn, nil |
| 17640 | } |
| 17641 | |
| 17642 | func NewOxmIdNwEcn() *OxmIdNwEcn { |
| 17643 | obj := &OxmIdNwEcn{ |
| 17644 | OxmId: NewOxmId(79873), |
| 17645 | } |
| 17646 | return obj |
| 17647 | } |
| 17648 | func (self *OxmIdNwEcn) GetOXMName() string { |
| 17649 | return "nw_ecn" |
| 17650 | } |
| 17651 | |
| 17652 | func (self *OxmIdNwEcn) MarshalJSON() ([]byte, error) { |
| 17653 | if self.TypeLen == 0 { |
| 17654 | return []byte("\"\""), nil |
| 17655 | } else { |
| 17656 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17657 | } |
| 17658 | } |
| 17659 | |
| 17660 | type OxmIdNwProto struct { |
| 17661 | *OxmId |
| 17662 | } |
| 17663 | |
| 17664 | type IOxmIdNwProto interface { |
| 17665 | IOxmId |
| 17666 | } |
| 17667 | |
| 17668 | func (self *OxmIdNwProto) Serialize(encoder *goloxi.Encoder) error { |
| 17669 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17670 | return err |
| 17671 | } |
| 17672 | |
| 17673 | return nil |
| 17674 | } |
| 17675 | |
| 17676 | func DecodeOxmIdNwProto(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdNwProto, error) { |
| 17677 | _oxmidnwproto := &OxmIdNwProto{OxmId: parent} |
| 17678 | return _oxmidnwproto, nil |
| 17679 | } |
| 17680 | |
| 17681 | func NewOxmIdNwProto() *OxmIdNwProto { |
| 17682 | obj := &OxmIdNwProto{ |
| 17683 | OxmId: NewOxmId(3073), |
| 17684 | } |
| 17685 | return obj |
| 17686 | } |
| 17687 | func (self *OxmIdNwProto) GetOXMName() string { |
| 17688 | return "nw_proto" |
| 17689 | } |
| 17690 | |
| 17691 | func (self *OxmIdNwProto) MarshalJSON() ([]byte, error) { |
| 17692 | if self.TypeLen == 0 { |
| 17693 | return []byte("\"\""), nil |
| 17694 | } else { |
| 17695 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17696 | } |
| 17697 | } |
| 17698 | |
| 17699 | type OxmIdNwTos struct { |
| 17700 | *OxmId |
| 17701 | } |
| 17702 | |
| 17703 | type IOxmIdNwTos interface { |
| 17704 | IOxmId |
| 17705 | } |
| 17706 | |
| 17707 | func (self *OxmIdNwTos) Serialize(encoder *goloxi.Encoder) error { |
| 17708 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17709 | return err |
| 17710 | } |
| 17711 | |
| 17712 | return nil |
| 17713 | } |
| 17714 | |
| 17715 | func DecodeOxmIdNwTos(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdNwTos, error) { |
| 17716 | _oxmidnwtos := &OxmIdNwTos{OxmId: parent} |
| 17717 | return _oxmidnwtos, nil |
| 17718 | } |
| 17719 | |
| 17720 | func NewOxmIdNwTos() *OxmIdNwTos { |
| 17721 | obj := &OxmIdNwTos{ |
| 17722 | OxmId: NewOxmId(2561), |
| 17723 | } |
| 17724 | return obj |
| 17725 | } |
| 17726 | func (self *OxmIdNwTos) GetOXMName() string { |
| 17727 | return "nw_tos" |
| 17728 | } |
| 17729 | |
| 17730 | func (self *OxmIdNwTos) MarshalJSON() ([]byte, error) { |
| 17731 | if self.TypeLen == 0 { |
| 17732 | return []byte("\"\""), nil |
| 17733 | } else { |
| 17734 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17735 | } |
| 17736 | } |
| 17737 | |
| 17738 | type OxmIdNwTtl struct { |
| 17739 | *OxmId |
| 17740 | } |
| 17741 | |
| 17742 | type IOxmIdNwTtl interface { |
| 17743 | IOxmId |
| 17744 | } |
| 17745 | |
| 17746 | func (self *OxmIdNwTtl) Serialize(encoder *goloxi.Encoder) error { |
| 17747 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17748 | return err |
| 17749 | } |
| 17750 | |
| 17751 | return nil |
| 17752 | } |
| 17753 | |
| 17754 | func DecodeOxmIdNwTtl(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdNwTtl, error) { |
| 17755 | _oxmidnwttl := &OxmIdNwTtl{OxmId: parent} |
| 17756 | return _oxmidnwttl, nil |
| 17757 | } |
| 17758 | |
| 17759 | func NewOxmIdNwTtl() *OxmIdNwTtl { |
| 17760 | obj := &OxmIdNwTtl{ |
| 17761 | OxmId: NewOxmId(80385), |
| 17762 | } |
| 17763 | return obj |
| 17764 | } |
| 17765 | func (self *OxmIdNwTtl) GetOXMName() string { |
| 17766 | return "nw_ttl" |
| 17767 | } |
| 17768 | |
| 17769 | func (self *OxmIdNwTtl) MarshalJSON() ([]byte, error) { |
| 17770 | if self.TypeLen == 0 { |
| 17771 | return []byte("\"\""), nil |
| 17772 | } else { |
| 17773 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17774 | } |
| 17775 | } |
| 17776 | |
| 17777 | type OxmIdPktMark struct { |
| 17778 | *OxmId |
| 17779 | } |
| 17780 | |
| 17781 | type IOxmIdPktMark interface { |
| 17782 | IOxmId |
| 17783 | } |
| 17784 | |
| 17785 | func (self *OxmIdPktMark) Serialize(encoder *goloxi.Encoder) error { |
| 17786 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17787 | return err |
| 17788 | } |
| 17789 | |
| 17790 | return nil |
| 17791 | } |
| 17792 | |
| 17793 | func DecodeOxmIdPktMark(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdPktMark, error) { |
| 17794 | _oxmidpktmark := &OxmIdPktMark{OxmId: parent} |
| 17795 | return _oxmidpktmark, nil |
| 17796 | } |
| 17797 | |
| 17798 | func NewOxmIdPktMark() *OxmIdPktMark { |
| 17799 | obj := &OxmIdPktMark{ |
| 17800 | OxmId: NewOxmId(82436), |
| 17801 | } |
| 17802 | return obj |
| 17803 | } |
| 17804 | func (self *OxmIdPktMark) GetOXMName() string { |
| 17805 | return "pkt_mark" |
| 17806 | } |
| 17807 | |
| 17808 | func (self *OxmIdPktMark) MarshalJSON() ([]byte, error) { |
| 17809 | if self.TypeLen == 0 { |
| 17810 | return []byte("\"\""), nil |
| 17811 | } else { |
| 17812 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17813 | } |
| 17814 | } |
| 17815 | |
| 17816 | type OxmIdPktMarkMasked struct { |
| 17817 | *OxmId |
| 17818 | } |
| 17819 | |
| 17820 | type IOxmIdPktMarkMasked interface { |
| 17821 | IOxmId |
| 17822 | } |
| 17823 | |
| 17824 | func (self *OxmIdPktMarkMasked) Serialize(encoder *goloxi.Encoder) error { |
| 17825 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17826 | return err |
| 17827 | } |
| 17828 | |
| 17829 | return nil |
| 17830 | } |
| 17831 | |
| 17832 | func DecodeOxmIdPktMarkMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdPktMarkMasked, error) { |
| 17833 | _oxmidpktmarkmasked := &OxmIdPktMarkMasked{OxmId: parent} |
| 17834 | return _oxmidpktmarkmasked, nil |
| 17835 | } |
| 17836 | |
| 17837 | func NewOxmIdPktMarkMasked() *OxmIdPktMarkMasked { |
| 17838 | obj := &OxmIdPktMarkMasked{ |
| 17839 | OxmId: NewOxmId(82696), |
| 17840 | } |
| 17841 | return obj |
| 17842 | } |
| 17843 | func (self *OxmIdPktMarkMasked) GetOXMName() string { |
| 17844 | return "pkt_mark_masked" |
| 17845 | } |
| 17846 | |
| 17847 | func (self *OxmIdPktMarkMasked) MarshalJSON() ([]byte, error) { |
| 17848 | if self.TypeLen == 0 { |
| 17849 | return []byte("\"\""), nil |
| 17850 | } else { |
| 17851 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17852 | } |
| 17853 | } |
| 17854 | |
| 17855 | type OxmIdRecircId struct { |
| 17856 | *OxmId |
| 17857 | } |
| 17858 | |
| 17859 | type IOxmIdRecircId interface { |
| 17860 | IOxmId |
| 17861 | } |
| 17862 | |
| 17863 | func (self *OxmIdRecircId) Serialize(encoder *goloxi.Encoder) error { |
| 17864 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17865 | return err |
| 17866 | } |
| 17867 | |
| 17868 | return nil |
| 17869 | } |
| 17870 | |
| 17871 | func DecodeOxmIdRecircId(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdRecircId, error) { |
| 17872 | _oxmidrecircid := &OxmIdRecircId{OxmId: parent} |
| 17873 | return _oxmidrecircid, nil |
| 17874 | } |
| 17875 | |
| 17876 | func NewOxmIdRecircId() *OxmIdRecircId { |
| 17877 | obj := &OxmIdRecircId{ |
| 17878 | OxmId: NewOxmId(83972), |
| 17879 | } |
| 17880 | return obj |
| 17881 | } |
| 17882 | func (self *OxmIdRecircId) GetOXMName() string { |
| 17883 | return "recirc_id" |
| 17884 | } |
| 17885 | |
| 17886 | func (self *OxmIdRecircId) MarshalJSON() ([]byte, error) { |
| 17887 | if self.TypeLen == 0 { |
| 17888 | return []byte("\"\""), nil |
| 17889 | } else { |
| 17890 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17891 | } |
| 17892 | } |
| 17893 | |
| 17894 | type OxmIdReg0 struct { |
| 17895 | *OxmId |
| 17896 | } |
| 17897 | |
| 17898 | type IOxmIdReg0 interface { |
| 17899 | IOxmId |
| 17900 | } |
| 17901 | |
| 17902 | func (self *OxmIdReg0) Serialize(encoder *goloxi.Encoder) error { |
| 17903 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17904 | return err |
| 17905 | } |
| 17906 | |
| 17907 | return nil |
| 17908 | } |
| 17909 | |
| 17910 | func DecodeOxmIdReg0(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg0, error) { |
| 17911 | _oxmidreg0 := &OxmIdReg0{OxmId: parent} |
| 17912 | return _oxmidreg0, nil |
| 17913 | } |
| 17914 | |
| 17915 | func NewOxmIdReg0() *OxmIdReg0 { |
| 17916 | obj := &OxmIdReg0{ |
| 17917 | OxmId: NewOxmId(65540), |
| 17918 | } |
| 17919 | return obj |
| 17920 | } |
| 17921 | func (self *OxmIdReg0) GetOXMName() string { |
| 17922 | return "reg0" |
| 17923 | } |
| 17924 | |
| 17925 | func (self *OxmIdReg0) MarshalJSON() ([]byte, error) { |
| 17926 | if self.TypeLen == 0 { |
| 17927 | return []byte("\"\""), nil |
| 17928 | } else { |
| 17929 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17930 | } |
| 17931 | } |
| 17932 | |
| 17933 | type OxmIdReg0Masked struct { |
| 17934 | *OxmId |
| 17935 | } |
| 17936 | |
| 17937 | type IOxmIdReg0Masked interface { |
| 17938 | IOxmId |
| 17939 | } |
| 17940 | |
| 17941 | func (self *OxmIdReg0Masked) Serialize(encoder *goloxi.Encoder) error { |
| 17942 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17943 | return err |
| 17944 | } |
| 17945 | |
| 17946 | return nil |
| 17947 | } |
| 17948 | |
| 17949 | func DecodeOxmIdReg0Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg0Masked, error) { |
| 17950 | _oxmidreg0masked := &OxmIdReg0Masked{OxmId: parent} |
| 17951 | return _oxmidreg0masked, nil |
| 17952 | } |
| 17953 | |
| 17954 | func NewOxmIdReg0Masked() *OxmIdReg0Masked { |
| 17955 | obj := &OxmIdReg0Masked{ |
| 17956 | OxmId: NewOxmId(65800), |
| 17957 | } |
| 17958 | return obj |
| 17959 | } |
| 17960 | func (self *OxmIdReg0Masked) GetOXMName() string { |
| 17961 | return "reg0_masked" |
| 17962 | } |
| 17963 | |
| 17964 | func (self *OxmIdReg0Masked) MarshalJSON() ([]byte, error) { |
| 17965 | if self.TypeLen == 0 { |
| 17966 | return []byte("\"\""), nil |
| 17967 | } else { |
| 17968 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 17969 | } |
| 17970 | } |
| 17971 | |
| 17972 | type OxmIdReg1 struct { |
| 17973 | *OxmId |
| 17974 | } |
| 17975 | |
| 17976 | type IOxmIdReg1 interface { |
| 17977 | IOxmId |
| 17978 | } |
| 17979 | |
| 17980 | func (self *OxmIdReg1) Serialize(encoder *goloxi.Encoder) error { |
| 17981 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 17982 | return err |
| 17983 | } |
| 17984 | |
| 17985 | return nil |
| 17986 | } |
| 17987 | |
| 17988 | func DecodeOxmIdReg1(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg1, error) { |
| 17989 | _oxmidreg1 := &OxmIdReg1{OxmId: parent} |
| 17990 | return _oxmidreg1, nil |
| 17991 | } |
| 17992 | |
| 17993 | func NewOxmIdReg1() *OxmIdReg1 { |
| 17994 | obj := &OxmIdReg1{ |
| 17995 | OxmId: NewOxmId(66052), |
| 17996 | } |
| 17997 | return obj |
| 17998 | } |
| 17999 | func (self *OxmIdReg1) GetOXMName() string { |
| 18000 | return "reg1" |
| 18001 | } |
| 18002 | |
| 18003 | func (self *OxmIdReg1) MarshalJSON() ([]byte, error) { |
| 18004 | if self.TypeLen == 0 { |
| 18005 | return []byte("\"\""), nil |
| 18006 | } else { |
| 18007 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18008 | } |
| 18009 | } |
| 18010 | |
| 18011 | type OxmIdReg10 struct { |
| 18012 | *OxmId |
| 18013 | } |
| 18014 | |
| 18015 | type IOxmIdReg10 interface { |
| 18016 | IOxmId |
| 18017 | } |
| 18018 | |
| 18019 | func (self *OxmIdReg10) Serialize(encoder *goloxi.Encoder) error { |
| 18020 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18021 | return err |
| 18022 | } |
| 18023 | |
| 18024 | return nil |
| 18025 | } |
| 18026 | |
| 18027 | func DecodeOxmIdReg10(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg10, error) { |
| 18028 | _oxmidreg10 := &OxmIdReg10{OxmId: parent} |
| 18029 | return _oxmidreg10, nil |
| 18030 | } |
| 18031 | |
| 18032 | func NewOxmIdReg10() *OxmIdReg10 { |
| 18033 | obj := &OxmIdReg10{ |
| 18034 | OxmId: NewOxmId(70660), |
| 18035 | } |
| 18036 | return obj |
| 18037 | } |
| 18038 | func (self *OxmIdReg10) GetOXMName() string { |
| 18039 | return "reg10" |
| 18040 | } |
| 18041 | |
| 18042 | func (self *OxmIdReg10) MarshalJSON() ([]byte, error) { |
| 18043 | if self.TypeLen == 0 { |
| 18044 | return []byte("\"\""), nil |
| 18045 | } else { |
| 18046 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18047 | } |
| 18048 | } |
| 18049 | |
| 18050 | type OxmIdReg10Masked struct { |
| 18051 | *OxmId |
| 18052 | } |
| 18053 | |
| 18054 | type IOxmIdReg10Masked interface { |
| 18055 | IOxmId |
| 18056 | } |
| 18057 | |
| 18058 | func (self *OxmIdReg10Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18059 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18060 | return err |
| 18061 | } |
| 18062 | |
| 18063 | return nil |
| 18064 | } |
| 18065 | |
| 18066 | func DecodeOxmIdReg10Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg10Masked, error) { |
| 18067 | _oxmidreg10masked := &OxmIdReg10Masked{OxmId: parent} |
| 18068 | return _oxmidreg10masked, nil |
| 18069 | } |
| 18070 | |
| 18071 | func NewOxmIdReg10Masked() *OxmIdReg10Masked { |
| 18072 | obj := &OxmIdReg10Masked{ |
| 18073 | OxmId: NewOxmId(70920), |
| 18074 | } |
| 18075 | return obj |
| 18076 | } |
| 18077 | func (self *OxmIdReg10Masked) GetOXMName() string { |
| 18078 | return "reg10_masked" |
| 18079 | } |
| 18080 | |
| 18081 | func (self *OxmIdReg10Masked) MarshalJSON() ([]byte, error) { |
| 18082 | if self.TypeLen == 0 { |
| 18083 | return []byte("\"\""), nil |
| 18084 | } else { |
| 18085 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18086 | } |
| 18087 | } |
| 18088 | |
| 18089 | type OxmIdReg11 struct { |
| 18090 | *OxmId |
| 18091 | } |
| 18092 | |
| 18093 | type IOxmIdReg11 interface { |
| 18094 | IOxmId |
| 18095 | } |
| 18096 | |
| 18097 | func (self *OxmIdReg11) Serialize(encoder *goloxi.Encoder) error { |
| 18098 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18099 | return err |
| 18100 | } |
| 18101 | |
| 18102 | return nil |
| 18103 | } |
| 18104 | |
| 18105 | func DecodeOxmIdReg11(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg11, error) { |
| 18106 | _oxmidreg11 := &OxmIdReg11{OxmId: parent} |
| 18107 | return _oxmidreg11, nil |
| 18108 | } |
| 18109 | |
| 18110 | func NewOxmIdReg11() *OxmIdReg11 { |
| 18111 | obj := &OxmIdReg11{ |
| 18112 | OxmId: NewOxmId(71172), |
| 18113 | } |
| 18114 | return obj |
| 18115 | } |
| 18116 | func (self *OxmIdReg11) GetOXMName() string { |
| 18117 | return "reg11" |
| 18118 | } |
| 18119 | |
| 18120 | func (self *OxmIdReg11) MarshalJSON() ([]byte, error) { |
| 18121 | if self.TypeLen == 0 { |
| 18122 | return []byte("\"\""), nil |
| 18123 | } else { |
| 18124 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18125 | } |
| 18126 | } |
| 18127 | |
| 18128 | type OxmIdReg11Masked struct { |
| 18129 | *OxmId |
| 18130 | } |
| 18131 | |
| 18132 | type IOxmIdReg11Masked interface { |
| 18133 | IOxmId |
| 18134 | } |
| 18135 | |
| 18136 | func (self *OxmIdReg11Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18137 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18138 | return err |
| 18139 | } |
| 18140 | |
| 18141 | return nil |
| 18142 | } |
| 18143 | |
| 18144 | func DecodeOxmIdReg11Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg11Masked, error) { |
| 18145 | _oxmidreg11masked := &OxmIdReg11Masked{OxmId: parent} |
| 18146 | return _oxmidreg11masked, nil |
| 18147 | } |
| 18148 | |
| 18149 | func NewOxmIdReg11Masked() *OxmIdReg11Masked { |
| 18150 | obj := &OxmIdReg11Masked{ |
| 18151 | OxmId: NewOxmId(71432), |
| 18152 | } |
| 18153 | return obj |
| 18154 | } |
| 18155 | func (self *OxmIdReg11Masked) GetOXMName() string { |
| 18156 | return "reg11_masked" |
| 18157 | } |
| 18158 | |
| 18159 | func (self *OxmIdReg11Masked) MarshalJSON() ([]byte, error) { |
| 18160 | if self.TypeLen == 0 { |
| 18161 | return []byte("\"\""), nil |
| 18162 | } else { |
| 18163 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18164 | } |
| 18165 | } |
| 18166 | |
| 18167 | type OxmIdReg12 struct { |
| 18168 | *OxmId |
| 18169 | } |
| 18170 | |
| 18171 | type IOxmIdReg12 interface { |
| 18172 | IOxmId |
| 18173 | } |
| 18174 | |
| 18175 | func (self *OxmIdReg12) Serialize(encoder *goloxi.Encoder) error { |
| 18176 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18177 | return err |
| 18178 | } |
| 18179 | |
| 18180 | return nil |
| 18181 | } |
| 18182 | |
| 18183 | func DecodeOxmIdReg12(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg12, error) { |
| 18184 | _oxmidreg12 := &OxmIdReg12{OxmId: parent} |
| 18185 | return _oxmidreg12, nil |
| 18186 | } |
| 18187 | |
| 18188 | func NewOxmIdReg12() *OxmIdReg12 { |
| 18189 | obj := &OxmIdReg12{ |
| 18190 | OxmId: NewOxmId(71684), |
| 18191 | } |
| 18192 | return obj |
| 18193 | } |
| 18194 | func (self *OxmIdReg12) GetOXMName() string { |
| 18195 | return "reg12" |
| 18196 | } |
| 18197 | |
| 18198 | func (self *OxmIdReg12) MarshalJSON() ([]byte, error) { |
| 18199 | if self.TypeLen == 0 { |
| 18200 | return []byte("\"\""), nil |
| 18201 | } else { |
| 18202 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18203 | } |
| 18204 | } |
| 18205 | |
| 18206 | type OxmIdReg12Masked struct { |
| 18207 | *OxmId |
| 18208 | } |
| 18209 | |
| 18210 | type IOxmIdReg12Masked interface { |
| 18211 | IOxmId |
| 18212 | } |
| 18213 | |
| 18214 | func (self *OxmIdReg12Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18215 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18216 | return err |
| 18217 | } |
| 18218 | |
| 18219 | return nil |
| 18220 | } |
| 18221 | |
| 18222 | func DecodeOxmIdReg12Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg12Masked, error) { |
| 18223 | _oxmidreg12masked := &OxmIdReg12Masked{OxmId: parent} |
| 18224 | return _oxmidreg12masked, nil |
| 18225 | } |
| 18226 | |
| 18227 | func NewOxmIdReg12Masked() *OxmIdReg12Masked { |
| 18228 | obj := &OxmIdReg12Masked{ |
| 18229 | OxmId: NewOxmId(71944), |
| 18230 | } |
| 18231 | return obj |
| 18232 | } |
| 18233 | func (self *OxmIdReg12Masked) GetOXMName() string { |
| 18234 | return "reg12_masked" |
| 18235 | } |
| 18236 | |
| 18237 | func (self *OxmIdReg12Masked) MarshalJSON() ([]byte, error) { |
| 18238 | if self.TypeLen == 0 { |
| 18239 | return []byte("\"\""), nil |
| 18240 | } else { |
| 18241 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18242 | } |
| 18243 | } |
| 18244 | |
| 18245 | type OxmIdReg13 struct { |
| 18246 | *OxmId |
| 18247 | } |
| 18248 | |
| 18249 | type IOxmIdReg13 interface { |
| 18250 | IOxmId |
| 18251 | } |
| 18252 | |
| 18253 | func (self *OxmIdReg13) Serialize(encoder *goloxi.Encoder) error { |
| 18254 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18255 | return err |
| 18256 | } |
| 18257 | |
| 18258 | return nil |
| 18259 | } |
| 18260 | |
| 18261 | func DecodeOxmIdReg13(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg13, error) { |
| 18262 | _oxmidreg13 := &OxmIdReg13{OxmId: parent} |
| 18263 | return _oxmidreg13, nil |
| 18264 | } |
| 18265 | |
| 18266 | func NewOxmIdReg13() *OxmIdReg13 { |
| 18267 | obj := &OxmIdReg13{ |
| 18268 | OxmId: NewOxmId(72196), |
| 18269 | } |
| 18270 | return obj |
| 18271 | } |
| 18272 | func (self *OxmIdReg13) GetOXMName() string { |
| 18273 | return "reg13" |
| 18274 | } |
| 18275 | |
| 18276 | func (self *OxmIdReg13) MarshalJSON() ([]byte, error) { |
| 18277 | if self.TypeLen == 0 { |
| 18278 | return []byte("\"\""), nil |
| 18279 | } else { |
| 18280 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18281 | } |
| 18282 | } |
| 18283 | |
| 18284 | type OxmIdReg13Masked struct { |
| 18285 | *OxmId |
| 18286 | } |
| 18287 | |
| 18288 | type IOxmIdReg13Masked interface { |
| 18289 | IOxmId |
| 18290 | } |
| 18291 | |
| 18292 | func (self *OxmIdReg13Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18293 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18294 | return err |
| 18295 | } |
| 18296 | |
| 18297 | return nil |
| 18298 | } |
| 18299 | |
| 18300 | func DecodeOxmIdReg13Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg13Masked, error) { |
| 18301 | _oxmidreg13masked := &OxmIdReg13Masked{OxmId: parent} |
| 18302 | return _oxmidreg13masked, nil |
| 18303 | } |
| 18304 | |
| 18305 | func NewOxmIdReg13Masked() *OxmIdReg13Masked { |
| 18306 | obj := &OxmIdReg13Masked{ |
| 18307 | OxmId: NewOxmId(72456), |
| 18308 | } |
| 18309 | return obj |
| 18310 | } |
| 18311 | func (self *OxmIdReg13Masked) GetOXMName() string { |
| 18312 | return "reg13_masked" |
| 18313 | } |
| 18314 | |
| 18315 | func (self *OxmIdReg13Masked) MarshalJSON() ([]byte, error) { |
| 18316 | if self.TypeLen == 0 { |
| 18317 | return []byte("\"\""), nil |
| 18318 | } else { |
| 18319 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18320 | } |
| 18321 | } |
| 18322 | |
| 18323 | type OxmIdReg14 struct { |
| 18324 | *OxmId |
| 18325 | } |
| 18326 | |
| 18327 | type IOxmIdReg14 interface { |
| 18328 | IOxmId |
| 18329 | } |
| 18330 | |
| 18331 | func (self *OxmIdReg14) Serialize(encoder *goloxi.Encoder) error { |
| 18332 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18333 | return err |
| 18334 | } |
| 18335 | |
| 18336 | return nil |
| 18337 | } |
| 18338 | |
| 18339 | func DecodeOxmIdReg14(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg14, error) { |
| 18340 | _oxmidreg14 := &OxmIdReg14{OxmId: parent} |
| 18341 | return _oxmidreg14, nil |
| 18342 | } |
| 18343 | |
| 18344 | func NewOxmIdReg14() *OxmIdReg14 { |
| 18345 | obj := &OxmIdReg14{ |
| 18346 | OxmId: NewOxmId(72708), |
| 18347 | } |
| 18348 | return obj |
| 18349 | } |
| 18350 | func (self *OxmIdReg14) GetOXMName() string { |
| 18351 | return "reg14" |
| 18352 | } |
| 18353 | |
| 18354 | func (self *OxmIdReg14) MarshalJSON() ([]byte, error) { |
| 18355 | if self.TypeLen == 0 { |
| 18356 | return []byte("\"\""), nil |
| 18357 | } else { |
| 18358 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18359 | } |
| 18360 | } |
| 18361 | |
| 18362 | type OxmIdReg14Masked struct { |
| 18363 | *OxmId |
| 18364 | } |
| 18365 | |
| 18366 | type IOxmIdReg14Masked interface { |
| 18367 | IOxmId |
| 18368 | } |
| 18369 | |
| 18370 | func (self *OxmIdReg14Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18371 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18372 | return err |
| 18373 | } |
| 18374 | |
| 18375 | return nil |
| 18376 | } |
| 18377 | |
| 18378 | func DecodeOxmIdReg14Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg14Masked, error) { |
| 18379 | _oxmidreg14masked := &OxmIdReg14Masked{OxmId: parent} |
| 18380 | return _oxmidreg14masked, nil |
| 18381 | } |
| 18382 | |
| 18383 | func NewOxmIdReg14Masked() *OxmIdReg14Masked { |
| 18384 | obj := &OxmIdReg14Masked{ |
| 18385 | OxmId: NewOxmId(72968), |
| 18386 | } |
| 18387 | return obj |
| 18388 | } |
| 18389 | func (self *OxmIdReg14Masked) GetOXMName() string { |
| 18390 | return "reg14_masked" |
| 18391 | } |
| 18392 | |
| 18393 | func (self *OxmIdReg14Masked) MarshalJSON() ([]byte, error) { |
| 18394 | if self.TypeLen == 0 { |
| 18395 | return []byte("\"\""), nil |
| 18396 | } else { |
| 18397 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18398 | } |
| 18399 | } |
| 18400 | |
| 18401 | type OxmIdReg15 struct { |
| 18402 | *OxmId |
| 18403 | } |
| 18404 | |
| 18405 | type IOxmIdReg15 interface { |
| 18406 | IOxmId |
| 18407 | } |
| 18408 | |
| 18409 | func (self *OxmIdReg15) Serialize(encoder *goloxi.Encoder) error { |
| 18410 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18411 | return err |
| 18412 | } |
| 18413 | |
| 18414 | return nil |
| 18415 | } |
| 18416 | |
| 18417 | func DecodeOxmIdReg15(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg15, error) { |
| 18418 | _oxmidreg15 := &OxmIdReg15{OxmId: parent} |
| 18419 | return _oxmidreg15, nil |
| 18420 | } |
| 18421 | |
| 18422 | func NewOxmIdReg15() *OxmIdReg15 { |
| 18423 | obj := &OxmIdReg15{ |
| 18424 | OxmId: NewOxmId(73220), |
| 18425 | } |
| 18426 | return obj |
| 18427 | } |
| 18428 | func (self *OxmIdReg15) GetOXMName() string { |
| 18429 | return "reg15" |
| 18430 | } |
| 18431 | |
| 18432 | func (self *OxmIdReg15) MarshalJSON() ([]byte, error) { |
| 18433 | if self.TypeLen == 0 { |
| 18434 | return []byte("\"\""), nil |
| 18435 | } else { |
| 18436 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18437 | } |
| 18438 | } |
| 18439 | |
| 18440 | type OxmIdReg15Masked struct { |
| 18441 | *OxmId |
| 18442 | } |
| 18443 | |
| 18444 | type IOxmIdReg15Masked interface { |
| 18445 | IOxmId |
| 18446 | } |
| 18447 | |
| 18448 | func (self *OxmIdReg15Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18449 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18450 | return err |
| 18451 | } |
| 18452 | |
| 18453 | return nil |
| 18454 | } |
| 18455 | |
| 18456 | func DecodeOxmIdReg15Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg15Masked, error) { |
| 18457 | _oxmidreg15masked := &OxmIdReg15Masked{OxmId: parent} |
| 18458 | return _oxmidreg15masked, nil |
| 18459 | } |
| 18460 | |
| 18461 | func NewOxmIdReg15Masked() *OxmIdReg15Masked { |
| 18462 | obj := &OxmIdReg15Masked{ |
| 18463 | OxmId: NewOxmId(73480), |
| 18464 | } |
| 18465 | return obj |
| 18466 | } |
| 18467 | func (self *OxmIdReg15Masked) GetOXMName() string { |
| 18468 | return "reg15_masked" |
| 18469 | } |
| 18470 | |
| 18471 | func (self *OxmIdReg15Masked) MarshalJSON() ([]byte, error) { |
| 18472 | if self.TypeLen == 0 { |
| 18473 | return []byte("\"\""), nil |
| 18474 | } else { |
| 18475 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18476 | } |
| 18477 | } |
| 18478 | |
| 18479 | type OxmIdReg1Masked struct { |
| 18480 | *OxmId |
| 18481 | } |
| 18482 | |
| 18483 | type IOxmIdReg1Masked interface { |
| 18484 | IOxmId |
| 18485 | } |
| 18486 | |
| 18487 | func (self *OxmIdReg1Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18488 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18489 | return err |
| 18490 | } |
| 18491 | |
| 18492 | return nil |
| 18493 | } |
| 18494 | |
| 18495 | func DecodeOxmIdReg1Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg1Masked, error) { |
| 18496 | _oxmidreg1masked := &OxmIdReg1Masked{OxmId: parent} |
| 18497 | return _oxmidreg1masked, nil |
| 18498 | } |
| 18499 | |
| 18500 | func NewOxmIdReg1Masked() *OxmIdReg1Masked { |
| 18501 | obj := &OxmIdReg1Masked{ |
| 18502 | OxmId: NewOxmId(66312), |
| 18503 | } |
| 18504 | return obj |
| 18505 | } |
| 18506 | func (self *OxmIdReg1Masked) GetOXMName() string { |
| 18507 | return "reg1_masked" |
| 18508 | } |
| 18509 | |
| 18510 | func (self *OxmIdReg1Masked) MarshalJSON() ([]byte, error) { |
| 18511 | if self.TypeLen == 0 { |
| 18512 | return []byte("\"\""), nil |
| 18513 | } else { |
| 18514 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18515 | } |
| 18516 | } |
| 18517 | |
| 18518 | type OxmIdReg2 struct { |
| 18519 | *OxmId |
| 18520 | } |
| 18521 | |
| 18522 | type IOxmIdReg2 interface { |
| 18523 | IOxmId |
| 18524 | } |
| 18525 | |
| 18526 | func (self *OxmIdReg2) Serialize(encoder *goloxi.Encoder) error { |
| 18527 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18528 | return err |
| 18529 | } |
| 18530 | |
| 18531 | return nil |
| 18532 | } |
| 18533 | |
| 18534 | func DecodeOxmIdReg2(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg2, error) { |
| 18535 | _oxmidreg2 := &OxmIdReg2{OxmId: parent} |
| 18536 | return _oxmidreg2, nil |
| 18537 | } |
| 18538 | |
| 18539 | func NewOxmIdReg2() *OxmIdReg2 { |
| 18540 | obj := &OxmIdReg2{ |
| 18541 | OxmId: NewOxmId(66564), |
| 18542 | } |
| 18543 | return obj |
| 18544 | } |
| 18545 | func (self *OxmIdReg2) GetOXMName() string { |
| 18546 | return "reg2" |
| 18547 | } |
| 18548 | |
| 18549 | func (self *OxmIdReg2) MarshalJSON() ([]byte, error) { |
| 18550 | if self.TypeLen == 0 { |
| 18551 | return []byte("\"\""), nil |
| 18552 | } else { |
| 18553 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18554 | } |
| 18555 | } |
| 18556 | |
| 18557 | type OxmIdReg2Masked struct { |
| 18558 | *OxmId |
| 18559 | } |
| 18560 | |
| 18561 | type IOxmIdReg2Masked interface { |
| 18562 | IOxmId |
| 18563 | } |
| 18564 | |
| 18565 | func (self *OxmIdReg2Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18566 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18567 | return err |
| 18568 | } |
| 18569 | |
| 18570 | return nil |
| 18571 | } |
| 18572 | |
| 18573 | func DecodeOxmIdReg2Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg2Masked, error) { |
| 18574 | _oxmidreg2masked := &OxmIdReg2Masked{OxmId: parent} |
| 18575 | return _oxmidreg2masked, nil |
| 18576 | } |
| 18577 | |
| 18578 | func NewOxmIdReg2Masked() *OxmIdReg2Masked { |
| 18579 | obj := &OxmIdReg2Masked{ |
| 18580 | OxmId: NewOxmId(66824), |
| 18581 | } |
| 18582 | return obj |
| 18583 | } |
| 18584 | func (self *OxmIdReg2Masked) GetOXMName() string { |
| 18585 | return "reg2_masked" |
| 18586 | } |
| 18587 | |
| 18588 | func (self *OxmIdReg2Masked) MarshalJSON() ([]byte, error) { |
| 18589 | if self.TypeLen == 0 { |
| 18590 | return []byte("\"\""), nil |
| 18591 | } else { |
| 18592 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18593 | } |
| 18594 | } |
| 18595 | |
| 18596 | type OxmIdReg3 struct { |
| 18597 | *OxmId |
| 18598 | } |
| 18599 | |
| 18600 | type IOxmIdReg3 interface { |
| 18601 | IOxmId |
| 18602 | } |
| 18603 | |
| 18604 | func (self *OxmIdReg3) Serialize(encoder *goloxi.Encoder) error { |
| 18605 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18606 | return err |
| 18607 | } |
| 18608 | |
| 18609 | return nil |
| 18610 | } |
| 18611 | |
| 18612 | func DecodeOxmIdReg3(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg3, error) { |
| 18613 | _oxmidreg3 := &OxmIdReg3{OxmId: parent} |
| 18614 | return _oxmidreg3, nil |
| 18615 | } |
| 18616 | |
| 18617 | func NewOxmIdReg3() *OxmIdReg3 { |
| 18618 | obj := &OxmIdReg3{ |
| 18619 | OxmId: NewOxmId(67076), |
| 18620 | } |
| 18621 | return obj |
| 18622 | } |
| 18623 | func (self *OxmIdReg3) GetOXMName() string { |
| 18624 | return "reg3" |
| 18625 | } |
| 18626 | |
| 18627 | func (self *OxmIdReg3) MarshalJSON() ([]byte, error) { |
| 18628 | if self.TypeLen == 0 { |
| 18629 | return []byte("\"\""), nil |
| 18630 | } else { |
| 18631 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18632 | } |
| 18633 | } |
| 18634 | |
| 18635 | type OxmIdReg3Masked struct { |
| 18636 | *OxmId |
| 18637 | } |
| 18638 | |
| 18639 | type IOxmIdReg3Masked interface { |
| 18640 | IOxmId |
| 18641 | } |
| 18642 | |
| 18643 | func (self *OxmIdReg3Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18644 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18645 | return err |
| 18646 | } |
| 18647 | |
| 18648 | return nil |
| 18649 | } |
| 18650 | |
| 18651 | func DecodeOxmIdReg3Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg3Masked, error) { |
| 18652 | _oxmidreg3masked := &OxmIdReg3Masked{OxmId: parent} |
| 18653 | return _oxmidreg3masked, nil |
| 18654 | } |
| 18655 | |
| 18656 | func NewOxmIdReg3Masked() *OxmIdReg3Masked { |
| 18657 | obj := &OxmIdReg3Masked{ |
| 18658 | OxmId: NewOxmId(67336), |
| 18659 | } |
| 18660 | return obj |
| 18661 | } |
| 18662 | func (self *OxmIdReg3Masked) GetOXMName() string { |
| 18663 | return "reg3_masked" |
| 18664 | } |
| 18665 | |
| 18666 | func (self *OxmIdReg3Masked) MarshalJSON() ([]byte, error) { |
| 18667 | if self.TypeLen == 0 { |
| 18668 | return []byte("\"\""), nil |
| 18669 | } else { |
| 18670 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18671 | } |
| 18672 | } |
| 18673 | |
| 18674 | type OxmIdReg4 struct { |
| 18675 | *OxmId |
| 18676 | } |
| 18677 | |
| 18678 | type IOxmIdReg4 interface { |
| 18679 | IOxmId |
| 18680 | } |
| 18681 | |
| 18682 | func (self *OxmIdReg4) Serialize(encoder *goloxi.Encoder) error { |
| 18683 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18684 | return err |
| 18685 | } |
| 18686 | |
| 18687 | return nil |
| 18688 | } |
| 18689 | |
| 18690 | func DecodeOxmIdReg4(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg4, error) { |
| 18691 | _oxmidreg4 := &OxmIdReg4{OxmId: parent} |
| 18692 | return _oxmidreg4, nil |
| 18693 | } |
| 18694 | |
| 18695 | func NewOxmIdReg4() *OxmIdReg4 { |
| 18696 | obj := &OxmIdReg4{ |
| 18697 | OxmId: NewOxmId(67588), |
| 18698 | } |
| 18699 | return obj |
| 18700 | } |
| 18701 | func (self *OxmIdReg4) GetOXMName() string { |
| 18702 | return "reg4" |
| 18703 | } |
| 18704 | |
| 18705 | func (self *OxmIdReg4) MarshalJSON() ([]byte, error) { |
| 18706 | if self.TypeLen == 0 { |
| 18707 | return []byte("\"\""), nil |
| 18708 | } else { |
| 18709 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18710 | } |
| 18711 | } |
| 18712 | |
| 18713 | type OxmIdReg4Masked struct { |
| 18714 | *OxmId |
| 18715 | } |
| 18716 | |
| 18717 | type IOxmIdReg4Masked interface { |
| 18718 | IOxmId |
| 18719 | } |
| 18720 | |
| 18721 | func (self *OxmIdReg4Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18722 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18723 | return err |
| 18724 | } |
| 18725 | |
| 18726 | return nil |
| 18727 | } |
| 18728 | |
| 18729 | func DecodeOxmIdReg4Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg4Masked, error) { |
| 18730 | _oxmidreg4masked := &OxmIdReg4Masked{OxmId: parent} |
| 18731 | return _oxmidreg4masked, nil |
| 18732 | } |
| 18733 | |
| 18734 | func NewOxmIdReg4Masked() *OxmIdReg4Masked { |
| 18735 | obj := &OxmIdReg4Masked{ |
| 18736 | OxmId: NewOxmId(67848), |
| 18737 | } |
| 18738 | return obj |
| 18739 | } |
| 18740 | func (self *OxmIdReg4Masked) GetOXMName() string { |
| 18741 | return "reg4_masked" |
| 18742 | } |
| 18743 | |
| 18744 | func (self *OxmIdReg4Masked) MarshalJSON() ([]byte, error) { |
| 18745 | if self.TypeLen == 0 { |
| 18746 | return []byte("\"\""), nil |
| 18747 | } else { |
| 18748 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18749 | } |
| 18750 | } |
| 18751 | |
| 18752 | type OxmIdReg5 struct { |
| 18753 | *OxmId |
| 18754 | } |
| 18755 | |
| 18756 | type IOxmIdReg5 interface { |
| 18757 | IOxmId |
| 18758 | } |
| 18759 | |
| 18760 | func (self *OxmIdReg5) Serialize(encoder *goloxi.Encoder) error { |
| 18761 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18762 | return err |
| 18763 | } |
| 18764 | |
| 18765 | return nil |
| 18766 | } |
| 18767 | |
| 18768 | func DecodeOxmIdReg5(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg5, error) { |
| 18769 | _oxmidreg5 := &OxmIdReg5{OxmId: parent} |
| 18770 | return _oxmidreg5, nil |
| 18771 | } |
| 18772 | |
| 18773 | func NewOxmIdReg5() *OxmIdReg5 { |
| 18774 | obj := &OxmIdReg5{ |
| 18775 | OxmId: NewOxmId(68100), |
| 18776 | } |
| 18777 | return obj |
| 18778 | } |
| 18779 | func (self *OxmIdReg5) GetOXMName() string { |
| 18780 | return "reg5" |
| 18781 | } |
| 18782 | |
| 18783 | func (self *OxmIdReg5) MarshalJSON() ([]byte, error) { |
| 18784 | if self.TypeLen == 0 { |
| 18785 | return []byte("\"\""), nil |
| 18786 | } else { |
| 18787 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18788 | } |
| 18789 | } |
| 18790 | |
| 18791 | type OxmIdReg5Masked struct { |
| 18792 | *OxmId |
| 18793 | } |
| 18794 | |
| 18795 | type IOxmIdReg5Masked interface { |
| 18796 | IOxmId |
| 18797 | } |
| 18798 | |
| 18799 | func (self *OxmIdReg5Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18800 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18801 | return err |
| 18802 | } |
| 18803 | |
| 18804 | return nil |
| 18805 | } |
| 18806 | |
| 18807 | func DecodeOxmIdReg5Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg5Masked, error) { |
| 18808 | _oxmidreg5masked := &OxmIdReg5Masked{OxmId: parent} |
| 18809 | return _oxmidreg5masked, nil |
| 18810 | } |
| 18811 | |
| 18812 | func NewOxmIdReg5Masked() *OxmIdReg5Masked { |
| 18813 | obj := &OxmIdReg5Masked{ |
| 18814 | OxmId: NewOxmId(68360), |
| 18815 | } |
| 18816 | return obj |
| 18817 | } |
| 18818 | func (self *OxmIdReg5Masked) GetOXMName() string { |
| 18819 | return "reg5_masked" |
| 18820 | } |
| 18821 | |
| 18822 | func (self *OxmIdReg5Masked) MarshalJSON() ([]byte, error) { |
| 18823 | if self.TypeLen == 0 { |
| 18824 | return []byte("\"\""), nil |
| 18825 | } else { |
| 18826 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18827 | } |
| 18828 | } |
| 18829 | |
| 18830 | type OxmIdReg6 struct { |
| 18831 | *OxmId |
| 18832 | } |
| 18833 | |
| 18834 | type IOxmIdReg6 interface { |
| 18835 | IOxmId |
| 18836 | } |
| 18837 | |
| 18838 | func (self *OxmIdReg6) Serialize(encoder *goloxi.Encoder) error { |
| 18839 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18840 | return err |
| 18841 | } |
| 18842 | |
| 18843 | return nil |
| 18844 | } |
| 18845 | |
| 18846 | func DecodeOxmIdReg6(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg6, error) { |
| 18847 | _oxmidreg6 := &OxmIdReg6{OxmId: parent} |
| 18848 | return _oxmidreg6, nil |
| 18849 | } |
| 18850 | |
| 18851 | func NewOxmIdReg6() *OxmIdReg6 { |
| 18852 | obj := &OxmIdReg6{ |
| 18853 | OxmId: NewOxmId(68612), |
| 18854 | } |
| 18855 | return obj |
| 18856 | } |
| 18857 | func (self *OxmIdReg6) GetOXMName() string { |
| 18858 | return "reg6" |
| 18859 | } |
| 18860 | |
| 18861 | func (self *OxmIdReg6) MarshalJSON() ([]byte, error) { |
| 18862 | if self.TypeLen == 0 { |
| 18863 | return []byte("\"\""), nil |
| 18864 | } else { |
| 18865 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18866 | } |
| 18867 | } |
| 18868 | |
| 18869 | type OxmIdReg6Masked struct { |
| 18870 | *OxmId |
| 18871 | } |
| 18872 | |
| 18873 | type IOxmIdReg6Masked interface { |
| 18874 | IOxmId |
| 18875 | } |
| 18876 | |
| 18877 | func (self *OxmIdReg6Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18878 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18879 | return err |
| 18880 | } |
| 18881 | |
| 18882 | return nil |
| 18883 | } |
| 18884 | |
| 18885 | func DecodeOxmIdReg6Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg6Masked, error) { |
| 18886 | _oxmidreg6masked := &OxmIdReg6Masked{OxmId: parent} |
| 18887 | return _oxmidreg6masked, nil |
| 18888 | } |
| 18889 | |
| 18890 | func NewOxmIdReg6Masked() *OxmIdReg6Masked { |
| 18891 | obj := &OxmIdReg6Masked{ |
| 18892 | OxmId: NewOxmId(68872), |
| 18893 | } |
| 18894 | return obj |
| 18895 | } |
| 18896 | func (self *OxmIdReg6Masked) GetOXMName() string { |
| 18897 | return "reg6_masked" |
| 18898 | } |
| 18899 | |
| 18900 | func (self *OxmIdReg6Masked) MarshalJSON() ([]byte, error) { |
| 18901 | if self.TypeLen == 0 { |
| 18902 | return []byte("\"\""), nil |
| 18903 | } else { |
| 18904 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18905 | } |
| 18906 | } |
| 18907 | |
| 18908 | type OxmIdReg7 struct { |
| 18909 | *OxmId |
| 18910 | } |
| 18911 | |
| 18912 | type IOxmIdReg7 interface { |
| 18913 | IOxmId |
| 18914 | } |
| 18915 | |
| 18916 | func (self *OxmIdReg7) Serialize(encoder *goloxi.Encoder) error { |
| 18917 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18918 | return err |
| 18919 | } |
| 18920 | |
| 18921 | return nil |
| 18922 | } |
| 18923 | |
| 18924 | func DecodeOxmIdReg7(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg7, error) { |
| 18925 | _oxmidreg7 := &OxmIdReg7{OxmId: parent} |
| 18926 | return _oxmidreg7, nil |
| 18927 | } |
| 18928 | |
| 18929 | func NewOxmIdReg7() *OxmIdReg7 { |
| 18930 | obj := &OxmIdReg7{ |
| 18931 | OxmId: NewOxmId(69124), |
| 18932 | } |
| 18933 | return obj |
| 18934 | } |
| 18935 | func (self *OxmIdReg7) GetOXMName() string { |
| 18936 | return "reg7" |
| 18937 | } |
| 18938 | |
| 18939 | func (self *OxmIdReg7) MarshalJSON() ([]byte, error) { |
| 18940 | if self.TypeLen == 0 { |
| 18941 | return []byte("\"\""), nil |
| 18942 | } else { |
| 18943 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18944 | } |
| 18945 | } |
| 18946 | |
| 18947 | type OxmIdReg7Masked struct { |
| 18948 | *OxmId |
| 18949 | } |
| 18950 | |
| 18951 | type IOxmIdReg7Masked interface { |
| 18952 | IOxmId |
| 18953 | } |
| 18954 | |
| 18955 | func (self *OxmIdReg7Masked) Serialize(encoder *goloxi.Encoder) error { |
| 18956 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18957 | return err |
| 18958 | } |
| 18959 | |
| 18960 | return nil |
| 18961 | } |
| 18962 | |
| 18963 | func DecodeOxmIdReg7Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg7Masked, error) { |
| 18964 | _oxmidreg7masked := &OxmIdReg7Masked{OxmId: parent} |
| 18965 | return _oxmidreg7masked, nil |
| 18966 | } |
| 18967 | |
| 18968 | func NewOxmIdReg7Masked() *OxmIdReg7Masked { |
| 18969 | obj := &OxmIdReg7Masked{ |
| 18970 | OxmId: NewOxmId(69384), |
| 18971 | } |
| 18972 | return obj |
| 18973 | } |
| 18974 | func (self *OxmIdReg7Masked) GetOXMName() string { |
| 18975 | return "reg7_masked" |
| 18976 | } |
| 18977 | |
| 18978 | func (self *OxmIdReg7Masked) MarshalJSON() ([]byte, error) { |
| 18979 | if self.TypeLen == 0 { |
| 18980 | return []byte("\"\""), nil |
| 18981 | } else { |
| 18982 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 18983 | } |
| 18984 | } |
| 18985 | |
| 18986 | type OxmIdReg8 struct { |
| 18987 | *OxmId |
| 18988 | } |
| 18989 | |
| 18990 | type IOxmIdReg8 interface { |
| 18991 | IOxmId |
| 18992 | } |
| 18993 | |
| 18994 | func (self *OxmIdReg8) Serialize(encoder *goloxi.Encoder) error { |
| 18995 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 18996 | return err |
| 18997 | } |
| 18998 | |
| 18999 | return nil |
| 19000 | } |
| 19001 | |
| 19002 | func DecodeOxmIdReg8(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg8, error) { |
| 19003 | _oxmidreg8 := &OxmIdReg8{OxmId: parent} |
| 19004 | return _oxmidreg8, nil |
| 19005 | } |
| 19006 | |
| 19007 | func NewOxmIdReg8() *OxmIdReg8 { |
| 19008 | obj := &OxmIdReg8{ |
| 19009 | OxmId: NewOxmId(69636), |
| 19010 | } |
| 19011 | return obj |
| 19012 | } |
| 19013 | func (self *OxmIdReg8) GetOXMName() string { |
| 19014 | return "reg8" |
| 19015 | } |
| 19016 | |
| 19017 | func (self *OxmIdReg8) MarshalJSON() ([]byte, error) { |
| 19018 | if self.TypeLen == 0 { |
| 19019 | return []byte("\"\""), nil |
| 19020 | } else { |
| 19021 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19022 | } |
| 19023 | } |
| 19024 | |
| 19025 | type OxmIdReg8Masked struct { |
| 19026 | *OxmId |
| 19027 | } |
| 19028 | |
| 19029 | type IOxmIdReg8Masked interface { |
| 19030 | IOxmId |
| 19031 | } |
| 19032 | |
| 19033 | func (self *OxmIdReg8Masked) Serialize(encoder *goloxi.Encoder) error { |
| 19034 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19035 | return err |
| 19036 | } |
| 19037 | |
| 19038 | return nil |
| 19039 | } |
| 19040 | |
| 19041 | func DecodeOxmIdReg8Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg8Masked, error) { |
| 19042 | _oxmidreg8masked := &OxmIdReg8Masked{OxmId: parent} |
| 19043 | return _oxmidreg8masked, nil |
| 19044 | } |
| 19045 | |
| 19046 | func NewOxmIdReg8Masked() *OxmIdReg8Masked { |
| 19047 | obj := &OxmIdReg8Masked{ |
| 19048 | OxmId: NewOxmId(69896), |
| 19049 | } |
| 19050 | return obj |
| 19051 | } |
| 19052 | func (self *OxmIdReg8Masked) GetOXMName() string { |
| 19053 | return "reg8_masked" |
| 19054 | } |
| 19055 | |
| 19056 | func (self *OxmIdReg8Masked) MarshalJSON() ([]byte, error) { |
| 19057 | if self.TypeLen == 0 { |
| 19058 | return []byte("\"\""), nil |
| 19059 | } else { |
| 19060 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19061 | } |
| 19062 | } |
| 19063 | |
| 19064 | type OxmIdReg9 struct { |
| 19065 | *OxmId |
| 19066 | } |
| 19067 | |
| 19068 | type IOxmIdReg9 interface { |
| 19069 | IOxmId |
| 19070 | } |
| 19071 | |
| 19072 | func (self *OxmIdReg9) Serialize(encoder *goloxi.Encoder) error { |
| 19073 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19074 | return err |
| 19075 | } |
| 19076 | |
| 19077 | return nil |
| 19078 | } |
| 19079 | |
| 19080 | func DecodeOxmIdReg9(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg9, error) { |
| 19081 | _oxmidreg9 := &OxmIdReg9{OxmId: parent} |
| 19082 | return _oxmidreg9, nil |
| 19083 | } |
| 19084 | |
| 19085 | func NewOxmIdReg9() *OxmIdReg9 { |
| 19086 | obj := &OxmIdReg9{ |
| 19087 | OxmId: NewOxmId(70148), |
| 19088 | } |
| 19089 | return obj |
| 19090 | } |
| 19091 | func (self *OxmIdReg9) GetOXMName() string { |
| 19092 | return "reg9" |
| 19093 | } |
| 19094 | |
| 19095 | func (self *OxmIdReg9) MarshalJSON() ([]byte, error) { |
| 19096 | if self.TypeLen == 0 { |
| 19097 | return []byte("\"\""), nil |
| 19098 | } else { |
| 19099 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19100 | } |
| 19101 | } |
| 19102 | |
| 19103 | type OxmIdReg9Masked struct { |
| 19104 | *OxmId |
| 19105 | } |
| 19106 | |
| 19107 | type IOxmIdReg9Masked interface { |
| 19108 | IOxmId |
| 19109 | } |
| 19110 | |
| 19111 | func (self *OxmIdReg9Masked) Serialize(encoder *goloxi.Encoder) error { |
| 19112 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19113 | return err |
| 19114 | } |
| 19115 | |
| 19116 | return nil |
| 19117 | } |
| 19118 | |
| 19119 | func DecodeOxmIdReg9Masked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdReg9Masked, error) { |
| 19120 | _oxmidreg9masked := &OxmIdReg9Masked{OxmId: parent} |
| 19121 | return _oxmidreg9masked, nil |
| 19122 | } |
| 19123 | |
| 19124 | func NewOxmIdReg9Masked() *OxmIdReg9Masked { |
| 19125 | obj := &OxmIdReg9Masked{ |
| 19126 | OxmId: NewOxmId(70408), |
| 19127 | } |
| 19128 | return obj |
| 19129 | } |
| 19130 | func (self *OxmIdReg9Masked) GetOXMName() string { |
| 19131 | return "reg9_masked" |
| 19132 | } |
| 19133 | |
| 19134 | func (self *OxmIdReg9Masked) MarshalJSON() ([]byte, error) { |
| 19135 | if self.TypeLen == 0 { |
| 19136 | return []byte("\"\""), nil |
| 19137 | } else { |
| 19138 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19139 | } |
| 19140 | } |
| 19141 | |
| 19142 | type OxmIdTcpDst struct { |
| 19143 | *OxmId |
| 19144 | } |
| 19145 | |
| 19146 | type IOxmIdTcpDst interface { |
| 19147 | IOxmId |
| 19148 | } |
| 19149 | |
| 19150 | func (self *OxmIdTcpDst) Serialize(encoder *goloxi.Encoder) error { |
| 19151 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19152 | return err |
| 19153 | } |
| 19154 | |
| 19155 | return nil |
| 19156 | } |
| 19157 | |
| 19158 | func DecodeOxmIdTcpDst(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTcpDst, error) { |
| 19159 | _oxmidtcpdst := &OxmIdTcpDst{OxmId: parent} |
| 19160 | return _oxmidtcpdst, nil |
| 19161 | } |
| 19162 | |
| 19163 | func NewOxmIdTcpDst() *OxmIdTcpDst { |
| 19164 | obj := &OxmIdTcpDst{ |
| 19165 | OxmId: NewOxmId(5122), |
| 19166 | } |
| 19167 | return obj |
| 19168 | } |
| 19169 | func (self *OxmIdTcpDst) GetOXMName() string { |
| 19170 | return "tcp_dst" |
| 19171 | } |
| 19172 | |
| 19173 | func (self *OxmIdTcpDst) MarshalJSON() ([]byte, error) { |
| 19174 | if self.TypeLen == 0 { |
| 19175 | return []byte("\"\""), nil |
| 19176 | } else { |
| 19177 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19178 | } |
| 19179 | } |
| 19180 | |
| 19181 | type OxmIdTcpDstMasked struct { |
| 19182 | *OxmId |
| 19183 | } |
| 19184 | |
| 19185 | type IOxmIdTcpDstMasked interface { |
| 19186 | IOxmId |
| 19187 | } |
| 19188 | |
| 19189 | func (self *OxmIdTcpDstMasked) Serialize(encoder *goloxi.Encoder) error { |
| 19190 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19191 | return err |
| 19192 | } |
| 19193 | |
| 19194 | return nil |
| 19195 | } |
| 19196 | |
| 19197 | func DecodeOxmIdTcpDstMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTcpDstMasked, error) { |
| 19198 | _oxmidtcpdstmasked := &OxmIdTcpDstMasked{OxmId: parent} |
| 19199 | return _oxmidtcpdstmasked, nil |
| 19200 | } |
| 19201 | |
| 19202 | func NewOxmIdTcpDstMasked() *OxmIdTcpDstMasked { |
| 19203 | obj := &OxmIdTcpDstMasked{ |
| 19204 | OxmId: NewOxmId(5378), |
| 19205 | } |
| 19206 | return obj |
| 19207 | } |
| 19208 | func (self *OxmIdTcpDstMasked) GetOXMName() string { |
| 19209 | return "tcp_dst_masked" |
| 19210 | } |
| 19211 | |
| 19212 | func (self *OxmIdTcpDstMasked) MarshalJSON() ([]byte, error) { |
| 19213 | if self.TypeLen == 0 { |
| 19214 | return []byte("\"\""), nil |
| 19215 | } else { |
| 19216 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19217 | } |
| 19218 | } |
| 19219 | |
| 19220 | type OxmIdTcpFlags struct { |
| 19221 | *OxmId |
| 19222 | } |
| 19223 | |
| 19224 | type IOxmIdTcpFlags interface { |
| 19225 | IOxmId |
| 19226 | } |
| 19227 | |
| 19228 | func (self *OxmIdTcpFlags) Serialize(encoder *goloxi.Encoder) error { |
| 19229 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19230 | return err |
| 19231 | } |
| 19232 | |
| 19233 | return nil |
| 19234 | } |
| 19235 | |
| 19236 | func DecodeOxmIdTcpFlags(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTcpFlags, error) { |
| 19237 | _oxmidtcpflags := &OxmIdTcpFlags{OxmId: parent} |
| 19238 | return _oxmidtcpflags, nil |
| 19239 | } |
| 19240 | |
| 19241 | func NewOxmIdTcpFlags() *OxmIdTcpFlags { |
| 19242 | obj := &OxmIdTcpFlags{ |
| 19243 | OxmId: NewOxmId(82946), |
| 19244 | } |
| 19245 | return obj |
| 19246 | } |
| 19247 | func (self *OxmIdTcpFlags) GetOXMName() string { |
| 19248 | return "tcp_flags" |
| 19249 | } |
| 19250 | |
| 19251 | func (self *OxmIdTcpFlags) MarshalJSON() ([]byte, error) { |
| 19252 | if self.TypeLen == 0 { |
| 19253 | return []byte("\"\""), nil |
| 19254 | } else { |
| 19255 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19256 | } |
| 19257 | } |
| 19258 | |
| 19259 | type OxmIdTcpFlagsMasked struct { |
| 19260 | *OxmId |
| 19261 | } |
| 19262 | |
| 19263 | type IOxmIdTcpFlagsMasked interface { |
| 19264 | IOxmId |
| 19265 | } |
| 19266 | |
| 19267 | func (self *OxmIdTcpFlagsMasked) Serialize(encoder *goloxi.Encoder) error { |
| 19268 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19269 | return err |
| 19270 | } |
| 19271 | |
| 19272 | return nil |
| 19273 | } |
| 19274 | |
| 19275 | func DecodeOxmIdTcpFlagsMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTcpFlagsMasked, error) { |
| 19276 | _oxmidtcpflagsmasked := &OxmIdTcpFlagsMasked{OxmId: parent} |
| 19277 | return _oxmidtcpflagsmasked, nil |
| 19278 | } |
| 19279 | |
| 19280 | func NewOxmIdTcpFlagsMasked() *OxmIdTcpFlagsMasked { |
| 19281 | obj := &OxmIdTcpFlagsMasked{ |
| 19282 | OxmId: NewOxmId(83204), |
| 19283 | } |
| 19284 | return obj |
| 19285 | } |
| 19286 | func (self *OxmIdTcpFlagsMasked) GetOXMName() string { |
| 19287 | return "tcp_flags_masked" |
| 19288 | } |
| 19289 | |
| 19290 | func (self *OxmIdTcpFlagsMasked) MarshalJSON() ([]byte, error) { |
| 19291 | if self.TypeLen == 0 { |
| 19292 | return []byte("\"\""), nil |
| 19293 | } else { |
| 19294 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19295 | } |
| 19296 | } |
| 19297 | |
| 19298 | type OxmIdTcpSrc struct { |
| 19299 | *OxmId |
| 19300 | } |
| 19301 | |
| 19302 | type IOxmIdTcpSrc interface { |
| 19303 | IOxmId |
| 19304 | } |
| 19305 | |
| 19306 | func (self *OxmIdTcpSrc) Serialize(encoder *goloxi.Encoder) error { |
| 19307 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19308 | return err |
| 19309 | } |
| 19310 | |
| 19311 | return nil |
| 19312 | } |
| 19313 | |
| 19314 | func DecodeOxmIdTcpSrc(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTcpSrc, error) { |
| 19315 | _oxmidtcpsrc := &OxmIdTcpSrc{OxmId: parent} |
| 19316 | return _oxmidtcpsrc, nil |
| 19317 | } |
| 19318 | |
| 19319 | func NewOxmIdTcpSrc() *OxmIdTcpSrc { |
| 19320 | obj := &OxmIdTcpSrc{ |
| 19321 | OxmId: NewOxmId(4610), |
| 19322 | } |
| 19323 | return obj |
| 19324 | } |
| 19325 | func (self *OxmIdTcpSrc) GetOXMName() string { |
| 19326 | return "tcp_src" |
| 19327 | } |
| 19328 | |
| 19329 | func (self *OxmIdTcpSrc) MarshalJSON() ([]byte, error) { |
| 19330 | if self.TypeLen == 0 { |
| 19331 | return []byte("\"\""), nil |
| 19332 | } else { |
| 19333 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19334 | } |
| 19335 | } |
| 19336 | |
| 19337 | type OxmIdTcpSrcMasked struct { |
| 19338 | *OxmId |
| 19339 | } |
| 19340 | |
| 19341 | type IOxmIdTcpSrcMasked interface { |
| 19342 | IOxmId |
| 19343 | } |
| 19344 | |
| 19345 | func (self *OxmIdTcpSrcMasked) Serialize(encoder *goloxi.Encoder) error { |
| 19346 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19347 | return err |
| 19348 | } |
| 19349 | |
| 19350 | return nil |
| 19351 | } |
| 19352 | |
| 19353 | func DecodeOxmIdTcpSrcMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTcpSrcMasked, error) { |
| 19354 | _oxmidtcpsrcmasked := &OxmIdTcpSrcMasked{OxmId: parent} |
| 19355 | return _oxmidtcpsrcmasked, nil |
| 19356 | } |
| 19357 | |
| 19358 | func NewOxmIdTcpSrcMasked() *OxmIdTcpSrcMasked { |
| 19359 | obj := &OxmIdTcpSrcMasked{ |
| 19360 | OxmId: NewOxmId(4868), |
| 19361 | } |
| 19362 | return obj |
| 19363 | } |
| 19364 | func (self *OxmIdTcpSrcMasked) GetOXMName() string { |
| 19365 | return "tcp_src_masked" |
| 19366 | } |
| 19367 | |
| 19368 | func (self *OxmIdTcpSrcMasked) MarshalJSON() ([]byte, error) { |
| 19369 | if self.TypeLen == 0 { |
| 19370 | return []byte("\"\""), nil |
| 19371 | } else { |
| 19372 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19373 | } |
| 19374 | } |
| 19375 | |
| 19376 | type OxmIdTunDst struct { |
| 19377 | *OxmId |
| 19378 | } |
| 19379 | |
| 19380 | type IOxmIdTunDst interface { |
| 19381 | IOxmId |
| 19382 | } |
| 19383 | |
| 19384 | func (self *OxmIdTunDst) Serialize(encoder *goloxi.Encoder) error { |
| 19385 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19386 | return err |
| 19387 | } |
| 19388 | |
| 19389 | return nil |
| 19390 | } |
| 19391 | |
| 19392 | func DecodeOxmIdTunDst(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTunDst, error) { |
| 19393 | _oxmidtundst := &OxmIdTunDst{OxmId: parent} |
| 19394 | return _oxmidtundst, nil |
| 19395 | } |
| 19396 | |
| 19397 | func NewOxmIdTunDst() *OxmIdTunDst { |
| 19398 | obj := &OxmIdTunDst{ |
| 19399 | OxmId: NewOxmId(81924), |
| 19400 | } |
| 19401 | return obj |
| 19402 | } |
| 19403 | func (self *OxmIdTunDst) GetOXMName() string { |
| 19404 | return "tun_dst" |
| 19405 | } |
| 19406 | |
| 19407 | func (self *OxmIdTunDst) MarshalJSON() ([]byte, error) { |
| 19408 | if self.TypeLen == 0 { |
| 19409 | return []byte("\"\""), nil |
| 19410 | } else { |
| 19411 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19412 | } |
| 19413 | } |
| 19414 | |
| 19415 | type OxmIdTunDstMasked struct { |
| 19416 | *OxmId |
| 19417 | } |
| 19418 | |
| 19419 | type IOxmIdTunDstMasked interface { |
| 19420 | IOxmId |
| 19421 | } |
| 19422 | |
| 19423 | func (self *OxmIdTunDstMasked) Serialize(encoder *goloxi.Encoder) error { |
| 19424 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19425 | return err |
| 19426 | } |
| 19427 | |
| 19428 | return nil |
| 19429 | } |
| 19430 | |
| 19431 | func DecodeOxmIdTunDstMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTunDstMasked, error) { |
| 19432 | _oxmidtundstmasked := &OxmIdTunDstMasked{OxmId: parent} |
| 19433 | return _oxmidtundstmasked, nil |
| 19434 | } |
| 19435 | |
| 19436 | func NewOxmIdTunDstMasked() *OxmIdTunDstMasked { |
| 19437 | obj := &OxmIdTunDstMasked{ |
| 19438 | OxmId: NewOxmId(82184), |
| 19439 | } |
| 19440 | return obj |
| 19441 | } |
| 19442 | func (self *OxmIdTunDstMasked) GetOXMName() string { |
| 19443 | return "tun_dst_masked" |
| 19444 | } |
| 19445 | |
| 19446 | func (self *OxmIdTunDstMasked) MarshalJSON() ([]byte, error) { |
| 19447 | if self.TypeLen == 0 { |
| 19448 | return []byte("\"\""), nil |
| 19449 | } else { |
| 19450 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19451 | } |
| 19452 | } |
| 19453 | |
| 19454 | type OxmIdTunFlags struct { |
| 19455 | *OxmId |
| 19456 | } |
| 19457 | |
| 19458 | type IOxmIdTunFlags interface { |
| 19459 | IOxmId |
| 19460 | } |
| 19461 | |
| 19462 | func (self *OxmIdTunFlags) Serialize(encoder *goloxi.Encoder) error { |
| 19463 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19464 | return err |
| 19465 | } |
| 19466 | |
| 19467 | return nil |
| 19468 | } |
| 19469 | |
| 19470 | func DecodeOxmIdTunFlags(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTunFlags, error) { |
| 19471 | _oxmidtunflags := &OxmIdTunFlags{OxmId: parent} |
| 19472 | return _oxmidtunflags, nil |
| 19473 | } |
| 19474 | |
| 19475 | func NewOxmIdTunFlags() *OxmIdTunFlags { |
| 19476 | obj := &OxmIdTunFlags{ |
| 19477 | OxmId: NewOxmId(118786), |
| 19478 | } |
| 19479 | return obj |
| 19480 | } |
| 19481 | func (self *OxmIdTunFlags) GetOXMName() string { |
| 19482 | return "tun_flags" |
| 19483 | } |
| 19484 | |
| 19485 | func (self *OxmIdTunFlags) MarshalJSON() ([]byte, error) { |
| 19486 | if self.TypeLen == 0 { |
| 19487 | return []byte("\"\""), nil |
| 19488 | } else { |
| 19489 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19490 | } |
| 19491 | } |
| 19492 | |
| 19493 | type OxmIdTunFlagsMasked struct { |
| 19494 | *OxmId |
| 19495 | } |
| 19496 | |
| 19497 | type IOxmIdTunFlagsMasked interface { |
| 19498 | IOxmId |
| 19499 | } |
| 19500 | |
| 19501 | func (self *OxmIdTunFlagsMasked) Serialize(encoder *goloxi.Encoder) error { |
| 19502 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19503 | return err |
| 19504 | } |
| 19505 | |
| 19506 | return nil |
| 19507 | } |
| 19508 | |
| 19509 | func DecodeOxmIdTunFlagsMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTunFlagsMasked, error) { |
| 19510 | _oxmidtunflagsmasked := &OxmIdTunFlagsMasked{OxmId: parent} |
| 19511 | return _oxmidtunflagsmasked, nil |
| 19512 | } |
| 19513 | |
| 19514 | func NewOxmIdTunFlagsMasked() *OxmIdTunFlagsMasked { |
| 19515 | obj := &OxmIdTunFlagsMasked{ |
| 19516 | OxmId: NewOxmId(119044), |
| 19517 | } |
| 19518 | return obj |
| 19519 | } |
| 19520 | func (self *OxmIdTunFlagsMasked) GetOXMName() string { |
| 19521 | return "tun_flags_masked" |
| 19522 | } |
| 19523 | |
| 19524 | func (self *OxmIdTunFlagsMasked) MarshalJSON() ([]byte, error) { |
| 19525 | if self.TypeLen == 0 { |
| 19526 | return []byte("\"\""), nil |
| 19527 | } else { |
| 19528 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19529 | } |
| 19530 | } |
| 19531 | |
| 19532 | type OxmIdTunGbpFlags struct { |
| 19533 | *OxmId |
| 19534 | } |
| 19535 | |
| 19536 | type IOxmIdTunGbpFlags interface { |
| 19537 | IOxmId |
| 19538 | } |
| 19539 | |
| 19540 | func (self *OxmIdTunGbpFlags) Serialize(encoder *goloxi.Encoder) error { |
| 19541 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19542 | return err |
| 19543 | } |
| 19544 | |
| 19545 | return nil |
| 19546 | } |
| 19547 | |
| 19548 | func DecodeOxmIdTunGbpFlags(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTunGbpFlags, error) { |
| 19549 | _oxmidtungbpflags := &OxmIdTunGbpFlags{OxmId: parent} |
| 19550 | return _oxmidtungbpflags, nil |
| 19551 | } |
| 19552 | |
| 19553 | func NewOxmIdTunGbpFlags() *OxmIdTunGbpFlags { |
| 19554 | obj := &OxmIdTunGbpFlags{ |
| 19555 | OxmId: NewOxmId(85505), |
| 19556 | } |
| 19557 | return obj |
| 19558 | } |
| 19559 | func (self *OxmIdTunGbpFlags) GetOXMName() string { |
| 19560 | return "tun_gbp_flags" |
| 19561 | } |
| 19562 | |
| 19563 | func (self *OxmIdTunGbpFlags) MarshalJSON() ([]byte, error) { |
| 19564 | if self.TypeLen == 0 { |
| 19565 | return []byte("\"\""), nil |
| 19566 | } else { |
| 19567 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19568 | } |
| 19569 | } |
| 19570 | |
| 19571 | type OxmIdTunGbpFlagsMasked struct { |
| 19572 | *OxmId |
| 19573 | } |
| 19574 | |
| 19575 | type IOxmIdTunGbpFlagsMasked interface { |
| 19576 | IOxmId |
| 19577 | } |
| 19578 | |
| 19579 | func (self *OxmIdTunGbpFlagsMasked) Serialize(encoder *goloxi.Encoder) error { |
| 19580 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19581 | return err |
| 19582 | } |
| 19583 | |
| 19584 | return nil |
| 19585 | } |
| 19586 | |
| 19587 | func DecodeOxmIdTunGbpFlagsMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTunGbpFlagsMasked, error) { |
| 19588 | _oxmidtungbpflagsmasked := &OxmIdTunGbpFlagsMasked{OxmId: parent} |
| 19589 | return _oxmidtungbpflagsmasked, nil |
| 19590 | } |
| 19591 | |
| 19592 | func NewOxmIdTunGbpFlagsMasked() *OxmIdTunGbpFlagsMasked { |
| 19593 | obj := &OxmIdTunGbpFlagsMasked{ |
| 19594 | OxmId: NewOxmId(85762), |
| 19595 | } |
| 19596 | return obj |
| 19597 | } |
| 19598 | func (self *OxmIdTunGbpFlagsMasked) GetOXMName() string { |
| 19599 | return "tun_gbp_flags_masked" |
| 19600 | } |
| 19601 | |
| 19602 | func (self *OxmIdTunGbpFlagsMasked) MarshalJSON() ([]byte, error) { |
| 19603 | if self.TypeLen == 0 { |
| 19604 | return []byte("\"\""), nil |
| 19605 | } else { |
| 19606 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19607 | } |
| 19608 | } |
| 19609 | |
| 19610 | type OxmIdTunGbpId struct { |
| 19611 | *OxmId |
| 19612 | } |
| 19613 | |
| 19614 | type IOxmIdTunGbpId interface { |
| 19615 | IOxmId |
| 19616 | } |
| 19617 | |
| 19618 | func (self *OxmIdTunGbpId) Serialize(encoder *goloxi.Encoder) error { |
| 19619 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19620 | return err |
| 19621 | } |
| 19622 | |
| 19623 | return nil |
| 19624 | } |
| 19625 | |
| 19626 | func DecodeOxmIdTunGbpId(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTunGbpId, error) { |
| 19627 | _oxmidtungbpid := &OxmIdTunGbpId{OxmId: parent} |
| 19628 | return _oxmidtungbpid, nil |
| 19629 | } |
| 19630 | |
| 19631 | func NewOxmIdTunGbpId() *OxmIdTunGbpId { |
| 19632 | obj := &OxmIdTunGbpId{ |
| 19633 | OxmId: NewOxmId(84994), |
| 19634 | } |
| 19635 | return obj |
| 19636 | } |
| 19637 | func (self *OxmIdTunGbpId) GetOXMName() string { |
| 19638 | return "tun_gbp_id" |
| 19639 | } |
| 19640 | |
| 19641 | func (self *OxmIdTunGbpId) MarshalJSON() ([]byte, error) { |
| 19642 | if self.TypeLen == 0 { |
| 19643 | return []byte("\"\""), nil |
| 19644 | } else { |
| 19645 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19646 | } |
| 19647 | } |
| 19648 | |
| 19649 | type OxmIdTunGbpIdMasked struct { |
| 19650 | *OxmId |
| 19651 | } |
| 19652 | |
| 19653 | type IOxmIdTunGbpIdMasked interface { |
| 19654 | IOxmId |
| 19655 | } |
| 19656 | |
| 19657 | func (self *OxmIdTunGbpIdMasked) Serialize(encoder *goloxi.Encoder) error { |
| 19658 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19659 | return err |
| 19660 | } |
| 19661 | |
| 19662 | return nil |
| 19663 | } |
| 19664 | |
| 19665 | func DecodeOxmIdTunGbpIdMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTunGbpIdMasked, error) { |
| 19666 | _oxmidtungbpidmasked := &OxmIdTunGbpIdMasked{OxmId: parent} |
| 19667 | return _oxmidtungbpidmasked, nil |
| 19668 | } |
| 19669 | |
| 19670 | func NewOxmIdTunGbpIdMasked() *OxmIdTunGbpIdMasked { |
| 19671 | obj := &OxmIdTunGbpIdMasked{ |
| 19672 | OxmId: NewOxmId(85252), |
| 19673 | } |
| 19674 | return obj |
| 19675 | } |
| 19676 | func (self *OxmIdTunGbpIdMasked) GetOXMName() string { |
| 19677 | return "tun_gbp_id_masked" |
| 19678 | } |
| 19679 | |
| 19680 | func (self *OxmIdTunGbpIdMasked) MarshalJSON() ([]byte, error) { |
| 19681 | if self.TypeLen == 0 { |
| 19682 | return []byte("\"\""), nil |
| 19683 | } else { |
| 19684 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19685 | } |
| 19686 | } |
| 19687 | |
| 19688 | type OxmIdTunId struct { |
| 19689 | *OxmId |
| 19690 | } |
| 19691 | |
| 19692 | type IOxmIdTunId interface { |
| 19693 | IOxmId |
| 19694 | } |
| 19695 | |
| 19696 | func (self *OxmIdTunId) Serialize(encoder *goloxi.Encoder) error { |
| 19697 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19698 | return err |
| 19699 | } |
| 19700 | |
| 19701 | return nil |
| 19702 | } |
| 19703 | |
| 19704 | func DecodeOxmIdTunId(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTunId, error) { |
| 19705 | _oxmidtunid := &OxmIdTunId{OxmId: parent} |
| 19706 | return _oxmidtunid, nil |
| 19707 | } |
| 19708 | |
| 19709 | func NewOxmIdTunId() *OxmIdTunId { |
| 19710 | obj := &OxmIdTunId{ |
| 19711 | OxmId: NewOxmId(73736), |
| 19712 | } |
| 19713 | return obj |
| 19714 | } |
| 19715 | func (self *OxmIdTunId) GetOXMName() string { |
| 19716 | return "tun_id" |
| 19717 | } |
| 19718 | |
| 19719 | func (self *OxmIdTunId) MarshalJSON() ([]byte, error) { |
| 19720 | if self.TypeLen == 0 { |
| 19721 | return []byte("\"\""), nil |
| 19722 | } else { |
| 19723 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19724 | } |
| 19725 | } |
| 19726 | |
| 19727 | type OxmIdTunIdMasked struct { |
| 19728 | *OxmId |
| 19729 | } |
| 19730 | |
| 19731 | type IOxmIdTunIdMasked interface { |
| 19732 | IOxmId |
| 19733 | } |
| 19734 | |
| 19735 | func (self *OxmIdTunIdMasked) Serialize(encoder *goloxi.Encoder) error { |
| 19736 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19737 | return err |
| 19738 | } |
| 19739 | |
| 19740 | return nil |
| 19741 | } |
| 19742 | |
| 19743 | func DecodeOxmIdTunIdMasked(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTunIdMasked, error) { |
| 19744 | _oxmidtunidmasked := &OxmIdTunIdMasked{OxmId: parent} |
| 19745 | return _oxmidtunidmasked, nil |
| 19746 | } |
| 19747 | |
| 19748 | func NewOxmIdTunIdMasked() *OxmIdTunIdMasked { |
| 19749 | obj := &OxmIdTunIdMasked{ |
| 19750 | OxmId: NewOxmId(74000), |
| 19751 | } |
| 19752 | return obj |
| 19753 | } |
| 19754 | func (self *OxmIdTunIdMasked) GetOXMName() string { |
| 19755 | return "tun_id_masked" |
| 19756 | } |
| 19757 | |
| 19758 | func (self *OxmIdTunIdMasked) MarshalJSON() ([]byte, error) { |
| 19759 | if self.TypeLen == 0 { |
| 19760 | return []byte("\"\""), nil |
| 19761 | } else { |
| 19762 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19763 | } |
| 19764 | } |
| 19765 | |
| 19766 | type OxmIdTunIpv6Dst struct { |
| 19767 | *OxmId |
| 19768 | } |
| 19769 | |
| 19770 | type IOxmIdTunIpv6Dst interface { |
| 19771 | IOxmId |
| 19772 | } |
| 19773 | |
| 19774 | func (self *OxmIdTunIpv6Dst) Serialize(encoder *goloxi.Encoder) error { |
| 19775 | if err := self.OxmId.Serialize(encoder); err != nil { |
| 19776 | return err |
| 19777 | } |
| 19778 | |
| 19779 | return nil |
| 19780 | } |
| 19781 | |
| 19782 | func DecodeOxmIdTunIpv6Dst(parent *OxmId, decoder *goloxi.Decoder) (*OxmIdTunIpv6Dst, error) { |
| 19783 | _oxmidtunipv6dst := &OxmIdTunIpv6Dst{OxmId: parent} |
| 19784 | return _oxmidtunipv6dst, nil |
| 19785 | } |
| 19786 | |
| 19787 | func NewOxmIdTunIpv6Dst() *OxmIdTunIpv6Dst { |
| 19788 | obj := &OxmIdTunIpv6Dst{ |
| 19789 | OxmId: NewOxmId(121872), |
| 19790 | } |
| 19791 | return obj |
| 19792 | } |
| 19793 | func (self *OxmIdTunIpv6Dst) GetOXMName() string { |
| 19794 | return "tun_ipv6_dst" |
| 19795 | } |
| 19796 | |
| 19797 | func (self *OxmIdTunIpv6Dst) MarshalJSON() ([]byte, error) { |
| 19798 | if self.TypeLen == 0 { |
| 19799 | return []byte("\"\""), nil |
| 19800 | } else { |
| 19801 | return []byte("\"" + self.GetOXMName() + "\""), nil |
| 19802 | } |
| 19803 | } |
| 19804 | |
| 19805 | type OxmIdTunIpv6DstMasked struct { |
| 19806 | *OxmId |
| 19807 | } |
| 19808 | |
| 19809 | type IOxmIdTunIpv6DstMasked interface { |
|