anjana_sreekumar@infosys.com | 991c206 | 2020-01-08 11:42:57 +0530 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2019-present Infosys Limited |
| 3 | * |
| 4 | * SPDX-License-Identifier: Apache-2.0 |
| 5 | */ |
| 6 | |
| 7 | /****************************************************************************** |
| 8 | * |
| 9 | * This is an auto generated file. |
| 10 | * Please do not edit this file. |
| 11 | * All edits to be made through template source file |
| 12 | * <TOP-DIR/scripts/GtpV2StackCodeGen/tts/msgtemplate.cpp.tt> |
| 13 | ******************************************************************************/ |
| 14 | |
| 15 | #include "deleteBearerResponseMsg.h" |
| 16 | #include "../ieClasses/manual/gtpV2Ie.h" |
| 17 | #include "../ieClasses/gtpV2IeFactory.h" |
| 18 | #include "../ieClasses/causeIe.h" |
| 19 | #include "../ieClasses/ebiIe.h" |
| 20 | #include "../ieClasses/bearerContextIe.h" |
| 21 | #include "../ieClasses/bearerContextsInDeleteBearerResponse.h" |
| 22 | #include "../ieClasses/recoveryIe.h" |
| 23 | #include "../ieClasses/fqCsidIe.h" |
| 24 | #include "../ieClasses/fqCsidIe.h" |
| 25 | #include "../ieClasses/fqCsidIe.h" |
| 26 | #include "../ieClasses/fqCsidIe.h" |
| 27 | #include "../ieClasses/pcoIe.h" |
| 28 | #include "../ieClasses/ueTimeZoneIe.h" |
| 29 | #include "../ieClasses/uliIe.h" |
| 30 | #include "../ieClasses/uliTimestampIe.h" |
| 31 | #include "../ieClasses/twanIdentifierIe.h" |
| 32 | #include "../ieClasses/twanIdentifierTimestampIe.h" |
| 33 | #include "../ieClasses/overloadControlInformationIe.h" |
| 34 | #include "../ieClasses/mmeS4SgsnsOverloadControlInformationInDeleteBearerResponse.h" |
| 35 | #include "../ieClasses/overloadControlInformationIe.h" |
| 36 | #include "../ieClasses/sgwsOverloadControlInformationInDeleteBearerResponse.h" |
| 37 | #include "../ieClasses/ipAddressIe.h" |
| 38 | #include "../ieClasses/overloadControlInformationIe.h" |
| 39 | #include "../ieClasses/twanEpdgsOverloadControlInformationInDeleteBearerResponse.h" |
| 40 | #include "../ieClasses/twanIdentifierIe.h" |
| 41 | #include "../ieClasses/twanIdentifierTimestampIe.h" |
| 42 | #include "../ieClasses/ipAddressIe.h" |
| 43 | #include "../ieClasses/portNumberIe.h" |
| 44 | #include "../ieClasses/fContainerIe.h" |
| 45 | #include "../ieClasses/portNumberIe.h" |
| 46 | #include "../ieClasses/secondaryRatUsageDataReportIe.h" |
| 47 | |
| 48 | DeleteBearerResponseMsg::DeleteBearerResponseMsg() |
| 49 | { |
| 50 | msgType = DeleteBearerResponseMsgType; |
| 51 | Uint16 mandIe; |
| 52 | mandIe = CauseIeType; |
| 53 | mandIe = (mandIe << 8) | 0; // cause |
| 54 | mandatoryIeSet.insert(mandIe); |
| 55 | } |
| 56 | |
| 57 | DeleteBearerResponseMsg::~DeleteBearerResponseMsg() |
| 58 | { |
| 59 | |
| 60 | } |
| 61 | |
| 62 | bool DeleteBearerResponseMsg::encodeDeleteBearerResponseMsg(MsgBuffer &buffer, |
| 63 | DeleteBearerResponseMsgData |
| 64 | const &data) |
| 65 | { |
| 66 | bool rc = false; |
| 67 | GtpV2IeHeader header; |
| 68 | Uint16 startIndex = 0; |
| 69 | Uint16 endIndex = 0; |
| 70 | Uint16 length = 0; |
| 71 | |
| 72 | |
| 73 | // Encode the Ie Header |
| 74 | header.ieType = CauseIeType; |
| 75 | header.instance = 0; |
| 76 | header.length = 0; // We will encode the IE first and then update the length |
| 77 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 78 | startIndex = buffer.getCurrentIndex(); |
| 79 | CauseIe cause= |
| 80 | dynamic_cast< |
| 81 | CauseIe&>(GtpV2IeFactory::getInstance().getIeObject(CauseIeType)); |
| 82 | rc = cause.encodeCauseIe(buffer, data.cause); |
| 83 | endIndex = buffer.getCurrentIndex(); |
| 84 | length = endIndex - startIndex; |
| 85 | |
| 86 | // encode the length value now |
| 87 | buffer.goToIndex(startIndex - 3); |
| 88 | buffer.writeUint16(length, false); |
| 89 | buffer.goToIndex(endIndex); |
| 90 | |
| 91 | if (!(rc)) |
| 92 | { |
| 93 | errorStream.add((char *)"Failed to encode IE: cause\n"); |
| 94 | return false; |
| 95 | } |
| 96 | |
| 97 | if (data.linkedEpsBearerIdIePresent) |
| 98 | { |
| 99 | |
| 100 | // Encode the Ie Header |
| 101 | header.ieType = EbiIeType; |
| 102 | header.instance = 0; |
| 103 | header.length = 0; // We will encode the IE first and then update the length |
| 104 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 105 | startIndex = buffer.getCurrentIndex(); |
| 106 | EbiIe ebi= |
| 107 | dynamic_cast< |
| 108 | EbiIe&>(GtpV2IeFactory::getInstance().getIeObject(EbiIeType)); |
| 109 | rc = ebi.encodeEbiIe(buffer, data.linkedEpsBearerId); |
| 110 | endIndex = buffer.getCurrentIndex(); |
| 111 | length = endIndex - startIndex; |
| 112 | |
| 113 | // encode the length value now |
| 114 | buffer.goToIndex(startIndex - 3); |
| 115 | buffer.writeUint16(length, false); |
| 116 | buffer.goToIndex(endIndex); |
| 117 | |
| 118 | if (!(rc)) |
| 119 | { |
| 120 | errorStream.add((char *)"Failed to encode IE: linkedEpsBearerId\n"); |
| 121 | return false; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | // First validate if the applicatoin provided more than the expected cardinality |
| 126 | if (data.bearerContextsCount > 11) |
| 127 | { |
| 128 | errorStream.add((char *)"Number of entries of bearerContexts exceeded\n"); |
| 129 | errorStream.add((char *)"Expected count: 11 Received count: "); |
| 130 | errorStream.add((char *)"data.bearerContextsCount"); |
| 131 | errorStream.endOfLine(); |
| 132 | return false; |
| 133 | } |
| 134 | for (Uint8 i = 0; i < data.bearerContextsCount; i++) |
| 135 | { |
| 136 | // Encode the Ie Header |
| 137 | header.ieType = BearerContextIeType; |
| 138 | header.instance = 0; |
| 139 | header.length = 0; // We will encode the IE first and then update the length |
| 140 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 141 | startIndex = buffer.getCurrentIndex(); |
| 142 | BearerContextIe bearerContext= |
| 143 | dynamic_cast< |
| 144 | BearerContextIe&>(GtpV2IeFactory::getInstance(). |
| 145 | getIeObject(BearerContextIeType)); |
| 146 | BearerContextsInDeleteBearerResponse groupedIeInstance = dynamic_cast<BearerContextsInDeleteBearerResponse&>(bearerContext.getGroupedIe(msgType, 0)); |
| 147 | rc = groupedIeInstance.encodeBearerContextsInDeleteBearerResponse(buffer, data.bearerContexts[i]); |
| 148 | endIndex = buffer.getCurrentIndex(); |
| 149 | length = endIndex - startIndex; |
| 150 | |
| 151 | // encode the length value now |
| 152 | buffer.goToIndex(startIndex - 3); |
| 153 | buffer.writeUint16(length, false); |
| 154 | buffer.goToIndex(endIndex); |
| 155 | } |
| 156 | |
| 157 | if (!(rc)) |
| 158 | { |
| 159 | errorStream.add((char *)"Failed to encode IE: bearerContexts\n"); |
| 160 | return false; |
| 161 | } |
| 162 | |
| 163 | if (data.recoveryIePresent) |
| 164 | { |
| 165 | |
| 166 | // Encode the Ie Header |
| 167 | header.ieType = RecoveryIeType; |
| 168 | header.instance = 0; |
| 169 | header.length = 0; // We will encode the IE first and then update the length |
| 170 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 171 | startIndex = buffer.getCurrentIndex(); |
| 172 | RecoveryIe recovery= |
| 173 | dynamic_cast< |
| 174 | RecoveryIe&>(GtpV2IeFactory::getInstance().getIeObject(RecoveryIeType)); |
| 175 | rc = recovery.encodeRecoveryIe(buffer, data.recovery); |
| 176 | endIndex = buffer.getCurrentIndex(); |
| 177 | length = endIndex - startIndex; |
| 178 | |
| 179 | // encode the length value now |
| 180 | buffer.goToIndex(startIndex - 3); |
| 181 | buffer.writeUint16(length, false); |
| 182 | buffer.goToIndex(endIndex); |
| 183 | |
| 184 | if (!(rc)) |
| 185 | { |
| 186 | errorStream.add((char *)"Failed to encode IE: recovery\n"); |
| 187 | return false; |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | if (data.mmeFqCsidIePresent) |
| 192 | { |
| 193 | |
| 194 | // Encode the Ie Header |
| 195 | header.ieType = FqCsidIeType; |
| 196 | header.instance = 0; |
| 197 | header.length = 0; // We will encode the IE first and then update the length |
| 198 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 199 | startIndex = buffer.getCurrentIndex(); |
| 200 | FqCsidIe fqCsid= |
| 201 | dynamic_cast< |
| 202 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 203 | rc = fqCsid.encodeFqCsidIe(buffer, data.mmeFqCsid); |
| 204 | endIndex = buffer.getCurrentIndex(); |
| 205 | length = endIndex - startIndex; |
| 206 | |
| 207 | // encode the length value now |
| 208 | buffer.goToIndex(startIndex - 3); |
| 209 | buffer.writeUint16(length, false); |
| 210 | buffer.goToIndex(endIndex); |
| 211 | |
| 212 | if (!(rc)) |
| 213 | { |
| 214 | errorStream.add((char *)"Failed to encode IE: mmeFqCsid\n"); |
| 215 | return false; |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | if (data.sgwFqCsidIePresent) |
| 220 | { |
| 221 | |
| 222 | // Encode the Ie Header |
| 223 | header.ieType = FqCsidIeType; |
| 224 | header.instance = 1; |
| 225 | header.length = 0; // We will encode the IE first and then update the length |
| 226 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 227 | startIndex = buffer.getCurrentIndex(); |
| 228 | FqCsidIe fqCsid= |
| 229 | dynamic_cast< |
| 230 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 231 | rc = fqCsid.encodeFqCsidIe(buffer, data.sgwFqCsid); |
| 232 | endIndex = buffer.getCurrentIndex(); |
| 233 | length = endIndex - startIndex; |
| 234 | |
| 235 | // encode the length value now |
| 236 | buffer.goToIndex(startIndex - 3); |
| 237 | buffer.writeUint16(length, false); |
| 238 | buffer.goToIndex(endIndex); |
| 239 | |
| 240 | if (!(rc)) |
| 241 | { |
| 242 | errorStream.add((char *)"Failed to encode IE: sgwFqCsid\n"); |
| 243 | return false; |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | if (data.epdgFqCsidIePresent) |
| 248 | { |
| 249 | |
| 250 | // Encode the Ie Header |
| 251 | header.ieType = FqCsidIeType; |
| 252 | header.instance = 2; |
| 253 | header.length = 0; // We will encode the IE first and then update the length |
| 254 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 255 | startIndex = buffer.getCurrentIndex(); |
| 256 | FqCsidIe fqCsid= |
| 257 | dynamic_cast< |
| 258 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 259 | rc = fqCsid.encodeFqCsidIe(buffer, data.epdgFqCsid); |
| 260 | endIndex = buffer.getCurrentIndex(); |
| 261 | length = endIndex - startIndex; |
| 262 | |
| 263 | // encode the length value now |
| 264 | buffer.goToIndex(startIndex - 3); |
| 265 | buffer.writeUint16(length, false); |
| 266 | buffer.goToIndex(endIndex); |
| 267 | |
| 268 | if (!(rc)) |
| 269 | { |
| 270 | errorStream.add((char *)"Failed to encode IE: epdgFqCsid\n"); |
| 271 | return false; |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | if (data.twanFqCsidIePresent) |
| 276 | { |
| 277 | |
| 278 | // Encode the Ie Header |
| 279 | header.ieType = FqCsidIeType; |
| 280 | header.instance = 3; |
| 281 | header.length = 0; // We will encode the IE first and then update the length |
| 282 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 283 | startIndex = buffer.getCurrentIndex(); |
| 284 | FqCsidIe fqCsid= |
| 285 | dynamic_cast< |
| 286 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 287 | rc = fqCsid.encodeFqCsidIe(buffer, data.twanFqCsid); |
| 288 | endIndex = buffer.getCurrentIndex(); |
| 289 | length = endIndex - startIndex; |
| 290 | |
| 291 | // encode the length value now |
| 292 | buffer.goToIndex(startIndex - 3); |
| 293 | buffer.writeUint16(length, false); |
| 294 | buffer.goToIndex(endIndex); |
| 295 | |
| 296 | if (!(rc)) |
| 297 | { |
| 298 | errorStream.add((char *)"Failed to encode IE: twanFqCsid\n"); |
| 299 | return false; |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | if (data.protocolConfigurationOptionsIePresent) |
| 304 | { |
| 305 | |
| 306 | // Encode the Ie Header |
| 307 | header.ieType = PcoIeType; |
| 308 | header.instance = 0; |
| 309 | header.length = 0; // We will encode the IE first and then update the length |
| 310 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 311 | startIndex = buffer.getCurrentIndex(); |
| 312 | PcoIe pco= |
| 313 | dynamic_cast< |
| 314 | PcoIe&>(GtpV2IeFactory::getInstance().getIeObject(PcoIeType)); |
| 315 | rc = pco.encodePcoIe(buffer, data.protocolConfigurationOptions); |
| 316 | endIndex = buffer.getCurrentIndex(); |
| 317 | length = endIndex - startIndex; |
| 318 | |
| 319 | // encode the length value now |
| 320 | buffer.goToIndex(startIndex - 3); |
| 321 | buffer.writeUint16(length, false); |
| 322 | buffer.goToIndex(endIndex); |
| 323 | |
| 324 | if (!(rc)) |
| 325 | { |
| 326 | errorStream.add((char *)"Failed to encode IE: protocolConfigurationOptions\n"); |
| 327 | return false; |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | if (data.ueTimeZoneIePresent) |
| 332 | { |
| 333 | |
| 334 | // Encode the Ie Header |
| 335 | header.ieType = UeTimeZoneIeType; |
| 336 | header.instance = 0; |
| 337 | header.length = 0; // We will encode the IE first and then update the length |
| 338 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 339 | startIndex = buffer.getCurrentIndex(); |
| 340 | UeTimeZoneIe ueTimeZone= |
| 341 | dynamic_cast< |
| 342 | UeTimeZoneIe&>(GtpV2IeFactory::getInstance().getIeObject(UeTimeZoneIeType)); |
| 343 | rc = ueTimeZone.encodeUeTimeZoneIe(buffer, data.ueTimeZone); |
| 344 | endIndex = buffer.getCurrentIndex(); |
| 345 | length = endIndex - startIndex; |
| 346 | |
| 347 | // encode the length value now |
| 348 | buffer.goToIndex(startIndex - 3); |
| 349 | buffer.writeUint16(length, false); |
| 350 | buffer.goToIndex(endIndex); |
| 351 | |
| 352 | if (!(rc)) |
| 353 | { |
| 354 | errorStream.add((char *)"Failed to encode IE: ueTimeZone\n"); |
| 355 | return false; |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | if (data.userLocationInformationIePresent) |
| 360 | { |
| 361 | |
| 362 | // Encode the Ie Header |
| 363 | header.ieType = UliIeType; |
| 364 | header.instance = 0; |
| 365 | header.length = 0; // We will encode the IE first and then update the length |
| 366 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 367 | startIndex = buffer.getCurrentIndex(); |
| 368 | UliIe uli= |
| 369 | dynamic_cast< |
| 370 | UliIe&>(GtpV2IeFactory::getInstance().getIeObject(UliIeType)); |
| 371 | rc = uli.encodeUliIe(buffer, data.userLocationInformation); |
| 372 | endIndex = buffer.getCurrentIndex(); |
| 373 | length = endIndex - startIndex; |
| 374 | |
| 375 | // encode the length value now |
| 376 | buffer.goToIndex(startIndex - 3); |
| 377 | buffer.writeUint16(length, false); |
| 378 | buffer.goToIndex(endIndex); |
| 379 | |
| 380 | if (!(rc)) |
| 381 | { |
| 382 | errorStream.add((char *)"Failed to encode IE: userLocationInformation\n"); |
| 383 | return false; |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | if (data.uliTimestampIePresent) |
| 388 | { |
| 389 | |
| 390 | // Encode the Ie Header |
| 391 | header.ieType = UliTimestampIeType; |
| 392 | header.instance = 0; |
| 393 | header.length = 0; // We will encode the IE first and then update the length |
| 394 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 395 | startIndex = buffer.getCurrentIndex(); |
| 396 | UliTimestampIe uliTimestamp= |
| 397 | dynamic_cast< |
| 398 | UliTimestampIe&>(GtpV2IeFactory::getInstance().getIeObject(UliTimestampIeType)); |
| 399 | rc = uliTimestamp.encodeUliTimestampIe(buffer, data.uliTimestamp); |
| 400 | endIndex = buffer.getCurrentIndex(); |
| 401 | length = endIndex - startIndex; |
| 402 | |
| 403 | // encode the length value now |
| 404 | buffer.goToIndex(startIndex - 3); |
| 405 | buffer.writeUint16(length, false); |
| 406 | buffer.goToIndex(endIndex); |
| 407 | |
| 408 | if (!(rc)) |
| 409 | { |
| 410 | errorStream.add((char *)"Failed to encode IE: uliTimestamp\n"); |
| 411 | return false; |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | if (data.twanIdentifierIePresent) |
| 416 | { |
| 417 | |
| 418 | // Encode the Ie Header |
| 419 | header.ieType = TwanIdentifierIeType; |
| 420 | header.instance = 0; |
| 421 | header.length = 0; // We will encode the IE first and then update the length |
| 422 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 423 | startIndex = buffer.getCurrentIndex(); |
| 424 | TwanIdentifierIe twanIdentifier= |
| 425 | dynamic_cast< |
| 426 | TwanIdentifierIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierIeType)); |
| 427 | rc = twanIdentifier.encodeTwanIdentifierIe(buffer, data.twanIdentifier); |
| 428 | endIndex = buffer.getCurrentIndex(); |
| 429 | length = endIndex - startIndex; |
| 430 | |
| 431 | // encode the length value now |
| 432 | buffer.goToIndex(startIndex - 3); |
| 433 | buffer.writeUint16(length, false); |
| 434 | buffer.goToIndex(endIndex); |
| 435 | |
| 436 | if (!(rc)) |
| 437 | { |
| 438 | errorStream.add((char *)"Failed to encode IE: twanIdentifier\n"); |
| 439 | return false; |
| 440 | } |
| 441 | } |
| 442 | |
| 443 | if (data.twanIdentifierTimestampIePresent) |
| 444 | { |
| 445 | |
| 446 | // Encode the Ie Header |
| 447 | header.ieType = TwanIdentifierTimestampIeType; |
| 448 | header.instance = 0; |
| 449 | header.length = 0; // We will encode the IE first and then update the length |
| 450 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 451 | startIndex = buffer.getCurrentIndex(); |
| 452 | TwanIdentifierTimestampIe twanIdentifierTimestamp= |
| 453 | dynamic_cast< |
| 454 | TwanIdentifierTimestampIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierTimestampIeType)); |
| 455 | rc = twanIdentifierTimestamp.encodeTwanIdentifierTimestampIe(buffer, data.twanIdentifierTimestamp); |
| 456 | endIndex = buffer.getCurrentIndex(); |
| 457 | length = endIndex - startIndex; |
| 458 | |
| 459 | // encode the length value now |
| 460 | buffer.goToIndex(startIndex - 3); |
| 461 | buffer.writeUint16(length, false); |
| 462 | buffer.goToIndex(endIndex); |
| 463 | |
| 464 | if (!(rc)) |
| 465 | { |
| 466 | errorStream.add((char *)"Failed to encode IE: twanIdentifierTimestamp\n"); |
| 467 | return false; |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | if (data.mmeS4SgsnsOverloadControlInformationIePresent) |
| 472 | { |
| 473 | |
| 474 | // Encode the Ie Header |
| 475 | header.ieType = OverloadControlInformationIeType; |
| 476 | header.instance = 0; |
| 477 | header.length = 0; // We will encode the IE first and then update the length |
| 478 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 479 | startIndex = buffer.getCurrentIndex(); |
| 480 | OverloadControlInformationIe overloadControlInformation= |
| 481 | dynamic_cast< |
| 482 | OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType)); |
| 483 | MmeS4SgsnsOverloadControlInformationInDeleteBearerResponse groupedIeInstance = |
| 484 | dynamic_cast< |
| 485 | MmeS4SgsnsOverloadControlInformationInDeleteBearerResponse&>(overloadControlInformation.getGroupedIe(msgType, 0)); |
| 486 | rc = groupedIeInstance.encodeMmeS4SgsnsOverloadControlInformationInDeleteBearerResponse(buffer, data.mmeS4SgsnsOverloadControlInformation); |
| 487 | endIndex = buffer.getCurrentIndex(); |
| 488 | length = endIndex - startIndex; |
| 489 | |
| 490 | // encode the length value now |
| 491 | buffer.goToIndex(startIndex - 3); |
| 492 | buffer.writeUint16(length, false); |
| 493 | buffer.goToIndex(endIndex); |
| 494 | |
| 495 | if (!(rc)) |
| 496 | { |
| 497 | errorStream.add((char *)"Failed to encode IE: mmeS4SgsnsOverloadControlInformation\n"); |
| 498 | return false; |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | if (data.sgwsOverloadControlInformationIePresent) |
| 503 | { |
| 504 | |
| 505 | // Encode the Ie Header |
| 506 | header.ieType = OverloadControlInformationIeType; |
| 507 | header.instance = 1; |
| 508 | header.length = 0; // We will encode the IE first and then update the length |
| 509 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 510 | startIndex = buffer.getCurrentIndex(); |
| 511 | OverloadControlInformationIe overloadControlInformation= |
| 512 | dynamic_cast< |
| 513 | OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType)); |
| 514 | SgwsOverloadControlInformationInDeleteBearerResponse groupedIeInstance = |
| 515 | dynamic_cast< |
| 516 | SgwsOverloadControlInformationInDeleteBearerResponse&>(overloadControlInformation.getGroupedIe(msgType, 1)); |
| 517 | rc = groupedIeInstance.encodeSgwsOverloadControlInformationInDeleteBearerResponse(buffer, data.sgwsOverloadControlInformation); |
| 518 | endIndex = buffer.getCurrentIndex(); |
| 519 | length = endIndex - startIndex; |
| 520 | |
| 521 | // encode the length value now |
| 522 | buffer.goToIndex(startIndex - 3); |
| 523 | buffer.writeUint16(length, false); |
| 524 | buffer.goToIndex(endIndex); |
| 525 | |
| 526 | if (!(rc)) |
| 527 | { |
| 528 | errorStream.add((char *)"Failed to encode IE: sgwsOverloadControlInformation\n"); |
| 529 | return false; |
| 530 | } |
| 531 | } |
| 532 | |
| 533 | if (data.mmeS4SgsnIdentifierIePresent) |
| 534 | { |
| 535 | |
| 536 | // Encode the Ie Header |
| 537 | header.ieType = IpAddressIeType; |
| 538 | header.instance = 0; |
| 539 | header.length = 0; // We will encode the IE first and then update the length |
| 540 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 541 | startIndex = buffer.getCurrentIndex(); |
| 542 | IpAddressIe ipAddress= |
| 543 | dynamic_cast< |
| 544 | IpAddressIe&>(GtpV2IeFactory::getInstance().getIeObject(IpAddressIeType)); |
| 545 | rc = ipAddress.encodeIpAddressIe(buffer, data.mmeS4SgsnIdentifier); |
| 546 | endIndex = buffer.getCurrentIndex(); |
| 547 | length = endIndex - startIndex; |
| 548 | |
| 549 | // encode the length value now |
| 550 | buffer.goToIndex(startIndex - 3); |
| 551 | buffer.writeUint16(length, false); |
| 552 | buffer.goToIndex(endIndex); |
| 553 | |
| 554 | if (!(rc)) |
| 555 | { |
| 556 | errorStream.add((char *)"Failed to encode IE: mmeS4SgsnIdentifier\n"); |
| 557 | return false; |
| 558 | } |
| 559 | } |
| 560 | |
| 561 | if (data.twanEpdgsOverloadControlInformationIePresent) |
| 562 | { |
| 563 | |
| 564 | // Encode the Ie Header |
| 565 | header.ieType = OverloadControlInformationIeType; |
| 566 | header.instance = 2; |
| 567 | header.length = 0; // We will encode the IE first and then update the length |
| 568 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 569 | startIndex = buffer.getCurrentIndex(); |
| 570 | OverloadControlInformationIe overloadControlInformation= |
| 571 | dynamic_cast< |
| 572 | OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType)); |
| 573 | TwanEpdgsOverloadControlInformationInDeleteBearerResponse groupedIeInstance = |
| 574 | dynamic_cast< |
| 575 | TwanEpdgsOverloadControlInformationInDeleteBearerResponse&>(overloadControlInformation.getGroupedIe(msgType, 2)); |
| 576 | rc = groupedIeInstance.encodeTwanEpdgsOverloadControlInformationInDeleteBearerResponse(buffer, data.twanEpdgsOverloadControlInformation); |
| 577 | endIndex = buffer.getCurrentIndex(); |
| 578 | length = endIndex - startIndex; |
| 579 | |
| 580 | // encode the length value now |
| 581 | buffer.goToIndex(startIndex - 3); |
| 582 | buffer.writeUint16(length, false); |
| 583 | buffer.goToIndex(endIndex); |
| 584 | |
| 585 | if (!(rc)) |
| 586 | { |
| 587 | errorStream.add((char *)"Failed to encode IE: twanEpdgsOverloadControlInformation\n"); |
| 588 | return false; |
| 589 | } |
| 590 | } |
| 591 | |
| 592 | if (data.wlanLocationInformationIePresent) |
| 593 | { |
| 594 | |
| 595 | // Encode the Ie Header |
| 596 | header.ieType = TwanIdentifierIeType; |
| 597 | header.instance = 1; |
| 598 | header.length = 0; // We will encode the IE first and then update the length |
| 599 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 600 | startIndex = buffer.getCurrentIndex(); |
| 601 | TwanIdentifierIe twanIdentifier= |
| 602 | dynamic_cast< |
| 603 | TwanIdentifierIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierIeType)); |
| 604 | rc = twanIdentifier.encodeTwanIdentifierIe(buffer, data.wlanLocationInformation); |
| 605 | endIndex = buffer.getCurrentIndex(); |
| 606 | length = endIndex - startIndex; |
| 607 | |
| 608 | // encode the length value now |
| 609 | buffer.goToIndex(startIndex - 3); |
| 610 | buffer.writeUint16(length, false); |
| 611 | buffer.goToIndex(endIndex); |
| 612 | |
| 613 | if (!(rc)) |
| 614 | { |
| 615 | errorStream.add((char *)"Failed to encode IE: wlanLocationInformation\n"); |
| 616 | return false; |
| 617 | } |
| 618 | } |
| 619 | |
| 620 | if (data.wlanLocationTimestampIePresent) |
| 621 | { |
| 622 | |
| 623 | // Encode the Ie Header |
| 624 | header.ieType = TwanIdentifierTimestampIeType; |
| 625 | header.instance = 1; |
| 626 | header.length = 0; // We will encode the IE first and then update the length |
| 627 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 628 | startIndex = buffer.getCurrentIndex(); |
| 629 | TwanIdentifierTimestampIe twanIdentifierTimestamp= |
| 630 | dynamic_cast< |
| 631 | TwanIdentifierTimestampIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierTimestampIeType)); |
| 632 | rc = twanIdentifierTimestamp.encodeTwanIdentifierTimestampIe(buffer, data.wlanLocationTimestamp); |
| 633 | endIndex = buffer.getCurrentIndex(); |
| 634 | length = endIndex - startIndex; |
| 635 | |
| 636 | // encode the length value now |
| 637 | buffer.goToIndex(startIndex - 3); |
| 638 | buffer.writeUint16(length, false); |
| 639 | buffer.goToIndex(endIndex); |
| 640 | |
| 641 | if (!(rc)) |
| 642 | { |
| 643 | errorStream.add((char *)"Failed to encode IE: wlanLocationTimestamp\n"); |
| 644 | return false; |
| 645 | } |
| 646 | } |
| 647 | |
| 648 | if (data.ueLocalIpAddressIePresent) |
| 649 | { |
| 650 | |
| 651 | // Encode the Ie Header |
| 652 | header.ieType = IpAddressIeType; |
| 653 | header.instance = 0; |
| 654 | header.length = 0; // We will encode the IE first and then update the length |
| 655 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 656 | startIndex = buffer.getCurrentIndex(); |
| 657 | IpAddressIe ipAddress= |
| 658 | dynamic_cast< |
| 659 | IpAddressIe&>(GtpV2IeFactory::getInstance().getIeObject(IpAddressIeType)); |
| 660 | rc = ipAddress.encodeIpAddressIe(buffer, data.ueLocalIpAddress); |
| 661 | endIndex = buffer.getCurrentIndex(); |
| 662 | length = endIndex - startIndex; |
| 663 | |
| 664 | // encode the length value now |
| 665 | buffer.goToIndex(startIndex - 3); |
| 666 | buffer.writeUint16(length, false); |
| 667 | buffer.goToIndex(endIndex); |
| 668 | |
| 669 | if (!(rc)) |
| 670 | { |
| 671 | errorStream.add((char *)"Failed to encode IE: ueLocalIpAddress\n"); |
| 672 | return false; |
| 673 | } |
| 674 | } |
| 675 | |
| 676 | if (data.ueUdpPortIePresent) |
| 677 | { |
| 678 | |
| 679 | // Encode the Ie Header |
| 680 | header.ieType = PortNumberIeType; |
| 681 | header.instance = 0; |
| 682 | header.length = 0; // We will encode the IE first and then update the length |
| 683 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 684 | startIndex = buffer.getCurrentIndex(); |
| 685 | PortNumberIe portNumber= |
| 686 | dynamic_cast< |
| 687 | PortNumberIe&>(GtpV2IeFactory::getInstance().getIeObject(PortNumberIeType)); |
| 688 | rc = portNumber.encodePortNumberIe(buffer, data.ueUdpPort); |
| 689 | endIndex = buffer.getCurrentIndex(); |
| 690 | length = endIndex - startIndex; |
| 691 | |
| 692 | // encode the length value now |
| 693 | buffer.goToIndex(startIndex - 3); |
| 694 | buffer.writeUint16(length, false); |
| 695 | buffer.goToIndex(endIndex); |
| 696 | |
| 697 | if (!(rc)) |
| 698 | { |
| 699 | errorStream.add((char *)"Failed to encode IE: ueUdpPort\n"); |
| 700 | return false; |
| 701 | } |
| 702 | } |
| 703 | |
| 704 | if (data.nbifomContainerIePresent) |
| 705 | { |
| 706 | |
| 707 | // Encode the Ie Header |
| 708 | header.ieType = FContainerIeType; |
| 709 | header.instance = 0; |
| 710 | header.length = 0; // We will encode the IE first and then update the length |
| 711 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 712 | startIndex = buffer.getCurrentIndex(); |
| 713 | FContainerIe fContainer= |
| 714 | dynamic_cast< |
| 715 | FContainerIe&>(GtpV2IeFactory::getInstance().getIeObject(FContainerIeType)); |
| 716 | rc = fContainer.encodeFContainerIe(buffer, data.nbifomContainer); |
| 717 | endIndex = buffer.getCurrentIndex(); |
| 718 | length = endIndex - startIndex; |
| 719 | |
| 720 | // encode the length value now |
| 721 | buffer.goToIndex(startIndex - 3); |
| 722 | buffer.writeUint16(length, false); |
| 723 | buffer.goToIndex(endIndex); |
| 724 | |
| 725 | if (!(rc)) |
| 726 | { |
| 727 | errorStream.add((char *)"Failed to encode IE: nbifomContainer\n"); |
| 728 | return false; |
| 729 | } |
| 730 | } |
| 731 | |
| 732 | if (data.ueTcpPortIePresent) |
| 733 | { |
| 734 | |
| 735 | // Encode the Ie Header |
| 736 | header.ieType = PortNumberIeType; |
| 737 | header.instance = 1; |
| 738 | header.length = 0; // We will encode the IE first and then update the length |
| 739 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 740 | startIndex = buffer.getCurrentIndex(); |
| 741 | PortNumberIe portNumber= |
| 742 | dynamic_cast< |
| 743 | PortNumberIe&>(GtpV2IeFactory::getInstance().getIeObject(PortNumberIeType)); |
| 744 | rc = portNumber.encodePortNumberIe(buffer, data.ueTcpPort); |
| 745 | endIndex = buffer.getCurrentIndex(); |
| 746 | length = endIndex - startIndex; |
| 747 | |
| 748 | // encode the length value now |
| 749 | buffer.goToIndex(startIndex - 3); |
| 750 | buffer.writeUint16(length, false); |
| 751 | buffer.goToIndex(endIndex); |
| 752 | |
| 753 | if (!(rc)) |
| 754 | { |
| 755 | errorStream.add((char *)"Failed to encode IE: ueTcpPort\n"); |
| 756 | return false; |
| 757 | } |
| 758 | } |
| 759 | |
| 760 | if (data.secondaryRatUsageDataReportIePresent) |
| 761 | { |
| 762 | |
| 763 | // Encode the Ie Header |
| 764 | header.ieType = SecondaryRatUsageDataReportIeType; |
| 765 | header.instance = 0; |
| 766 | header.length = 0; // We will encode the IE first and then update the length |
| 767 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 768 | startIndex = buffer.getCurrentIndex(); |
| 769 | SecondaryRatUsageDataReportIe secondaryRatUsageDataReport= |
| 770 | dynamic_cast< |
| 771 | SecondaryRatUsageDataReportIe&>(GtpV2IeFactory::getInstance().getIeObject(SecondaryRatUsageDataReportIeType)); |
| 772 | rc = secondaryRatUsageDataReport.encodeSecondaryRatUsageDataReportIe(buffer, data.secondaryRatUsageDataReport); |
| 773 | endIndex = buffer.getCurrentIndex(); |
| 774 | length = endIndex - startIndex; |
| 775 | |
| 776 | // encode the length value now |
| 777 | buffer.goToIndex(startIndex - 3); |
| 778 | buffer.writeUint16(length, false); |
| 779 | buffer.goToIndex(endIndex); |
| 780 | |
| 781 | if (!(rc)) |
| 782 | { |
| 783 | errorStream.add((char *)"Failed to encode IE: secondaryRatUsageDataReport\n"); |
| 784 | return false; |
| 785 | } |
| 786 | } |
| 787 | return rc; |
| 788 | |
| 789 | } |
| 790 | |
| 791 | bool DeleteBearerResponseMsg::decodeDeleteBearerResponseMsg(MsgBuffer &buffer, |
| 792 | DeleteBearerResponseMsgData |
| 793 | &data, Uint16 length) |
| 794 | { |
| 795 | |
| 796 | bool rc = false; |
| 797 | GtpV2IeHeader ieHeader; |
| 798 | |
| 799 | set<Uint16> mandatoryIeLocalList = mandatoryIeSet; |
| 800 | while (buffer.lengthLeft() > IE_HEADER_SIZE) |
| 801 | { |
| 802 | GtpV2Ie::decodeGtpV2IeHeader(buffer, ieHeader); |
| 803 | if (ieHeader.length > buffer.lengthLeft()) |
| 804 | { |
| 805 | // We do not have enough bytes left in the message for this IE |
| 806 | errorStream.add((char *)"IE Length exceeds beyond message boundary\n"); |
| 807 | errorStream.add((char *)" Offending IE Type: "); |
| 808 | errorStream.add(ieHeader.ieType); |
| 809 | errorStream.add((char *)"\n Ie Length in Header: "); |
| 810 | errorStream.add(ieHeader.length); |
| 811 | errorStream.add((char *)"\n Bytes left in message: "); |
| 812 | errorStream.add(buffer.lengthLeft()); |
| 813 | errorStream.endOfLine(); |
| 814 | return false; |
| 815 | } |
| 816 | |
| 817 | switch (ieHeader.ieType){ |
| 818 | |
| 819 | case CauseIeType: |
| 820 | { |
| 821 | CauseIe ieObject = |
| 822 | dynamic_cast< |
| 823 | CauseIe&>(GtpV2IeFactory::getInstance().getIeObject(CauseIeType)); |
| 824 | |
| 825 | if(ieHeader.instance == 0) |
| 826 | { |
| 827 | rc = ieObject.decodeCauseIe(buffer, data.cause, ieHeader.length); |
| 828 | |
| 829 | if (!(rc)) |
| 830 | { |
| 831 | errorStream.add((char *)"Failed to decode IE: cause\n"); |
| 832 | return false; |
| 833 | } |
| 834 | } |
| 835 | |
| 836 | else |
| 837 | { |
| 838 | // Unknown IE instance print error |
| 839 | errorStream.add((char *)"Unknown IE Type: "); |
| 840 | errorStream.add(ieHeader.ieType); |
| 841 | errorStream.endOfLine(); |
| 842 | buffer.skipBytes(ieHeader.length); |
| 843 | } |
| 844 | break; |
| 845 | } |
| 846 | |
| 847 | case EbiIeType: |
| 848 | { |
| 849 | EbiIe ieObject = |
| 850 | dynamic_cast< |
| 851 | EbiIe&>(GtpV2IeFactory::getInstance().getIeObject(EbiIeType)); |
| 852 | |
| 853 | if(ieHeader.instance == 0) |
| 854 | { |
| 855 | rc = ieObject.decodeEbiIe(buffer, data.linkedEpsBearerId, ieHeader.length); |
| 856 | |
| 857 | data.linkedEpsBearerIdIePresent = true; |
| 858 | if (!(rc)) |
| 859 | { |
| 860 | errorStream.add((char *)"Failed to decode IE: linkedEpsBearerId\n"); |
| 861 | return false; |
| 862 | } |
| 863 | } |
| 864 | |
| 865 | else |
| 866 | { |
| 867 | // Unknown IE instance print error |
| 868 | errorStream.add((char *)"Unknown IE Type: "); |
| 869 | errorStream.add(ieHeader.ieType); |
| 870 | errorStream.endOfLine(); |
| 871 | buffer.skipBytes(ieHeader.length); |
| 872 | } |
| 873 | break; |
| 874 | } |
| 875 | |
| 876 | case BearerContextIeType: |
| 877 | { |
| 878 | BearerContextIe ieObject = |
| 879 | dynamic_cast< |
| 880 | BearerContextIe&>(GtpV2IeFactory::getInstance().getIeObject(BearerContextIeType)); |
| 881 | |
| 882 | if(ieHeader.instance == 0) |
| 883 | { |
| 884 | // First check if we have enough space left to decode and store this instance |
| 885 | if (data.bearerContextsCount == 11) |
| 886 | { |
| 887 | errorStream.add((char *)"More than 11 instances of bearerContexts received\n"); |
| 888 | return false; |
| 889 | } |
| 890 | BearerContextsInDeleteBearerResponse groupedIeInstance = |
| 891 | dynamic_cast< |
| 892 | BearerContextsInDeleteBearerResponse&>(ieObject.getGroupedIe(msgType, 0)); |
| 893 | rc = groupedIeInstance.decodeBearerContextsInDeleteBearerResponse(buffer, |
| 894 | data.bearerContexts[data.bearerContextsCount], ieHeader.length); |
| 895 | data.bearerContextsCount++; // TODO Count validation |
| 896 | |
| 897 | if (!(rc)) |
| 898 | { |
| 899 | errorStream.add((char *)"Failed to decode IE: bearerContexts\n"); |
| 900 | return false; |
| 901 | } |
| 902 | } |
| 903 | |
| 904 | else |
| 905 | { |
| 906 | // Unknown IE instance print error |
| 907 | errorStream.add((char *)"Unknown IE Type: "); |
| 908 | errorStream.add(ieHeader.ieType); |
| 909 | errorStream.endOfLine(); |
| 910 | buffer.skipBytes(ieHeader.length); |
| 911 | } |
| 912 | break; |
| 913 | } |
| 914 | |
| 915 | case RecoveryIeType: |
| 916 | { |
| 917 | RecoveryIe ieObject = |
| 918 | dynamic_cast< |
| 919 | RecoveryIe&>(GtpV2IeFactory::getInstance().getIeObject(RecoveryIeType)); |
| 920 | |
| 921 | if(ieHeader.instance == 0) |
| 922 | { |
| 923 | rc = ieObject.decodeRecoveryIe(buffer, data.recovery, ieHeader.length); |
| 924 | |
| 925 | data.recoveryIePresent = true; |
| 926 | if (!(rc)) |
| 927 | { |
| 928 | errorStream.add((char *)"Failed to decode IE: recovery\n"); |
| 929 | return false; |
| 930 | } |
| 931 | } |
| 932 | |
| 933 | else |
| 934 | { |
| 935 | // Unknown IE instance print error |
| 936 | errorStream.add((char *)"Unknown IE Type: "); |
| 937 | errorStream.add(ieHeader.ieType); |
| 938 | errorStream.endOfLine(); |
| 939 | buffer.skipBytes(ieHeader.length); |
| 940 | } |
| 941 | break; |
| 942 | } |
| 943 | |
| 944 | case FqCsidIeType: |
| 945 | { |
| 946 | FqCsidIe ieObject = |
| 947 | dynamic_cast< |
| 948 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 949 | |
| 950 | if(ieHeader.instance == 0) |
| 951 | { |
| 952 | rc = ieObject.decodeFqCsidIe(buffer, data.mmeFqCsid, ieHeader.length); |
| 953 | |
| 954 | data.mmeFqCsidIePresent = true; |
| 955 | if (!(rc)) |
| 956 | { |
| 957 | errorStream.add((char *)"Failed to decode IE: mmeFqCsid\n"); |
| 958 | return false; |
| 959 | } |
| 960 | } |
| 961 | else if(ieHeader.instance == 1) |
| 962 | { |
| 963 | rc = ieObject.decodeFqCsidIe(buffer, data.sgwFqCsid, ieHeader.length); |
| 964 | |
| 965 | data.sgwFqCsidIePresent = true; |
| 966 | if (!(rc)) |
| 967 | { |
| 968 | errorStream.add((char *)"Failed to decode IE: sgwFqCsid\n"); |
| 969 | return false; |
| 970 | } |
| 971 | } |
| 972 | else if(ieHeader.instance == 2) |
| 973 | { |
| 974 | rc = ieObject.decodeFqCsidIe(buffer, data.epdgFqCsid, ieHeader.length); |
| 975 | |
| 976 | data.epdgFqCsidIePresent = true; |
| 977 | if (!(rc)) |
| 978 | { |
| 979 | errorStream.add((char *)"Failed to decode IE: epdgFqCsid\n"); |
| 980 | return false; |
| 981 | } |
| 982 | } |
| 983 | else if(ieHeader.instance == 3) |
| 984 | { |
| 985 | rc = ieObject.decodeFqCsidIe(buffer, data.twanFqCsid, ieHeader.length); |
| 986 | |
| 987 | data.twanFqCsidIePresent = true; |
| 988 | if (!(rc)) |
| 989 | { |
| 990 | errorStream.add((char *)"Failed to decode IE: twanFqCsid\n"); |
| 991 | return false; |
| 992 | } |
| 993 | } |
| 994 | |
| 995 | else |
| 996 | { |
| 997 | // Unknown IE instance print error |
| 998 | errorStream.add((char *)"Unknown IE Type: "); |
| 999 | errorStream.add(ieHeader.ieType); |
| 1000 | errorStream.endOfLine(); |
| 1001 | buffer.skipBytes(ieHeader.length); |
| 1002 | } |
| 1003 | break; |
| 1004 | } |
| 1005 | |
| 1006 | case PcoIeType: |
| 1007 | { |
| 1008 | PcoIe ieObject = |
| 1009 | dynamic_cast< |
| 1010 | PcoIe&>(GtpV2IeFactory::getInstance().getIeObject(PcoIeType)); |
| 1011 | |
| 1012 | if(ieHeader.instance == 0) |
| 1013 | { |
| 1014 | rc = ieObject.decodePcoIe(buffer, data.protocolConfigurationOptions, ieHeader.length); |
| 1015 | |
| 1016 | data.protocolConfigurationOptionsIePresent = true; |
| 1017 | if (!(rc)) |
| 1018 | { |
| 1019 | errorStream.add((char *)"Failed to decode IE: protocolConfigurationOptions\n"); |
| 1020 | return false; |
| 1021 | } |
| 1022 | } |
| 1023 | |
| 1024 | else |
| 1025 | { |
| 1026 | // Unknown IE instance print error |
| 1027 | errorStream.add((char *)"Unknown IE Type: "); |
| 1028 | errorStream.add(ieHeader.ieType); |
| 1029 | errorStream.endOfLine(); |
| 1030 | buffer.skipBytes(ieHeader.length); |
| 1031 | } |
| 1032 | break; |
| 1033 | } |
| 1034 | |
| 1035 | case UeTimeZoneIeType: |
| 1036 | { |
| 1037 | UeTimeZoneIe ieObject = |
| 1038 | dynamic_cast< |
| 1039 | UeTimeZoneIe&>(GtpV2IeFactory::getInstance().getIeObject(UeTimeZoneIeType)); |
| 1040 | |
| 1041 | if(ieHeader.instance == 0) |
| 1042 | { |
| 1043 | rc = ieObject.decodeUeTimeZoneIe(buffer, data.ueTimeZone, ieHeader.length); |
| 1044 | |
| 1045 | data.ueTimeZoneIePresent = true; |
| 1046 | if (!(rc)) |
| 1047 | { |
| 1048 | errorStream.add((char *)"Failed to decode IE: ueTimeZone\n"); |
| 1049 | return false; |
| 1050 | } |
| 1051 | } |
| 1052 | |
| 1053 | else |
| 1054 | { |
| 1055 | // Unknown IE instance print error |
| 1056 | errorStream.add((char *)"Unknown IE Type: "); |
| 1057 | errorStream.add(ieHeader.ieType); |
| 1058 | errorStream.endOfLine(); |
| 1059 | buffer.skipBytes(ieHeader.length); |
| 1060 | } |
| 1061 | break; |
| 1062 | } |
| 1063 | |
| 1064 | case UliIeType: |
| 1065 | { |
| 1066 | UliIe ieObject = |
| 1067 | dynamic_cast< |
| 1068 | UliIe&>(GtpV2IeFactory::getInstance().getIeObject(UliIeType)); |
| 1069 | |
| 1070 | if(ieHeader.instance == 0) |
| 1071 | { |
| 1072 | rc = ieObject.decodeUliIe(buffer, data.userLocationInformation, ieHeader.length); |
| 1073 | |
| 1074 | data.userLocationInformationIePresent = true; |
| 1075 | if (!(rc)) |
| 1076 | { |
| 1077 | errorStream.add((char *)"Failed to decode IE: userLocationInformation\n"); |
| 1078 | return false; |
| 1079 | } |
| 1080 | } |
| 1081 | |
| 1082 | else |
| 1083 | { |
| 1084 | // Unknown IE instance print error |
| 1085 | errorStream.add((char *)"Unknown IE Type: "); |
| 1086 | errorStream.add(ieHeader.ieType); |
| 1087 | errorStream.endOfLine(); |
| 1088 | buffer.skipBytes(ieHeader.length); |
| 1089 | } |
| 1090 | break; |
| 1091 | } |
| 1092 | |
| 1093 | case UliTimestampIeType: |
| 1094 | { |
| 1095 | UliTimestampIe ieObject = |
| 1096 | dynamic_cast< |
| 1097 | UliTimestampIe&>(GtpV2IeFactory::getInstance().getIeObject(UliTimestampIeType)); |
| 1098 | |
| 1099 | if(ieHeader.instance == 0) |
| 1100 | { |
| 1101 | rc = ieObject.decodeUliTimestampIe(buffer, data.uliTimestamp, ieHeader.length); |
| 1102 | |
| 1103 | data.uliTimestampIePresent = true; |
| 1104 | if (!(rc)) |
| 1105 | { |
| 1106 | errorStream.add((char *)"Failed to decode IE: uliTimestamp\n"); |
| 1107 | return false; |
| 1108 | } |
| 1109 | } |
| 1110 | |
| 1111 | else |
| 1112 | { |
| 1113 | // Unknown IE instance print error |
| 1114 | errorStream.add((char *)"Unknown IE Type: "); |
| 1115 | errorStream.add(ieHeader.ieType); |
| 1116 | errorStream.endOfLine(); |
| 1117 | buffer.skipBytes(ieHeader.length); |
| 1118 | } |
| 1119 | break; |
| 1120 | } |
| 1121 | |
| 1122 | case TwanIdentifierIeType: |
| 1123 | { |
| 1124 | TwanIdentifierIe ieObject = |
| 1125 | dynamic_cast< |
| 1126 | TwanIdentifierIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierIeType)); |
| 1127 | |
| 1128 | if(ieHeader.instance == 0) |
| 1129 | { |
| 1130 | rc = ieObject.decodeTwanIdentifierIe(buffer, data.twanIdentifier, ieHeader.length); |
| 1131 | |
| 1132 | data.twanIdentifierIePresent = true; |
| 1133 | if (!(rc)) |
| 1134 | { |
| 1135 | errorStream.add((char *)"Failed to decode IE: twanIdentifier\n"); |
| 1136 | return false; |
| 1137 | } |
| 1138 | } |
| 1139 | else if(ieHeader.instance == 1) |
| 1140 | { |
| 1141 | rc = ieObject.decodeTwanIdentifierIe(buffer, data.wlanLocationInformation, ieHeader.length); |
| 1142 | |
| 1143 | data.wlanLocationInformationIePresent = true; |
| 1144 | if (!(rc)) |
| 1145 | { |
| 1146 | errorStream.add((char *)"Failed to decode IE: wlanLocationInformation\n"); |
| 1147 | return false; |
| 1148 | } |
| 1149 | } |
| 1150 | |
| 1151 | else |
| 1152 | { |
| 1153 | // Unknown IE instance print error |
| 1154 | errorStream.add((char *)"Unknown IE Type: "); |
| 1155 | errorStream.add(ieHeader.ieType); |
| 1156 | errorStream.endOfLine(); |
| 1157 | buffer.skipBytes(ieHeader.length); |
| 1158 | } |
| 1159 | break; |
| 1160 | } |
| 1161 | |
| 1162 | case TwanIdentifierTimestampIeType: |
| 1163 | { |
| 1164 | TwanIdentifierTimestampIe ieObject = |
| 1165 | dynamic_cast< |
| 1166 | TwanIdentifierTimestampIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierTimestampIeType)); |
| 1167 | |
| 1168 | if(ieHeader.instance == 0) |
| 1169 | { |
| 1170 | rc = ieObject.decodeTwanIdentifierTimestampIe(buffer, data.twanIdentifierTimestamp, ieHeader.length); |
| 1171 | |
| 1172 | data.twanIdentifierTimestampIePresent = true; |
| 1173 | if (!(rc)) |
| 1174 | { |
| 1175 | errorStream.add((char *)"Failed to decode IE: twanIdentifierTimestamp\n"); |
| 1176 | return false; |
| 1177 | } |
| 1178 | } |
| 1179 | else if(ieHeader.instance == 1) |
| 1180 | { |
| 1181 | rc = ieObject.decodeTwanIdentifierTimestampIe(buffer, data.wlanLocationTimestamp, ieHeader.length); |
| 1182 | |
| 1183 | data.wlanLocationTimestampIePresent = true; |
| 1184 | if (!(rc)) |
| 1185 | { |
| 1186 | errorStream.add((char *)"Failed to decode IE: wlanLocationTimestamp\n"); |
| 1187 | return false; |
| 1188 | } |
| 1189 | } |
| 1190 | |
| 1191 | else |
| 1192 | { |
| 1193 | // Unknown IE instance print error |
| 1194 | errorStream.add((char *)"Unknown IE Type: "); |
| 1195 | errorStream.add(ieHeader.ieType); |
| 1196 | errorStream.endOfLine(); |
| 1197 | buffer.skipBytes(ieHeader.length); |
| 1198 | } |
| 1199 | break; |
| 1200 | } |
| 1201 | |
| 1202 | case OverloadControlInformationIeType: |
| 1203 | { |
| 1204 | OverloadControlInformationIe ieObject = |
| 1205 | dynamic_cast< |
| 1206 | OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType)); |
| 1207 | |
| 1208 | if(ieHeader.instance == 0) |
| 1209 | { |
| 1210 | MmeS4SgsnsOverloadControlInformationInDeleteBearerResponse groupedIeInstance = |
| 1211 | dynamic_cast< |
| 1212 | MmeS4SgsnsOverloadControlInformationInDeleteBearerResponse&>(ieObject.getGroupedIe(msgType, 0)); |
| 1213 | rc = groupedIeInstance.decodeMmeS4SgsnsOverloadControlInformationInDeleteBearerResponse(buffer, data.mmeS4SgsnsOverloadControlInformation, ieHeader.length); |
| 1214 | |
| 1215 | data.mmeS4SgsnsOverloadControlInformationIePresent = true; |
| 1216 | if (!(rc)) |
| 1217 | { |
| 1218 | errorStream.add((char *)"Failed to decode IE: mmeS4SgsnsOverloadControlInformation\n"); |
| 1219 | return false; |
| 1220 | } |
| 1221 | } |
| 1222 | else if(ieHeader.instance == 1) |
| 1223 | { |
| 1224 | SgwsOverloadControlInformationInDeleteBearerResponse groupedIeInstance = |
| 1225 | dynamic_cast< |
| 1226 | SgwsOverloadControlInformationInDeleteBearerResponse&>(ieObject.getGroupedIe(msgType, 1)); |
| 1227 | rc = groupedIeInstance.decodeSgwsOverloadControlInformationInDeleteBearerResponse(buffer, data.sgwsOverloadControlInformation, ieHeader.length); |
| 1228 | |
| 1229 | data.sgwsOverloadControlInformationIePresent = true; |
| 1230 | if (!(rc)) |
| 1231 | { |
| 1232 | errorStream.add((char *)"Failed to decode IE: sgwsOverloadControlInformation\n"); |
| 1233 | return false; |
| 1234 | } |
| 1235 | } |
| 1236 | else if(ieHeader.instance == 2) |
| 1237 | { |
| 1238 | TwanEpdgsOverloadControlInformationInDeleteBearerResponse groupedIeInstance = |
| 1239 | dynamic_cast< |
| 1240 | TwanEpdgsOverloadControlInformationInDeleteBearerResponse&>(ieObject.getGroupedIe(msgType, 2)); |
| 1241 | rc = groupedIeInstance.decodeTwanEpdgsOverloadControlInformationInDeleteBearerResponse(buffer, data.twanEpdgsOverloadControlInformation, ieHeader.length); |
| 1242 | |
| 1243 | data.twanEpdgsOverloadControlInformationIePresent = true; |
| 1244 | if (!(rc)) |
| 1245 | { |
| 1246 | errorStream.add((char *)"Failed to decode IE: twanEpdgsOverloadControlInformation\n"); |
| 1247 | return false; |
| 1248 | } |
| 1249 | } |
| 1250 | |
| 1251 | else |
| 1252 | { |
| 1253 | // Unknown IE instance print error |
| 1254 | errorStream.add((char *)"Unknown IE Type: "); |
| 1255 | errorStream.add(ieHeader.ieType); |
| 1256 | errorStream.endOfLine(); |
| 1257 | buffer.skipBytes(ieHeader.length); |
| 1258 | } |
| 1259 | break; |
| 1260 | } |
| 1261 | |
| 1262 | case IpAddressIeType: |
| 1263 | { |
| 1264 | IpAddressIe ieObject = |
| 1265 | dynamic_cast< |
| 1266 | IpAddressIe&>(GtpV2IeFactory::getInstance().getIeObject(IpAddressIeType)); |
| 1267 | |
| 1268 | if(ieHeader.instance == 0) |
| 1269 | { |
| 1270 | rc = ieObject.decodeIpAddressIe(buffer, data.mmeS4SgsnIdentifier, ieHeader.length); |
| 1271 | |
| 1272 | data.mmeS4SgsnIdentifierIePresent = true; |
| 1273 | if (!(rc)) |
| 1274 | { |
| 1275 | errorStream.add((char *)"Failed to decode IE: mmeS4SgsnIdentifier\n"); |
| 1276 | return false; |
| 1277 | } |
| 1278 | } |
| 1279 | else if(ieHeader.instance == 0) |
| 1280 | { |
| 1281 | rc = ieObject.decodeIpAddressIe(buffer, data.ueLocalIpAddress, ieHeader.length); |
| 1282 | |
| 1283 | data.ueLocalIpAddressIePresent = true; |
| 1284 | if (!(rc)) |
| 1285 | { |
| 1286 | errorStream.add((char *)"Failed to decode IE: ueLocalIpAddress\n"); |
| 1287 | return false; |
| 1288 | } |
| 1289 | } |
| 1290 | |
| 1291 | else |
| 1292 | { |
| 1293 | // Unknown IE instance print error |
| 1294 | errorStream.add((char *)"Unknown IE Type: "); |
| 1295 | errorStream.add(ieHeader.ieType); |
| 1296 | errorStream.endOfLine(); |
| 1297 | buffer.skipBytes(ieHeader.length); |
| 1298 | } |
| 1299 | break; |
| 1300 | } |
| 1301 | |
| 1302 | case PortNumberIeType: |
| 1303 | { |
| 1304 | PortNumberIe ieObject = |
| 1305 | dynamic_cast< |
| 1306 | PortNumberIe&>(GtpV2IeFactory::getInstance().getIeObject(PortNumberIeType)); |
| 1307 | |
| 1308 | if(ieHeader.instance == 0) |
| 1309 | { |
| 1310 | rc = ieObject.decodePortNumberIe(buffer, data.ueUdpPort, ieHeader.length); |
| 1311 | |
| 1312 | data.ueUdpPortIePresent = true; |
| 1313 | if (!(rc)) |
| 1314 | { |
| 1315 | errorStream.add((char *)"Failed to decode IE: ueUdpPort\n"); |
| 1316 | return false; |
| 1317 | } |
| 1318 | } |
| 1319 | else if(ieHeader.instance == 1) |
| 1320 | { |
| 1321 | rc = ieObject.decodePortNumberIe(buffer, data.ueTcpPort, ieHeader.length); |
| 1322 | |
| 1323 | data.ueTcpPortIePresent = true; |
| 1324 | if (!(rc)) |
| 1325 | { |
| 1326 | errorStream.add((char *)"Failed to decode IE: ueTcpPort\n"); |
| 1327 | return false; |
| 1328 | } |
| 1329 | } |
| 1330 | |
| 1331 | else |
| 1332 | { |
| 1333 | // Unknown IE instance print error |
| 1334 | errorStream.add((char *)"Unknown IE Type: "); |
| 1335 | errorStream.add(ieHeader.ieType); |
| 1336 | errorStream.endOfLine(); |
| 1337 | buffer.skipBytes(ieHeader.length); |
| 1338 | } |
| 1339 | break; |
| 1340 | } |
| 1341 | |
| 1342 | case FContainerIeType: |
| 1343 | { |
| 1344 | FContainerIe ieObject = |
| 1345 | dynamic_cast< |
| 1346 | FContainerIe&>(GtpV2IeFactory::getInstance().getIeObject(FContainerIeType)); |
| 1347 | |
| 1348 | if(ieHeader.instance == 0) |
| 1349 | { |
| 1350 | rc = ieObject.decodeFContainerIe(buffer, data.nbifomContainer, ieHeader.length); |
| 1351 | |
| 1352 | data.nbifomContainerIePresent = true; |
| 1353 | if (!(rc)) |
| 1354 | { |
| 1355 | errorStream.add((char *)"Failed to decode IE: nbifomContainer\n"); |
| 1356 | return false; |
| 1357 | } |
| 1358 | } |
| 1359 | |
| 1360 | else |
| 1361 | { |
| 1362 | // Unknown IE instance print error |
| 1363 | errorStream.add((char *)"Unknown IE Type: "); |
| 1364 | errorStream.add(ieHeader.ieType); |
| 1365 | errorStream.endOfLine(); |
| 1366 | buffer.skipBytes(ieHeader.length); |
| 1367 | } |
| 1368 | break; |
| 1369 | } |
| 1370 | |
| 1371 | case SecondaryRatUsageDataReportIeType: |
| 1372 | { |
| 1373 | SecondaryRatUsageDataReportIe ieObject = |
| 1374 | dynamic_cast< |
| 1375 | SecondaryRatUsageDataReportIe&>(GtpV2IeFactory::getInstance().getIeObject(SecondaryRatUsageDataReportIeType)); |
| 1376 | |
| 1377 | if(ieHeader.instance == 0) |
| 1378 | { |
| 1379 | rc = ieObject.decodeSecondaryRatUsageDataReportIe(buffer, data.secondaryRatUsageDataReport, ieHeader.length); |
| 1380 | |
| 1381 | data.secondaryRatUsageDataReportIePresent = true; |
| 1382 | if (!(rc)) |
| 1383 | { |
| 1384 | errorStream.add((char *)"Failed to decode IE: secondaryRatUsageDataReport\n"); |
| 1385 | return false; |
| 1386 | } |
| 1387 | } |
| 1388 | |
| 1389 | else |
| 1390 | { |
| 1391 | // Unknown IE instance print error |
| 1392 | errorStream.add((char *)"Unknown IE Type: "); |
| 1393 | errorStream.add(ieHeader.ieType); |
| 1394 | errorStream.endOfLine(); |
| 1395 | buffer.skipBytes(ieHeader.length); |
| 1396 | } |
| 1397 | break; |
| 1398 | } |
| 1399 | |
| 1400 | default: |
| 1401 | { |
| 1402 | // Unknown IE print error |
| 1403 | errorStream.add((char *)"Unknown IE Type: "); |
| 1404 | errorStream.add(ieHeader.ieType); |
| 1405 | errorStream.endOfLine(); |
| 1406 | buffer.skipBytes(ieHeader.length); |
| 1407 | } |
| 1408 | } |
| 1409 | } |
| 1410 | return rc; // TODO validations |
| 1411 | } |
| 1412 | |
| 1413 | void DeleteBearerResponseMsg:: |
| 1414 | displayDeleteBearerResponseMsgData_v(DeleteBearerResponseMsgData const &data, Debug &stream) |
| 1415 | { |
| 1416 | stream.incrIndent(); |
| 1417 | stream.add((char *)"DeleteBearerResponseMsg:"); |
| 1418 | stream.endOfLine(); |
| 1419 | stream.incrIndent(); |
| 1420 | |
| 1421 | |
| 1422 | stream.add((char *)"IE - cause:"); |
| 1423 | stream.endOfLine(); |
| 1424 | CauseIe cause= |
| 1425 | dynamic_cast< |
| 1426 | CauseIe&>(GtpV2IeFactory::getInstance().getIeObject(CauseIeType)); |
| 1427 | cause.displayCauseIe_v(data.cause, stream); |
| 1428 | |
| 1429 | if (data.linkedEpsBearerIdIePresent) |
| 1430 | { |
| 1431 | |
| 1432 | |
| 1433 | stream.add((char *)"IE - linkedEpsBearerId:"); |
| 1434 | stream.endOfLine(); |
| 1435 | EbiIe ebi= |
| 1436 | dynamic_cast< |
| 1437 | EbiIe&>(GtpV2IeFactory::getInstance().getIeObject(EbiIeType)); |
| 1438 | ebi.displayEbiIe_v(data.linkedEpsBearerId, stream); |
| 1439 | |
| 1440 | } |
| 1441 | |
| 1442 | Uint8 displayCount; |
| 1443 | |
| 1444 | displayCount = data.bearerContextsCount; |
| 1445 | if (displayCount > 11) |
| 1446 | { |
| 1447 | stream.add((char *)"Invalid data more than 11 instances"); |
| 1448 | stream.endOfLine(); |
| 1449 | stream.add((char *)"Displaying only 11"); |
| 1450 | stream.endOfLine(); |
| 1451 | displayCount = 11; |
| 1452 | } |
| 1453 | for (Uint8 i = 0; i < displayCount; i++) |
| 1454 | { |
| 1455 | stream.add((char *)"IE - bearerContexts:"); |
| 1456 | stream.endOfLine(); |
| 1457 | BearerContextIe bearerContext= |
| 1458 | dynamic_cast< |
| 1459 | BearerContextIe&>(GtpV2IeFactory::getInstance().getIeObject(BearerContextIeType)); |
| 1460 | BearerContextsInDeleteBearerResponse groupedIeInstance = |
| 1461 | dynamic_cast< |
| 1462 | BearerContextsInDeleteBearerResponse&>(bearerContext.getGroupedIe(msgType, 0)); |
| 1463 | groupedIeInstance.displayBearerContextsInDeleteBearerResponseData_v(data.bearerContexts[i], stream); |
| 1464 | } |
| 1465 | |
| 1466 | |
| 1467 | |
| 1468 | |
| 1469 | if (data.recoveryIePresent) |
| 1470 | { |
| 1471 | |
| 1472 | |
| 1473 | stream.add((char *)"IE - recovery:"); |
| 1474 | stream.endOfLine(); |
| 1475 | RecoveryIe recovery= |
| 1476 | dynamic_cast< |
| 1477 | RecoveryIe&>(GtpV2IeFactory::getInstance().getIeObject(RecoveryIeType)); |
| 1478 | recovery.displayRecoveryIe_v(data.recovery, stream); |
| 1479 | |
| 1480 | } |
| 1481 | if (data.mmeFqCsidIePresent) |
| 1482 | { |
| 1483 | |
| 1484 | |
| 1485 | stream.add((char *)"IE - mmeFqCsid:"); |
| 1486 | stream.endOfLine(); |
| 1487 | FqCsidIe fqCsid= |
| 1488 | dynamic_cast< |
| 1489 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 1490 | fqCsid.displayFqCsidIe_v(data.mmeFqCsid, stream); |
| 1491 | |
| 1492 | } |
| 1493 | if (data.sgwFqCsidIePresent) |
| 1494 | { |
| 1495 | |
| 1496 | |
| 1497 | stream.add((char *)"IE - sgwFqCsid:"); |
| 1498 | stream.endOfLine(); |
| 1499 | FqCsidIe fqCsid= |
| 1500 | dynamic_cast< |
| 1501 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 1502 | fqCsid.displayFqCsidIe_v(data.sgwFqCsid, stream); |
| 1503 | |
| 1504 | } |
| 1505 | if (data.epdgFqCsidIePresent) |
| 1506 | { |
| 1507 | |
| 1508 | |
| 1509 | stream.add((char *)"IE - epdgFqCsid:"); |
| 1510 | stream.endOfLine(); |
| 1511 | FqCsidIe fqCsid= |
| 1512 | dynamic_cast< |
| 1513 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 1514 | fqCsid.displayFqCsidIe_v(data.epdgFqCsid, stream); |
| 1515 | |
| 1516 | } |
| 1517 | if (data.twanFqCsidIePresent) |
| 1518 | { |
| 1519 | |
| 1520 | |
| 1521 | stream.add((char *)"IE - twanFqCsid:"); |
| 1522 | stream.endOfLine(); |
| 1523 | FqCsidIe fqCsid= |
| 1524 | dynamic_cast< |
| 1525 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 1526 | fqCsid.displayFqCsidIe_v(data.twanFqCsid, stream); |
| 1527 | |
| 1528 | } |
| 1529 | if (data.protocolConfigurationOptionsIePresent) |
| 1530 | { |
| 1531 | |
| 1532 | |
| 1533 | stream.add((char *)"IE - protocolConfigurationOptions:"); |
| 1534 | stream.endOfLine(); |
| 1535 | PcoIe pco= |
| 1536 | dynamic_cast< |
| 1537 | PcoIe&>(GtpV2IeFactory::getInstance().getIeObject(PcoIeType)); |
| 1538 | pco.displayPcoIe_v(data.protocolConfigurationOptions, stream); |
| 1539 | |
| 1540 | } |
| 1541 | if (data.ueTimeZoneIePresent) |
| 1542 | { |
| 1543 | |
| 1544 | |
| 1545 | stream.add((char *)"IE - ueTimeZone:"); |
| 1546 | stream.endOfLine(); |
| 1547 | UeTimeZoneIe ueTimeZone= |
| 1548 | dynamic_cast< |
| 1549 | UeTimeZoneIe&>(GtpV2IeFactory::getInstance().getIeObject(UeTimeZoneIeType)); |
| 1550 | ueTimeZone.displayUeTimeZoneIe_v(data.ueTimeZone, stream); |
| 1551 | |
| 1552 | } |
| 1553 | if (data.userLocationInformationIePresent) |
| 1554 | { |
| 1555 | |
| 1556 | |
| 1557 | stream.add((char *)"IE - userLocationInformation:"); |
| 1558 | stream.endOfLine(); |
| 1559 | UliIe uli= |
| 1560 | dynamic_cast< |
| 1561 | UliIe&>(GtpV2IeFactory::getInstance().getIeObject(UliIeType)); |
| 1562 | uli.displayUliIe_v(data.userLocationInformation, stream); |
| 1563 | |
| 1564 | } |
| 1565 | if (data.uliTimestampIePresent) |
| 1566 | { |
| 1567 | |
| 1568 | |
| 1569 | stream.add((char *)"IE - uliTimestamp:"); |
| 1570 | stream.endOfLine(); |
| 1571 | UliTimestampIe uliTimestamp= |
| 1572 | dynamic_cast< |
| 1573 | UliTimestampIe&>(GtpV2IeFactory::getInstance().getIeObject(UliTimestampIeType)); |
| 1574 | uliTimestamp.displayUliTimestampIe_v(data.uliTimestamp, stream); |
| 1575 | |
| 1576 | } |
| 1577 | if (data.twanIdentifierIePresent) |
| 1578 | { |
| 1579 | |
| 1580 | |
| 1581 | stream.add((char *)"IE - twanIdentifier:"); |
| 1582 | stream.endOfLine(); |
| 1583 | TwanIdentifierIe twanIdentifier= |
| 1584 | dynamic_cast< |
| 1585 | TwanIdentifierIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierIeType)); |
| 1586 | twanIdentifier.displayTwanIdentifierIe_v(data.twanIdentifier, stream); |
| 1587 | |
| 1588 | } |
| 1589 | if (data.twanIdentifierTimestampIePresent) |
| 1590 | { |
| 1591 | |
| 1592 | |
| 1593 | stream.add((char *)"IE - twanIdentifierTimestamp:"); |
| 1594 | stream.endOfLine(); |
| 1595 | TwanIdentifierTimestampIe twanIdentifierTimestamp= |
| 1596 | dynamic_cast< |
| 1597 | TwanIdentifierTimestampIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierTimestampIeType)); |
| 1598 | twanIdentifierTimestamp.displayTwanIdentifierTimestampIe_v(data.twanIdentifierTimestamp, stream); |
| 1599 | |
| 1600 | } |
| 1601 | if (data.mmeS4SgsnsOverloadControlInformationIePresent) |
| 1602 | { |
| 1603 | |
| 1604 | |
| 1605 | stream.add((char *)"IE - mmeS4SgsnsOverloadControlInformation:"); |
| 1606 | stream.endOfLine(); |
| 1607 | OverloadControlInformationIe overloadControlInformation= |
| 1608 | dynamic_cast< |
| 1609 | OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType)); |
| 1610 | MmeS4SgsnsOverloadControlInformationInDeleteBearerResponse groupedIeInstance = |
| 1611 | dynamic_cast< |
| 1612 | MmeS4SgsnsOverloadControlInformationInDeleteBearerResponse&>(overloadControlInformation.getGroupedIe(msgType, 0)); |
| 1613 | groupedIeInstance.displayMmeS4SgsnsOverloadControlInformationInDeleteBearerResponseData_v(data.mmeS4SgsnsOverloadControlInformation, stream); |
| 1614 | |
| 1615 | } |
| 1616 | if (data.sgwsOverloadControlInformationIePresent) |
| 1617 | { |
| 1618 | |
| 1619 | |
| 1620 | stream.add((char *)"IE - sgwsOverloadControlInformation:"); |
| 1621 | stream.endOfLine(); |
| 1622 | OverloadControlInformationIe overloadControlInformation= |
| 1623 | dynamic_cast< |
| 1624 | OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType)); |
| 1625 | SgwsOverloadControlInformationInDeleteBearerResponse groupedIeInstance = |
| 1626 | dynamic_cast< |
| 1627 | SgwsOverloadControlInformationInDeleteBearerResponse&>(overloadControlInformation.getGroupedIe(msgType, 1)); |
| 1628 | groupedIeInstance.displaySgwsOverloadControlInformationInDeleteBearerResponseData_v(data.sgwsOverloadControlInformation, stream); |
| 1629 | |
| 1630 | } |
| 1631 | if (data.mmeS4SgsnIdentifierIePresent) |
| 1632 | { |
| 1633 | |
| 1634 | |
| 1635 | stream.add((char *)"IE - mmeS4SgsnIdentifier:"); |
| 1636 | stream.endOfLine(); |
| 1637 | IpAddressIe ipAddress= |
| 1638 | dynamic_cast< |
| 1639 | IpAddressIe&>(GtpV2IeFactory::getInstance().getIeObject(IpAddressIeType)); |
| 1640 | ipAddress.displayIpAddressIe_v(data.mmeS4SgsnIdentifier, stream); |
| 1641 | |
| 1642 | } |
| 1643 | if (data.twanEpdgsOverloadControlInformationIePresent) |
| 1644 | { |
| 1645 | |
| 1646 | |
| 1647 | stream.add((char *)"IE - twanEpdgsOverloadControlInformation:"); |
| 1648 | stream.endOfLine(); |
| 1649 | OverloadControlInformationIe overloadControlInformation= |
| 1650 | dynamic_cast< |
| 1651 | OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType)); |
| 1652 | TwanEpdgsOverloadControlInformationInDeleteBearerResponse groupedIeInstance = |
| 1653 | dynamic_cast< |
| 1654 | TwanEpdgsOverloadControlInformationInDeleteBearerResponse&>(overloadControlInformation.getGroupedIe(msgType, 2)); |
| 1655 | groupedIeInstance.displayTwanEpdgsOverloadControlInformationInDeleteBearerResponseData_v(data.twanEpdgsOverloadControlInformation, stream); |
| 1656 | |
| 1657 | } |
| 1658 | if (data.wlanLocationInformationIePresent) |
| 1659 | { |
| 1660 | |
| 1661 | |
| 1662 | stream.add((char *)"IE - wlanLocationInformation:"); |
| 1663 | stream.endOfLine(); |
| 1664 | TwanIdentifierIe twanIdentifier= |
| 1665 | dynamic_cast< |
| 1666 | TwanIdentifierIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierIeType)); |
| 1667 | twanIdentifier.displayTwanIdentifierIe_v(data.wlanLocationInformation, stream); |
| 1668 | |
| 1669 | } |
| 1670 | if (data.wlanLocationTimestampIePresent) |
| 1671 | { |
| 1672 | |
| 1673 | |
| 1674 | stream.add((char *)"IE - wlanLocationTimestamp:"); |
| 1675 | stream.endOfLine(); |
| 1676 | TwanIdentifierTimestampIe twanIdentifierTimestamp= |
| 1677 | dynamic_cast< |
| 1678 | TwanIdentifierTimestampIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierTimestampIeType)); |
| 1679 | twanIdentifierTimestamp.displayTwanIdentifierTimestampIe_v(data.wlanLocationTimestamp, stream); |
| 1680 | |
| 1681 | } |
| 1682 | if (data.ueLocalIpAddressIePresent) |
| 1683 | { |
| 1684 | |
| 1685 | |
| 1686 | stream.add((char *)"IE - ueLocalIpAddress:"); |
| 1687 | stream.endOfLine(); |
| 1688 | IpAddressIe ipAddress= |
| 1689 | dynamic_cast< |
| 1690 | IpAddressIe&>(GtpV2IeFactory::getInstance().getIeObject(IpAddressIeType)); |
| 1691 | ipAddress.displayIpAddressIe_v(data.ueLocalIpAddress, stream); |
| 1692 | |
| 1693 | } |
| 1694 | if (data.ueUdpPortIePresent) |
| 1695 | { |
| 1696 | |
| 1697 | |
| 1698 | stream.add((char *)"IE - ueUdpPort:"); |
| 1699 | stream.endOfLine(); |
| 1700 | PortNumberIe portNumber= |
| 1701 | dynamic_cast< |
| 1702 | PortNumberIe&>(GtpV2IeFactory::getInstance().getIeObject(PortNumberIeType)); |
| 1703 | portNumber.displayPortNumberIe_v(data.ueUdpPort, stream); |
| 1704 | |
| 1705 | } |
| 1706 | if (data.nbifomContainerIePresent) |
| 1707 | { |
| 1708 | |
| 1709 | |
| 1710 | stream.add((char *)"IE - nbifomContainer:"); |
| 1711 | stream.endOfLine(); |
| 1712 | FContainerIe fContainer= |
| 1713 | dynamic_cast< |
| 1714 | FContainerIe&>(GtpV2IeFactory::getInstance().getIeObject(FContainerIeType)); |
| 1715 | fContainer.displayFContainerIe_v(data.nbifomContainer, stream); |
| 1716 | |
| 1717 | } |
| 1718 | if (data.ueTcpPortIePresent) |
| 1719 | { |
| 1720 | |
| 1721 | |
| 1722 | stream.add((char *)"IE - ueTcpPort:"); |
| 1723 | stream.endOfLine(); |
| 1724 | PortNumberIe portNumber= |
| 1725 | dynamic_cast< |
| 1726 | PortNumberIe&>(GtpV2IeFactory::getInstance().getIeObject(PortNumberIeType)); |
| 1727 | portNumber.displayPortNumberIe_v(data.ueTcpPort, stream); |
| 1728 | |
| 1729 | } |
| 1730 | if (data.secondaryRatUsageDataReportIePresent) |
| 1731 | { |
| 1732 | |
| 1733 | |
| 1734 | stream.add((char *)"IE - secondaryRatUsageDataReport:"); |
| 1735 | stream.endOfLine(); |
| 1736 | SecondaryRatUsageDataReportIe secondaryRatUsageDataReport= |
| 1737 | dynamic_cast< |
| 1738 | SecondaryRatUsageDataReportIe&>(GtpV2IeFactory::getInstance().getIeObject(SecondaryRatUsageDataReportIeType)); |
| 1739 | secondaryRatUsageDataReport.displaySecondaryRatUsageDataReportIe_v(data.secondaryRatUsageDataReport, stream); |
| 1740 | |
| 1741 | } |
| 1742 | |
| 1743 | stream.decrIndent(); |
| 1744 | stream.decrIndent(); |
| 1745 | } |
| 1746 | |
| 1747 | |