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