blob: 4bbd7151d5870ec145bf5dad5e8c4e581c20ef7a [file] [log] [blame]
anjana_sreekumar@infosys.com991c2062020-01-08 11:42:57 +05301/*
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 "modifyBearerRequestMsg.h"
16#include "../ieClasses/manual/gtpV2Ie.h"
17#include "../ieClasses/gtpV2IeFactory.h"
18#include "../ieClasses/meiIe.h"
19#include "../ieClasses/uliIe.h"
20#include "../ieClasses/servingNetworkIe.h"
21#include "../ieClasses/ratTypeIe.h"
22#include "../ieClasses/indicationIe.h"
23#include "../ieClasses/fTeidIe.h"
24#include "../ieClasses/ambrIe.h"
25#include "../ieClasses/delayValueIe.h"
26#include "../ieClasses/bearerContextIe.h"
27#include "../ieClasses/bearerContextsToBeModifiedInModifyBearerRequest.h"
28#include "../ieClasses/bearerContextIe.h"
29#include "../ieClasses/bearerContextsToBeRemovedInModifyBearerRequest.h"
30#include "../ieClasses/recoveryIe.h"
31#include "../ieClasses/ueTimeZoneIe.h"
32#include "../ieClasses/fqCsidIe.h"
33#include "../ieClasses/fqCsidIe.h"
34#include "../ieClasses/uciIe.h"
35#include "../ieClasses/ipAddressIe.h"
36#include "../ieClasses/portNumberIe.h"
37#include "../ieClasses/localDistinguishedNameIe.h"
38#include "../ieClasses/localDistinguishedNameIe.h"
39#include "../ieClasses/ipAddressIe.h"
40#include "../ieClasses/portNumberIe.h"
41#include "../ieClasses/ipAddressIe.h"
42#include "../ieClasses/cnOperatorSelectionEntityIe.h"
43#include "../ieClasses/overloadControlInformationIe.h"
44#include "../ieClasses/mmeS4SgsnsOverloadControlInformationInModifyBearerRequest.h"
45#include "../ieClasses/overloadControlInformationIe.h"
46#include "../ieClasses/sgwsOverloadControlInformationInModifyBearerRequest.h"
47#include "../ieClasses/overloadControlInformationIe.h"
48#include "../ieClasses/epdgsOverloadControlInformationInModifyBearerRequest.h"
49#include "../ieClasses/servingPlmnRateControlIe.h"
50#include "../ieClasses/counterIe.h"
51#include "../ieClasses/imsiIe.h"
52#include "../ieClasses/uliIe.h"
53#include "../ieClasses/twanIdentifierIe.h"
54#include "../ieClasses/twanIdentifierTimestampIe.h"
55#include "../ieClasses/secondaryRatUsageDataReportIe.h"
56
57ModifyBearerRequestMsg::ModifyBearerRequestMsg()
58{
59 msgType = ModifyBearerRequestMsgType;
60
61}
62
63ModifyBearerRequestMsg::~ModifyBearerRequestMsg()
64{
65
66}
67
68bool ModifyBearerRequestMsg::encodeModifyBearerRequestMsg(MsgBuffer &buffer,
69 ModifyBearerRequestMsgData
70 const &data)
71{
72 bool rc = false;
73 GtpV2IeHeader header;
74 Uint16 startIndex = 0;
75 Uint16 endIndex = 0;
76 Uint16 length = 0;
77
78 if (data.meIdentityIePresent)
79 {
80
81 // Encode the Ie Header
82 header.ieType = MeiIeType;
83 header.instance = 0;
84 header.length = 0; // We will encode the IE first and then update the length
85 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
86 startIndex = buffer.getCurrentIndex();
87 MeiIe mei=
88 dynamic_cast<
89 MeiIe&>(GtpV2IeFactory::getInstance().getIeObject(MeiIeType));
90 rc = mei.encodeMeiIe(buffer, data.meIdentity);
91 endIndex = buffer.getCurrentIndex();
92 length = endIndex - startIndex;
93
94 // encode the length value now
95 buffer.goToIndex(startIndex - 3);
96 buffer.writeUint16(length, false);
97 buffer.goToIndex(endIndex);
98
99 if (!(rc))
100 {
101 errorStream.add((char *)"Failed to encode IE: meIdentity\n");
102 return false;
103 }
104 }
105
106 if (data.userLocationInformationIePresent)
107 {
108
109 // Encode the Ie Header
110 header.ieType = UliIeType;
111 header.instance = 0;
112 header.length = 0; // We will encode the IE first and then update the length
113 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
114 startIndex = buffer.getCurrentIndex();
115 UliIe uli=
116 dynamic_cast<
117 UliIe&>(GtpV2IeFactory::getInstance().getIeObject(UliIeType));
118 rc = uli.encodeUliIe(buffer, data.userLocationInformation);
119 endIndex = buffer.getCurrentIndex();
120 length = endIndex - startIndex;
121
122 // encode the length value now
123 buffer.goToIndex(startIndex - 3);
124 buffer.writeUint16(length, false);
125 buffer.goToIndex(endIndex);
126
127 if (!(rc))
128 {
129 errorStream.add((char *)"Failed to encode IE: userLocationInformation\n");
130 return false;
131 }
132 }
133
134 if (data.servingNetworkIePresent)
135 {
136
137 // Encode the Ie Header
138 header.ieType = ServingNetworkIeType;
139 header.instance = 0;
140 header.length = 0; // We will encode the IE first and then update the length
141 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
142 startIndex = buffer.getCurrentIndex();
143 ServingNetworkIe servingNetwork=
144 dynamic_cast<
145 ServingNetworkIe&>(GtpV2IeFactory::getInstance().getIeObject(ServingNetworkIeType));
146 rc = servingNetwork.encodeServingNetworkIe(buffer, data.servingNetwork);
147 endIndex = buffer.getCurrentIndex();
148 length = endIndex - startIndex;
149
150 // encode the length value now
151 buffer.goToIndex(startIndex - 3);
152 buffer.writeUint16(length, false);
153 buffer.goToIndex(endIndex);
154
155 if (!(rc))
156 {
157 errorStream.add((char *)"Failed to encode IE: servingNetwork\n");
158 return false;
159 }
160 }
161
162 if (data.ratTypeIePresent)
163 {
164
165 // Encode the Ie Header
166 header.ieType = RatTypeIeType;
167 header.instance = 0;
168 header.length = 0; // We will encode the IE first and then update the length
169 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
170 startIndex = buffer.getCurrentIndex();
171 RatTypeIe ratType=
172 dynamic_cast<
173 RatTypeIe&>(GtpV2IeFactory::getInstance().getIeObject(RatTypeIeType));
174 rc = ratType.encodeRatTypeIe(buffer, data.ratType);
175 endIndex = buffer.getCurrentIndex();
176 length = endIndex - startIndex;
177
178 // encode the length value now
179 buffer.goToIndex(startIndex - 3);
180 buffer.writeUint16(length, false);
181 buffer.goToIndex(endIndex);
182
183 if (!(rc))
184 {
185 errorStream.add((char *)"Failed to encode IE: ratType\n");
186 return false;
187 }
188 }
189
190 if (data.indicationFlagsIePresent)
191 {
192
193 // Encode the Ie Header
194 header.ieType = IndicationIeType;
195 header.instance = 0;
196 header.length = 0; // We will encode the IE first and then update the length
197 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
198 startIndex = buffer.getCurrentIndex();
199 IndicationIe indication=
200 dynamic_cast<
201 IndicationIe&>(GtpV2IeFactory::getInstance().getIeObject(IndicationIeType));
202 rc = indication.encodeIndicationIe(buffer, data.indicationFlags);
203 endIndex = buffer.getCurrentIndex();
204 length = endIndex - startIndex;
205
206 // encode the length value now
207 buffer.goToIndex(startIndex - 3);
208 buffer.writeUint16(length, false);
209 buffer.goToIndex(endIndex);
210
211 if (!(rc))
212 {
213 errorStream.add((char *)"Failed to encode IE: indicationFlags\n");
214 return false;
215 }
216 }
217
218 if (data.senderFTeidForControlPlaneIePresent)
219 {
220
221 // Encode the Ie Header
222 header.ieType = FTeidIeType;
223 header.instance = 0;
224 header.length = 0; // We will encode the IE first and then update the length
225 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
226 startIndex = buffer.getCurrentIndex();
227 FTeidIe fTeid=
228 dynamic_cast<
229 FTeidIe&>(GtpV2IeFactory::getInstance().getIeObject(FTeidIeType));
230 rc = fTeid.encodeFTeidIe(buffer, data.senderFTeidForControlPlane);
231 endIndex = buffer.getCurrentIndex();
232 length = endIndex - startIndex;
233
234 // encode the length value now
235 buffer.goToIndex(startIndex - 3);
236 buffer.writeUint16(length, false);
237 buffer.goToIndex(endIndex);
238
239 if (!(rc))
240 {
241 errorStream.add((char *)"Failed to encode IE: senderFTeidForControlPlane\n");
242 return false;
243 }
244 }
245
246 if (data.aggregateMaximumBitRateIePresent)
247 {
248
249 // Encode the Ie Header
250 header.ieType = AmbrIeType;
251 header.instance = 0;
252 header.length = 0; // We will encode the IE first and then update the length
253 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
254 startIndex = buffer.getCurrentIndex();
255 AmbrIe ambr=
256 dynamic_cast<
257 AmbrIe&>(GtpV2IeFactory::getInstance().getIeObject(AmbrIeType));
258 rc = ambr.encodeAmbrIe(buffer, data.aggregateMaximumBitRate);
259 endIndex = buffer.getCurrentIndex();
260 length = endIndex - startIndex;
261
262 // encode the length value now
263 buffer.goToIndex(startIndex - 3);
264 buffer.writeUint16(length, false);
265 buffer.goToIndex(endIndex);
266
267 if (!(rc))
268 {
269 errorStream.add((char *)"Failed to encode IE: aggregateMaximumBitRate\n");
270 return false;
271 }
272 }
273
274 if (data.delayDownlinkPacketNotificationRequestIePresent)
275 {
276
277 // Encode the Ie Header
278 header.ieType = DelayValueIeType;
279 header.instance = 0;
280 header.length = 0; // We will encode the IE first and then update the length
281 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
282 startIndex = buffer.getCurrentIndex();
283 DelayValueIe delayValue=
284 dynamic_cast<
285 DelayValueIe&>(GtpV2IeFactory::getInstance().getIeObject(DelayValueIeType));
286 rc = delayValue.encodeDelayValueIe(buffer, data.delayDownlinkPacketNotificationRequest);
287 endIndex = buffer.getCurrentIndex();
288 length = endIndex - startIndex;
289
290 // encode the length value now
291 buffer.goToIndex(startIndex - 3);
292 buffer.writeUint16(length, false);
293 buffer.goToIndex(endIndex);
294
295 if (!(rc))
296 {
297 errorStream.add((char *)"Failed to encode IE: delayDownlinkPacketNotificationRequest\n");
298 return false;
299 }
300 }
301
302 // First validate if the applicatoin provided more than the expected cardinality
303 if (data.bearerContextsToBeModifiedCount > 11)
304 {
305 errorStream.add((char *)"Number of entries of bearerContextsToBeModified exceeded\n");
306 errorStream.add((char *)"Expected count: 11 Received count: ");
307 errorStream.add((char *)"data.bearerContextsToBeModifiedCount");
308 errorStream.endOfLine();
309 return false;
310 }
311 for (Uint8 i = 0; i < data.bearerContextsToBeModifiedCount; i++)
312 {
313 // Encode the Ie Header
314 header.ieType = BearerContextIeType;
315 header.instance = 0;
316 header.length = 0; // We will encode the IE first and then update the length
317 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
318 startIndex = buffer.getCurrentIndex();
319 BearerContextIe bearerContext=
320 dynamic_cast<
321 BearerContextIe&>(GtpV2IeFactory::getInstance().
322 getIeObject(BearerContextIeType));
323 BearerContextsToBeModifiedInModifyBearerRequest groupedIeInstance = dynamic_cast<BearerContextsToBeModifiedInModifyBearerRequest&>(bearerContext.getGroupedIe(msgType, 0));
324 rc = groupedIeInstance.encodeBearerContextsToBeModifiedInModifyBearerRequest(buffer, data.bearerContextsToBeModified[i]);
325 endIndex = buffer.getCurrentIndex();
326 length = endIndex - startIndex;
327
328 // encode the length value now
329 buffer.goToIndex(startIndex - 3);
330 buffer.writeUint16(length, false);
331 buffer.goToIndex(endIndex);
332 }
333
334 if (!(rc))
335 {
336 errorStream.add((char *)"Failed to encode IE: bearerContextsToBeModified\n");
337 return false;
338 }
339
340 // First validate if the applicatoin provided more than the expected cardinality
341 if (data.bearerContextsToBeRemovedCount > 11)
342 {
343 errorStream.add((char *)"Number of entries of bearerContextsToBeRemoved exceeded\n");
344 errorStream.add((char *)"Expected count: 11 Received count: ");
345 errorStream.add((char *)"data.bearerContextsToBeRemovedCount");
346 errorStream.endOfLine();
347 return false;
348 }
349 for (Uint8 i = 0; i < data.bearerContextsToBeRemovedCount; i++)
350 {
351 // Encode the Ie Header
352 header.ieType = BearerContextIeType;
353 header.instance = 1;
354 header.length = 0; // We will encode the IE first and then update the length
355 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
356 startIndex = buffer.getCurrentIndex();
357 BearerContextIe bearerContext=
358 dynamic_cast<
359 BearerContextIe&>(GtpV2IeFactory::getInstance().
360 getIeObject(BearerContextIeType));
361 BearerContextsToBeRemovedInModifyBearerRequest groupedIeInstance = dynamic_cast<BearerContextsToBeRemovedInModifyBearerRequest&>(bearerContext.getGroupedIe(msgType, 1));
362 rc = groupedIeInstance.encodeBearerContextsToBeRemovedInModifyBearerRequest(buffer, data.bearerContextsToBeRemoved[i]);
363 endIndex = buffer.getCurrentIndex();
364 length = endIndex - startIndex;
365
366 // encode the length value now
367 buffer.goToIndex(startIndex - 3);
368 buffer.writeUint16(length, false);
369 buffer.goToIndex(endIndex);
370 }
371
372 if (!(rc))
373 {
374 errorStream.add((char *)"Failed to encode IE: bearerContextsToBeRemoved\n");
375 return false;
376 }
377
378 if (data.recoveryIePresent)
379 {
380
381 // Encode the Ie Header
382 header.ieType = RecoveryIeType;
383 header.instance = 0;
384 header.length = 0; // We will encode the IE first and then update the length
385 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
386 startIndex = buffer.getCurrentIndex();
387 RecoveryIe recovery=
388 dynamic_cast<
389 RecoveryIe&>(GtpV2IeFactory::getInstance().getIeObject(RecoveryIeType));
390 rc = recovery.encodeRecoveryIe(buffer, data.recovery);
391 endIndex = buffer.getCurrentIndex();
392 length = endIndex - startIndex;
393
394 // encode the length value now
395 buffer.goToIndex(startIndex - 3);
396 buffer.writeUint16(length, false);
397 buffer.goToIndex(endIndex);
398
399 if (!(rc))
400 {
401 errorStream.add((char *)"Failed to encode IE: recovery\n");
402 return false;
403 }
404 }
405
406 if (data.ueTimeZoneIePresent)
407 {
408
409 // Encode the Ie Header
410 header.ieType = UeTimeZoneIeType;
411 header.instance = 0;
412 header.length = 0; // We will encode the IE first and then update the length
413 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
414 startIndex = buffer.getCurrentIndex();
415 UeTimeZoneIe ueTimeZone=
416 dynamic_cast<
417 UeTimeZoneIe&>(GtpV2IeFactory::getInstance().getIeObject(UeTimeZoneIeType));
418 rc = ueTimeZone.encodeUeTimeZoneIe(buffer, data.ueTimeZone);
419 endIndex = buffer.getCurrentIndex();
420 length = endIndex - startIndex;
421
422 // encode the length value now
423 buffer.goToIndex(startIndex - 3);
424 buffer.writeUint16(length, false);
425 buffer.goToIndex(endIndex);
426
427 if (!(rc))
428 {
429 errorStream.add((char *)"Failed to encode IE: ueTimeZone\n");
430 return false;
431 }
432 }
433
434 if (data.mmeFqCsidIePresent)
435 {
436
437 // Encode the Ie Header
438 header.ieType = FqCsidIeType;
439 header.instance = 0;
440 header.length = 0; // We will encode the IE first and then update the length
441 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
442 startIndex = buffer.getCurrentIndex();
443 FqCsidIe fqCsid=
444 dynamic_cast<
445 FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType));
446 rc = fqCsid.encodeFqCsidIe(buffer, data.mmeFqCsid);
447 endIndex = buffer.getCurrentIndex();
448 length = endIndex - startIndex;
449
450 // encode the length value now
451 buffer.goToIndex(startIndex - 3);
452 buffer.writeUint16(length, false);
453 buffer.goToIndex(endIndex);
454
455 if (!(rc))
456 {
457 errorStream.add((char *)"Failed to encode IE: mmeFqCsid\n");
458 return false;
459 }
460 }
461
462 if (data.sgwFqCsidIePresent)
463 {
464
465 // Encode the Ie Header
466 header.ieType = FqCsidIeType;
467 header.instance = 1;
468 header.length = 0; // We will encode the IE first and then update the length
469 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
470 startIndex = buffer.getCurrentIndex();
471 FqCsidIe fqCsid=
472 dynamic_cast<
473 FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType));
474 rc = fqCsid.encodeFqCsidIe(buffer, data.sgwFqCsid);
475 endIndex = buffer.getCurrentIndex();
476 length = endIndex - startIndex;
477
478 // encode the length value now
479 buffer.goToIndex(startIndex - 3);
480 buffer.writeUint16(length, false);
481 buffer.goToIndex(endIndex);
482
483 if (!(rc))
484 {
485 errorStream.add((char *)"Failed to encode IE: sgwFqCsid\n");
486 return false;
487 }
488 }
489
490 if (data.userCsgInformationIePresent)
491 {
492
493 // Encode the Ie Header
494 header.ieType = UciIeType;
495 header.instance = 0;
496 header.length = 0; // We will encode the IE first and then update the length
497 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
498 startIndex = buffer.getCurrentIndex();
499 UciIe uci=
500 dynamic_cast<
501 UciIe&>(GtpV2IeFactory::getInstance().getIeObject(UciIeType));
502 rc = uci.encodeUciIe(buffer, data.userCsgInformation);
503 endIndex = buffer.getCurrentIndex();
504 length = endIndex - startIndex;
505
506 // encode the length value now
507 buffer.goToIndex(startIndex - 3);
508 buffer.writeUint16(length, false);
509 buffer.goToIndex(endIndex);
510
511 if (!(rc))
512 {
513 errorStream.add((char *)"Failed to encode IE: userCsgInformation\n");
514 return false;
515 }
516 }
517
518 if (data.ueLocalIpAddressIePresent)
519 {
520
521 // Encode the Ie Header
522 header.ieType = IpAddressIeType;
523 header.instance = 1;
524 header.length = 0; // We will encode the IE first and then update the length
525 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
526 startIndex = buffer.getCurrentIndex();
527 IpAddressIe ipAddress=
528 dynamic_cast<
529 IpAddressIe&>(GtpV2IeFactory::getInstance().getIeObject(IpAddressIeType));
530 rc = ipAddress.encodeIpAddressIe(buffer, data.ueLocalIpAddress);
531 endIndex = buffer.getCurrentIndex();
532 length = endIndex - startIndex;
533
534 // encode the length value now
535 buffer.goToIndex(startIndex - 3);
536 buffer.writeUint16(length, false);
537 buffer.goToIndex(endIndex);
538
539 if (!(rc))
540 {
541 errorStream.add((char *)"Failed to encode IE: ueLocalIpAddress\n");
542 return false;
543 }
544 }
545
546 if (data.ueUdpPortIePresent)
547 {
548
549 // Encode the Ie Header
550 header.ieType = PortNumberIeType;
551 header.instance = 1;
552 header.length = 0; // We will encode the IE first and then update the length
553 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
554 startIndex = buffer.getCurrentIndex();
555 PortNumberIe portNumber=
556 dynamic_cast<
557 PortNumberIe&>(GtpV2IeFactory::getInstance().getIeObject(PortNumberIeType));
558 rc = portNumber.encodePortNumberIe(buffer, data.ueUdpPort);
559 endIndex = buffer.getCurrentIndex();
560 length = endIndex - startIndex;
561
562 // encode the length value now
563 buffer.goToIndex(startIndex - 3);
564 buffer.writeUint16(length, false);
565 buffer.goToIndex(endIndex);
566
567 if (!(rc))
568 {
569 errorStream.add((char *)"Failed to encode IE: ueUdpPort\n");
570 return false;
571 }
572 }
573
574 if (data.mmeS4SgsnLdnIePresent)
575 {
576
577 // Encode the Ie Header
578 header.ieType = LocalDistinguishedNameIeType;
579 header.instance = 0;
580 header.length = 0; // We will encode the IE first and then update the length
581 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
582 startIndex = buffer.getCurrentIndex();
583 LocalDistinguishedNameIe localDistinguishedName=
584 dynamic_cast<
585 LocalDistinguishedNameIe&>(GtpV2IeFactory::getInstance().getIeObject(LocalDistinguishedNameIeType));
586 rc = localDistinguishedName.encodeLocalDistinguishedNameIe(buffer, data.mmeS4SgsnLdn);
587 endIndex = buffer.getCurrentIndex();
588 length = endIndex - startIndex;
589
590 // encode the length value now
591 buffer.goToIndex(startIndex - 3);
592 buffer.writeUint16(length, false);
593 buffer.goToIndex(endIndex);
594
595 if (!(rc))
596 {
597 errorStream.add((char *)"Failed to encode IE: mmeS4SgsnLdn\n");
598 return false;
599 }
600 }
601
602 if (data.sgwLdnIePresent)
603 {
604
605 // Encode the Ie Header
606 header.ieType = LocalDistinguishedNameIeType;
607 header.instance = 0;
608 header.length = 0; // We will encode the IE first and then update the length
609 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
610 startIndex = buffer.getCurrentIndex();
611 LocalDistinguishedNameIe localDistinguishedName=
612 dynamic_cast<
613 LocalDistinguishedNameIe&>(GtpV2IeFactory::getInstance().getIeObject(LocalDistinguishedNameIeType));
614 rc = localDistinguishedName.encodeLocalDistinguishedNameIe(buffer, data.sgwLdn);
615 endIndex = buffer.getCurrentIndex();
616 length = endIndex - startIndex;
617
618 // encode the length value now
619 buffer.goToIndex(startIndex - 3);
620 buffer.writeUint16(length, false);
621 buffer.goToIndex(endIndex);
622
623 if (!(rc))
624 {
625 errorStream.add((char *)"Failed to encode IE: sgwLdn\n");
626 return false;
627 }
628 }
629
630 if (data.hNbLocalIpAddressIePresent)
631 {
632
633 // Encode the Ie Header
634 header.ieType = IpAddressIeType;
635 header.instance = 0;
636 header.length = 0; // We will encode the IE first and then update the length
637 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
638 startIndex = buffer.getCurrentIndex();
639 IpAddressIe ipAddress=
640 dynamic_cast<
641 IpAddressIe&>(GtpV2IeFactory::getInstance().getIeObject(IpAddressIeType));
642 rc = ipAddress.encodeIpAddressIe(buffer, data.hNbLocalIpAddress);
643 endIndex = buffer.getCurrentIndex();
644 length = endIndex - startIndex;
645
646 // encode the length value now
647 buffer.goToIndex(startIndex - 3);
648 buffer.writeUint16(length, false);
649 buffer.goToIndex(endIndex);
650
651 if (!(rc))
652 {
653 errorStream.add((char *)"Failed to encode IE: hNbLocalIpAddress\n");
654 return false;
655 }
656 }
657
658 if (data.hNbUdpPortIePresent)
659 {
660
661 // Encode the Ie Header
662 header.ieType = PortNumberIeType;
663 header.instance = 0;
664 header.length = 0; // We will encode the IE first and then update the length
665 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
666 startIndex = buffer.getCurrentIndex();
667 PortNumberIe portNumber=
668 dynamic_cast<
669 PortNumberIe&>(GtpV2IeFactory::getInstance().getIeObject(PortNumberIeType));
670 rc = portNumber.encodePortNumberIe(buffer, data.hNbUdpPort);
671 endIndex = buffer.getCurrentIndex();
672 length = endIndex - startIndex;
673
674 // encode the length value now
675 buffer.goToIndex(startIndex - 3);
676 buffer.writeUint16(length, false);
677 buffer.goToIndex(endIndex);
678
679 if (!(rc))
680 {
681 errorStream.add((char *)"Failed to encode IE: hNbUdpPort\n");
682 return false;
683 }
684 }
685
686 if (data.mmeS4SgsnIdentifierIePresent)
687 {
688
689 // Encode the Ie Header
690 header.ieType = IpAddressIeType;
691 header.instance = 2;
692 header.length = 0; // We will encode the IE first and then update the length
693 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
694 startIndex = buffer.getCurrentIndex();
695 IpAddressIe ipAddress=
696 dynamic_cast<
697 IpAddressIe&>(GtpV2IeFactory::getInstance().getIeObject(IpAddressIeType));
698 rc = ipAddress.encodeIpAddressIe(buffer, data.mmeS4SgsnIdentifier);
699 endIndex = buffer.getCurrentIndex();
700 length = endIndex - startIndex;
701
702 // encode the length value now
703 buffer.goToIndex(startIndex - 3);
704 buffer.writeUint16(length, false);
705 buffer.goToIndex(endIndex);
706
707 if (!(rc))
708 {
709 errorStream.add((char *)"Failed to encode IE: mmeS4SgsnIdentifier\n");
710 return false;
711 }
712 }
713
714 if (data.cnOperatorSelectionEntityIePresent)
715 {
716
717 // Encode the Ie Header
718 header.ieType = CnOperatorSelectionEntityIeType;
719 header.instance = 0;
720 header.length = 0; // We will encode the IE first and then update the length
721 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
722 startIndex = buffer.getCurrentIndex();
723 CnOperatorSelectionEntityIe cnOperatorSelectionEntity=
724 dynamic_cast<
725 CnOperatorSelectionEntityIe&>(GtpV2IeFactory::getInstance().getIeObject(CnOperatorSelectionEntityIeType));
726 rc = cnOperatorSelectionEntity.encodeCnOperatorSelectionEntityIe(buffer, data.cnOperatorSelectionEntity);
727 endIndex = buffer.getCurrentIndex();
728 length = endIndex - startIndex;
729
730 // encode the length value now
731 buffer.goToIndex(startIndex - 3);
732 buffer.writeUint16(length, false);
733 buffer.goToIndex(endIndex);
734
735 if (!(rc))
736 {
737 errorStream.add((char *)"Failed to encode IE: cnOperatorSelectionEntity\n");
738 return false;
739 }
740 }
741
742 if (data.mmeS4SgsnsOverloadControlInformationIePresent)
743 {
744
745 // Encode the Ie Header
746 header.ieType = OverloadControlInformationIeType;
747 header.instance = 0;
748 header.length = 0; // We will encode the IE first and then update the length
749 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
750 startIndex = buffer.getCurrentIndex();
751 OverloadControlInformationIe overloadControlInformation=
752 dynamic_cast<
753 OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType));
754 MmeS4SgsnsOverloadControlInformationInModifyBearerRequest groupedIeInstance =
755 dynamic_cast<
756 MmeS4SgsnsOverloadControlInformationInModifyBearerRequest&>(overloadControlInformation.getGroupedIe(msgType, 0));
757 rc = groupedIeInstance.encodeMmeS4SgsnsOverloadControlInformationInModifyBearerRequest(buffer, data.mmeS4SgsnsOverloadControlInformation);
758 endIndex = buffer.getCurrentIndex();
759 length = endIndex - startIndex;
760
761 // encode the length value now
762 buffer.goToIndex(startIndex - 3);
763 buffer.writeUint16(length, false);
764 buffer.goToIndex(endIndex);
765
766 if (!(rc))
767 {
768 errorStream.add((char *)"Failed to encode IE: mmeS4SgsnsOverloadControlInformation\n");
769 return false;
770 }
771 }
772
773 if (data.sgwsOverloadControlInformationIePresent)
774 {
775
776 // Encode the Ie Header
777 header.ieType = OverloadControlInformationIeType;
778 header.instance = 1;
779 header.length = 0; // We will encode the IE first and then update the length
780 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
781 startIndex = buffer.getCurrentIndex();
782 OverloadControlInformationIe overloadControlInformation=
783 dynamic_cast<
784 OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType));
785 SgwsOverloadControlInformationInModifyBearerRequest groupedIeInstance =
786 dynamic_cast<
787 SgwsOverloadControlInformationInModifyBearerRequest&>(overloadControlInformation.getGroupedIe(msgType, 1));
788 rc = groupedIeInstance.encodeSgwsOverloadControlInformationInModifyBearerRequest(buffer, data.sgwsOverloadControlInformation);
789 endIndex = buffer.getCurrentIndex();
790 length = endIndex - startIndex;
791
792 // encode the length value now
793 buffer.goToIndex(startIndex - 3);
794 buffer.writeUint16(length, false);
795 buffer.goToIndex(endIndex);
796
797 if (!(rc))
798 {
799 errorStream.add((char *)"Failed to encode IE: sgwsOverloadControlInformation\n");
800 return false;
801 }
802 }
803
804 if (data.epdgsOverloadControlInformationIePresent)
805 {
806
807 // Encode the Ie Header
808 header.ieType = OverloadControlInformationIeType;
809 header.instance = 2;
810 header.length = 0; // We will encode the IE first and then update the length
811 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
812 startIndex = buffer.getCurrentIndex();
813 OverloadControlInformationIe overloadControlInformation=
814 dynamic_cast<
815 OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType));
816 EpdgsOverloadControlInformationInModifyBearerRequest groupedIeInstance =
817 dynamic_cast<
818 EpdgsOverloadControlInformationInModifyBearerRequest&>(overloadControlInformation.getGroupedIe(msgType, 2));
819 rc = groupedIeInstance.encodeEpdgsOverloadControlInformationInModifyBearerRequest(buffer, data.epdgsOverloadControlInformation);
820 endIndex = buffer.getCurrentIndex();
821 length = endIndex - startIndex;
822
823 // encode the length value now
824 buffer.goToIndex(startIndex - 3);
825 buffer.writeUint16(length, false);
826 buffer.goToIndex(endIndex);
827
828 if (!(rc))
829 {
830 errorStream.add((char *)"Failed to encode IE: epdgsOverloadControlInformation\n");
831 return false;
832 }
833 }
834
835 if (data.servingPlmnRateControlIePresent)
836 {
837
838 // Encode the Ie Header
839 header.ieType = ServingPlmnRateControlIeType;
840 header.instance = 0;
841 header.length = 0; // We will encode the IE first and then update the length
842 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
843 startIndex = buffer.getCurrentIndex();
844 ServingPlmnRateControlIe servingPlmnRateControl=
845 dynamic_cast<
846 ServingPlmnRateControlIe&>(GtpV2IeFactory::getInstance().getIeObject(ServingPlmnRateControlIeType));
847 rc = servingPlmnRateControl.encodeServingPlmnRateControlIe(buffer, data.servingPlmnRateControl);
848 endIndex = buffer.getCurrentIndex();
849 length = endIndex - startIndex;
850
851 // encode the length value now
852 buffer.goToIndex(startIndex - 3);
853 buffer.writeUint16(length, false);
854 buffer.goToIndex(endIndex);
855
856 if (!(rc))
857 {
858 errorStream.add((char *)"Failed to encode IE: servingPlmnRateControl\n");
859 return false;
860 }
861 }
862
863 if (data.moExceptionDataCounterIePresent)
864 {
865
866 // Encode the Ie Header
867 header.ieType = CounterIeType;
868 header.instance = 0;
869 header.length = 0; // We will encode the IE first and then update the length
870 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
871 startIndex = buffer.getCurrentIndex();
872 CounterIe counter=
873 dynamic_cast<
874 CounterIe&>(GtpV2IeFactory::getInstance().getIeObject(CounterIeType));
875 rc = counter.encodeCounterIe(buffer, data.moExceptionDataCounter);
876 endIndex = buffer.getCurrentIndex();
877 length = endIndex - startIndex;
878
879 // encode the length value now
880 buffer.goToIndex(startIndex - 3);
881 buffer.writeUint16(length, false);
882 buffer.goToIndex(endIndex);
883
884 if (!(rc))
885 {
886 errorStream.add((char *)"Failed to encode IE: moExceptionDataCounter\n");
887 return false;
888 }
889 }
890
891 if (data.imsiIePresent)
892 {
893
894 // Encode the Ie Header
895 header.ieType = ImsiIeType;
896 header.instance = 0;
897 header.length = 0; // We will encode the IE first and then update the length
898 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
899 startIndex = buffer.getCurrentIndex();
900 ImsiIe imsi=
901 dynamic_cast<
902 ImsiIe&>(GtpV2IeFactory::getInstance().getIeObject(ImsiIeType));
903 rc = imsi.encodeImsiIe(buffer, data.imsi);
904 endIndex = buffer.getCurrentIndex();
905 length = endIndex - startIndex;
906
907 // encode the length value now
908 buffer.goToIndex(startIndex - 3);
909 buffer.writeUint16(length, false);
910 buffer.goToIndex(endIndex);
911
912 if (!(rc))
913 {
914 errorStream.add((char *)"Failed to encode IE: imsi\n");
915 return false;
916 }
917 }
918
919 if (data.userLocationInformationForSgwIePresent)
920 {
921
922 // Encode the Ie Header
923 header.ieType = UliIeType;
924 header.instance = 1;
925 header.length = 0; // We will encode the IE first and then update the length
926 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
927 startIndex = buffer.getCurrentIndex();
928 UliIe uli=
929 dynamic_cast<
930 UliIe&>(GtpV2IeFactory::getInstance().getIeObject(UliIeType));
931 rc = uli.encodeUliIe(buffer, data.userLocationInformationForSgw);
932 endIndex = buffer.getCurrentIndex();
933 length = endIndex - startIndex;
934
935 // encode the length value now
936 buffer.goToIndex(startIndex - 3);
937 buffer.writeUint16(length, false);
938 buffer.goToIndex(endIndex);
939
940 if (!(rc))
941 {
942 errorStream.add((char *)"Failed to encode IE: userLocationInformationForSgw\n");
943 return false;
944 }
945 }
946
947 if (data.wlanLocationInformationIePresent)
948 {
949
950 // Encode the Ie Header
951 header.ieType = TwanIdentifierIeType;
952 header.instance = 0;
953 header.length = 0; // We will encode the IE first and then update the length
954 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
955 startIndex = buffer.getCurrentIndex();
956 TwanIdentifierIe twanIdentifier=
957 dynamic_cast<
958 TwanIdentifierIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierIeType));
959 rc = twanIdentifier.encodeTwanIdentifierIe(buffer, data.wlanLocationInformation);
960 endIndex = buffer.getCurrentIndex();
961 length = endIndex - startIndex;
962
963 // encode the length value now
964 buffer.goToIndex(startIndex - 3);
965 buffer.writeUint16(length, false);
966 buffer.goToIndex(endIndex);
967
968 if (!(rc))
969 {
970 errorStream.add((char *)"Failed to encode IE: wlanLocationInformation\n");
971 return false;
972 }
973 }
974
975 if (data.wlanLocationTimestampIePresent)
976 {
977
978 // Encode the Ie Header
979 header.ieType = TwanIdentifierTimestampIeType;
980 header.instance = 0;
981 header.length = 0; // We will encode the IE first and then update the length
982 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
983 startIndex = buffer.getCurrentIndex();
984 TwanIdentifierTimestampIe twanIdentifierTimestamp=
985 dynamic_cast<
986 TwanIdentifierTimestampIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierTimestampIeType));
987 rc = twanIdentifierTimestamp.encodeTwanIdentifierTimestampIe(buffer, data.wlanLocationTimestamp);
988 endIndex = buffer.getCurrentIndex();
989 length = endIndex - startIndex;
990
991 // encode the length value now
992 buffer.goToIndex(startIndex - 3);
993 buffer.writeUint16(length, false);
994 buffer.goToIndex(endIndex);
995
996 if (!(rc))
997 {
998 errorStream.add((char *)"Failed to encode IE: wlanLocationTimestamp\n");
999 return false;
1000 }
1001 }
1002
1003 if (data.secondaryRatUsageDataReportIePresent)
1004 {
1005
1006 // Encode the Ie Header
1007 header.ieType = SecondaryRatUsageDataReportIeType;
1008 header.instance = 0;
1009 header.length = 0; // We will encode the IE first and then update the length
1010 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
1011 startIndex = buffer.getCurrentIndex();
1012 SecondaryRatUsageDataReportIe secondaryRatUsageDataReport=
1013 dynamic_cast<
1014 SecondaryRatUsageDataReportIe&>(GtpV2IeFactory::getInstance().getIeObject(SecondaryRatUsageDataReportIeType));
1015 rc = secondaryRatUsageDataReport.encodeSecondaryRatUsageDataReportIe(buffer, data.secondaryRatUsageDataReport);
1016 endIndex = buffer.getCurrentIndex();
1017 length = endIndex - startIndex;
1018
1019 // encode the length value now
1020 buffer.goToIndex(startIndex - 3);
1021 buffer.writeUint16(length, false);
1022 buffer.goToIndex(endIndex);
1023
1024 if (!(rc))
1025 {
1026 errorStream.add((char *)"Failed to encode IE: secondaryRatUsageDataReport\n");
1027 return false;
1028 }
1029 }
1030 return rc;
1031
1032}
1033
1034bool ModifyBearerRequestMsg::decodeModifyBearerRequestMsg(MsgBuffer &buffer,
1035 ModifyBearerRequestMsgData
1036 &data, Uint16 length)
1037{
1038
1039 bool rc = false;
1040 GtpV2IeHeader ieHeader;
1041
1042 set<Uint16> mandatoryIeLocalList = mandatoryIeSet;
1043 while (buffer.lengthLeft() > IE_HEADER_SIZE)
1044 {
1045 GtpV2Ie::decodeGtpV2IeHeader(buffer, ieHeader);
1046 if (ieHeader.length > buffer.lengthLeft())
1047 {
1048 // We do not have enough bytes left in the message for this IE
1049 errorStream.add((char *)"IE Length exceeds beyond message boundary\n");
1050 errorStream.add((char *)" Offending IE Type: ");
1051 errorStream.add(ieHeader.ieType);
1052 errorStream.add((char *)"\n Ie Length in Header: ");
1053 errorStream.add(ieHeader.length);
1054 errorStream.add((char *)"\n Bytes left in message: ");
1055 errorStream.add(buffer.lengthLeft());
1056 errorStream.endOfLine();
1057 return false;
1058 }
1059
1060 switch (ieHeader.ieType){
1061
1062 case MeiIeType:
1063 {
1064 MeiIe ieObject =
1065 dynamic_cast<
1066 MeiIe&>(GtpV2IeFactory::getInstance().getIeObject(MeiIeType));
1067
1068 if(ieHeader.instance == 0)
1069 {
1070 rc = ieObject.decodeMeiIe(buffer, data.meIdentity, ieHeader.length);
1071
1072 data.meIdentityIePresent = true;
1073 if (!(rc))
1074 {
1075 errorStream.add((char *)"Failed to decode IE: meIdentity\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 UliIeType:
1092 {
1093 UliIe ieObject =
1094 dynamic_cast<
1095 UliIe&>(GtpV2IeFactory::getInstance().getIeObject(UliIeType));
1096
1097 if(ieHeader.instance == 0)
1098 {
1099 rc = ieObject.decodeUliIe(buffer, data.userLocationInformation, ieHeader.length);
1100
1101 data.userLocationInformationIePresent = true;
1102 if (!(rc))
1103 {
1104 errorStream.add((char *)"Failed to decode IE: userLocationInformation\n");
1105 return false;
1106 }
1107 }
1108 else if(ieHeader.instance == 1)
1109 {
1110 rc = ieObject.decodeUliIe(buffer, data.userLocationInformationForSgw, ieHeader.length);
1111
1112 data.userLocationInformationForSgwIePresent = true;
1113 if (!(rc))
1114 {
1115 errorStream.add((char *)"Failed to decode IE: userLocationInformationForSgw\n");
1116 return false;
1117 }
1118 }
1119
1120 else
1121 {
1122 // Unknown IE instance print error
1123 errorStream.add((char *)"Unknown IE Type: ");
1124 errorStream.add(ieHeader.ieType);
1125 errorStream.endOfLine();
1126 buffer.skipBytes(ieHeader.length);
1127 }
1128 break;
1129 }
1130
1131 case ServingNetworkIeType:
1132 {
1133 ServingNetworkIe ieObject =
1134 dynamic_cast<
1135 ServingNetworkIe&>(GtpV2IeFactory::getInstance().getIeObject(ServingNetworkIeType));
1136
1137 if(ieHeader.instance == 0)
1138 {
1139 rc = ieObject.decodeServingNetworkIe(buffer, data.servingNetwork, ieHeader.length);
1140
1141 data.servingNetworkIePresent = true;
1142 if (!(rc))
1143 {
1144 errorStream.add((char *)"Failed to decode IE: servingNetwork\n");
1145 return false;
1146 }
1147 }
1148
1149 else
1150 {
1151 // Unknown IE instance print error
1152 errorStream.add((char *)"Unknown IE Type: ");
1153 errorStream.add(ieHeader.ieType);
1154 errorStream.endOfLine();
1155 buffer.skipBytes(ieHeader.length);
1156 }
1157 break;
1158 }
1159
1160 case RatTypeIeType:
1161 {
1162 RatTypeIe ieObject =
1163 dynamic_cast<
1164 RatTypeIe&>(GtpV2IeFactory::getInstance().getIeObject(RatTypeIeType));
1165
1166 if(ieHeader.instance == 0)
1167 {
1168 rc = ieObject.decodeRatTypeIe(buffer, data.ratType, ieHeader.length);
1169
1170 data.ratTypeIePresent = true;
1171 if (!(rc))
1172 {
1173 errorStream.add((char *)"Failed to decode IE: ratType\n");
1174 return false;
1175 }
1176 }
1177
1178 else
1179 {
1180 // Unknown IE instance print error
1181 errorStream.add((char *)"Unknown IE Type: ");
1182 errorStream.add(ieHeader.ieType);
1183 errorStream.endOfLine();
1184 buffer.skipBytes(ieHeader.length);
1185 }
1186 break;
1187 }
1188
1189 case IndicationIeType:
1190 {
1191 IndicationIe ieObject =
1192 dynamic_cast<
1193 IndicationIe&>(GtpV2IeFactory::getInstance().getIeObject(IndicationIeType));
1194
1195 if(ieHeader.instance == 0)
1196 {
1197 rc = ieObject.decodeIndicationIe(buffer, data.indicationFlags, ieHeader.length);
1198
1199 data.indicationFlagsIePresent = true;
1200 if (!(rc))
1201 {
1202 errorStream.add((char *)"Failed to decode IE: indicationFlags\n");
1203 return false;
1204 }
1205 }
1206
1207 else
1208 {
1209 // Unknown IE instance print error
1210 errorStream.add((char *)"Unknown IE Type: ");
1211 errorStream.add(ieHeader.ieType);
1212 errorStream.endOfLine();
1213 buffer.skipBytes(ieHeader.length);
1214 }
1215 break;
1216 }
1217
1218 case FTeidIeType:
1219 {
1220 FTeidIe ieObject =
1221 dynamic_cast<
1222 FTeidIe&>(GtpV2IeFactory::getInstance().getIeObject(FTeidIeType));
1223
1224 if(ieHeader.instance == 0)
1225 {
1226 rc = ieObject.decodeFTeidIe(buffer, data.senderFTeidForControlPlane, ieHeader.length);
1227
1228 data.senderFTeidForControlPlaneIePresent = true;
1229 if (!(rc))
1230 {
1231 errorStream.add((char *)"Failed to decode IE: senderFTeidForControlPlane\n");
1232 return false;
1233 }
1234 }
1235
1236 else
1237 {
1238 // Unknown IE instance print error
1239 errorStream.add((char *)"Unknown IE Type: ");
1240 errorStream.add(ieHeader.ieType);
1241 errorStream.endOfLine();
1242 buffer.skipBytes(ieHeader.length);
1243 }
1244 break;
1245 }
1246
1247 case AmbrIeType:
1248 {
1249 AmbrIe ieObject =
1250 dynamic_cast<
1251 AmbrIe&>(GtpV2IeFactory::getInstance().getIeObject(AmbrIeType));
1252
1253 if(ieHeader.instance == 0)
1254 {
1255 rc = ieObject.decodeAmbrIe(buffer, data.aggregateMaximumBitRate, ieHeader.length);
1256
1257 data.aggregateMaximumBitRateIePresent = true;
1258 if (!(rc))
1259 {
1260 errorStream.add((char *)"Failed to decode IE: aggregateMaximumBitRate\n");
1261 return false;
1262 }
1263 }
1264
1265 else
1266 {
1267 // Unknown IE instance print error
1268 errorStream.add((char *)"Unknown IE Type: ");
1269 errorStream.add(ieHeader.ieType);
1270 errorStream.endOfLine();
1271 buffer.skipBytes(ieHeader.length);
1272 }
1273 break;
1274 }
1275
1276 case DelayValueIeType:
1277 {
1278 DelayValueIe ieObject =
1279 dynamic_cast<
1280 DelayValueIe&>(GtpV2IeFactory::getInstance().getIeObject(DelayValueIeType));
1281
1282 if(ieHeader.instance == 0)
1283 {
1284 rc = ieObject.decodeDelayValueIe(buffer, data.delayDownlinkPacketNotificationRequest, ieHeader.length);
1285
1286 data.delayDownlinkPacketNotificationRequestIePresent = true;
1287 if (!(rc))
1288 {
1289 errorStream.add((char *)"Failed to decode IE: delayDownlinkPacketNotificationRequest\n");
1290 return false;
1291 }
1292 }
1293
1294 else
1295 {
1296 // Unknown IE instance print error
1297 errorStream.add((char *)"Unknown IE Type: ");
1298 errorStream.add(ieHeader.ieType);
1299 errorStream.endOfLine();
1300 buffer.skipBytes(ieHeader.length);
1301 }
1302 break;
1303 }
1304
1305 case BearerContextIeType:
1306 {
1307 BearerContextIe ieObject =
1308 dynamic_cast<
1309 BearerContextIe&>(GtpV2IeFactory::getInstance().getIeObject(BearerContextIeType));
1310
1311 if(ieHeader.instance == 0)
1312 {
1313 // First check if we have enough space left to decode and store this instance
1314 if (data.bearerContextsToBeModifiedCount == 11)
1315 {
1316 errorStream.add((char *)"More than 11 instances of bearerContextsToBeModified received\n");
1317 return false;
1318 }
1319 BearerContextsToBeModifiedInModifyBearerRequest groupedIeInstance =
1320 dynamic_cast<
1321 BearerContextsToBeModifiedInModifyBearerRequest&>(ieObject.getGroupedIe(msgType, 0));
1322 rc = groupedIeInstance.decodeBearerContextsToBeModifiedInModifyBearerRequest(buffer,
1323 data.bearerContextsToBeModified[data.bearerContextsToBeModifiedCount], ieHeader.length);
1324 data.bearerContextsToBeModifiedCount++; // TODO Count validation
1325
1326 if (!(rc))
1327 {
1328 errorStream.add((char *)"Failed to decode IE: bearerContextsToBeModified\n");
1329 return false;
1330 }
1331 }
1332 else if(ieHeader.instance == 1)
1333 {
1334 // First check if we have enough space left to decode and store this instance
1335 if (data.bearerContextsToBeRemovedCount == 11)
1336 {
1337 errorStream.add((char *)"More than 11 instances of bearerContextsToBeRemoved received\n");
1338 return false;
1339 }
1340 BearerContextsToBeRemovedInModifyBearerRequest groupedIeInstance =
1341 dynamic_cast<
1342 BearerContextsToBeRemovedInModifyBearerRequest&>(ieObject.getGroupedIe(msgType, 1));
1343 rc = groupedIeInstance.decodeBearerContextsToBeRemovedInModifyBearerRequest(buffer,
1344 data.bearerContextsToBeRemoved[data.bearerContextsToBeRemovedCount], ieHeader.length);
1345 data.bearerContextsToBeRemovedCount++; // TODO Count validation
1346
1347 if (!(rc))
1348 {
1349 errorStream.add((char *)"Failed to decode IE: bearerContextsToBeRemoved\n");
1350 return false;
1351 }
1352 }
1353
1354 else
1355 {
1356 // Unknown IE instance print error
1357 errorStream.add((char *)"Unknown IE Type: ");
1358 errorStream.add(ieHeader.ieType);
1359 errorStream.endOfLine();
1360 buffer.skipBytes(ieHeader.length);
1361 }
1362 break;
1363 }
1364
1365 case RecoveryIeType:
1366 {
1367 RecoveryIe ieObject =
1368 dynamic_cast<
1369 RecoveryIe&>(GtpV2IeFactory::getInstance().getIeObject(RecoveryIeType));
1370
1371 if(ieHeader.instance == 0)
1372 {
1373 rc = ieObject.decodeRecoveryIe(buffer, data.recovery, ieHeader.length);
1374
1375 data.recoveryIePresent = true;
1376 if (!(rc))
1377 {
1378 errorStream.add((char *)"Failed to decode IE: recovery\n");
1379 return false;
1380 }
1381 }
1382
1383 else
1384 {
1385 // Unknown IE instance print error
1386 errorStream.add((char *)"Unknown IE Type: ");
1387 errorStream.add(ieHeader.ieType);
1388 errorStream.endOfLine();
1389 buffer.skipBytes(ieHeader.length);
1390 }
1391 break;
1392 }
1393
1394 case UeTimeZoneIeType:
1395 {
1396 UeTimeZoneIe ieObject =
1397 dynamic_cast<
1398 UeTimeZoneIe&>(GtpV2IeFactory::getInstance().getIeObject(UeTimeZoneIeType));
1399
1400 if(ieHeader.instance == 0)
1401 {
1402 rc = ieObject.decodeUeTimeZoneIe(buffer, data.ueTimeZone, ieHeader.length);
1403
1404 data.ueTimeZoneIePresent = true;
1405 if (!(rc))
1406 {
1407 errorStream.add((char *)"Failed to decode IE: ueTimeZone\n");
1408 return false;
1409 }
1410 }
1411
1412 else
1413 {
1414 // Unknown IE instance print error
1415 errorStream.add((char *)"Unknown IE Type: ");
1416 errorStream.add(ieHeader.ieType);
1417 errorStream.endOfLine();
1418 buffer.skipBytes(ieHeader.length);
1419 }
1420 break;
1421 }
1422
1423 case FqCsidIeType:
1424 {
1425 FqCsidIe ieObject =
1426 dynamic_cast<
1427 FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType));
1428
1429 if(ieHeader.instance == 0)
1430 {
1431 rc = ieObject.decodeFqCsidIe(buffer, data.mmeFqCsid, ieHeader.length);
1432
1433 data.mmeFqCsidIePresent = true;
1434 if (!(rc))
1435 {
1436 errorStream.add((char *)"Failed to decode IE: mmeFqCsid\n");
1437 return false;
1438 }
1439 }
1440 else if(ieHeader.instance == 1)
1441 {
1442 rc = ieObject.decodeFqCsidIe(buffer, data.sgwFqCsid, ieHeader.length);
1443
1444 data.sgwFqCsidIePresent = true;
1445 if (!(rc))
1446 {
1447 errorStream.add((char *)"Failed to decode IE: sgwFqCsid\n");
1448 return false;
1449 }
1450 }
1451
1452 else
1453 {
1454 // Unknown IE instance print error
1455 errorStream.add((char *)"Unknown IE Type: ");
1456 errorStream.add(ieHeader.ieType);
1457 errorStream.endOfLine();
1458 buffer.skipBytes(ieHeader.length);
1459 }
1460 break;
1461 }
1462
1463 case UciIeType:
1464 {
1465 UciIe ieObject =
1466 dynamic_cast<
1467 UciIe&>(GtpV2IeFactory::getInstance().getIeObject(UciIeType));
1468
1469 if(ieHeader.instance == 0)
1470 {
1471 rc = ieObject.decodeUciIe(buffer, data.userCsgInformation, ieHeader.length);
1472
1473 data.userCsgInformationIePresent = true;
1474 if (!(rc))
1475 {
1476 errorStream.add((char *)"Failed to decode IE: userCsgInformation\n");
1477 return false;
1478 }
1479 }
1480
1481 else
1482 {
1483 // Unknown IE instance print error
1484 errorStream.add((char *)"Unknown IE Type: ");
1485 errorStream.add(ieHeader.ieType);
1486 errorStream.endOfLine();
1487 buffer.skipBytes(ieHeader.length);
1488 }
1489 break;
1490 }
1491
1492 case IpAddressIeType:
1493 {
1494 IpAddressIe ieObject =
1495 dynamic_cast<
1496 IpAddressIe&>(GtpV2IeFactory::getInstance().getIeObject(IpAddressIeType));
1497
1498 if(ieHeader.instance == 1)
1499 {
1500 rc = ieObject.decodeIpAddressIe(buffer, data.ueLocalIpAddress, ieHeader.length);
1501
1502 data.ueLocalIpAddressIePresent = true;
1503 if (!(rc))
1504 {
1505 errorStream.add((char *)"Failed to decode IE: ueLocalIpAddress\n");
1506 return false;
1507 }
1508 }
1509 else if(ieHeader.instance == 0)
1510 {
1511 rc = ieObject.decodeIpAddressIe(buffer, data.hNbLocalIpAddress, ieHeader.length);
1512
1513 data.hNbLocalIpAddressIePresent = true;
1514 if (!(rc))
1515 {
1516 errorStream.add((char *)"Failed to decode IE: hNbLocalIpAddress\n");
1517 return false;
1518 }
1519 }
1520 else if(ieHeader.instance == 2)
1521 {
1522 rc = ieObject.decodeIpAddressIe(buffer, data.mmeS4SgsnIdentifier, ieHeader.length);
1523
1524 data.mmeS4SgsnIdentifierIePresent = true;
1525 if (!(rc))
1526 {
1527 errorStream.add((char *)"Failed to decode IE: mmeS4SgsnIdentifier\n");
1528 return false;
1529 }
1530 }
1531
1532 else
1533 {
1534 // Unknown IE instance print error
1535 errorStream.add((char *)"Unknown IE Type: ");
1536 errorStream.add(ieHeader.ieType);
1537 errorStream.endOfLine();
1538 buffer.skipBytes(ieHeader.length);
1539 }
1540 break;
1541 }
1542
1543 case PortNumberIeType:
1544 {
1545 PortNumberIe ieObject =
1546 dynamic_cast<
1547 PortNumberIe&>(GtpV2IeFactory::getInstance().getIeObject(PortNumberIeType));
1548
1549 if(ieHeader.instance == 1)
1550 {
1551 rc = ieObject.decodePortNumberIe(buffer, data.ueUdpPort, ieHeader.length);
1552
1553 data.ueUdpPortIePresent = true;
1554 if (!(rc))
1555 {
1556 errorStream.add((char *)"Failed to decode IE: ueUdpPort\n");
1557 return false;
1558 }
1559 }
1560 else if(ieHeader.instance == 0)
1561 {
1562 rc = ieObject.decodePortNumberIe(buffer, data.hNbUdpPort, ieHeader.length);
1563
1564 data.hNbUdpPortIePresent = true;
1565 if (!(rc))
1566 {
1567 errorStream.add((char *)"Failed to decode IE: hNbUdpPort\n");
1568 return false;
1569 }
1570 }
1571
1572 else
1573 {
1574 // Unknown IE instance print error
1575 errorStream.add((char *)"Unknown IE Type: ");
1576 errorStream.add(ieHeader.ieType);
1577 errorStream.endOfLine();
1578 buffer.skipBytes(ieHeader.length);
1579 }
1580 break;
1581 }
1582
1583 case LocalDistinguishedNameIeType:
1584 {
1585 LocalDistinguishedNameIe ieObject =
1586 dynamic_cast<
1587 LocalDistinguishedNameIe&>(GtpV2IeFactory::getInstance().getIeObject(LocalDistinguishedNameIeType));
1588
1589 if(ieHeader.instance == 0)
1590 {
1591 rc = ieObject.decodeLocalDistinguishedNameIe(buffer, data.mmeS4SgsnLdn, ieHeader.length);
1592
1593 data.mmeS4SgsnLdnIePresent = true;
1594 if (!(rc))
1595 {
1596 errorStream.add((char *)"Failed to decode IE: mmeS4SgsnLdn\n");
1597 return false;
1598 }
1599 }
1600 else if(ieHeader.instance == 0)
1601 {
1602 rc = ieObject.decodeLocalDistinguishedNameIe(buffer, data.sgwLdn, ieHeader.length);
1603
1604 data.sgwLdnIePresent = true;
1605 if (!(rc))
1606 {
1607 errorStream.add((char *)"Failed to decode IE: sgwLdn\n");
1608 return false;
1609 }
1610 }
1611
1612 else
1613 {
1614 // Unknown IE instance print error
1615 errorStream.add((char *)"Unknown IE Type: ");
1616 errorStream.add(ieHeader.ieType);
1617 errorStream.endOfLine();
1618 buffer.skipBytes(ieHeader.length);
1619 }
1620 break;
1621 }
1622
1623 case CnOperatorSelectionEntityIeType:
1624 {
1625 CnOperatorSelectionEntityIe ieObject =
1626 dynamic_cast<
1627 CnOperatorSelectionEntityIe&>(GtpV2IeFactory::getInstance().getIeObject(CnOperatorSelectionEntityIeType));
1628
1629 if(ieHeader.instance == 0)
1630 {
1631 rc = ieObject.decodeCnOperatorSelectionEntityIe(buffer, data.cnOperatorSelectionEntity, ieHeader.length);
1632
1633 data.cnOperatorSelectionEntityIePresent = true;
1634 if (!(rc))
1635 {
1636 errorStream.add((char *)"Failed to decode IE: cnOperatorSelectionEntity\n");
1637 return false;
1638 }
1639 }
1640
1641 else
1642 {
1643 // Unknown IE instance print error
1644 errorStream.add((char *)"Unknown IE Type: ");
1645 errorStream.add(ieHeader.ieType);
1646 errorStream.endOfLine();
1647 buffer.skipBytes(ieHeader.length);
1648 }
1649 break;
1650 }
1651
1652 case OverloadControlInformationIeType:
1653 {
1654 OverloadControlInformationIe ieObject =
1655 dynamic_cast<
1656 OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType));
1657
1658 if(ieHeader.instance == 0)
1659 {
1660 MmeS4SgsnsOverloadControlInformationInModifyBearerRequest groupedIeInstance =
1661 dynamic_cast<
1662 MmeS4SgsnsOverloadControlInformationInModifyBearerRequest&>(ieObject.getGroupedIe(msgType, 0));
1663 rc = groupedIeInstance.decodeMmeS4SgsnsOverloadControlInformationInModifyBearerRequest(buffer, data.mmeS4SgsnsOverloadControlInformation, ieHeader.length);
1664
1665 data.mmeS4SgsnsOverloadControlInformationIePresent = true;
1666 if (!(rc))
1667 {
1668 errorStream.add((char *)"Failed to decode IE: mmeS4SgsnsOverloadControlInformation\n");
1669 return false;
1670 }
1671 }
1672 else if(ieHeader.instance == 1)
1673 {
1674 SgwsOverloadControlInformationInModifyBearerRequest groupedIeInstance =
1675 dynamic_cast<
1676 SgwsOverloadControlInformationInModifyBearerRequest&>(ieObject.getGroupedIe(msgType, 1));
1677 rc = groupedIeInstance.decodeSgwsOverloadControlInformationInModifyBearerRequest(buffer, data.sgwsOverloadControlInformation, ieHeader.length);
1678
1679 data.sgwsOverloadControlInformationIePresent = true;
1680 if (!(rc))
1681 {
1682 errorStream.add((char *)"Failed to decode IE: sgwsOverloadControlInformation\n");
1683 return false;
1684 }
1685 }
1686 else if(ieHeader.instance == 2)
1687 {
1688 EpdgsOverloadControlInformationInModifyBearerRequest groupedIeInstance =
1689 dynamic_cast<
1690 EpdgsOverloadControlInformationInModifyBearerRequest&>(ieObject.getGroupedIe(msgType, 2));
1691 rc = groupedIeInstance.decodeEpdgsOverloadControlInformationInModifyBearerRequest(buffer, data.epdgsOverloadControlInformation, ieHeader.length);
1692
1693 data.epdgsOverloadControlInformationIePresent = true;
1694 if (!(rc))
1695 {
1696 errorStream.add((char *)"Failed to decode IE: epdgsOverloadControlInformation\n");
1697 return false;
1698 }
1699 }
1700
1701 else
1702 {
1703 // Unknown IE instance print error
1704 errorStream.add((char *)"Unknown IE Type: ");
1705 errorStream.add(ieHeader.ieType);
1706 errorStream.endOfLine();
1707 buffer.skipBytes(ieHeader.length);
1708 }
1709 break;
1710 }
1711
1712 case ServingPlmnRateControlIeType:
1713 {
1714 ServingPlmnRateControlIe ieObject =
1715 dynamic_cast<
1716 ServingPlmnRateControlIe&>(GtpV2IeFactory::getInstance().getIeObject(ServingPlmnRateControlIeType));
1717
1718 if(ieHeader.instance == 0)
1719 {
1720 rc = ieObject.decodeServingPlmnRateControlIe(buffer, data.servingPlmnRateControl, ieHeader.length);
1721
1722 data.servingPlmnRateControlIePresent = true;
1723 if (!(rc))
1724 {
1725 errorStream.add((char *)"Failed to decode IE: servingPlmnRateControl\n");
1726 return false;
1727 }
1728 }
1729
1730 else
1731 {
1732 // Unknown IE instance print error
1733 errorStream.add((char *)"Unknown IE Type: ");
1734 errorStream.add(ieHeader.ieType);
1735 errorStream.endOfLine();
1736 buffer.skipBytes(ieHeader.length);
1737 }
1738 break;
1739 }
1740
1741 case CounterIeType:
1742 {
1743 CounterIe ieObject =
1744 dynamic_cast<
1745 CounterIe&>(GtpV2IeFactory::getInstance().getIeObject(CounterIeType));
1746
1747 if(ieHeader.instance == 0)
1748 {
1749 rc = ieObject.decodeCounterIe(buffer, data.moExceptionDataCounter, ieHeader.length);
1750
1751 data.moExceptionDataCounterIePresent = true;
1752 if (!(rc))
1753 {
1754 errorStream.add((char *)"Failed to decode IE: moExceptionDataCounter\n");
1755 return false;
1756 }
1757 }
1758
1759 else
1760 {
1761 // Unknown IE instance print error
1762 errorStream.add((char *)"Unknown IE Type: ");
1763 errorStream.add(ieHeader.ieType);
1764 errorStream.endOfLine();
1765 buffer.skipBytes(ieHeader.length);
1766 }
1767 break;
1768 }
1769
1770 case ImsiIeType:
1771 {
1772 ImsiIe ieObject =
1773 dynamic_cast<
1774 ImsiIe&>(GtpV2IeFactory::getInstance().getIeObject(ImsiIeType));
1775
1776 if(ieHeader.instance == 0)
1777 {
1778 rc = ieObject.decodeImsiIe(buffer, data.imsi, ieHeader.length);
1779
1780 data.imsiIePresent = true;
1781 if (!(rc))
1782 {
1783 errorStream.add((char *)"Failed to decode IE: imsi\n");
1784 return false;
1785 }
1786 }
1787
1788 else
1789 {
1790 // Unknown IE instance print error
1791 errorStream.add((char *)"Unknown IE Type: ");
1792 errorStream.add(ieHeader.ieType);
1793 errorStream.endOfLine();
1794 buffer.skipBytes(ieHeader.length);
1795 }
1796 break;
1797 }
1798
1799 case TwanIdentifierIeType:
1800 {
1801 TwanIdentifierIe ieObject =
1802 dynamic_cast<
1803 TwanIdentifierIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierIeType));
1804
1805 if(ieHeader.instance == 0)
1806 {
1807 rc = ieObject.decodeTwanIdentifierIe(buffer, data.wlanLocationInformation, ieHeader.length);
1808
1809 data.wlanLocationInformationIePresent = true;
1810 if (!(rc))
1811 {
1812 errorStream.add((char *)"Failed to decode IE: wlanLocationInformation\n");
1813 return false;
1814 }
1815 }
1816
1817 else
1818 {
1819 // Unknown IE instance print error
1820 errorStream.add((char *)"Unknown IE Type: ");
1821 errorStream.add(ieHeader.ieType);
1822 errorStream.endOfLine();
1823 buffer.skipBytes(ieHeader.length);
1824 }
1825 break;
1826 }
1827
1828 case TwanIdentifierTimestampIeType:
1829 {
1830 TwanIdentifierTimestampIe ieObject =
1831 dynamic_cast<
1832 TwanIdentifierTimestampIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierTimestampIeType));
1833
1834 if(ieHeader.instance == 0)
1835 {
1836 rc = ieObject.decodeTwanIdentifierTimestampIe(buffer, data.wlanLocationTimestamp, ieHeader.length);
1837
1838 data.wlanLocationTimestampIePresent = true;
1839 if (!(rc))
1840 {
1841 errorStream.add((char *)"Failed to decode IE: wlanLocationTimestamp\n");
1842 return false;
1843 }
1844 }
1845
1846 else
1847 {
1848 // Unknown IE instance print error
1849 errorStream.add((char *)"Unknown IE Type: ");
1850 errorStream.add(ieHeader.ieType);
1851 errorStream.endOfLine();
1852 buffer.skipBytes(ieHeader.length);
1853 }
1854 break;
1855 }
1856
1857 case SecondaryRatUsageDataReportIeType:
1858 {
1859 SecondaryRatUsageDataReportIe ieObject =
1860 dynamic_cast<
1861 SecondaryRatUsageDataReportIe&>(GtpV2IeFactory::getInstance().getIeObject(SecondaryRatUsageDataReportIeType));
1862
1863 if(ieHeader.instance == 0)
1864 {
1865 rc = ieObject.decodeSecondaryRatUsageDataReportIe(buffer, data.secondaryRatUsageDataReport, ieHeader.length);
1866
1867 data.secondaryRatUsageDataReportIePresent = true;
1868 if (!(rc))
1869 {
1870 errorStream.add((char *)"Failed to decode IE: secondaryRatUsageDataReport\n");
1871 return false;
1872 }
1873 }
1874
1875 else
1876 {
1877 // Unknown IE instance print error
1878 errorStream.add((char *)"Unknown IE Type: ");
1879 errorStream.add(ieHeader.ieType);
1880 errorStream.endOfLine();
1881 buffer.skipBytes(ieHeader.length);
1882 }
1883 break;
1884 }
1885
1886 default:
1887 {
1888 // Unknown IE print error
1889 errorStream.add((char *)"Unknown IE Type: ");
1890 errorStream.add(ieHeader.ieType);
1891 errorStream.endOfLine();
1892 buffer.skipBytes(ieHeader.length);
1893 }
1894 }
1895 }
1896 return rc; // TODO validations
1897}
1898
1899void ModifyBearerRequestMsg::
1900displayModifyBearerRequestMsgData_v(ModifyBearerRequestMsgData const &data, Debug &stream)
1901{
1902 stream.incrIndent();
1903 stream.add((char *)"ModifyBearerRequestMsg:");
1904 stream.endOfLine();
1905 stream.incrIndent();
1906
1907
1908 if (data.meIdentityIePresent)
1909 {
1910
1911
1912 stream.add((char *)"IE - meIdentity:");
1913 stream.endOfLine();
1914 MeiIe mei=
1915 dynamic_cast<
1916 MeiIe&>(GtpV2IeFactory::getInstance().getIeObject(MeiIeType));
1917 mei.displayMeiIe_v(data.meIdentity, stream);
1918
1919 }
1920 if (data.userLocationInformationIePresent)
1921 {
1922
1923
1924 stream.add((char *)"IE - userLocationInformation:");
1925 stream.endOfLine();
1926 UliIe uli=
1927 dynamic_cast<
1928 UliIe&>(GtpV2IeFactory::getInstance().getIeObject(UliIeType));
1929 uli.displayUliIe_v(data.userLocationInformation, stream);
1930
1931 }
1932 if (data.servingNetworkIePresent)
1933 {
1934
1935
1936 stream.add((char *)"IE - servingNetwork:");
1937 stream.endOfLine();
1938 ServingNetworkIe servingNetwork=
1939 dynamic_cast<
1940 ServingNetworkIe&>(GtpV2IeFactory::getInstance().getIeObject(ServingNetworkIeType));
1941 servingNetwork.displayServingNetworkIe_v(data.servingNetwork, stream);
1942
1943 }
1944 if (data.ratTypeIePresent)
1945 {
1946
1947
1948 stream.add((char *)"IE - ratType:");
1949 stream.endOfLine();
1950 RatTypeIe ratType=
1951 dynamic_cast<
1952 RatTypeIe&>(GtpV2IeFactory::getInstance().getIeObject(RatTypeIeType));
1953 ratType.displayRatTypeIe_v(data.ratType, stream);
1954
1955 }
1956 if (data.indicationFlagsIePresent)
1957 {
1958
1959
1960 stream.add((char *)"IE - indicationFlags:");
1961 stream.endOfLine();
1962 IndicationIe indication=
1963 dynamic_cast<
1964 IndicationIe&>(GtpV2IeFactory::getInstance().getIeObject(IndicationIeType));
1965 indication.displayIndicationIe_v(data.indicationFlags, stream);
1966
1967 }
1968 if (data.senderFTeidForControlPlaneIePresent)
1969 {
1970
1971
1972 stream.add((char *)"IE - senderFTeidForControlPlane:");
1973 stream.endOfLine();
1974 FTeidIe fTeid=
1975 dynamic_cast<
1976 FTeidIe&>(GtpV2IeFactory::getInstance().getIeObject(FTeidIeType));
1977 fTeid.displayFTeidIe_v(data.senderFTeidForControlPlane, stream);
1978
1979 }
1980 if (data.aggregateMaximumBitRateIePresent)
1981 {
1982
1983
1984 stream.add((char *)"IE - aggregateMaximumBitRate:");
1985 stream.endOfLine();
1986 AmbrIe ambr=
1987 dynamic_cast<
1988 AmbrIe&>(GtpV2IeFactory::getInstance().getIeObject(AmbrIeType));
1989 ambr.displayAmbrIe_v(data.aggregateMaximumBitRate, stream);
1990
1991 }
1992 if (data.delayDownlinkPacketNotificationRequestIePresent)
1993 {
1994
1995
1996 stream.add((char *)"IE - delayDownlinkPacketNotificationRequest:");
1997 stream.endOfLine();
1998 DelayValueIe delayValue=
1999 dynamic_cast<
2000 DelayValueIe&>(GtpV2IeFactory::getInstance().getIeObject(DelayValueIeType));
2001 delayValue.displayDelayValueIe_v(data.delayDownlinkPacketNotificationRequest, stream);
2002
2003 }
2004
2005 Uint8 displayCount;
2006
2007 displayCount = data.bearerContextsToBeModifiedCount;
2008 if (displayCount > 11)
2009 {
2010 stream.add((char *)"Invalid data more than 11 instances");
2011 stream.endOfLine();
2012 stream.add((char *)"Displaying only 11");
2013 stream.endOfLine();
2014 displayCount = 11;
2015 }
2016 for (Uint8 i = 0; i < displayCount; i++)
2017 {
2018 stream.add((char *)"IE - bearerContextsToBeModified:");
2019 stream.endOfLine();
2020 BearerContextIe bearerContext=
2021 dynamic_cast<
2022 BearerContextIe&>(GtpV2IeFactory::getInstance().getIeObject(BearerContextIeType));
2023 BearerContextsToBeModifiedInModifyBearerRequest groupedIeInstance =
2024 dynamic_cast<
2025 BearerContextsToBeModifiedInModifyBearerRequest&>(bearerContext.getGroupedIe(msgType, 0));
2026 groupedIeInstance.displayBearerContextsToBeModifiedInModifyBearerRequestData_v(data.bearerContextsToBeModified[i], stream);
2027 }
2028
2029
2030
2031
2032 displayCount = data.bearerContextsToBeRemovedCount;
2033 if (displayCount > 11)
2034 {
2035 stream.add((char *)"Invalid data more than 11 instances");
2036 stream.endOfLine();
2037 stream.add((char *)"Displaying only 11");
2038 stream.endOfLine();
2039 displayCount = 11;
2040 }
2041 for (Uint8 i = 0; i < displayCount; i++)
2042 {
2043 stream.add((char *)"IE - bearerContextsToBeRemoved:");
2044 stream.endOfLine();
2045 BearerContextIe bearerContext=
2046 dynamic_cast<
2047 BearerContextIe&>(GtpV2IeFactory::getInstance().getIeObject(BearerContextIeType));
2048 BearerContextsToBeRemovedInModifyBearerRequest groupedIeInstance =
2049 dynamic_cast<
2050 BearerContextsToBeRemovedInModifyBearerRequest&>(bearerContext.getGroupedIe(msgType, 1));
2051 groupedIeInstance.displayBearerContextsToBeRemovedInModifyBearerRequestData_v(data.bearerContextsToBeRemoved[i], stream);
2052 }
2053
2054
2055
2056
2057 if (data.recoveryIePresent)
2058 {
2059
2060
2061 stream.add((char *)"IE - recovery:");
2062 stream.endOfLine();
2063 RecoveryIe recovery=
2064 dynamic_cast<
2065 RecoveryIe&>(GtpV2IeFactory::getInstance().getIeObject(RecoveryIeType));
2066 recovery.displayRecoveryIe_v(data.recovery, stream);
2067
2068 }
2069 if (data.ueTimeZoneIePresent)
2070 {
2071
2072
2073 stream.add((char *)"IE - ueTimeZone:");
2074 stream.endOfLine();
2075 UeTimeZoneIe ueTimeZone=
2076 dynamic_cast<
2077 UeTimeZoneIe&>(GtpV2IeFactory::getInstance().getIeObject(UeTimeZoneIeType));
2078 ueTimeZone.displayUeTimeZoneIe_v(data.ueTimeZone, stream);
2079
2080 }
2081 if (data.mmeFqCsidIePresent)
2082 {
2083
2084
2085 stream.add((char *)"IE - mmeFqCsid:");
2086 stream.endOfLine();
2087 FqCsidIe fqCsid=
2088 dynamic_cast<
2089 FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType));
2090 fqCsid.displayFqCsidIe_v(data.mmeFqCsid, stream);
2091
2092 }
2093 if (data.sgwFqCsidIePresent)
2094 {
2095
2096
2097 stream.add((char *)"IE - sgwFqCsid:");
2098 stream.endOfLine();
2099 FqCsidIe fqCsid=
2100 dynamic_cast<
2101 FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType));
2102 fqCsid.displayFqCsidIe_v(data.sgwFqCsid, stream);
2103
2104 }
2105 if (data.userCsgInformationIePresent)
2106 {
2107
2108
2109 stream.add((char *)"IE - userCsgInformation:");
2110 stream.endOfLine();
2111 UciIe uci=
2112 dynamic_cast<
2113 UciIe&>(GtpV2IeFactory::getInstance().getIeObject(UciIeType));
2114 uci.displayUciIe_v(data.userCsgInformation, stream);
2115
2116 }
2117 if (data.ueLocalIpAddressIePresent)
2118 {
2119
2120
2121 stream.add((char *)"IE - ueLocalIpAddress:");
2122 stream.endOfLine();
2123 IpAddressIe ipAddress=
2124 dynamic_cast<
2125 IpAddressIe&>(GtpV2IeFactory::getInstance().getIeObject(IpAddressIeType));
2126 ipAddress.displayIpAddressIe_v(data.ueLocalIpAddress, stream);
2127
2128 }
2129 if (data.ueUdpPortIePresent)
2130 {
2131
2132
2133 stream.add((char *)"IE - ueUdpPort:");
2134 stream.endOfLine();
2135 PortNumberIe portNumber=
2136 dynamic_cast<
2137 PortNumberIe&>(GtpV2IeFactory::getInstance().getIeObject(PortNumberIeType));
2138 portNumber.displayPortNumberIe_v(data.ueUdpPort, stream);
2139
2140 }
2141 if (data.mmeS4SgsnLdnIePresent)
2142 {
2143
2144
2145 stream.add((char *)"IE - mmeS4SgsnLdn:");
2146 stream.endOfLine();
2147 LocalDistinguishedNameIe localDistinguishedName=
2148 dynamic_cast<
2149 LocalDistinguishedNameIe&>(GtpV2IeFactory::getInstance().getIeObject(LocalDistinguishedNameIeType));
2150 localDistinguishedName.displayLocalDistinguishedNameIe_v(data.mmeS4SgsnLdn, stream);
2151
2152 }
2153 if (data.sgwLdnIePresent)
2154 {
2155
2156
2157 stream.add((char *)"IE - sgwLdn:");
2158 stream.endOfLine();
2159 LocalDistinguishedNameIe localDistinguishedName=
2160 dynamic_cast<
2161 LocalDistinguishedNameIe&>(GtpV2IeFactory::getInstance().getIeObject(LocalDistinguishedNameIeType));
2162 localDistinguishedName.displayLocalDistinguishedNameIe_v(data.sgwLdn, stream);
2163
2164 }
2165 if (data.hNbLocalIpAddressIePresent)
2166 {
2167
2168
2169 stream.add((char *)"IE - hNbLocalIpAddress:");
2170 stream.endOfLine();
2171 IpAddressIe ipAddress=
2172 dynamic_cast<
2173 IpAddressIe&>(GtpV2IeFactory::getInstance().getIeObject(IpAddressIeType));
2174 ipAddress.displayIpAddressIe_v(data.hNbLocalIpAddress, stream);
2175
2176 }
2177 if (data.hNbUdpPortIePresent)
2178 {
2179
2180
2181 stream.add((char *)"IE - hNbUdpPort:");
2182 stream.endOfLine();
2183 PortNumberIe portNumber=
2184 dynamic_cast<
2185 PortNumberIe&>(GtpV2IeFactory::getInstance().getIeObject(PortNumberIeType));
2186 portNumber.displayPortNumberIe_v(data.hNbUdpPort, stream);
2187
2188 }
2189 if (data.mmeS4SgsnIdentifierIePresent)
2190 {
2191
2192
2193 stream.add((char *)"IE - mmeS4SgsnIdentifier:");
2194 stream.endOfLine();
2195 IpAddressIe ipAddress=
2196 dynamic_cast<
2197 IpAddressIe&>(GtpV2IeFactory::getInstance().getIeObject(IpAddressIeType));
2198 ipAddress.displayIpAddressIe_v(data.mmeS4SgsnIdentifier, stream);
2199
2200 }
2201 if (data.cnOperatorSelectionEntityIePresent)
2202 {
2203
2204
2205 stream.add((char *)"IE - cnOperatorSelectionEntity:");
2206 stream.endOfLine();
2207 CnOperatorSelectionEntityIe cnOperatorSelectionEntity=
2208 dynamic_cast<
2209 CnOperatorSelectionEntityIe&>(GtpV2IeFactory::getInstance().getIeObject(CnOperatorSelectionEntityIeType));
2210 cnOperatorSelectionEntity.displayCnOperatorSelectionEntityIe_v(data.cnOperatorSelectionEntity, stream);
2211
2212 }
2213 if (data.mmeS4SgsnsOverloadControlInformationIePresent)
2214 {
2215
2216
2217 stream.add((char *)"IE - mmeS4SgsnsOverloadControlInformation:");
2218 stream.endOfLine();
2219 OverloadControlInformationIe overloadControlInformation=
2220 dynamic_cast<
2221 OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType));
2222 MmeS4SgsnsOverloadControlInformationInModifyBearerRequest groupedIeInstance =
2223 dynamic_cast<
2224 MmeS4SgsnsOverloadControlInformationInModifyBearerRequest&>(overloadControlInformation.getGroupedIe(msgType, 0));
2225 groupedIeInstance.displayMmeS4SgsnsOverloadControlInformationInModifyBearerRequestData_v(data.mmeS4SgsnsOverloadControlInformation, stream);
2226
2227 }
2228 if (data.sgwsOverloadControlInformationIePresent)
2229 {
2230
2231
2232 stream.add((char *)"IE - sgwsOverloadControlInformation:");
2233 stream.endOfLine();
2234 OverloadControlInformationIe overloadControlInformation=
2235 dynamic_cast<
2236 OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType));
2237 SgwsOverloadControlInformationInModifyBearerRequest groupedIeInstance =
2238 dynamic_cast<
2239 SgwsOverloadControlInformationInModifyBearerRequest&>(overloadControlInformation.getGroupedIe(msgType, 1));
2240 groupedIeInstance.displaySgwsOverloadControlInformationInModifyBearerRequestData_v(data.sgwsOverloadControlInformation, stream);
2241
2242 }
2243 if (data.epdgsOverloadControlInformationIePresent)
2244 {
2245
2246
2247 stream.add((char *)"IE - epdgsOverloadControlInformation:");
2248 stream.endOfLine();
2249 OverloadControlInformationIe overloadControlInformation=
2250 dynamic_cast<
2251 OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType));
2252 EpdgsOverloadControlInformationInModifyBearerRequest groupedIeInstance =
2253 dynamic_cast<
2254 EpdgsOverloadControlInformationInModifyBearerRequest&>(overloadControlInformation.getGroupedIe(msgType, 2));
2255 groupedIeInstance.displayEpdgsOverloadControlInformationInModifyBearerRequestData_v(data.epdgsOverloadControlInformation, stream);
2256
2257 }
2258 if (data.servingPlmnRateControlIePresent)
2259 {
2260
2261
2262 stream.add((char *)"IE - servingPlmnRateControl:");
2263 stream.endOfLine();
2264 ServingPlmnRateControlIe servingPlmnRateControl=
2265 dynamic_cast<
2266 ServingPlmnRateControlIe&>(GtpV2IeFactory::getInstance().getIeObject(ServingPlmnRateControlIeType));
2267 servingPlmnRateControl.displayServingPlmnRateControlIe_v(data.servingPlmnRateControl, stream);
2268
2269 }
2270 if (data.moExceptionDataCounterIePresent)
2271 {
2272
2273
2274 stream.add((char *)"IE - moExceptionDataCounter:");
2275 stream.endOfLine();
2276 CounterIe counter=
2277 dynamic_cast<
2278 CounterIe&>(GtpV2IeFactory::getInstance().getIeObject(CounterIeType));
2279 counter.displayCounterIe_v(data.moExceptionDataCounter, stream);
2280
2281 }
2282 if (data.imsiIePresent)
2283 {
2284
2285
2286 stream.add((char *)"IE - imsi:");
2287 stream.endOfLine();
2288 ImsiIe imsi=
2289 dynamic_cast<
2290 ImsiIe&>(GtpV2IeFactory::getInstance().getIeObject(ImsiIeType));
2291 imsi.displayImsiIe_v(data.imsi, stream);
2292
2293 }
2294 if (data.userLocationInformationForSgwIePresent)
2295 {
2296
2297
2298 stream.add((char *)"IE - userLocationInformationForSgw:");
2299 stream.endOfLine();
2300 UliIe uli=
2301 dynamic_cast<
2302 UliIe&>(GtpV2IeFactory::getInstance().getIeObject(UliIeType));
2303 uli.displayUliIe_v(data.userLocationInformationForSgw, stream);
2304
2305 }
2306 if (data.wlanLocationInformationIePresent)
2307 {
2308
2309
2310 stream.add((char *)"IE - wlanLocationInformation:");
2311 stream.endOfLine();
2312 TwanIdentifierIe twanIdentifier=
2313 dynamic_cast<
2314 TwanIdentifierIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierIeType));
2315 twanIdentifier.displayTwanIdentifierIe_v(data.wlanLocationInformation, stream);
2316
2317 }
2318 if (data.wlanLocationTimestampIePresent)
2319 {
2320
2321
2322 stream.add((char *)"IE - wlanLocationTimestamp:");
2323 stream.endOfLine();
2324 TwanIdentifierTimestampIe twanIdentifierTimestamp=
2325 dynamic_cast<
2326 TwanIdentifierTimestampIe&>(GtpV2IeFactory::getInstance().getIeObject(TwanIdentifierTimestampIeType));
2327 twanIdentifierTimestamp.displayTwanIdentifierTimestampIe_v(data.wlanLocationTimestamp, stream);
2328
2329 }
2330 if (data.secondaryRatUsageDataReportIePresent)
2331 {
2332
2333
2334 stream.add((char *)"IE - secondaryRatUsageDataReport:");
2335 stream.endOfLine();
2336 SecondaryRatUsageDataReportIe secondaryRatUsageDataReport=
2337 dynamic_cast<
2338 SecondaryRatUsageDataReportIe&>(GtpV2IeFactory::getInstance().getIeObject(SecondaryRatUsageDataReportIeType));
2339 secondaryRatUsageDataReport.displaySecondaryRatUsageDataReportIe_v(data.secondaryRatUsageDataReport, stream);
2340
2341 }
2342
2343 stream.decrIndent();
2344 stream.decrIndent();
2345}
2346
2347