blob: 292fe40a3f15d6242332871b0232ec42bb114761 [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 "deleteSessionResponseMsg.h"
16#include "../ieClasses/manual/gtpV2Ie.h"
17#include "../ieClasses/gtpV2IeFactory.h"
18#include "../ieClasses/causeIe.h"
19#include "../ieClasses/recoveryIe.h"
20#include "../ieClasses/pcoIe.h"
21#include "../ieClasses/indicationIe.h"
22#include "../ieClasses/loadControlInformationIe.h"
23#include "../ieClasses/pgwsNodeLevelLoadControlInformationInDeleteSessionResponse.h"
24#include "../ieClasses/loadControlInformationIe.h"
25#include "../ieClasses/pgwsApnLevelLoadControlInformationInDeleteSessionResponse.h"
26#include "../ieClasses/loadControlInformationIe.h"
27#include "../ieClasses/sgwsNodeLevelLoadControlInformationInDeleteSessionResponse.h"
28#include "../ieClasses/overloadControlInformationIe.h"
29#include "../ieClasses/pgwsOverloadControlInformationInDeleteSessionResponse.h"
30#include "../ieClasses/overloadControlInformationIe.h"
31#include "../ieClasses/sgwsOverloadControlInformationInDeleteSessionResponse.h"
32#include "../ieClasses/epcoIe.h"
33
34DeleteSessionResponseMsg::DeleteSessionResponseMsg()
35{
36 msgType = DeleteSessionResponseMsgType;
37 Uint16 mandIe;
38 mandIe = CauseIeType;
39 mandIe = (mandIe << 8) | 0; // cause
40 mandatoryIeSet.insert(mandIe);
41}
42
43DeleteSessionResponseMsg::~DeleteSessionResponseMsg()
44{
45
46}
47
48bool DeleteSessionResponseMsg::encodeDeleteSessionResponseMsg(MsgBuffer &buffer,
49 DeleteSessionResponseMsgData
50 const &data)
51{
52 bool rc = false;
53 GtpV2IeHeader header;
54 Uint16 startIndex = 0;
55 Uint16 endIndex = 0;
56 Uint16 length = 0;
57
58
59 // Encode the Ie Header
60 header.ieType = CauseIeType;
61 header.instance = 0;
62 header.length = 0; // We will encode the IE first and then update the length
63 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
64 startIndex = buffer.getCurrentIndex();
65 CauseIe cause=
66 dynamic_cast<
67 CauseIe&>(GtpV2IeFactory::getInstance().getIeObject(CauseIeType));
68 rc = cause.encodeCauseIe(buffer, data.cause);
69 endIndex = buffer.getCurrentIndex();
70 length = endIndex - startIndex;
71
72 // encode the length value now
73 buffer.goToIndex(startIndex - 3);
74 buffer.writeUint16(length, false);
75 buffer.goToIndex(endIndex);
76
77 if (!(rc))
78 {
79 errorStream.add((char *)"Failed to encode IE: cause\n");
80 return false;
81 }
82
83 if (data.recoveryIePresent)
84 {
85
86 // Encode the Ie Header
87 header.ieType = RecoveryIeType;
88 header.instance = 0;
89 header.length = 0; // We will encode the IE first and then update the length
90 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
91 startIndex = buffer.getCurrentIndex();
92 RecoveryIe recovery=
93 dynamic_cast<
94 RecoveryIe&>(GtpV2IeFactory::getInstance().getIeObject(RecoveryIeType));
95 rc = recovery.encodeRecoveryIe(buffer, data.recovery);
96 endIndex = buffer.getCurrentIndex();
97 length = endIndex - startIndex;
98
99 // encode the length value now
100 buffer.goToIndex(startIndex - 3);
101 buffer.writeUint16(length, false);
102 buffer.goToIndex(endIndex);
103
104 if (!(rc))
105 {
106 errorStream.add((char *)"Failed to encode IE: recovery\n");
107 return false;
108 }
109 }
110
111 if (data.protocolConfigurationOptionsIePresent)
112 {
113
114 // Encode the Ie Header
115 header.ieType = PcoIeType;
116 header.instance = 0;
117 header.length = 0; // We will encode the IE first and then update the length
118 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
119 startIndex = buffer.getCurrentIndex();
120 PcoIe pco=
121 dynamic_cast<
122 PcoIe&>(GtpV2IeFactory::getInstance().getIeObject(PcoIeType));
123 rc = pco.encodePcoIe(buffer, data.protocolConfigurationOptions);
124 endIndex = buffer.getCurrentIndex();
125 length = endIndex - startIndex;
126
127 // encode the length value now
128 buffer.goToIndex(startIndex - 3);
129 buffer.writeUint16(length, false);
130 buffer.goToIndex(endIndex);
131
132 if (!(rc))
133 {
134 errorStream.add((char *)"Failed to encode IE: protocolConfigurationOptions\n");
135 return false;
136 }
137 }
138
139 if (data.indicationFlagsIePresent)
140 {
141
142 // Encode the Ie Header
143 header.ieType = IndicationIeType;
144 header.instance = 0;
145 header.length = 0; // We will encode the IE first and then update the length
146 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
147 startIndex = buffer.getCurrentIndex();
148 IndicationIe indication=
149 dynamic_cast<
150 IndicationIe&>(GtpV2IeFactory::getInstance().getIeObject(IndicationIeType));
151 rc = indication.encodeIndicationIe(buffer, data.indicationFlags);
152 endIndex = buffer.getCurrentIndex();
153 length = endIndex - startIndex;
154
155 // encode the length value now
156 buffer.goToIndex(startIndex - 3);
157 buffer.writeUint16(length, false);
158 buffer.goToIndex(endIndex);
159
160 if (!(rc))
161 {
162 errorStream.add((char *)"Failed to encode IE: indicationFlags\n");
163 return false;
164 }
165 }
166
167 if (data.pgwsNodeLevelLoadControlInformationIePresent)
168 {
169
170 // Encode the Ie Header
171 header.ieType = LoadControlInformationIeType;
172 header.instance = 0;
173 header.length = 0; // We will encode the IE first and then update the length
174 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
175 startIndex = buffer.getCurrentIndex();
176 LoadControlInformationIe loadControlInformation=
177 dynamic_cast<
178 LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType));
179 PgwsNodeLevelLoadControlInformationInDeleteSessionResponse groupedIeInstance =
180 dynamic_cast<
181 PgwsNodeLevelLoadControlInformationInDeleteSessionResponse&>(loadControlInformation.getGroupedIe(msgType, 0));
182 rc = groupedIeInstance.encodePgwsNodeLevelLoadControlInformationInDeleteSessionResponse(buffer, data.pgwsNodeLevelLoadControlInformation);
183 endIndex = buffer.getCurrentIndex();
184 length = endIndex - startIndex;
185
186 // encode the length value now
187 buffer.goToIndex(startIndex - 3);
188 buffer.writeUint16(length, false);
189 buffer.goToIndex(endIndex);
190
191 if (!(rc))
192 {
193 errorStream.add((char *)"Failed to encode IE: pgwsNodeLevelLoadControlInformation\n");
194 return false;
195 }
196 }
197
198 if (data.pgwsApnLevelLoadControlInformationIePresent)
199 {
200
201 // Encode the Ie Header
202 header.ieType = LoadControlInformationIeType;
203 header.instance = 1;
204 header.length = 0; // We will encode the IE first and then update the length
205 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
206 startIndex = buffer.getCurrentIndex();
207 LoadControlInformationIe loadControlInformation=
208 dynamic_cast<
209 LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType));
210 PgwsApnLevelLoadControlInformationInDeleteSessionResponse groupedIeInstance =
211 dynamic_cast<
212 PgwsApnLevelLoadControlInformationInDeleteSessionResponse&>(loadControlInformation.getGroupedIe(msgType, 1));
213 rc = groupedIeInstance.encodePgwsApnLevelLoadControlInformationInDeleteSessionResponse(buffer, data.pgwsApnLevelLoadControlInformation);
214 endIndex = buffer.getCurrentIndex();
215 length = endIndex - startIndex;
216
217 // encode the length value now
218 buffer.goToIndex(startIndex - 3);
219 buffer.writeUint16(length, false);
220 buffer.goToIndex(endIndex);
221
222 if (!(rc))
223 {
224 errorStream.add((char *)"Failed to encode IE: pgwsApnLevelLoadControlInformation\n");
225 return false;
226 }
227 }
228
229 if (data.sgwsNodeLevelLoadControlInformationIePresent)
230 {
231
232 // Encode the Ie Header
233 header.ieType = LoadControlInformationIeType;
234 header.instance = 2;
235 header.length = 0; // We will encode the IE first and then update the length
236 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
237 startIndex = buffer.getCurrentIndex();
238 LoadControlInformationIe loadControlInformation=
239 dynamic_cast<
240 LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType));
241 SgwsNodeLevelLoadControlInformationInDeleteSessionResponse groupedIeInstance =
242 dynamic_cast<
243 SgwsNodeLevelLoadControlInformationInDeleteSessionResponse&>(loadControlInformation.getGroupedIe(msgType, 2));
244 rc = groupedIeInstance.encodeSgwsNodeLevelLoadControlInformationInDeleteSessionResponse(buffer, data.sgwsNodeLevelLoadControlInformation);
245 endIndex = buffer.getCurrentIndex();
246 length = endIndex - startIndex;
247
248 // encode the length value now
249 buffer.goToIndex(startIndex - 3);
250 buffer.writeUint16(length, false);
251 buffer.goToIndex(endIndex);
252
253 if (!(rc))
254 {
255 errorStream.add((char *)"Failed to encode IE: sgwsNodeLevelLoadControlInformation\n");
256 return false;
257 }
258 }
259
260 if (data.pgwsOverloadControlInformationIePresent)
261 {
262
263 // Encode the Ie Header
264 header.ieType = OverloadControlInformationIeType;
265 header.instance = 0;
266 header.length = 0; // We will encode the IE first and then update the length
267 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
268 startIndex = buffer.getCurrentIndex();
269 OverloadControlInformationIe overloadControlInformation=
270 dynamic_cast<
271 OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType));
272 PgwsOverloadControlInformationInDeleteSessionResponse groupedIeInstance =
273 dynamic_cast<
274 PgwsOverloadControlInformationInDeleteSessionResponse&>(overloadControlInformation.getGroupedIe(msgType, 0));
275 rc = groupedIeInstance.encodePgwsOverloadControlInformationInDeleteSessionResponse(buffer, data.pgwsOverloadControlInformation);
276 endIndex = buffer.getCurrentIndex();
277 length = endIndex - startIndex;
278
279 // encode the length value now
280 buffer.goToIndex(startIndex - 3);
281 buffer.writeUint16(length, false);
282 buffer.goToIndex(endIndex);
283
284 if (!(rc))
285 {
286 errorStream.add((char *)"Failed to encode IE: pgwsOverloadControlInformation\n");
287 return false;
288 }
289 }
290
291 if (data.sgwsOverloadControlInformationIePresent)
292 {
293
294 // Encode the Ie Header
295 header.ieType = OverloadControlInformationIeType;
296 header.instance = 1;
297 header.length = 0; // We will encode the IE first and then update the length
298 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
299 startIndex = buffer.getCurrentIndex();
300 OverloadControlInformationIe overloadControlInformation=
301 dynamic_cast<
302 OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType));
303 SgwsOverloadControlInformationInDeleteSessionResponse groupedIeInstance =
304 dynamic_cast<
305 SgwsOverloadControlInformationInDeleteSessionResponse&>(overloadControlInformation.getGroupedIe(msgType, 1));
306 rc = groupedIeInstance.encodeSgwsOverloadControlInformationInDeleteSessionResponse(buffer, data.sgwsOverloadControlInformation);
307 endIndex = buffer.getCurrentIndex();
308 length = endIndex - startIndex;
309
310 // encode the length value now
311 buffer.goToIndex(startIndex - 3);
312 buffer.writeUint16(length, false);
313 buffer.goToIndex(endIndex);
314
315 if (!(rc))
316 {
317 errorStream.add((char *)"Failed to encode IE: sgwsOverloadControlInformation\n");
318 return false;
319 }
320 }
321
322 if (data.extendedProtocolConfigurationOptionsIePresent)
323 {
324
325 // Encode the Ie Header
326 header.ieType = EpcoIeType;
327 header.instance = 0;
328 header.length = 0; // We will encode the IE first and then update the length
329 GtpV2Ie::encodeGtpV2IeHeader(buffer, header);
330 startIndex = buffer.getCurrentIndex();
331 EpcoIe epco=
332 dynamic_cast<
333 EpcoIe&>(GtpV2IeFactory::getInstance().getIeObject(EpcoIeType));
334 rc = epco.encodeEpcoIe(buffer, data.extendedProtocolConfigurationOptions);
335 endIndex = buffer.getCurrentIndex();
336 length = endIndex - startIndex;
337
338 // encode the length value now
339 buffer.goToIndex(startIndex - 3);
340 buffer.writeUint16(length, false);
341 buffer.goToIndex(endIndex);
342
343 if (!(rc))
344 {
345 errorStream.add((char *)"Failed to encode IE: extendedProtocolConfigurationOptions\n");
346 return false;
347 }
348 }
349 return rc;
350
351}
352
353bool DeleteSessionResponseMsg::decodeDeleteSessionResponseMsg(MsgBuffer &buffer,
354 DeleteSessionResponseMsgData
355 &data, Uint16 length)
356{
357
358 bool rc = false;
359 GtpV2IeHeader ieHeader;
360
361 set<Uint16> mandatoryIeLocalList = mandatoryIeSet;
362 while (buffer.lengthLeft() > IE_HEADER_SIZE)
363 {
364 GtpV2Ie::decodeGtpV2IeHeader(buffer, ieHeader);
365 if (ieHeader.length > buffer.lengthLeft())
366 {
367 // We do not have enough bytes left in the message for this IE
368 errorStream.add((char *)"IE Length exceeds beyond message boundary\n");
369 errorStream.add((char *)" Offending IE Type: ");
370 errorStream.add(ieHeader.ieType);
371 errorStream.add((char *)"\n Ie Length in Header: ");
372 errorStream.add(ieHeader.length);
373 errorStream.add((char *)"\n Bytes left in message: ");
374 errorStream.add(buffer.lengthLeft());
375 errorStream.endOfLine();
376 return false;
377 }
378
379 switch (ieHeader.ieType){
380
381 case CauseIeType:
382 {
383 CauseIe ieObject =
384 dynamic_cast<
385 CauseIe&>(GtpV2IeFactory::getInstance().getIeObject(CauseIeType));
386
387 if(ieHeader.instance == 0)
388 {
389 rc = ieObject.decodeCauseIe(buffer, data.cause, ieHeader.length);
390
391 if (!(rc))
392 {
393 errorStream.add((char *)"Failed to decode IE: cause\n");
394 return false;
395 }
396 }
397
398 else
399 {
400 // Unknown IE instance print error
401 errorStream.add((char *)"Unknown IE Type: ");
402 errorStream.add(ieHeader.ieType);
403 errorStream.endOfLine();
404 buffer.skipBytes(ieHeader.length);
405 }
406 break;
407 }
408
409 case RecoveryIeType:
410 {
411 RecoveryIe ieObject =
412 dynamic_cast<
413 RecoveryIe&>(GtpV2IeFactory::getInstance().getIeObject(RecoveryIeType));
414
415 if(ieHeader.instance == 0)
416 {
417 rc = ieObject.decodeRecoveryIe(buffer, data.recovery, ieHeader.length);
418
419 data.recoveryIePresent = true;
420 if (!(rc))
421 {
422 errorStream.add((char *)"Failed to decode IE: recovery\n");
423 return false;
424 }
425 }
426
427 else
428 {
429 // Unknown IE instance print error
430 errorStream.add((char *)"Unknown IE Type: ");
431 errorStream.add(ieHeader.ieType);
432 errorStream.endOfLine();
433 buffer.skipBytes(ieHeader.length);
434 }
435 break;
436 }
437
438 case PcoIeType:
439 {
440 PcoIe ieObject =
441 dynamic_cast<
442 PcoIe&>(GtpV2IeFactory::getInstance().getIeObject(PcoIeType));
443
444 if(ieHeader.instance == 0)
445 {
446 rc = ieObject.decodePcoIe(buffer, data.protocolConfigurationOptions, ieHeader.length);
447
448 data.protocolConfigurationOptionsIePresent = true;
449 if (!(rc))
450 {
451 errorStream.add((char *)"Failed to decode IE: protocolConfigurationOptions\n");
452 return false;
453 }
454 }
455
456 else
457 {
458 // Unknown IE instance print error
459 errorStream.add((char *)"Unknown IE Type: ");
460 errorStream.add(ieHeader.ieType);
461 errorStream.endOfLine();
462 buffer.skipBytes(ieHeader.length);
463 }
464 break;
465 }
466
467 case IndicationIeType:
468 {
469 IndicationIe ieObject =
470 dynamic_cast<
471 IndicationIe&>(GtpV2IeFactory::getInstance().getIeObject(IndicationIeType));
472
473 if(ieHeader.instance == 0)
474 {
475 rc = ieObject.decodeIndicationIe(buffer, data.indicationFlags, ieHeader.length);
476
477 data.indicationFlagsIePresent = true;
478 if (!(rc))
479 {
480 errorStream.add((char *)"Failed to decode IE: indicationFlags\n");
481 return false;
482 }
483 }
484
485 else
486 {
487 // Unknown IE instance print error
488 errorStream.add((char *)"Unknown IE Type: ");
489 errorStream.add(ieHeader.ieType);
490 errorStream.endOfLine();
491 buffer.skipBytes(ieHeader.length);
492 }
493 break;
494 }
495
496 case LoadControlInformationIeType:
497 {
498 LoadControlInformationIe ieObject =
499 dynamic_cast<
500 LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType));
501
502 if(ieHeader.instance == 0)
503 {
504 PgwsNodeLevelLoadControlInformationInDeleteSessionResponse groupedIeInstance =
505 dynamic_cast<
506 PgwsNodeLevelLoadControlInformationInDeleteSessionResponse&>(ieObject.getGroupedIe(msgType, 0));
507 rc = groupedIeInstance.decodePgwsNodeLevelLoadControlInformationInDeleteSessionResponse(buffer, data.pgwsNodeLevelLoadControlInformation, ieHeader.length);
508
509 data.pgwsNodeLevelLoadControlInformationIePresent = true;
510 if (!(rc))
511 {
512 errorStream.add((char *)"Failed to decode IE: pgwsNodeLevelLoadControlInformation\n");
513 return false;
514 }
515 }
516 else if(ieHeader.instance == 1)
517 {
518 PgwsApnLevelLoadControlInformationInDeleteSessionResponse groupedIeInstance =
519 dynamic_cast<
520 PgwsApnLevelLoadControlInformationInDeleteSessionResponse&>(ieObject.getGroupedIe(msgType, 1));
521 rc = groupedIeInstance.decodePgwsApnLevelLoadControlInformationInDeleteSessionResponse(buffer, data.pgwsApnLevelLoadControlInformation, ieHeader.length);
522
523 data.pgwsApnLevelLoadControlInformationIePresent = true;
524 if (!(rc))
525 {
526 errorStream.add((char *)"Failed to decode IE: pgwsApnLevelLoadControlInformation\n");
527 return false;
528 }
529 }
530 else if(ieHeader.instance == 2)
531 {
532 SgwsNodeLevelLoadControlInformationInDeleteSessionResponse groupedIeInstance =
533 dynamic_cast<
534 SgwsNodeLevelLoadControlInformationInDeleteSessionResponse&>(ieObject.getGroupedIe(msgType, 2));
535 rc = groupedIeInstance.decodeSgwsNodeLevelLoadControlInformationInDeleteSessionResponse(buffer, data.sgwsNodeLevelLoadControlInformation, ieHeader.length);
536
537 data.sgwsNodeLevelLoadControlInformationIePresent = true;
538 if (!(rc))
539 {
540 errorStream.add((char *)"Failed to decode IE: sgwsNodeLevelLoadControlInformation\n");
541 return false;
542 }
543 }
544
545 else
546 {
547 // Unknown IE instance print error
548 errorStream.add((char *)"Unknown IE Type: ");
549 errorStream.add(ieHeader.ieType);
550 errorStream.endOfLine();
551 buffer.skipBytes(ieHeader.length);
552 }
553 break;
554 }
555
556 case OverloadControlInformationIeType:
557 {
558 OverloadControlInformationIe ieObject =
559 dynamic_cast<
560 OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType));
561
562 if(ieHeader.instance == 0)
563 {
564 PgwsOverloadControlInformationInDeleteSessionResponse groupedIeInstance =
565 dynamic_cast<
566 PgwsOverloadControlInformationInDeleteSessionResponse&>(ieObject.getGroupedIe(msgType, 0));
567 rc = groupedIeInstance.decodePgwsOverloadControlInformationInDeleteSessionResponse(buffer, data.pgwsOverloadControlInformation, ieHeader.length);
568
569 data.pgwsOverloadControlInformationIePresent = true;
570 if (!(rc))
571 {
572 errorStream.add((char *)"Failed to decode IE: pgwsOverloadControlInformation\n");
573 return false;
574 }
575 }
576 else if(ieHeader.instance == 1)
577 {
578 SgwsOverloadControlInformationInDeleteSessionResponse groupedIeInstance =
579 dynamic_cast<
580 SgwsOverloadControlInformationInDeleteSessionResponse&>(ieObject.getGroupedIe(msgType, 1));
581 rc = groupedIeInstance.decodeSgwsOverloadControlInformationInDeleteSessionResponse(buffer, data.sgwsOverloadControlInformation, ieHeader.length);
582
583 data.sgwsOverloadControlInformationIePresent = true;
584 if (!(rc))
585 {
586 errorStream.add((char *)"Failed to decode IE: sgwsOverloadControlInformation\n");
587 return false;
588 }
589 }
590
591 else
592 {
593 // Unknown IE instance print error
594 errorStream.add((char *)"Unknown IE Type: ");
595 errorStream.add(ieHeader.ieType);
596 errorStream.endOfLine();
597 buffer.skipBytes(ieHeader.length);
598 }
599 break;
600 }
601
602 case EpcoIeType:
603 {
604 EpcoIe ieObject =
605 dynamic_cast<
606 EpcoIe&>(GtpV2IeFactory::getInstance().getIeObject(EpcoIeType));
607
608 if(ieHeader.instance == 0)
609 {
610 rc = ieObject.decodeEpcoIe(buffer, data.extendedProtocolConfigurationOptions, ieHeader.length);
611
612 data.extendedProtocolConfigurationOptionsIePresent = true;
613 if (!(rc))
614 {
615 errorStream.add((char *)"Failed to decode IE: extendedProtocolConfigurationOptions\n");
616 return false;
617 }
618 }
619
620 else
621 {
622 // Unknown IE instance print error
623 errorStream.add((char *)"Unknown IE Type: ");
624 errorStream.add(ieHeader.ieType);
625 errorStream.endOfLine();
626 buffer.skipBytes(ieHeader.length);
627 }
628 break;
629 }
630
631 default:
632 {
633 // Unknown IE print error
634 errorStream.add((char *)"Unknown IE Type: ");
635 errorStream.add(ieHeader.ieType);
636 errorStream.endOfLine();
637 buffer.skipBytes(ieHeader.length);
638 }
639 }
640 }
641 return rc; // TODO validations
642}
643
644void DeleteSessionResponseMsg::
645displayDeleteSessionResponseMsgData_v(DeleteSessionResponseMsgData const &data, Debug &stream)
646{
647 stream.incrIndent();
648 stream.add((char *)"DeleteSessionResponseMsg:");
649 stream.endOfLine();
650 stream.incrIndent();
651
652
653 stream.add((char *)"IE - cause:");
654 stream.endOfLine();
655 CauseIe cause=
656 dynamic_cast<
657 CauseIe&>(GtpV2IeFactory::getInstance().getIeObject(CauseIeType));
658 cause.displayCauseIe_v(data.cause, stream);
659
660 if (data.recoveryIePresent)
661 {
662
663
664 stream.add((char *)"IE - recovery:");
665 stream.endOfLine();
666 RecoveryIe recovery=
667 dynamic_cast<
668 RecoveryIe&>(GtpV2IeFactory::getInstance().getIeObject(RecoveryIeType));
669 recovery.displayRecoveryIe_v(data.recovery, stream);
670
671 }
672 if (data.protocolConfigurationOptionsIePresent)
673 {
674
675
676 stream.add((char *)"IE - protocolConfigurationOptions:");
677 stream.endOfLine();
678 PcoIe pco=
679 dynamic_cast<
680 PcoIe&>(GtpV2IeFactory::getInstance().getIeObject(PcoIeType));
681 pco.displayPcoIe_v(data.protocolConfigurationOptions, stream);
682
683 }
684 if (data.indicationFlagsIePresent)
685 {
686
687
688 stream.add((char *)"IE - indicationFlags:");
689 stream.endOfLine();
690 IndicationIe indication=
691 dynamic_cast<
692 IndicationIe&>(GtpV2IeFactory::getInstance().getIeObject(IndicationIeType));
693 indication.displayIndicationIe_v(data.indicationFlags, stream);
694
695 }
696 if (data.pgwsNodeLevelLoadControlInformationIePresent)
697 {
698
699
700 stream.add((char *)"IE - pgwsNodeLevelLoadControlInformation:");
701 stream.endOfLine();
702 LoadControlInformationIe loadControlInformation=
703 dynamic_cast<
704 LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType));
705 PgwsNodeLevelLoadControlInformationInDeleteSessionResponse groupedIeInstance =
706 dynamic_cast<
707 PgwsNodeLevelLoadControlInformationInDeleteSessionResponse&>(loadControlInformation.getGroupedIe(msgType, 0));
708 groupedIeInstance.displayPgwsNodeLevelLoadControlInformationInDeleteSessionResponseData_v(data.pgwsNodeLevelLoadControlInformation, stream);
709
710 }
711 if (data.pgwsApnLevelLoadControlInformationIePresent)
712 {
713
714
715 stream.add((char *)"IE - pgwsApnLevelLoadControlInformation:");
716 stream.endOfLine();
717 LoadControlInformationIe loadControlInformation=
718 dynamic_cast<
719 LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType));
720 PgwsApnLevelLoadControlInformationInDeleteSessionResponse groupedIeInstance =
721 dynamic_cast<
722 PgwsApnLevelLoadControlInformationInDeleteSessionResponse&>(loadControlInformation.getGroupedIe(msgType, 1));
723 groupedIeInstance.displayPgwsApnLevelLoadControlInformationInDeleteSessionResponseData_v(data.pgwsApnLevelLoadControlInformation, stream);
724
725 }
726 if (data.sgwsNodeLevelLoadControlInformationIePresent)
727 {
728
729
730 stream.add((char *)"IE - sgwsNodeLevelLoadControlInformation:");
731 stream.endOfLine();
732 LoadControlInformationIe loadControlInformation=
733 dynamic_cast<
734 LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType));
735 SgwsNodeLevelLoadControlInformationInDeleteSessionResponse groupedIeInstance =
736 dynamic_cast<
737 SgwsNodeLevelLoadControlInformationInDeleteSessionResponse&>(loadControlInformation.getGroupedIe(msgType, 2));
738 groupedIeInstance.displaySgwsNodeLevelLoadControlInformationInDeleteSessionResponseData_v(data.sgwsNodeLevelLoadControlInformation, stream);
739
740 }
741 if (data.pgwsOverloadControlInformationIePresent)
742 {
743
744
745 stream.add((char *)"IE - pgwsOverloadControlInformation:");
746 stream.endOfLine();
747 OverloadControlInformationIe overloadControlInformation=
748 dynamic_cast<
749 OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType));
750 PgwsOverloadControlInformationInDeleteSessionResponse groupedIeInstance =
751 dynamic_cast<
752 PgwsOverloadControlInformationInDeleteSessionResponse&>(overloadControlInformation.getGroupedIe(msgType, 0));
753 groupedIeInstance.displayPgwsOverloadControlInformationInDeleteSessionResponseData_v(data.pgwsOverloadControlInformation, stream);
754
755 }
756 if (data.sgwsOverloadControlInformationIePresent)
757 {
758
759
760 stream.add((char *)"IE - sgwsOverloadControlInformation:");
761 stream.endOfLine();
762 OverloadControlInformationIe overloadControlInformation=
763 dynamic_cast<
764 OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType));
765 SgwsOverloadControlInformationInDeleteSessionResponse groupedIeInstance =
766 dynamic_cast<
767 SgwsOverloadControlInformationInDeleteSessionResponse&>(overloadControlInformation.getGroupedIe(msgType, 1));
768 groupedIeInstance.displaySgwsOverloadControlInformationInDeleteSessionResponseData_v(data.sgwsOverloadControlInformation, stream);
769
770 }
771 if (data.extendedProtocolConfigurationOptionsIePresent)
772 {
773
774
775 stream.add((char *)"IE - extendedProtocolConfigurationOptions:");
776 stream.endOfLine();
777 EpcoIe epco=
778 dynamic_cast<
779 EpcoIe&>(GtpV2IeFactory::getInstance().getIeObject(EpcoIeType));
780 epco.displayEpcoIe_v(data.extendedProtocolConfigurationOptions, stream);
781
782 }
783
784 stream.decrIndent();
785 stream.decrIndent();
786}
787
788