EpcTools
An event based multi-threaded C++ development framework.
pfcpr15inl.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2020 Sprint
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 
17 #ifndef __PFCPR15INL_H
18 #define __PFCPR15INL_H
19 
20 #include "pfcpr15.h"
21 
23 namespace PFCP_R15
24 {
28 
29 union AliasPointer {
30  in_addr *in_addr_ptr;
31  in_addr_t *in_addr_t_ptr;
32  in6_addr *in6_addr_ptr;
33  uint32_t *uint32_t_ptr;
34  uint16_t *uint16_t_ptr;
35  uint8_t *uint8_t_ptr;
36 };
37 
38 inline CauseIE::CauseIE(pfcp_cause_ie_t &ie, LengthCalculator *parent)
39  : IEHeader(ie.header, PFCP_IE_CAUSE, parent),
40  ie_(ie)
41 {
42 }
43 
44 inline CauseEnum CauseIE::cause() const
45 {
46  return static_cast<CauseEnum>(ie_.cause_value);
47 }
48 
49 inline CauseIE &CauseIE::cause(CauseEnum val)
50 {
51  ie_.cause_value = static_cast<uint8_t>(val);
52  setLength();
53  return *this;
54 }
55 
56 inline pfcp_cause_ie_t &CauseIE::data()
57 {
58  return ie_;
59 }
60 
61 inline uint16_t CauseIE::calculateLength()
62 {
63  return sizeof(pfcp_cause_ie_t) - sizeof(pfcp_ie_header_t);
64 }
65 
67 
68 inline SourceInterfaceIE::SourceInterfaceIE(pfcp_src_intfc_ie_t &ie, LengthCalculator *parent)
69  : IEHeader(ie.header, PFCP_IE_SRC_INTFC, parent),
70  ie_(ie)
71 {
72 }
73 
75 {
76  return static_cast<SourceInterfaceEnum>(ie_.interface_value);
77 }
78 
79 inline SourceInterfaceIE &SourceInterfaceIE::interface_value(SourceInterfaceEnum val)
80 {
81  ie_.interface_value = static_cast<uint8_t>(val);
82  setLength();
83  return *this;
84 }
85 
86 inline pfcp_src_intfc_ie_t &SourceInterfaceIE::data()
87 {
88  return ie_;
89 }
90 
91 inline uint16_t SourceInterfaceIE::calculateLength()
92 {
93  return sizeof(pfcp_src_intfc_ie_t) - sizeof(pfcp_ie_header_t);
94 }
95 
97 
98 inline Bool FTeidIE::chid() const
99 {
100  return ie_.chid;
101 }
102 
103 inline Bool FTeidIE::ch() const
104 {
105  return ie_.ch;
106 }
107 
108 inline Bool FTeidIE::v6() const
109 {
110  return ie_.v6;
111 }
112 
113 inline Bool FTeidIE::v4() const
114 {
115  return ie_.v4;
116 }
117 
118 inline uint32_t FTeidIE::teid() const
119 {
120  return ie_.teid;
121 }
122 
123 inline const in_addr &FTeidIE::ipv4_address() const
124 {
125  AliasPointer u;
126  u.uint32_t_ptr = &ie_.ipv4_address;
127  return *u.in_addr_ptr;
128 }
129 
130 inline const in6_addr &FTeidIE::ipv6_address() const
131 {
132  AliasPointer u;
133  u.uint8_t_ptr = ie_.ipv6_address;
134  return *u.in6_addr_ptr;
135 }
136 
137 inline uint8_t FTeidIE::choose_id() const
138 {
139  return ie_.choose_id;
140 }
141 
142 inline FTeidIE &FTeidIE::teid(uint32_t val)
143 {
144  ie_.chid = 0;
145  ie_.ch = 0;
146  ie_.teid = val;
147  setLength();
148  return *this;
149 }
150 
151 inline FTeidIE &FTeidIE::ip_address(const ESocket::Address &val)
152 {
153  if (val.getFamily() == ESocket::Family::INET)
154  return ip_address(val.getInet().sin_addr);
155  else if (val.getFamily() == ESocket::Family::INET6)
156  return ip_address(val.getInet6().sin6_addr);
157  return *this;
158 }
159 
160 inline FTeidIE &FTeidIE::ip_address(const EIpAddress &val)
161 {
162  if (val.family() == AF_INET)
163  return ip_address(val.ipv4Address());
164  else if (val.family() == AF_INET6)
165  return ip_address(val.ipv6Address());
166  return *this;
167 }
168 
169 inline FTeidIE &FTeidIE::ip_address(const in_addr &val)
170 {
171  ie_.chid = 0;
172  ie_.ch = 0;
173  ie_.v4 = 1;
174  ie_.ipv4_address = val.s_addr;
175  setLength();
176  return *this;
177 }
178 
179 inline FTeidIE &FTeidIE::ip_address(const in6_addr &val)
180 {
181  ie_.chid = 0;
182  ie_.ch = 0;
183  ie_.v6 = 1;
184  std::memcpy(ie_.ipv6_address, val.s6_addr, sizeof(ie_.ipv6_address));
185  setLength();
186  return *this;
187 }
188 
189 inline FTeidIE &FTeidIE::ch(Bool ch)
190 {
191  if (ch)
192  {
193  ie_.v4 = 0;
194  ie_.v6 = 0;
195  ie_.ch = 1;
196  }
197  else
198  {
199  ie_.ch = 0;
200  ie_.chid = 0;
201  }
202  setLength();
203  return *this;
204 }
205 
206 inline FTeidIE &FTeidIE::choose_id(uint8_t val)
207 {
208  ie_.v4 = 0;
209  ie_.v6 = 0;
210  ie_.ch = 1;
211  ie_.chid = 1;
212  ie_.choose_id = val;
213  setLength();
214  return *this;
215 }
216 
217 inline pfcp_fteid_ie_t &FTeidIE::data()
218 {
219  return ie_;
220 }
221 
222 inline FTeidIE::FTeidIE(pfcp_fteid_ie_t &ie, LengthCalculator *parent)
223  : IEHeader(ie.header, PFCP_IE_FTEID, parent),
224  ie_(ie)
225 {
226 }
227 
228 inline uint16_t FTeidIE::calculateLength()
229 {
230  return
231  1 /* octet 5, bits */ +
232  (ie_.ch ? 0 : sizeof(ie_.teid)) +
233  (ie_.chid ? 1 : 0) +
234  (ie_.v6 ? sizeof(in6_addr) : 0) +
235  (ie_.v4 ? sizeof(in_addr) : 0);
236 }
237 
239 
240 inline NetworkInstanceIE::NetworkInstanceIE(pfcp_ntwk_inst_ie_t &ie, LengthCalculator *parent)
241  : IEHeader(ie.header, PFCP_IE_NTWK_INST, parent),
242  ie_(ie)
243 {
244 }
245 
246 inline const uint8_t *NetworkInstanceIE::ntwk_inst() const
247 {
248  return ie_.ntwk_inst;
249 }
250 
251 inline const uint16_t NetworkInstanceIE::ntwk_inst_len() const
252 {
253  return ie_.header.len;
254 }
255 
256 inline NetworkInstanceIE &NetworkInstanceIE::ntwk_inst(const EOctetString &val)
257 {
258  return ntwk_inst(val.data(), val.length());
259 }
260 
261 inline NetworkInstanceIE &NetworkInstanceIE::ntwk_inst(const uint8_t *val, uint16_t len)
262 {
263  if (len > sizeof(ie_.ntwk_inst))
264  len = sizeof(ie_.ntwk_inst);
265  ie_.header.len = len;
266  std::memcpy(ie_.ntwk_inst, val, len);
267  // no need to call setLength() since we just set the header length
268  return *this;
269 }
270 
271 inline pfcp_ntwk_inst_ie_t &NetworkInstanceIE::data()
272 {
273  return ie_;
274 }
275 
276 inline uint16_t NetworkInstanceIE::calculateLength()
277 {
278  return ie_.header.len;
279 }
280 
282 
283 inline SdfFilterIE::SdfFilterIE(pfcp_sdf_filter_ie_t &ie, LengthCalculator *parent)
284  : IEHeader(ie.header, PFCP_IE_SDF_FILTER, parent),
285  ie_(ie)
286 {
287 }
288 
289 inline Bool SdfFilterIE::fd() const
290 {
291  return ie_.fd;
292 }
293 
294 inline Bool SdfFilterIE::ttc() const
295 {
296  return ie_.ttc;
297 }
298 
299 inline Bool SdfFilterIE::spi() const
300 {
301  return ie_.spi;
302 }
303 
304 inline Bool SdfFilterIE::fl() const
305 {
306  return ie_.fl;
307 }
308 
309 inline Bool SdfFilterIE::bid() const
310 {
311  return ie_.bid;
312 }
313 
314 inline const uint8_t *SdfFilterIE::flow_desc() const
315 {
316  return ie_.flow_desc;
317 }
318 
319 inline uint16_t SdfFilterIE::len_of_flow_desc() const
320 {
321  return ie_.len_of_flow_desc;
322 }
323 
324 inline const uint8_t *SdfFilterIE::tos_traffic_cls() const
325 {
326  return ie_.tos_traffic_cls;
327 }
328 
329 inline const uint8_t *SdfFilterIE::secur_parm_idx() const
330 {
331  return ie_.secur_parm_idx;
332 }
333 
334 inline const uint8_t *SdfFilterIE::flow_label() const
335 {
336  return ie_.flow_label;
337 }
338 
339 inline uint32_t SdfFilterIE::sdf_filter_id() const
340 {
341  return ie_.sdf_filter_id;
342 }
343 
344 inline SdfFilterIE &SdfFilterIE::bid(Bool bid)
345 {
346  ie_.bid = bid ? 1 : 0;
347  setLength();
348  return *this;
349 }
350 
351 inline SdfFilterIE &SdfFilterIE::flow_desc(const uint8_t *flowDesc, uint16_t flowDescLen)
352 {
353  if (flowDescLen > sizeof(ie_.flow_desc))
354  flowDescLen = sizeof(ie_.flow_desc);
355  ie_.fd = 1;
356  ie_.len_of_flow_desc = flowDescLen;
357  std::memcpy(ie_.flow_desc, flowDesc, flowDescLen);
358  setLength();
359  return *this;
360 }
361 
362 inline SdfFilterIE &SdfFilterIE::tos_traffic_cls(const uint8_t *tosTrafficClass)
363 {
364  ie_.ttc = 1;
365  std::memcpy(ie_.tos_traffic_cls, tosTrafficClass, sizeof(ie_.tos_traffic_cls));
366  setLength();
367  return *this;
368 }
369 
370 inline SdfFilterIE &SdfFilterIE::secur_parm_idx(const uint8_t *securityParameterIndex)
371 {
372  ie_.spi = 1;
373  std::memcpy(ie_.secur_parm_idx, securityParameterIndex, sizeof(ie_.secur_parm_idx));
374  setLength();
375  return *this;
376 }
377 
378 inline SdfFilterIE &SdfFilterIE::flow_label(const uint8_t *flowLabel)
379 {
380  ie_.fl = 1;
381  std::memcpy(ie_.flow_label, flowLabel, sizeof(ie_.flow_label));
382  setLength();
383  return *this;
384 }
385 
386 inline SdfFilterIE &SdfFilterIE::sdf_filter_id(const uint32_t sdfFilterId)
387 {
388  ie_.sdf_filter_id = sdfFilterId;
389  setLength();
390  return *this;
391 }
392 
393 inline pfcp_sdf_filter_ie_t &SdfFilterIE::data()
394 {
395  return ie_;
396 }
397 
398 inline uint16_t SdfFilterIE::calculateLength()
399 {
400  return
401  1 /* octet 5, bits */ +
402  sizeof(ie_.sdf_fltr_spare2) +
403  (ie_.fd ? (sizeof(ie_.len_of_flow_desc) + ie_.len_of_flow_desc) : 0) +
404  (ie_.ttc ? sizeof(ie_.tos_traffic_cls) : 0) +
405  (ie_.spi ? sizeof(ie_.secur_parm_idx) : 0) +
406  (ie_.fl ? 3 /* should be sizeof(ie_flow_label) */ : 0) +
407  sizeof(ie_.sdf_filter_id)
408  ;
409 }
410 
412 
413 inline ApplicationIdIE::ApplicationIdIE(pfcp_application_id_ie_t &ie, LengthCalculator *parent)
414  : IEHeader(ie.header, PFCP_IE_APPLICATION_ID, parent),
415  ie_(ie)
416 {
417 }
418 
419 inline uint16_t ApplicationIdIE::app_ident_len() const
420 {
421  return ie_.header.len;
422 }
423 
424 inline const uint8_t *ApplicationIdIE::app_ident() const
425 {
426  return ie_.app_ident;
427 }
428 
429 inline ApplicationIdIE &ApplicationIdIE::app_ident(const uint8_t *app_id, uint16_t len)
430 {
431  if (len > sizeof(ie_.app_ident))
432  len = sizeof(ie_.app_ident);
433  std::memcpy(ie_.app_ident, app_id, len);
434  ie_.header.len = len;
435  return *this;
436 }
437 
438 inline pfcp_application_id_ie_t &ApplicationIdIE::data()
439 {
440  return ie_;
441 }
442 
443 inline uint16_t ApplicationIdIE::calculateLength()
444 {
445  return ie_.header.len;
446 }
447 
449 
450 inline GateStatusIE::GateStatusIE(pfcp_gate_status_ie_t &ie, LengthCalculator *parent)
451  : IEHeader(ie.header, PFCP_IE_GATE_STATUS, parent),
452  ie_(ie)
453 {
454 }
455 
457 {
458  return static_cast<DownlinkGateEnum>(ie_.dl_gate);
459 }
460 
462 {
463  return static_cast<UplinkGateEnum>(ie_.ul_gate);
464 }
465 
466 inline GateStatusIE &GateStatusIE::dl_gate(DownlinkGateEnum dl)
467 {
468  switch (dl)
469  {
473  {
474  ie_.dl_gate = static_cast<uint8_t>(DownlinkGateEnum::Closed);
475  break;
476  }
477  default:
478  {
479  ie_.dl_gate = static_cast<uint8_t>(dl);
480  break;
481  }
482  }
483  setLength();
484  return *this;
485 }
486 
487 inline GateStatusIE &GateStatusIE::ul_gate(UplinkGateEnum ul)
488 {
489  switch (ul)
490  {
494  {
495  ie_.ul_gate = static_cast<uint8_t>(UplinkGateEnum::Closed);
496  break;
497  }
498  default:
499  {
500  ie_.ul_gate = static_cast<uint8_t>(ul);
501  break;
502  }
503  }
504  setLength();
505  return *this;
506 }
507 
508 inline pfcp_gate_status_ie_t &GateStatusIE::data()
509 {
510  return ie_;
511 }
512 
513 inline uint16_t GateStatusIE::calculateLength()
514 {
515  return sizeof(pfcp_gate_status_ie_t) - sizeof(pfcp_ie_header_t);
516 }
517 
519 
520 inline MbrIE::MbrIE(pfcp_mbr_ie_t &ie, LengthCalculator *parent)
521  : IEHeader(ie.header, PFCP_IE_MBR, parent),
522  ie_(ie)
523 {
524 }
525 
526 inline uint64_t MbrIE::ul_mbr() const
527 {
528  return ie_.ul_mbr;
529 }
530 
531 inline uint64_t MbrIE::dl_mbr() const
532 {
533  return ie_.dl_mbr;
534 }
535 
536 inline MbrIE &MbrIE::ul_mbr(uint64_t mbr)
537 {
538  ie_.ul_mbr = mbr & 0x000000ffffffffff;
539  setLength();
540  return *this;
541 }
542 
543 inline MbrIE &MbrIE::dl_mbr(uint64_t mbr)
544 {
545  ie_.dl_mbr = mbr & 0x000000ffffffffff;
546  setLength();
547  return *this;
548 }
549 
550 inline pfcp_mbr_ie_t &MbrIE::data()
551 {
552  return ie_;
553 }
554 
555 inline uint16_t MbrIE::calculateLength()
556 {
557  return 10; /* ul mbr + dl mbr --> 5+5=10 */
558 }
559 
561 
562 inline GbrIE::GbrIE(pfcp_gbr_ie_t &ie, LengthCalculator *parent)
563  : IEHeader(ie.header, PFCP_IE_GBR, parent),
564  ie_(ie)
565 {
566 }
567 
568 inline uint64_t GbrIE::ul_gbr() const
569 {
570  return ie_.ul_gbr;
571 }
572 
573 inline uint64_t GbrIE::dl_gbr() const
574 {
575  return ie_.dl_gbr;
576 }
577 
578 inline GbrIE &GbrIE::ul_gbr(uint64_t mbr)
579 {
580  ie_.ul_gbr = mbr & 0x000000ffffffffff;
581  setLength();
582  return *this;
583 }
584 
585 inline GbrIE &GbrIE::dl_gbr(uint64_t mbr)
586 {
587  ie_.dl_gbr = mbr & 0x000000ffffffffff;
588  setLength();
589  return *this;
590 }
591 
592 inline pfcp_gbr_ie_t &GbrIE::data()
593 {
594  return ie_;
595 }
596 
597 inline uint16_t GbrIE::calculateLength()
598 {
599  return 10; /* ul gbr + dl gbr --> 5+5=10 */
600 }
601 
603 
604 inline uint32_t QerCorrelationIdIE::qer_corr_id_val() const
605 {
606  return ie_.qer_corr_id_val;
607 }
608 
609 inline QerCorrelationIdIE &QerCorrelationIdIE::qer_corr_id_val(uint32_t id)
610 {
611  ie_.qer_corr_id_val = id;
612  setLength();
613  return *this;
614 }
615 
616 inline pfcp_qer_corr_id_ie_t &QerCorrelationIdIE::data()
617 {
618  return ie_;
619 }
620 
621 inline QerCorrelationIdIE::QerCorrelationIdIE(pfcp_qer_corr_id_ie_t &ie, LengthCalculator *parent)
622  : IEHeader(ie.header, PFCP_IE_QER_CORR_ID, parent),
623  ie_(ie)
624 {
625 }
626 
627 inline uint16_t QerCorrelationIdIE::calculateLength()
628 {
629  return sizeof(pfcp_qer_corr_id_ie_t) - sizeof(pfcp_ie_header_t);
630 }
631 
633 
634 inline uint32_t PrecedenceIE::prcdnc_val() const
635 {
636  return ie_.prcdnc_val;
637 }
638 
639 inline PrecedenceIE &PrecedenceIE::prcdnc_val(uint32_t val)
640 {
641  ie_.prcdnc_val = val;
642  setLength();
643  return *this;
644 }
645 
646 inline pfcp_precedence_ie_t &PrecedenceIE::data()
647 {
648  return ie_;
649 }
650 
651 inline PrecedenceIE::PrecedenceIE(pfcp_precedence_ie_t &ie, LengthCalculator *parent)
652  : IEHeader(ie.header, PFCP_IE_PRECEDENCE, parent),
653  ie_(ie)
654 {
655 }
656 
657 inline uint16_t PrecedenceIE::calculateLength()
658 {
659  return sizeof(pfcp_precedence_ie_t) - sizeof(pfcp_ie_header_t);
660 }
661 
663 
664 inline const uint8_t *TransportLevelMarkingIE::tostraffic_cls() const
665 {
666  return ie_.tostraffic_cls;
667 }
668 
669 inline TransportLevelMarkingIE &TransportLevelMarkingIE::tostraffic_cls(const uint8_t *val)
670 {
671  std::memcpy(ie_.tostraffic_cls, val, sizeof(ie_.tostraffic_cls));
672  setLength();
673  return *this;
674 }
675 
676 inline pfcp_trnspt_lvl_marking_ie_t &TransportLevelMarkingIE::data()
677 {
678  return ie_;
679 }
680 
681 inline TransportLevelMarkingIE::TransportLevelMarkingIE(pfcp_trnspt_lvl_marking_ie_t &ie, LengthCalculator *parent)
682  : IEHeader(ie.header, PFCP_IE_TRNSPT_LVL_MARKING, parent),
683  ie_(ie)
684 {
685 }
686 
688 {
689  return sizeof(pfcp_trnspt_lvl_marking_ie_t) - sizeof(pfcp_ie_header_t);
690 }
691 
693 
694 inline Bool VolumeThresholdIE::tovol() const
695 {
696  return ie_.tovol;
697 }
698 
699 inline Bool VolumeThresholdIE::ulvol() const
700 {
701  return ie_.ulvol;
702 }
703 
704 inline Bool VolumeThresholdIE::dlvol() const
705 {
706  return ie_.dlvol;
707 }
708 
709 inline uint64_t VolumeThresholdIE::total_volume() const
710 {
711  return ie_.total_volume;
712 }
713 
714 inline uint64_t VolumeThresholdIE::uplink_volume() const
715 {
716  return ie_.uplink_volume;
717 }
718 
719 inline uint64_t VolumeThresholdIE::downlink_volume() const
720 {
721  return ie_.downlink_volume;
722 }
723 
724 inline VolumeThresholdIE &VolumeThresholdIE::total_volume(uint64_t val)
725 {
726  ie_.tovol = 1;
727  ie_.total_volume = val;
728  setLength();
729  return *this;
730 }
731 
732 inline VolumeThresholdIE &VolumeThresholdIE::uplink_volume(uint64_t val)
733 {
734  ie_.ulvol = 1;
735  ie_.uplink_volume = val;
736  setLength();
737  return *this;
738 }
739 
740 inline VolumeThresholdIE &VolumeThresholdIE::downlink_volume(uint64_t val)
741 {
742  ie_.dlvol = 1;
743  ie_.downlink_volume = val;
744  setLength();
745  return *this;
746 }
747 
748 inline pfcp_vol_thresh_ie_t &VolumeThresholdIE::data()
749 {
750  return ie_;
751 }
752 
753 inline VolumeThresholdIE::VolumeThresholdIE(pfcp_vol_thresh_ie_t &ie, LengthCalculator *parent)
754  : IEHeader(ie.header, PFCP_IE_VOL_THRESH, parent),
755  ie_(ie)
756 {
757 }
758 
759 inline uint16_t VolumeThresholdIE::calculateLength()
760 {
761  return
762  1 + /* octet 5 */
763  (ie_.tovol ? sizeof(ie_.total_volume) : 0) +
764  (ie_.ulvol ? sizeof(ie_.uplink_volume) : 0) +
765  (ie_.dlvol ? sizeof(ie_.downlink_volume) : 0)
766  ;
767 }
768 
770 
771 inline TimeThresholdIE::TimeThresholdIE(pfcp_time_threshold_ie_t &ie, LengthCalculator *parent)
772  : IEHeader(ie.header, PFCP_IE_TIME_THRESHOLD, parent),
773  ie_(ie)
774 {
775 }
776 
777 inline uint32_t TimeThresholdIE::time_threshold() const
778 {
779  return ie_.time_threshold;
780 }
781 
782 inline TimeThresholdIE &TimeThresholdIE::time_threshold(uint32_t val)
783 {
784  ie_.time_threshold = val;
785  setLength();
786  return *this;
787 }
788 
789 inline pfcp_time_threshold_ie_t &TimeThresholdIE::data()
790 {
791  return ie_;
792 }
793 
794 inline uint16_t TimeThresholdIE::calculateLength()
795 {
796  return sizeof(pfcp_time_threshold_ie_t) - sizeof(pfcp_ie_header_t);
797 }
798 
800 
801 inline MonitoringTimeIE::MonitoringTimeIE(pfcp_monitoring_time_ie_t &ie, LengthCalculator *parent)
802  : IEHeader(ie.header, PFCP_IE_MONITORING_TIME, parent),
803  ie_(ie)
804 {
805 }
806 
807 inline const ETime MonitoringTimeIE::monitoring_time() const
808 {
809  ETime t;
810  t.setNTPTime(ie_.monitoring_time);
811  return t;
812 }
813 
814 inline MonitoringTimeIE &MonitoringTimeIE::monitoring_time(uint32_t val)
815 {
816  ie_.monitoring_time = val;
817  setLength();
818  return *this;
819 }
820 
821 inline MonitoringTimeIE &MonitoringTimeIE::monitoring_time(const ETime &val)
822 {
823  ie_.monitoring_time = val.getNTPTimeSeconds();
824  setLength();
825  return *this;
826 }
827 
828 inline pfcp_monitoring_time_ie_t &MonitoringTimeIE::data()
829 {
830  return ie_;
831 }
832 
833 inline uint16_t MonitoringTimeIE::calculateLength()
834 {
835  return sizeof(pfcp_monitoring_time_ie_t) - sizeof(pfcp_ie_header_t);
836 }
837 
839 
840 inline SubsequentVolumeThresholdIE::SubsequentVolumeThresholdIE(pfcp_sbsqnt_vol_thresh_ie_t &ie, LengthCalculator *parent)
841  : IEHeader(ie.header, PFCP_IE_SBSQNT_VOL_THRESH, parent),
842  ie_(ie)
843 {
844 }
845 
846 inline Bool SubsequentVolumeThresholdIE::tovol() const
847 {
848  return ie_.tovol;
849 }
850 
851 inline Bool SubsequentVolumeThresholdIE::ulvol() const
852 {
853  return ie_.ulvol;
854 }
855 
856 inline Bool SubsequentVolumeThresholdIE::dlvol() const
857 {
858  return ie_.dlvol;
859 }
860 
861 inline uint64_t SubsequentVolumeThresholdIE::total_volume() const
862 {
863  return ie_.total_volume;
864 }
865 
866 inline uint64_t SubsequentVolumeThresholdIE::uplink_volume() const
867 {
868  return ie_.uplink_volume;
869 }
870 
871 inline uint64_t SubsequentVolumeThresholdIE::downlink_volume() const
872 {
873  return ie_.downlink_volume;
874 }
875 
876 inline SubsequentVolumeThresholdIE &SubsequentVolumeThresholdIE::total_volume(uint64_t val)
877 {
878  ie_.tovol = 1;
879  ie_.total_volume = val;
880  setLength();
881  return *this;
882 }
883 
884 inline SubsequentVolumeThresholdIE &SubsequentVolumeThresholdIE::uplink_volume(uint64_t val)
885 {
886  ie_.ulvol = 1;
887  ie_.uplink_volume = val;
888  setLength();
889  return *this;
890 }
891 
892 inline SubsequentVolumeThresholdIE &SubsequentVolumeThresholdIE::downlink_volume(uint64_t val)
893 {
894  ie_.dlvol = 1;
895  ie_.downlink_volume = val;
896  setLength();
897  return *this;
898 }
899 
900 inline pfcp_sbsqnt_vol_thresh_ie_t &SubsequentVolumeThresholdIE::data()
901 {
902  return ie_;
903 }
904 
906 {
907  return
908  1 + /* octet 5 */
909  (ie_.tovol ? sizeof(ie_.total_volume) : 0) +
910  (ie_.ulvol ? sizeof(ie_.uplink_volume) : 0) +
911  (ie_.dlvol ? sizeof(ie_.downlink_volume) : 0)
912  ;
913 }
914 
916 
917 inline SubsequentTimeThresholdIE::SubsequentTimeThresholdIE(pfcp_sbsqnt_time_thresh_ie_t &ie, LengthCalculator *parent)
918  : IEHeader(ie.header, PFCP_IE_SBSQNT_TIME_THRESH, parent),
919  ie_(ie)
920 {
921 }
922 
923 inline uint32_t SubsequentTimeThresholdIE::sbsqnt_time_thresh() const
924 {
925  return ie_.sbsqnt_time_thresh;
926 }
927 
928 inline SubsequentTimeThresholdIE &SubsequentTimeThresholdIE::sbsqnt_time_thresh(uint32_t val)
929 {
930  ie_.sbsqnt_time_thresh = val;
931  setLength();
932  return *this;
933 }
934 
935 inline pfcp_sbsqnt_time_thresh_ie_t &SubsequentTimeThresholdIE::data()
936 {
937  return ie_;
938 }
939 
941 {
942  return sizeof(pfcp_sbsqnt_time_thresh_ie_t) - sizeof(pfcp_ie_header_t);
943 }
944 
946 
947 inline uint32_t InactivityDetectionTimeIE::inact_det_time() const
948 {
949  return ie_.inact_det_time;
950 }
951 
952 inline InactivityDetectionTimeIE &InactivityDetectionTimeIE::inact_det_time(uint32_t val)
953 {
954  ie_.inact_det_time = val;
955  setLength();
956  return *this;
957 }
958 
959 inline pfcp_inact_det_time_ie_t &InactivityDetectionTimeIE::data()
960 {
961  return ie_;
962 }
963 
964 inline InactivityDetectionTimeIE::InactivityDetectionTimeIE(pfcp_inact_det_time_ie_t &ie, LengthCalculator *parent)
965  : IEHeader(ie.header, PFCP_IE_INACT_DET_TIME, parent),
966  ie_(ie)
967 {
968 }
969 
971 {
972  return sizeof(pfcp_inact_det_time_ie_t) - sizeof(pfcp_ie_header_t);
973 }
974 
976 
977 inline ReportingTriggersIE::ReportingTriggersIE(pfcp_rptng_triggers_ie_t &ie, LengthCalculator *parent)
978  : IEHeader(ie.header, PFCP_IE_RPTNG_TRIGGERS, parent),
979  ie_(ie)
980 {
981 }
982 
983 inline Bool ReportingTriggersIE::perio() const
984 {
985  return ie_.perio;
986 }
987 
988 inline Bool ReportingTriggersIE::volth() const
989 {
990  return ie_.volth;
991 }
992 
993 inline Bool ReportingTriggersIE::timth() const
994 {
995  return ie_.timth;
996 }
997 
998 inline Bool ReportingTriggersIE::quhti() const
999 {
1000  return ie_.quhti;
1001 }
1002 
1003 inline Bool ReportingTriggersIE::start() const
1004 {
1005  return ie_.start;
1006 }
1007 
1008 inline Bool ReportingTriggersIE::stopt() const
1009 {
1010  return ie_.stopt;
1011 }
1012 
1013 inline Bool ReportingTriggersIE::droth() const
1014 {
1015  return ie_.droth;
1016 }
1017 
1018 inline Bool ReportingTriggersIE::liusa() const
1019 {
1020  return ie_.liusa;
1021 }
1022 
1023 inline Bool ReportingTriggersIE::volqu() const
1024 {
1025  return ie_.volqu;
1026 }
1027 
1028 inline Bool ReportingTriggersIE::timqu() const
1029 {
1030  return ie_.timqu;
1031 }
1032 
1033 inline Bool ReportingTriggersIE::envcl() const
1034 {
1035  return ie_.envcl;
1036 }
1037 
1038 inline Bool ReportingTriggersIE::macar() const
1039 {
1040  return ie_.macar;
1041 }
1042 
1043 inline Bool ReportingTriggersIE::eveth() const
1044 {
1045  return ie_.eveth;
1046 }
1047 
1048 inline Bool ReportingTriggersIE::evequ() const
1049 {
1050  return ie_.evequ;
1051 }
1052 
1053 inline ReportingTriggersIE &ReportingTriggersIE::setPerio(Bool val)
1054 {
1055  ie_.perio = val ? 1 : 0;
1056  setLength();
1057  return *this;
1058 }
1059 
1060 inline ReportingTriggersIE &ReportingTriggersIE::setVolth(Bool val)
1061 {
1062  ie_.volth = val ? 1 : 0;
1063  setLength();
1064  return *this;
1065 }
1066 
1067 inline ReportingTriggersIE &ReportingTriggersIE::setTimth(Bool val)
1068 {
1069  ie_.timth = val ? 1 : 0;
1070  setLength();
1071  return *this;
1072 }
1073 
1074 inline ReportingTriggersIE &ReportingTriggersIE::setQuhti(Bool val)
1075 {
1076  ie_.quhti = val ? 1 : 0;
1077  setLength();
1078  return *this;
1079 }
1080 
1081 inline ReportingTriggersIE &ReportingTriggersIE::setStart(Bool val)
1082 {
1083  ie_.start = val ? 1 : 0;
1084  setLength();
1085  return *this;
1086 }
1087 
1088 inline ReportingTriggersIE &ReportingTriggersIE::setStopt(Bool val)
1089 {
1090  ie_.stopt = val ? 1 : 0;
1091  setLength();
1092  return *this;
1093 }
1094 
1095 inline ReportingTriggersIE &ReportingTriggersIE::setDroth(Bool val)
1096 {
1097  ie_.droth = val ? 1 : 0;
1098  setLength();
1099  return *this;
1100 }
1101 
1102 inline ReportingTriggersIE &ReportingTriggersIE::setLiusa(Bool val)
1103 {
1104  ie_.liusa = val ? 1 : 0;
1105  setLength();
1106  return *this;
1107 }
1108 
1109 inline ReportingTriggersIE &ReportingTriggersIE::setVolqu(Bool val)
1110 {
1111  ie_.volqu = val ? 1 : 0;
1112  setLength();
1113  return *this;
1114 }
1115 
1116 inline ReportingTriggersIE &ReportingTriggersIE::setTimqu(Bool val)
1117 {
1118  ie_.timqu = val ? 1 : 0;
1119  setLength();
1120  return *this;
1121 }
1122 
1123 inline ReportingTriggersIE &ReportingTriggersIE::setEnvcl(Bool val)
1124 {
1125  ie_.envcl = val ? 1 : 0;
1126  setLength();
1127  return *this;
1128 }
1129 
1130 inline ReportingTriggersIE &ReportingTriggersIE::setMacar(Bool val)
1131 {
1132  ie_.macar = val ? 1 : 0;
1133  setLength();
1134  return *this;
1135 }
1136 
1137 inline ReportingTriggersIE &ReportingTriggersIE::setEveth(Bool val)
1138 {
1139  ie_.eveth = val ? 1 : 0;
1140  setLength();
1141  return *this;
1142 }
1143 
1144 inline ReportingTriggersIE &ReportingTriggersIE::setEvequ(Bool val)
1145 {
1146  ie_.evequ = val ? 1 : 0;
1147  setLength();
1148  return *this;
1149 }
1150 
1151 inline pfcp_rptng_triggers_ie_t &ReportingTriggersIE::data()
1152 {
1153  return ie_;
1154 }
1155 
1156 inline uint16_t ReportingTriggersIE::calculateLength()
1157 {
1158  return sizeof(pfcp_rptng_triggers_ie_t) - sizeof(pfcp_ie_header_t);
1159 }
1160 
1162 
1163 inline RedirectInformationIE::RedirectInformationIE(pfcp_redir_info_ie_t &ie, LengthCalculator *parent)
1164  : IEHeader(ie.header, PFCP_IE_REDIR_INFO, parent),
1165  ie_(ie)
1166 {
1167 }
1168 
1170 {
1171  return static_cast<RedirectAddressTypeEnum>(ie_.redir_addr_type);
1172 }
1173 
1174 inline uint16_t RedirectInformationIE::redir_svr_addr_len() const
1175 {
1176  return ie_.redir_svr_addr_len;
1177 }
1178 
1179 inline const uint8_t *RedirectInformationIE::redir_svr_addr() const
1180 {
1181  return ie_.redir_svr_addr;
1182 }
1183 
1185 {
1186  return ie_.other_redir_svr_addr_len;
1187 }
1188 
1189 inline const uint8_t *RedirectInformationIE::other_redir_svr_addr() const
1190 {
1191  return ie_.other_redir_svr_addr;
1192 }
1193 
1194 inline RedirectInformationIE &RedirectInformationIE::redir_addr_type(RedirectAddressTypeEnum val)
1195 {
1196  ie_.redir_addr_type = static_cast<uint8_t>(val);
1197  setLength();
1198  return *this;
1199 }
1200 
1201 inline RedirectInformationIE &RedirectInformationIE::redir_svr_addr(const uint8_t *val, uint16_t len)
1202 {
1203  if (len > sizeof(ie_.redir_svr_addr))
1204  len = sizeof(ie_.redir_svr_addr);
1205  ie_.redir_svr_addr_len = len;
1206  std::memcpy(ie_.redir_svr_addr, val, len);
1207  setLength();
1208  return *this;
1209 }
1210 
1211 inline RedirectInformationIE &RedirectInformationIE::other_redir_svr_addr(const uint8_t *val, uint16_t len)
1212 {
1213  if (len > sizeof(ie_.other_redir_svr_addr))
1214  len = sizeof(ie_.other_redir_svr_addr);
1215  ie_.other_redir_svr_addr_len = len;
1216  std::memcpy(ie_.other_redir_svr_addr, val, len);
1217  setLength();
1218  return *this;
1219 }
1220 
1221 inline pfcp_redir_info_ie_t &RedirectInformationIE::data()
1222 {
1223  return ie_;
1224 }
1225 
1227 {
1228  return
1229  1 + /* octet 5 */
1230  sizeof(ie_.redir_svr_addr_len) +
1231  ie_.redir_svr_addr_len +
1232  sizeof(ie_.other_redir_svr_addr_len) +
1233  ie_.other_redir_svr_addr_len
1234  ;
1235 }
1236 
1238 
1239 inline ReportTypeIE::ReportTypeIE(pfcp_report_type_ie_t &ie, LengthCalculator *parent)
1240  : IEHeader(ie.header, PFCP_IE_REPORT_TYPE, parent),
1241  ie_(ie)
1242 {
1243 }
1244 
1245 inline Bool ReportTypeIE::dldr() const
1246 {
1247  return ie_.dldr;
1248 }
1249 
1250 inline Bool ReportTypeIE::usar() const
1251 {
1252  return ie_.usar;
1253 }
1254 
1255 inline Bool ReportTypeIE::erir() const
1256 {
1257  return ie_.erir;
1258 }
1259 
1260 inline Bool ReportTypeIE::upir() const
1261 {
1262  return ie_.upir;
1263 }
1264 
1265 inline ReportTypeIE &ReportTypeIE::dldr(Bool val)
1266 {
1267  ie_.dldr = val ? 1 : 0; setLength();
1268  return *this;
1269 }
1270 
1271 inline ReportTypeIE &ReportTypeIE::usar(Bool val)
1272 {
1273  ie_.usar = val ? 1 : 0; setLength();
1274  return *this;
1275 }
1276 
1277 inline ReportTypeIE &ReportTypeIE::erir(Bool val)
1278 {
1279  ie_.erir = val ? 1 : 0; setLength();
1280  return *this;
1281 }
1282 
1283 inline ReportTypeIE &ReportTypeIE::upir(Bool val)
1284 {
1285  ie_.upir = val ? 1 : 0; setLength();
1286  return *this;
1287 }
1288 
1289 inline pfcp_report_type_ie_t &ReportTypeIE::data()
1290 {
1291  return ie_;
1292 }
1293 
1294 inline uint16_t ReportTypeIE::calculateLength()
1295 {
1296  return sizeof(pfcp_report_type_ie_t) - sizeof(pfcp_ie_header_t);
1297 }
1298 
1300 
1301 inline uint16_t OffendingIeIE::type_of_the_offending_ie() const
1302 {
1303  return ie_.type_of_the_offending_ie;
1304 }
1305 
1306 inline OffendingIeIE &OffendingIeIE::type_of_the_offending_ie(uint16_t val)
1307 {
1308  ie_.type_of_the_offending_ie = val;
1309  setLength();
1310  return *this;
1311 }
1312 
1313 inline pfcp_offending_ie_ie_t &OffendingIeIE::data()
1314 {
1315  return ie_;
1316 }
1317 
1318 inline OffendingIeIE::OffendingIeIE(pfcp_offending_ie_ie_t &ie, LengthCalculator *parent)
1319  : IEHeader(ie.header, PFCP_IE_OFFENDING_IE, parent),
1320  ie_(ie)
1321 {
1322 }
1323 
1324 inline uint16_t OffendingIeIE::calculateLength()
1325 {
1326  return sizeof(pfcp_offending_ie_ie_t) - sizeof(pfcp_ie_header_t);
1327 }
1328 
1330 
1331 inline uint8_t ForwardingPolicyIE::frwdng_plcy_ident_len() const
1332 {
1333  return ie_.frwdng_plcy_ident_len;
1334 }
1335 
1336 inline const uint8_t *ForwardingPolicyIE::frwdng_plcy_ident() const
1337 {
1338  return ie_.frwdng_plcy_ident;
1339 }
1340 
1341 inline ForwardingPolicyIE &ForwardingPolicyIE::frwdng_plcy_ident(const uint8_t *val, uint8_t len)
1342 {
1343  if (len > sizeof(ie_.frwdng_plcy_ident))
1344  len = sizeof(ie_.frwdng_plcy_ident);
1345  ie_.frwdng_plcy_ident_len = len;
1346  std::memcpy(ie_.frwdng_plcy_ident, val, len);
1347  setLength();
1348  return *this;
1349 }
1350 
1351 inline pfcp_frwdng_plcy_ie_t &ForwardingPolicyIE::data()
1352 {
1353  return ie_;
1354 }
1355 
1356 inline ForwardingPolicyIE::ForwardingPolicyIE(pfcp_frwdng_plcy_ie_t &ie, LengthCalculator *parent)
1357  : IEHeader(ie.header, PFCP_IE_FRWDNG_PLCY, parent),
1358  ie_(ie)
1359 {
1360 }
1361 
1362 inline uint16_t ForwardingPolicyIE::calculateLength()
1363 {
1364  return sizeof(ie_.frwdng_plcy_ident_len) + ie_.frwdng_plcy_ident_len;
1365 }
1366 
1368 
1369 inline DestinationInterfaceIE::DestinationInterfaceIE(pfcp_dst_intfc_ie_t &ie, LengthCalculator *parent)
1370  : IEHeader(ie.header, PFCP_IE_DST_INTFC, parent),
1371  ie_(ie)
1372 {
1373 }
1374 
1376 {
1377  return static_cast<DestinationInterfaceEnum>(ie_.interface_value);
1378 }
1379 
1380 inline DestinationInterfaceIE &DestinationInterfaceIE::interface_value(DestinationInterfaceEnum val)
1381 {
1382  ie_.interface_value = static_cast<uint8_t>(val);
1383  setLength();
1384  return *this;
1385 }
1386 
1387 inline pfcp_dst_intfc_ie_t &DestinationInterfaceIE::data()
1388 {
1389  return ie_;
1390 }
1391 
1393 {
1394  return sizeof(pfcp_dst_intfc_ie_t) - sizeof(pfcp_ie_header_t);
1395 }
1396 
1398 
1399 inline UpFunctionFeaturesIE::UpFunctionFeaturesIE(pfcp_up_func_feat_ie_t &ie, LengthCalculator *parent)
1400  : IEHeader(ie.header, PFCP_IE_UP_FUNC_FEAT, parent),
1401  ie_(ie)
1402 {
1403 }
1404 
1405 inline Bool UpFunctionFeaturesIE::bucp() const
1406 {
1407  return ie_.sup_feat.bucp;
1408 }
1409 
1410 inline Bool UpFunctionFeaturesIE::ddnd() const
1411 {
1412  return ie_.sup_feat.ddnd;
1413 }
1414 
1415 inline Bool UpFunctionFeaturesIE::dlbd() const
1416 {
1417  return ie_.sup_feat.dlbd;
1418 }
1419 
1420 inline Bool UpFunctionFeaturesIE::trst() const
1421 {
1422  return ie_.sup_feat.trst;
1423 }
1424 
1425 inline Bool UpFunctionFeaturesIE::ftup() const
1426 {
1427  return ie_.sup_feat.ftup;
1428 }
1429 
1430 inline Bool UpFunctionFeaturesIE::pfdm() const
1431 {
1432  return ie_.sup_feat.pfdm;
1433 }
1434 
1435 inline Bool UpFunctionFeaturesIE::heeu() const
1436 {
1437  return ie_.sup_feat.heeu;
1438 }
1439 
1440 inline Bool UpFunctionFeaturesIE::treu() const
1441 {
1442  return ie_.sup_feat.treu;
1443 }
1444 
1445 inline Bool UpFunctionFeaturesIE::empu() const
1446 {
1447  return ie_.sup_feat.empu;
1448 }
1449 
1450 inline Bool UpFunctionFeaturesIE::pdiu() const
1451 {
1452  return ie_.sup_feat.pdiu;
1453 }
1454 
1455 inline Bool UpFunctionFeaturesIE::udbc() const
1456 {
1457  return ie_.sup_feat.udbc;
1458 }
1459 
1460 inline Bool UpFunctionFeaturesIE::quoac() const
1461 {
1462  return ie_.sup_feat.quoac;
1463 }
1464 
1465 inline Bool UpFunctionFeaturesIE::trace() const
1466 {
1467  return ie_.sup_feat.trace;
1468 }
1469 
1470 inline Bool UpFunctionFeaturesIE::frrt() const
1471 {
1472  return ie_.sup_feat.frrt;
1473 }
1474 
1475 inline Bool UpFunctionFeaturesIE::pfde() const
1476 {
1477  return ie_.sup_feat.pfde;
1478 }
1479 
1480 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::bucp(Bool val)
1481 {
1482  ie_.sup_feat.bucp = val ? 1 : 0;
1483  setLength();
1484  return *this;
1485 }
1486 
1487 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::ddnd(Bool val)
1488 {
1489  ie_.sup_feat.ddnd = val ? 1 : 0;
1490  setLength();
1491  return *this;
1492 }
1493 
1494 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::dlbd(Bool val)
1495 {
1496  ie_.sup_feat.dlbd = val ? 1 : 0;
1497  setLength();
1498  return *this;
1499 }
1500 
1501 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::trst(Bool val)
1502 {
1503  ie_.sup_feat.trst = val ? 1 : 0;
1504  setLength();
1505  return *this;
1506 }
1507 
1508 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::ftup(Bool val)
1509 {
1510  ie_.sup_feat.ftup = val ? 1 : 0;
1511  setLength();
1512  return *this;
1513 }
1514 
1515 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::pfdm(Bool val)
1516 {
1517  ie_.sup_feat.pfdm = val ? 1 : 0;
1518  setLength();
1519  return *this;
1520 }
1521 
1522 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::heeu(Bool val)
1523 {
1524  ie_.sup_feat.heeu = val ? 1 : 0;
1525  setLength();
1526  return *this;
1527 }
1528 
1529 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::treu(Bool val)
1530 {
1531  ie_.sup_feat.treu = val ? 1 : 0;
1532  setLength();
1533  return *this;
1534 }
1535 
1536 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::empu(Bool val)
1537 {
1538  ie_.sup_feat.empu = val ? 1 : 0;
1539  setLength();
1540  return *this;
1541 }
1542 
1543 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::pdiu(Bool val)
1544 {
1545  ie_.sup_feat.pdiu = val ? 1 : 0;
1546  setLength();
1547  return *this;
1548 }
1549 
1550 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::udbc(Bool val)
1551 {
1552  ie_.sup_feat.udbc = val ? 1 : 0;
1553  setLength();
1554  return *this;
1555 }
1556 
1557 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::quoac(Bool val)
1558 {
1559  ie_.sup_feat.quoac = val ? 1 : 0;
1560  setLength();
1561  return *this;
1562 }
1563 
1564 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::trace(Bool val)
1565 {
1566  ie_.sup_feat.trace = val ? 1 : 0;
1567  setLength();
1568  return *this;
1569 }
1570 
1571 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::frrt(Bool val)
1572 {
1573  ie_.sup_feat.frrt = val ? 1 : 0;
1574  setLength();
1575  return *this;
1576 }
1577 
1578 inline UpFunctionFeaturesIE &UpFunctionFeaturesIE::pfde(Bool val)
1579 {
1580  ie_.sup_feat.pfde = val ? 1 : 0;
1581  setLength();
1582  return *this;
1583 }
1584 
1585 inline pfcp_up_func_feat_ie_t &UpFunctionFeaturesIE::data()
1586 {
1587  return ie_;
1588 }
1589 
1590 inline uint16_t UpFunctionFeaturesIE::calculateLength()
1591 {
1592  return sizeof(pfcp_up_func_feat_ie_t) - sizeof(pfcp_ie_header_t);
1593 }
1594 
1596 
1597 inline ApplyActionIE::ApplyActionIE(pfcp_apply_action_ie_t &ie, LengthCalculator *parent)
1598  : IEHeader(ie.header, PFCP_IE_APPLY_ACTION, parent),
1599  ie_(ie)
1600 {
1601 }
1602 
1603 inline Bool ApplyActionIE::drop() const
1604 {
1605  return ie_.drop;
1606 }
1607 
1608 inline Bool ApplyActionIE::forw() const
1609 {
1610  return ie_.forw;
1611 }
1612 
1613 inline Bool ApplyActionIE::buff() const
1614 {
1615  return ie_.buff;
1616 }
1617 
1618 inline Bool ApplyActionIE::nocp() const
1619 {
1620  return ie_.nocp;
1621 }
1622 
1623 inline Bool ApplyActionIE::dupl() const
1624 {
1625  return ie_.dupl;
1626 }
1627 
1628 inline ApplyActionIE &ApplyActionIE::drop(Bool val)
1629 {
1630  ie_.drop = val ? 1 : 0;
1631  setLength();
1632  return *this;
1633 }
1634 
1635 inline ApplyActionIE &ApplyActionIE::forw(Bool val)
1636 {
1637  ie_.forw = val ? 1 : 0;
1638  setLength();
1639  return *this;
1640 }
1641 
1642 inline ApplyActionIE &ApplyActionIE::buff(Bool val)
1643 {
1644  ie_.buff = val ? 1 : 0;
1645  setLength();
1646  return *this;
1647 }
1648 
1649 inline ApplyActionIE &ApplyActionIE::nocp(Bool val)
1650 {
1651  ie_.nocp = val ? 1 : 0;
1652  setLength();
1653  return *this;
1654 }
1655 
1656 inline ApplyActionIE &ApplyActionIE::dupl(Bool val)
1657 {
1658  ie_.dupl = val ? 1 : 0;
1659  setLength();
1660  return *this;
1661 }
1662 
1663 inline pfcp_apply_action_ie_t &ApplyActionIE::data()
1664 {
1665  return ie_;
1666 }
1667 
1668 inline uint16_t ApplyActionIE::calculateLength()
1669 {
1670  return sizeof(pfcp_apply_action_ie_t) - sizeof(pfcp_ie_header_t);
1671 }
1672 
1674 
1675 inline DownlinkDataServiceInformationIE::DownlinkDataServiceInformationIE(pfcp_dnlnk_data_svc_info_ie_t &ie, LengthCalculator *parent)
1676  : IEHeader(ie.header, PFCP_IE_DNLNK_DATA_SVC_INFO, parent),
1677  ie_(ie)
1678 {
1679 }
1680 
1681 inline Bool DownlinkDataServiceInformationIE::ppi() const
1682 {
1683  return ie_.ppi;
1684 }
1685 
1686 inline Bool DownlinkDataServiceInformationIE::qfii() const
1687 {
1688  return ie_.qfii;
1689 }
1690 
1692 {
1693  return ie_.paging_plcy_indctn_val;
1694 }
1695 
1696 inline uint8_t DownlinkDataServiceInformationIE::qfi() const
1697 {
1698  return ie_.qfi;
1699 }
1700 
1701 inline DownlinkDataServiceInformationIE &DownlinkDataServiceInformationIE::paging_plcy_indctn_val(Bool val)
1702 {
1703  ie_.paging_plcy_indctn_val = val; ie_.ppi = 1;
1704  setLength();
1705  return *this;
1706 }
1707 
1708 inline DownlinkDataServiceInformationIE &DownlinkDataServiceInformationIE::qfi(Bool val)
1709 {
1710  ie_.qfi = val; ie_.qfii = 1;
1711  setLength();
1712  return *this;
1713 }
1714 
1715 inline pfcp_dnlnk_data_svc_info_ie_t &DownlinkDataServiceInformationIE::data()
1716 {
1717  return ie_;
1718 }
1719 
1721 {
1722  return
1723  1 + /* octet 5 */
1724  (ie_.ppi ? 1 : 0) +
1725  (ie_.qfii ? 1 : 0)
1726  ;
1727 }
1728 
1730 
1731 inline DownlinkDataNotificationDelayIE::DownlinkDataNotificationDelayIE(pfcp_dnlnk_data_notif_delay_ie_t &ie, LengthCalculator *parent)
1732  : IEHeader(ie.header, PFCP_IE_DNLNK_DATA_NOTIF_DELAY, parent),
1733  ie_(ie)
1734 {
1735 }
1736 
1737 inline uint8_t DownlinkDataNotificationDelayIE::delay_value() const
1738 {
1739  return ie_.delay_val_in_integer_multiples_of_50_millisecs_or_zero;
1740 }
1741 
1742 inline DownlinkDataNotificationDelayIE &DownlinkDataNotificationDelayIE::delay_value(uint8_t val)
1743 {
1744  ie_.delay_val_in_integer_multiples_of_50_millisecs_or_zero = val;
1745  setLength();
1746  return *this;
1747 }
1748 
1749 inline pfcp_dnlnk_data_notif_delay_ie_t &DownlinkDataNotificationDelayIE::data()
1750 {
1751  return ie_;
1752 }
1753 
1755 {
1756  return sizeof(pfcp_dnlnk_data_notif_delay_ie_t) - sizeof(pfcp_ie_header_t);
1757 }
1758 
1760 
1761 inline DlBufferingDurationIE::DlBufferingDurationIE(pfcp_dl_buf_dur_ie_t &ie, LengthCalculator *parent)
1762  : IEHeader(ie.header, PFCP_IE_DL_BUF_DUR, parent),
1763  ie_(ie)
1764 {
1765 }
1766 
1768 {
1769  return (ie_.timer_unit == 5 || ie_.timer_unit == 6) ?
1771  static_cast<DlBufferingDurationTimerUnitEnum>(ie_.timer_unit);
1772 }
1773 
1774 inline uint8_t DlBufferingDurationIE::timer_value() const
1775 {
1776  return ie_.timer_value;
1777 }
1778 
1780 {
1781  ie_.timer_unit = static_cast<uint8_t>(val);
1782  setLength();
1783  return *this;
1784 }
1785 
1786 inline DlBufferingDurationIE &DlBufferingDurationIE::timer_unit(uint8_t val)
1787 {
1788  ie_.timer_value = val;
1789  setLength();
1790  return *this;
1791 }
1792 
1793 inline pfcp_dl_buf_dur_ie_t &DlBufferingDurationIE::data()
1794 {
1795  return ie_;
1796 }
1797 
1799 {
1800  return sizeof(pfcp_dl_buf_dur_ie_t) - sizeof(pfcp_ie_header_t);
1801 }
1802 
1804 
1805 inline DlBufferingSuggestedPacketCountIE::DlBufferingSuggestedPacketCountIE(pfcp_dl_buf_suggstd_pckt_cnt_ie_t &ie, LengthCalculator *parent)
1806  : IEHeader(ie.header, PFCP_IE_DL_BUF_SUGGSTD_PCKT_CNT, parent),
1807  ie_(ie)
1808 {
1809 }
1810 
1812 {
1813  return ie_.pckt_cnt_val;
1814 }
1815 
1816 inline DlBufferingSuggestedPacketCountIE &DlBufferingSuggestedPacketCountIE::pckt_cnt_val(uint16_t val)
1817 {
1818  ie_.pckt_cnt_val = val;
1819  setLength();
1820  return *this;
1821 }
1822 
1823 inline pfcp_dl_buf_suggstd_pckt_cnt_ie_t &DlBufferingSuggestedPacketCountIE::data()
1824 {
1825  return ie_;
1826 }
1827 
1829 {
1830  return ie_.pckt_cnt_val < 256 ? 1 : 2;
1831 }
1832 
1834 
1835 inline PfcpSmReqFlagsIE::PfcpSmReqFlagsIE(pfcp_pfcpsmreq_flags_ie_t &ie, LengthCalculator *parent)
1836  : IEHeader(ie.header, PFCP_IE_PFCPSMREQ_FLAGS, parent),
1837  ie_(ie)
1838 {
1839 }
1840 
1841 inline Bool PfcpSmReqFlagsIE::drobu() const
1842 {
1843  return ie_.drobu;
1844 }
1845 
1846 inline Bool PfcpSmReqFlagsIE::sndem() const
1847 {
1848  return ie_.sndem;
1849 }
1850 
1851 inline Bool PfcpSmReqFlagsIE::qaurr() const
1852 {
1853  return ie_.qaurr;
1854 }
1855 
1856 inline PfcpSmReqFlagsIE &PfcpSmReqFlagsIE::drobu(Bool val)
1857 {
1858  ie_.drobu = val ? 1 : 0;
1859  setLength();
1860  return *this;
1861 }
1862 
1863 inline PfcpSmReqFlagsIE &PfcpSmReqFlagsIE::sndem(Bool val)
1864 {
1865  ie_.sndem = val ? 1 : 0;
1866  setLength();
1867  return *this;
1868 }
1869 
1870 inline PfcpSmReqFlagsIE &PfcpSmReqFlagsIE::qaurr(Bool val)
1871 {
1872  ie_.qaurr = val ? 1 : 0;
1873  setLength();
1874  return *this;
1875 }
1876 
1877 inline pfcp_pfcpsmreq_flags_ie_t &PfcpSmReqFlagsIE::data()
1878 {
1879  return ie_;
1880 }
1881 
1882 inline uint16_t PfcpSmReqFlagsIE::calculateLength()
1883 {
1884  return sizeof(pfcp_pfcpsmreq_flags_ie_t) - sizeof(pfcp_ie_header_t);
1885 }
1886 
1888 
1889 inline PfcpSrRspFlagsIE::PfcpSrRspFlagsIE(pfcp_pfcpsrrsp_flags_ie_t &ie, LengthCalculator *parent)
1890  : IEHeader(ie.header, PFCP_IE_PFCPSRRSP_FLAGS, parent),
1891  ie_(ie)
1892 {
1893 }
1894 
1895 inline Bool PfcpSrRspFlagsIE::drobu() const
1896 {
1897  return ie_.drobu;
1898 }
1899 
1900 inline PfcpSrRspFlagsIE &PfcpSrRspFlagsIE::drobu(Bool val)
1901 {
1902  ie_.drobu = val ? 1 : 0;
1903  setLength();
1904  return *this;
1905 }
1906 
1907 inline pfcp_pfcpsrrsp_flags_ie_t &PfcpSrRspFlagsIE::data()
1908 {
1909  return ie_;
1910 }
1911 
1912 inline uint16_t PfcpSrRspFlagsIE::calculateLength()
1913 {
1914  return sizeof(pfcp_pfcpsrrsp_flags_ie_t) - sizeof(pfcp_ie_header_t);
1915 }
1916 
1918 
1919 inline SequenceNumberIE::SequenceNumberIE(pfcp_sequence_number_ie_t &ie, LengthCalculator *parent)
1920  : IEHeader(ie.header, PFCP_IE_SEQUENCE_NUMBER, parent),
1921  ie_(ie)
1922 {
1923 }
1924 
1925 inline uint32_t SequenceNumberIE::sequence_number() const
1926 {
1927  return ie_.sequence_number;
1928 }
1929 
1930 inline SequenceNumberIE &SequenceNumberIE::sequence_number(uint32_t val)
1931 {
1932  ie_.sequence_number = val;
1933  setLength();
1934  return *this;
1935 }
1936 
1937 inline pfcp_sequence_number_ie_t &SequenceNumberIE::data()
1938 {
1939  return ie_;
1940 }
1941 
1942 inline uint16_t SequenceNumberIE::calculateLength()
1943 {
1944  return sizeof(pfcp_sequence_number_ie_t) - sizeof(pfcp_ie_header_t);
1945 }
1946 
1948 
1949 inline MetricIE::MetricIE(pfcp_metric_ie_t &ie, LengthCalculator *parent)
1950  : IEHeader(ie.header, PFCP_IE_METRIC, parent),
1951  ie_(ie)
1952 {
1953 }
1954 
1955 inline uint8_t MetricIE::metric() const
1956 {
1957  return ie_.metric > 100 ? 0 : ie_.metric;
1958 }
1959 
1960 inline MetricIE &MetricIE::metric(uint8_t val)
1961 {
1962  ie_.metric = val > 100 ? 0 : val;
1963  setLength();
1964  return *this;
1965 }
1966 
1967 inline pfcp_metric_ie_t &MetricIE::data()
1968 {
1969  return ie_;
1970 }
1971 
1972 inline uint16_t MetricIE::calculateLength()
1973 {
1974  return sizeof(pfcp_metric_ie_t) - sizeof(pfcp_ie_header_t);
1975 }
1976 
1978 
1980 {
1981  return (ie_.timer_unit == 5 || ie_.timer_unit == 6) ?
1983  static_cast<TimerTimerUnitEnum>(ie_.timer_unit);
1984 }
1985 
1986 inline uint8_t TimerIE::timer_value() const
1987 {
1988  return ie_.timer_value;
1989 }
1990 
1991 inline TimerIE &TimerIE::timer_unit(TimerTimerUnitEnum val)
1992 {
1993  ie_.timer_unit = static_cast<uint8_t>(val);
1994  setLength();
1995  return *this;
1996 }
1997 
1998 inline TimerIE &TimerIE::timer_unit(uint8_t val)
1999 {
2000  ie_.timer_value = val;
2001  setLength();
2002  return *this;
2003 }
2004 
2005 inline pfcp_timer_ie_t &TimerIE::data()
2006 {
2007  return ie_;
2008 }
2009 
2010 inline TimerIE::TimerIE(pfcp_timer_ie_t &ie, LengthCalculator *parent)
2011  : IEHeader(ie.header, PFCP_IE_DL_BUF_DUR, parent),
2012  ie_(ie)
2013 {
2014 }
2015 
2016 inline uint16_t TimerIE::calculateLength()
2017 {
2018  return sizeof(pfcp_timer_ie_t) - sizeof(pfcp_ie_header_t);
2019 }
2020 
2022 
2023 inline uint16_t PdrIdIE::rule_id() const
2024 {
2025  return ie_.rule_id;
2026 }
2027 
2028 inline PdrIdIE &PdrIdIE::rule_id(uint16_t val)
2029 {
2030  ie_.rule_id = val;
2031  setLength();
2032  return *this;
2033 }
2034 
2035 inline pfcp_pdr_id_ie_t &PdrIdIE::data()
2036 {
2037  return ie_;
2038 }
2039 
2040 inline PdrIdIE::PdrIdIE(pfcp_pdr_id_ie_t &ie, LengthCalculator *parent)
2041  : IEHeader(ie.header, PFCP_IE_PDR_ID, parent),
2042  ie_(ie)
2043 {
2044 }
2045 
2046 inline uint16_t PdrIdIE::calculateLength()
2047 {
2048  return sizeof(pfcp_pdr_id_ie_t) - sizeof(pfcp_ie_header_t);
2049 }
2050 
2052 
2053 inline Bool FSeidIE::v4() const
2054 {
2055  return ie_.v4;
2056 }
2057 
2058 inline Bool FSeidIE::v6() const
2059 {
2060  return ie_.v6;
2061 }
2062 
2063 inline uint64_t FSeidIE::seid() const
2064 {
2065  return ie_.seid;
2066 }
2067 
2068 inline const in_addr &FSeidIE::ipv4_address() const
2069 {
2070  AliasPointer u;
2071  u.uint32_t_ptr = &ie_.ipv4_address;
2072  return *u.in_addr_ptr;
2073 }
2074 
2075 inline const in6_addr &FSeidIE::ipv6_address() const
2076 {
2077  AliasPointer u;
2078  u.uint8_t_ptr = ie_.ipv6_address;
2079  return *u.in6_addr_ptr;
2080 }
2081 
2082 inline FSeidIE &FSeidIE::seid(uint64_t val)
2083 {
2084  ie_.seid = val;
2085  setLength();
2086  return *this;
2087 }
2088 
2089 inline FSeidIE &FSeidIE::ip_address(const ESocket::Address &val)
2090 {
2091  if (val.getFamily() == ESocket::Family::INET)
2092  return ip_address(val.getInet().sin_addr);
2093  else if (val.getFamily() == ESocket::Family::INET6)
2094  return ip_address(val.getInet6().sin6_addr);
2095  return *this;
2096 }
2097 
2098 inline FSeidIE &FSeidIE::ip_address(const EIpAddress &val)
2099 {
2100  if (val.family() == AF_INET)
2101  return ip_address(val.ipv4Address());
2102  else if (val.family() == AF_INET6)
2103  return ip_address(val.ipv6Address());
2104  return *this;
2105 }
2106 
2107 inline FSeidIE &FSeidIE::ip_address(const in_addr &val)
2108 {
2109  ie_.v4 = 1;
2110  ie_.ipv4_address = val.s_addr;
2111  setLength();
2112  return *this;
2113 }
2114 
2115 inline FSeidIE &FSeidIE::ip_address(const in6_addr &val)
2116 {
2117  ie_.v6 = 1;
2118  std::memcpy(ie_.ipv6_address, val.s6_addr, sizeof(ie_.ipv6_address));
2119  setLength();
2120  return *this;
2121 }
2122 
2123 inline pfcp_fseid_ie_t &FSeidIE::data()
2124 {
2125  return ie_;
2126 }
2127 
2128 inline FSeidIE::FSeidIE(pfcp_fseid_ie_t &ie, LengthCalculator *parent)
2129  : IEHeader(ie.header, PFCP_IE_FSEID, parent),
2130  ie_(ie)
2131 {
2132 }
2133 inline uint16_t FSeidIE::calculateLength()
2134 {
2135  return
2136  1 + /* octet 5 */
2137  sizeof(ie_.seid) +
2138  (ie_.v4 ? sizeof(ie_.ipv4_address) : 0) +
2139  (ie_.v6 ? sizeof(ie_.ipv6_address) : 0)
2140  ;
2141 }
2142 
2144 
2146 {
2147  return static_cast<NodeIdTypeEnum>(ie_.node_id_type);
2148 }
2149 
2150 inline const in_addr &NodeIdIE::node_id_value_ipv4_address() const
2151 {
2152  AliasPointer u;
2153  u.uint32_t_ptr = &ie_.node_id_value_ipv4_address;
2154  return *u.in_addr_ptr;
2155 }
2156 
2157 inline const in6_addr &NodeIdIE::node_id_value_ipv6_address() const
2158 {
2159  AliasPointer u;
2160  u.uint8_t_ptr = ie_.node_id_value_ipv6_address;
2161  return *u.in6_addr_ptr;
2162 }
2163 
2164 inline const uint8_t *NodeIdIE::node_id_value_fqdn() const
2165 {
2166  return ie_.node_id_value_fqdn;
2167 }
2168 
2169 inline uint16_t NodeIdIE::node_id_valud_fqdn_len() const
2170 {
2171  return ie_.header.len - 1;
2172 }
2173 
2174 inline NodeIdIE &NodeIdIE::node_id_value(const ESocket::Address &val)
2175 {
2176  if (val.getFamily() == ESocket::Family::INET)
2177  return node_id_value(val.getInet().sin_addr);
2178  else if (val.getFamily() == ESocket::Family::INET6)
2179  return node_id_value(val.getInet6().sin6_addr);
2180  return *this;
2181 }
2182 
2183 inline NodeIdIE &NodeIdIE::node_id_value(const EIpAddress &val)
2184 {
2185  if (val.family() == AF_INET)
2186  return node_id_value(val.ipv4Address());
2187  else if (val.family() == AF_INET6)
2188  return node_id_value(val.ipv6Address());
2189  return *this;
2190 }
2191 
2192 inline NodeIdIE &NodeIdIE::node_id_value(const in_addr &val)
2193 {
2194  ie_.node_id_type = static_cast<uint8_t>(NodeIdTypeEnum::ipv4_address);
2195  std::memcpy(&ie_.node_id_value_ipv4_address, &val, sizeof(val));
2196  setLength();
2197  return *this;
2198 }
2199 
2200 inline NodeIdIE &NodeIdIE::node_id_value(const in6_addr &val)
2201 {
2202  ie_.node_id_type = static_cast<uint8_t>(NodeIdTypeEnum::ipv6_address);
2203  std::memcpy(ie_.node_id_value_ipv6_address, val.s6_addr, sizeof(val));
2204  setLength();
2205  return *this;
2206 }
2207 
2208 inline NodeIdIE &NodeIdIE::node_id_value(const uint8_t *val, uint8_t len, NodeIdTypeEnum type)
2209 {
2210  ie_.node_id_type = static_cast<uint8_t>(type);
2211 
2212  switch(type)
2213  {
2215  {
2216  if(len != sizeof(ie_.node_id_value_ipv4_address))
2217  throw NodeIdException_NodeIdTypeLengthMismatch();
2218  std::memcpy(&ie_.node_id_value_ipv4_address, val, sizeof(ie_.node_id_value_ipv4_address));
2219  break;
2220  }
2222  {
2223  if(len != sizeof(ie_.node_id_value_ipv6_address))
2224  throw NodeIdException_NodeIdTypeLengthMismatch();
2225  std::memcpy(ie_.node_id_value_ipv6_address, val, sizeof(ie_.node_id_value_ipv6_address));
2226  break;
2227  }
2228  case NodeIdTypeEnum::FQDN:
2229  {
2230  if (len > sizeof(ie_.node_id_value_fqdn))
2231  len = sizeof(ie_.node_id_value_fqdn);
2232  std::memcpy(ie_.node_id_value_fqdn, val, len);
2233  ie_.header.len = 1 + len;
2234  break;
2235  }
2236  default:
2237  {
2238  throw NodeIdException_UnrecognizedNodeIdType((Int) type);
2239  break;
2240  }
2241  }
2242 
2243  return *this;
2244 }
2245 
2246 inline pfcp_node_id_ie_t &NodeIdIE::data()
2247 {
2248  return ie_;
2249 }
2250 
2251 inline NodeIdIE::NodeIdIE(pfcp_node_id_ie_t &ie, LengthCalculator *parent)
2252  : IEHeader(ie.header, PFCP_IE_NODE_ID, parent),
2253  ie_(ie)
2254 {
2255 }
2256 
2257 inline uint16_t NodeIdIE::calculateLength()
2258 {
2259  return
2260  1 + /* octet 5 */
2261  (
2262  ie_.node_id_type == 0 ? sizeof(in_addr) :
2263  ie_.node_id_type == 1 ? sizeof(in6_addr) :
2264  ie_.header.len - 1
2265  );
2266 }
2267 
2269 
2270 #define REPLACE_DATA(flag,srcofs,len_of,dest,destofs,destsize,value,value_length) \
2271 { \
2272  if (destofs + value_length > destsize) \
2273  return *this; \
2274  srcofs += flag ? len_of : 0; \
2275  flag = 1; \
2276  len_of = value_length; \
2277  std::memcpy(&dest[destofs], value, value_length); \
2278  destofs += value_length; \
2279 }
2280 
2281 #define ADD_DATA(flag,src,srcofs,len_of,dest,destofs,destsize,value,value_length) \
2282 { \
2283  AliasPointer u; \
2284  if (destofs + value_length + sizeof(uint16_t) > destsize) \
2285  return *this; \
2286  if (flag) { \
2287  std::memcpy(&dest[destofs], &src[srcofs], len_of); \
2288  srcofs += len_of; \
2289  destofs += len_of; \
2290  } else { \
2291  len_of = 0; \
2292  flag = 1; \
2293  } \
2294  len_of += value_length + sizeof(uint16_t); \
2295  u.uint8_t_ptr = &dest[destofs]; \
2296  *u.uint16_t_ptr = htons(value_length); \
2297  destofs += sizeof(uint16_t); \
2298  std::memcpy(&dest[destofs], value, value_length); \
2299  destofs += value_length; \
2300 }
2301 
2302 inline Bool PfdContentsIE::adnp() const
2303 {
2304  return ie_.adnp;
2305 }
2306 
2307 inline Bool PfdContentsIE::aurl() const
2308 {
2309  return ie_.aurl;
2310 }
2311 
2312 inline Bool PfdContentsIE::afd() const
2313 {
2314  return ie_.afd;
2315 }
2316 
2317 inline Bool PfdContentsIE::dnp() const
2318 {
2319  return ie_.dnp;
2320 }
2321 
2322 inline Bool PfdContentsIE::cp() const
2323 {
2324  return ie_.cp;
2325 }
2326 
2327 inline Bool PfdContentsIE::dn() const
2328 {
2329  return ie_.dn;
2330 }
2331 
2332 inline Bool PfdContentsIE::url() const
2333 {
2334  return ie_.url;
2335 }
2336 
2337 inline Bool PfdContentsIE::fd() const
2338 {
2339  return ie_.fd;
2340 }
2341 
2342 inline uint16_t PfdContentsIE::len_of_flow_desc() const
2343 {
2344  return ie_.len_of_flow_desc;
2345 }
2346 
2347 inline const uint8_t *PfdContentsIE::flow_desc() const
2348 {
2349  return ie_.flow_desc;
2350 }
2351 
2352 inline uint16_t PfdContentsIE::length_of_url() const
2353 {
2354  return ie_.length_of_url;
2355 }
2356 
2357 inline const uint8_t *PfdContentsIE::url2() const
2358 {
2359  return ie_.url2;
2360 }
2361 
2362 inline uint16_t PfdContentsIE::len_of_domain_nm() const
2363 {
2364  return ie_.len_of_domain_nm;
2365 }
2366 
2367 inline const uint8_t *PfdContentsIE::domain_name() const
2368 {
2369  return ie_.domain_name;
2370 }
2371 
2372 inline uint16_t PfdContentsIE::len_of_cstm_pfd_cntnt() const
2373 {
2374  return ie_.len_of_cstm_pfd_cntnt;
2375 }
2376 
2377 inline const uint8_t *PfdContentsIE::cstm_pfd_cntnt() const
2378 {
2379  return ie_.cstm_pfd_cntnt;
2380 }
2381 
2382 inline uint16_t PfdContentsIE::len_of_domain_nm_prot() const
2383 {
2384  return ie_.len_of_domain_nm_prot;
2385 }
2386 
2387 inline const uint8_t *PfdContentsIE::domain_name_prot() const
2388 {
2389  return ie_.domain_name_prot;
2390 }
2391 
2392 inline uint16_t PfdContentsIE::len_of_add_flow_desc() const
2393 {
2394  return ie_.len_of_add_flow_desc;
2395 }
2396 
2397 inline const uint8_t *PfdContentsIE::add_flow_desc() const
2398 {
2399  return ie_.add_flow_desc;
2400 }
2401 
2402 inline uint16_t PfdContentsIE::len_of_add_url() const
2403 {
2404  return ie_.len_of_add_url;
2405 }
2406 
2407 inline const uint8_t *PfdContentsIE::add_url() const
2408 {
2409  return ie_.add_url;
2410 }
2411 
2412 inline uint16_t PfdContentsIE::len_of_add_domain_nm_prot() const
2413 {
2414  return ie_.len_of_add_domain_nm_prot;
2415 }
2416 
2417 inline const uint8_t *PfdContentsIE::add_domain_nm_prot() const
2418 {
2419  return ie_.add_domain_nm_prot;
2420 }
2421 
2422 inline PfdContentsIE &PfdContentsIE::flow_desc(const uint8_t *val, uint16_t len)
2423 {
2424  uint16_t tmpofs = 0;
2425  uint16_t dataofs = 0;
2426  uint8_t tmp[sizeof(ie_.data)];
2427 
2428  REPLACE_DATA(ie_.fd, dataofs, ie_.len_of_flow_desc, tmp, tmpofs, sizeof(ie_.data), val, len);
2429 
2430  if (!move(ie_.url, tmp, tmpofs, ie_.data, dataofs, ie_.length_of_url, sizeof(ie_.data)) ||
2431  !move(ie_.dn, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm, sizeof(ie_.data)) ||
2432  !move(ie_.cp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_cstm_pfd_cntnt, sizeof(ie_.data)) ||
2433  !move(ie_.dnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm_prot, sizeof(ie_.data)) ||
2434  !move(ie_.afd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_flow_desc, sizeof(ie_.data)) ||
2435  !move(ie_.aurl, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_url, sizeof(ie_.data)) ||
2436  !move(ie_.adnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_domain_nm_prot, sizeof(ie_.data)))
2437  return *this;
2438 
2439  std::memcpy(ie_.data, tmp, tmpofs);
2440 
2441  updatePointers();
2442 
2443  return *this;
2444 }
2445 
2446 inline PfdContentsIE &PfdContentsIE::url2(const uint8_t *val, uint16_t len)
2447 {
2448  uint16_t tmpofs = 0;
2449  uint16_t dataofs = 0;
2450  uint8_t tmp[sizeof(ie_.data)];
2451 
2452  if (!move(ie_.fd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_flow_desc, sizeof(ie_.data)))
2453  return *this;
2454 
2455  REPLACE_DATA(ie_.url, dataofs, ie_.length_of_url, tmp, tmpofs, sizeof(ie_.data), val, len);
2456 
2457  if (!move(ie_.dn, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm, sizeof(ie_.data)) ||
2458  !move(ie_.cp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_cstm_pfd_cntnt, sizeof(ie_.data)) ||
2459  !move(ie_.dnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm_prot, sizeof(ie_.data)) ||
2460  !move(ie_.afd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_flow_desc, sizeof(ie_.data)) ||
2461  !move(ie_.aurl, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_url, sizeof(ie_.data)) ||
2462  !move(ie_.adnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_domain_nm_prot, sizeof(ie_.data)))
2463  return *this;
2464 
2465  std::memcpy(ie_.data, tmp, tmpofs);
2466 
2467  updatePointers();
2468 
2469  return *this;
2470 }
2471 
2472 inline PfdContentsIE &PfdContentsIE::domain_name(const uint8_t *val, uint16_t len)
2473 {
2474  uint16_t tmpofs = 0;
2475  uint16_t dataofs = 0;
2476  uint8_t tmp[sizeof(ie_.data)];
2477 
2478  if (!move(ie_.fd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_flow_desc, sizeof(ie_.data)) ||
2479  !move(ie_.url, tmp, tmpofs, ie_.data, dataofs, ie_.length_of_url, sizeof(ie_.data)))
2480  return *this;
2481 
2482  REPLACE_DATA(ie_.dn, dataofs, ie_.len_of_domain_nm, tmp, tmpofs, sizeof(ie_.data), val, len);
2483 
2484  if (!move(ie_.cp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_cstm_pfd_cntnt, sizeof(ie_.data)) ||
2485  !move(ie_.dnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm_prot, sizeof(ie_.data)) ||
2486  !move(ie_.afd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_flow_desc, sizeof(ie_.data)) ||
2487  !move(ie_.aurl, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_url, sizeof(ie_.data)) ||
2488  !move(ie_.adnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_domain_nm_prot, sizeof(ie_.data)))
2489  return *this;
2490 
2491  std::memcpy(ie_.data, tmp, tmpofs);
2492 
2493  updatePointers();
2494 
2495  return *this;
2496 }
2497 
2498 inline PfdContentsIE &PfdContentsIE::cstm_pfd_cntnt(const uint8_t *val, uint16_t len)
2499 {
2500  uint16_t tmpofs = 0;
2501  uint16_t dataofs = 0;
2502  uint8_t tmp[sizeof(ie_.data)];
2503 
2504  if (!move(ie_.fd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_flow_desc, sizeof(ie_.data)) ||
2505  !move(ie_.url, tmp, tmpofs, ie_.data, dataofs, ie_.length_of_url, sizeof(ie_.data)) ||
2506  !move(ie_.dn, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm, sizeof(ie_.data)))
2507  return *this;
2508 
2509  REPLACE_DATA(ie_.cp, dataofs, ie_.len_of_cstm_pfd_cntnt, tmp, tmpofs, sizeof(ie_.data), val, len);
2510 
2511  if (!move(ie_.dnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm_prot, sizeof(ie_.data)) ||
2512  !move(ie_.afd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_flow_desc, sizeof(ie_.data)) ||
2513  !move(ie_.aurl, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_url, sizeof(ie_.data)) ||
2514  !move(ie_.adnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_domain_nm_prot, sizeof(ie_.data)))
2515  return *this;
2516 
2517  std::memcpy(ie_.data, tmp, tmpofs);
2518 
2519  updatePointers();
2520 
2521  return *this;
2522 }
2523 
2524 inline PfdContentsIE &PfdContentsIE::domain_name_prot(const uint8_t *val, uint16_t len)
2525 {
2526  uint16_t tmpofs = 0;
2527  uint16_t dataofs = 0;
2528  uint8_t tmp[sizeof(ie_.data)];
2529 
2530  if (!move(ie_.fd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_flow_desc, sizeof(ie_.data)) ||
2531  !move(ie_.url, tmp, tmpofs, ie_.data, dataofs, ie_.length_of_url, sizeof(ie_.data)) ||
2532  !move(ie_.dn, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm, sizeof(ie_.data)) ||
2533  !move(ie_.cp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_cstm_pfd_cntnt, sizeof(ie_.data)))
2534  return *this;
2535 
2536  REPLACE_DATA(ie_.dnp, dataofs, ie_.len_of_domain_nm_prot, tmp, tmpofs, sizeof(ie_.data), val, len);
2537 
2538  if (!move(ie_.afd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_flow_desc, sizeof(ie_.data)) ||
2539  !move(ie_.aurl, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_url, sizeof(ie_.data)) ||
2540  !move(ie_.adnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_domain_nm_prot, sizeof(ie_.data)))
2541  return *this;
2542 
2543  std::memcpy(ie_.data, tmp, tmpofs);
2544 
2545  updatePointers();
2546 
2547  return *this;
2548 }
2549 
2550 inline PfdContentsIE &PfdContentsIE::add_flow_desc(const uint8_t *val, uint16_t len)
2551 {
2552  uint16_t tmpofs = 0;
2553  uint16_t dataofs = 0;
2554  uint8_t tmp[sizeof(ie_.data)];
2555 
2556  if (!move(ie_.fd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_flow_desc, sizeof(ie_.data)) ||
2557  !move(ie_.url, tmp, tmpofs, ie_.data, dataofs, ie_.length_of_url, sizeof(ie_.data)) ||
2558  !move(ie_.dn, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm, sizeof(ie_.data)) ||
2559  !move(ie_.cp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_cstm_pfd_cntnt, sizeof(ie_.data)) ||
2560  !move(ie_.dnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm_prot, sizeof(ie_.data)))
2561  return *this;
2562 
2563  ADD_DATA(ie_.afd, ie_.data, dataofs, ie_.len_of_add_flow_desc, tmp, tmpofs, sizeof(ie_.data), val, len);
2564 
2565  if (!move(ie_.aurl, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_url, sizeof(ie_.data)) ||
2566  !move(ie_.adnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_domain_nm_prot, sizeof(ie_.data)))
2567  return *this;
2568 
2569  std::memcpy(ie_.data, tmp, tmpofs);
2570 
2571  updatePointers();
2572 
2573  return *this;
2574 }
2575 
2576 inline PfdContentsIE &PfdContentsIE::add_url(const uint8_t *val, uint16_t len)
2577 {
2578  uint16_t tmpofs = 0;
2579  uint16_t dataofs = 0;
2580  uint8_t tmp[sizeof(ie_.data)];
2581 
2582  if (!move(ie_.fd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_flow_desc, sizeof(ie_.data)) ||
2583  !move(ie_.url, tmp, tmpofs, ie_.data, dataofs, ie_.length_of_url, sizeof(ie_.data)) ||
2584  !move(ie_.dn, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm, sizeof(ie_.data)) ||
2585  !move(ie_.cp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_cstm_pfd_cntnt, sizeof(ie_.data)) ||
2586  !move(ie_.dnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm_prot, sizeof(ie_.data)) ||
2587  !move(ie_.afd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_flow_desc, sizeof(ie_.data)))
2588  return *this;
2589 
2590  ADD_DATA(ie_.aurl, ie_.data, dataofs, ie_.len_of_add_url, tmp, tmpofs, sizeof(ie_.data), val, len);
2591 
2592  if (!move(ie_.adnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_domain_nm_prot, sizeof(ie_.data)))
2593  return *this;
2594 
2595  std::memcpy(ie_.data, tmp, tmpofs);
2596 
2597  updatePointers();
2598 
2599  return *this;
2600 }
2601 
2602 inline PfdContentsIE &PfdContentsIE::add_domain_nm_prot(const uint8_t *val, uint16_t len)
2603 {
2604  uint16_t tmpofs = 0;
2605  uint16_t dataofs = 0;
2606  uint8_t tmp[sizeof(ie_.data)];
2607 
2608  if (!move(ie_.fd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_flow_desc, sizeof(ie_.data)) ||
2609  !move(ie_.url, tmp, tmpofs, ie_.data, dataofs, ie_.length_of_url, sizeof(ie_.data)) ||
2610  !move(ie_.dn, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm, sizeof(ie_.data)) ||
2611  !move(ie_.cp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_cstm_pfd_cntnt, sizeof(ie_.data)) ||
2612  !move(ie_.dnp, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_domain_nm_prot, sizeof(ie_.data)) ||
2613  !move(ie_.afd, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_flow_desc, sizeof(ie_.data)) ||
2614  !move(ie_.aurl, tmp, tmpofs, ie_.data, dataofs, ie_.len_of_add_url, sizeof(ie_.data)))
2615  return *this;
2616 
2617  ADD_DATA(ie_.adnp, ie_.data, dataofs, ie_.len_of_add_domain_nm_prot, tmp, tmpofs, sizeof(ie_.data), val, len);
2618 
2619  std::memcpy(ie_.data, tmp, tmpofs);
2620 
2621  updatePointers();
2622 
2623  return *this;
2624 }
2625 
2626 inline pfcp_pfd_contents_ie_t &PfdContentsIE::data()
2627 {
2628  return ie_;
2629 }
2630 
2631 inline PfdContentsIE::PfdContentsIE(pfcp_pfd_contents_ie_t &ie, LengthCalculator *parent)
2632  : IEHeader(ie.header, PFCP_IE_PFD_CONTENTS, parent),
2633  ie_(ie)
2634 {
2635 }
2636 
2637 inline uint16_t PfdContentsIE::calculateLength()
2638 {
2639  return
2640  2 + /* octets 5 & 6 */
2641  (ie_.fd ? ie_.len_of_flow_desc : 0) +
2642  (ie_.url ? ie_.length_of_url : 0) +
2643  (ie_.dn ? ie_.len_of_domain_nm : 0) +
2644  (ie_.cp ? ie_.len_of_cstm_pfd_cntnt : 0) +
2645  (ie_.dnp ? ie_.len_of_domain_nm_prot : 0) +
2646  (ie_.afd ? ie_.len_of_add_flow_desc : 0) +
2647  (ie_.aurl ? ie_.len_of_add_url : 0) +
2648  (ie_.adnp ? ie_.len_of_add_domain_nm_prot : 0)
2649  ;
2650 }
2651 
2652 inline Bool PfdContentsIE::move(Bool flag, uint8_t *dest, uint16_t &destofs, uint8_t *src, uint16_t &srcofs, uint16_t len, uint16_t maxlen)
2653 {
2654  if (flag)
2655  {
2656  if (destofs + len < maxlen)
2657  return False;
2658  std::memcpy(&dest[destofs], &src[srcofs], len);
2659  destofs += len;
2660  srcofs += len;
2661  }
2662  return True;
2663 }
2664 
2665 inline Void PfdContentsIE::updatePointer(Bool flag, uint8_t* &ptr, uint8_t *data, uint16_t &ofs, uint16_t len)
2666 {
2667  if (flag)
2668  {
2669  ptr = &data[ofs];
2670  ofs += len;
2671  }
2672  else
2673  {
2674  ptr = nullptr;
2675  }
2676 }
2677 
2678 inline Void PfdContentsIE::updatePointers()
2679 {
2680  uint16_t dataofs = 0;
2681  updatePointer(ie_.fd, ie_.flow_desc, ie_.data, dataofs, ie_.len_of_flow_desc);
2682  updatePointer(ie_.url, ie_.url2, ie_.data, dataofs, ie_.length_of_url);
2683  updatePointer(ie_.dn, ie_.domain_name, ie_.data, dataofs, ie_.len_of_domain_nm);
2684  updatePointer(ie_.cp, ie_.cstm_pfd_cntnt, ie_.data, dataofs, ie_.len_of_cstm_pfd_cntnt);
2685  updatePointer(ie_.dnp, ie_.domain_name_prot, ie_.data, dataofs, ie_.len_of_domain_nm_prot);
2686  updatePointer(ie_.afd, ie_.add_flow_desc, ie_.data, dataofs, ie_.len_of_add_flow_desc);
2687  updatePointer(ie_.aurl, ie_.add_url, ie_.data, dataofs, ie_.len_of_add_url);
2688  updatePointer(ie_.adnp, ie_.add_domain_nm_prot, ie_.data, dataofs, ie_.len_of_add_domain_nm_prot);
2689 }
2690 
2691 #undef REPLACE_DATA
2692 #undef ADD_DATA
2693 
2695 
2696 inline Bool MeasurementMethodIE::durat() const
2697 {
2698  return ie_.durat;
2699 }
2700 
2701 inline Bool MeasurementMethodIE::volum() const
2702 {
2703  return ie_.volum;
2704 }
2705 
2706 inline Bool MeasurementMethodIE::event() const
2707 {
2708  return ie_.event;
2709 }
2710 
2711 inline MeasurementMethodIE &MeasurementMethodIE::durat(Bool val)
2712 {
2713  ie_.durat = val ? 1 : 0; setLength();
2714  return *this;
2715 }
2716 
2717 inline MeasurementMethodIE &MeasurementMethodIE::volum(Bool val)
2718 {
2719  ie_.volum = val ? 1 : 0; setLength();
2720  return *this;
2721 }
2722 
2723 inline MeasurementMethodIE &MeasurementMethodIE::event(Bool val)
2724 {
2725  ie_.event = val ? 1 : 0; setLength();
2726  return *this;
2727 }
2728 
2729 inline pfcp_meas_mthd_ie_t &MeasurementMethodIE::data()
2730 {
2731  return ie_;
2732 }
2733 
2734 inline MeasurementMethodIE::MeasurementMethodIE(pfcp_meas_mthd_ie_t &ie, LengthCalculator *parent)
2735  : IEHeader(ie.header, PFCP_IE_MEAS_MTHD, parent),
2736  ie_(ie)
2737 {
2738 }
2739 
2740 inline uint16_t MeasurementMethodIE::calculateLength()
2741 {
2742  return sizeof(pfcp_meas_mthd_ie_t) - sizeof(pfcp_ie_header_t);
2743 }
2744 
2746 
2747 inline Bool UsageReportTriggerIE::immer() const
2748 {
2749  return ie_.immer;
2750 }
2751 
2752 inline Bool UsageReportTriggerIE::droth() const
2753 {
2754  return ie_.droth;
2755 }
2756 
2757 inline Bool UsageReportTriggerIE::stopt() const
2758 {
2759  return ie_.stopt;
2760 }
2761 
2762 inline Bool UsageReportTriggerIE::start() const
2763 {
2764  return ie_.start;
2765 }
2766 
2767 inline Bool UsageReportTriggerIE::quhti() const
2768 {
2769  return ie_.quhti;
2770 }
2771 
2772 inline Bool UsageReportTriggerIE::timth() const
2773 {
2774  return ie_.timth;
2775 }
2776 
2777 inline Bool UsageReportTriggerIE::volth() const
2778 {
2779  return ie_.volth;
2780 }
2781 
2782 inline Bool UsageReportTriggerIE::perio() const
2783 {
2784  return ie_.perio;
2785 }
2786 
2787 inline Bool UsageReportTriggerIE::eveth() const
2788 {
2789  return ie_.eveth;
2790 }
2791 
2792 inline Bool UsageReportTriggerIE::macar() const
2793 {
2794  return ie_.macar;
2795 }
2796 
2797 inline Bool UsageReportTriggerIE::envcl() const
2798 {
2799  return ie_.envcl;
2800 }
2801 
2802 inline Bool UsageReportTriggerIE::monit() const
2803 {
2804  return ie_.monit;
2805 }
2806 
2807 inline Bool UsageReportTriggerIE::termr() const
2808 {
2809  return ie_.termr;
2810 }
2811 
2812 inline Bool UsageReportTriggerIE::liusa() const
2813 {
2814  return ie_.liusa;
2815 }
2816 
2817 inline Bool UsageReportTriggerIE::timqu() const
2818 {
2819  return ie_.timqu;
2820 }
2821 
2822 inline Bool UsageReportTriggerIE::volqu() const
2823 {
2824  return ie_.volqu;
2825 }
2826 
2827 inline Bool UsageReportTriggerIE::evequ() const
2828 {
2829  return ie_.evequ;
2830 }
2831 
2832 inline UsageReportTriggerIE &UsageReportTriggerIE::immer(Bool val)
2833 {
2834  ie_.immer = val; setLength();
2835  return *this;
2836 }
2837 
2838 inline UsageReportTriggerIE &UsageReportTriggerIE::droth(Bool val)
2839 {
2840  ie_.droth = val; setLength();
2841  return *this;
2842 }
2843 
2844 inline UsageReportTriggerIE &UsageReportTriggerIE::stopt(Bool val)
2845 {
2846  ie_.stopt = val; setLength();
2847  return *this;
2848 }
2849 
2850 inline UsageReportTriggerIE &UsageReportTriggerIE::start(Bool val)
2851 {
2852  ie_.start = val; setLength();
2853  return *this;
2854 }
2855 
2856 inline UsageReportTriggerIE &UsageReportTriggerIE::quhti(Bool val)
2857 {
2858  ie_.quhti = val; setLength();
2859  return *this;
2860 }
2861 
2862 inline UsageReportTriggerIE &UsageReportTriggerIE::timth(Bool val)
2863 {
2864  ie_.timth = val; setLength();
2865  return *this;
2866 }
2867 
2868 inline UsageReportTriggerIE &UsageReportTriggerIE::volth(Bool val)
2869 {
2870  ie_.volth = val; setLength();
2871  return *this;
2872 }
2873 
2874 inline UsageReportTriggerIE &UsageReportTriggerIE::perio(Bool val)
2875 {
2876  ie_.perio = val; setLength();
2877  return *this;
2878 }
2879 
2880 inline UsageReportTriggerIE &UsageReportTriggerIE::eveth(Bool val)
2881 {
2882  ie_.eveth = val; setLength();
2883  return *this;
2884 }
2885 
2886 inline UsageReportTriggerIE &UsageReportTriggerIE::macar(Bool val)
2887 {
2888  ie_.macar = val; setLength();
2889  return *this;
2890 }
2891 
2892 inline UsageReportTriggerIE &UsageReportTriggerIE::envcl(Bool val)
2893 {
2894  ie_.envcl = val; setLength();
2895  return *this;
2896 }
2897 
2898 inline UsageReportTriggerIE &UsageReportTriggerIE::monit(Bool val)
2899 {
2900  ie_.monit = val; setLength();
2901  return *this;
2902 }
2903 
2904 inline UsageReportTriggerIE &UsageReportTriggerIE::termr(Bool val)
2905 {
2906  ie_.termr = val; setLength();
2907  return *this;
2908 }
2909 
2910 inline UsageReportTriggerIE &UsageReportTriggerIE::liusa(Bool val)
2911 {
2912  ie_.liusa = val; setLength();
2913  return *this;
2914 }
2915 
2916 inline UsageReportTriggerIE &UsageReportTriggerIE::timqu(Bool val)
2917 {
2918  ie_.timqu = val; setLength();
2919  return *this;
2920 }
2921 
2922 inline UsageReportTriggerIE &UsageReportTriggerIE::volqu(Bool val)
2923 {
2924  ie_.volqu = val; setLength();
2925  return *this;
2926 }
2927 
2928 inline UsageReportTriggerIE &UsageReportTriggerIE::evequ(Bool val)
2929 {
2930  ie_.evequ = val; setLength();
2931  return *this;
2932 }
2933 
2934 inline pfcp_usage_rpt_trig_ie_t &UsageReportTriggerIE::data()
2935 {
2936  return ie_;
2937 }
2938 
2939 inline UsageReportTriggerIE::UsageReportTriggerIE(pfcp_usage_rpt_trig_ie_t &ie, LengthCalculator *parent)
2940  : IEHeader(ie.header, PFCP_IE_USAGE_RPT_TRIG, parent),
2941  ie_(ie)
2942 {
2943 }
2944 
2945 inline uint16_t UsageReportTriggerIE::calculateLength()
2946 {
2947  return sizeof(pfcp_usage_rpt_trig_ie_t) - sizeof(pfcp_ie_header_t);
2948 }
2949 
2951 
2952 inline uint32_t MeasurementPeriodIE::meas_period() const
2953 {
2954  return ie_.meas_period;
2955 }
2956 
2957 inline MeasurementPeriodIE &MeasurementPeriodIE::meas_period(uint32_t val)
2958 {
2959  ie_.meas_period = val;
2960  setLength();
2961  return *this;
2962 }
2963 
2964 inline pfcp_meas_period_ie_t &MeasurementPeriodIE::data()
2965 {
2966  return ie_;
2967 }
2968 
2969 inline MeasurementPeriodIE::MeasurementPeriodIE(pfcp_meas_period_ie_t &ie, LengthCalculator *parent)
2970  : IEHeader(ie.header, PFCP_IE_MEAS_PERIOD, parent),
2971  ie_(ie)
2972 {
2973 }
2974 
2975 inline uint16_t MeasurementPeriodIE::calculateLength()
2976 {
2977  return sizeof(pfcp_meas_period_ie_t) - sizeof(pfcp_ie_header_t);
2978 }
2979 
2981 
2983 {
2984  return static_cast<FqCsidNodeIdTypeEnum>(ie_.fqcsid_node_id_type);
2985 }
2986 
2987 inline uint8_t FqCsidIE::number_of_csids() const
2988 {
2989  return ie_.number_of_csids;
2990 }
2991 
2992 inline const in_addr &FqCsidIE::ipv4_node_address() const
2993 {
2994  AliasPointer u;
2995  u.uint8_t_ptr = ie_.node_address;
2996  return *u.in_addr_ptr;
2997 }
2998 
2999 inline const in6_addr &FqCsidIE::ipv6_node_address() const
3000 {
3001  AliasPointer u;
3002  u.uint8_t_ptr = ie_.node_address;
3003  return *u.in6_addr_ptr;
3004 }
3005 
3006 inline uint32_t FqCsidIE::mcc_mnc_id_node_address() const
3007 {
3008  AliasPointer u;
3009  u.uint8_t_ptr = ie_.node_address;
3010  return ntohl(*u.uint32_t_ptr);
3011 }
3012 
3013 inline uint16_t FqCsidIE::pdn_conn_set_ident(uint8_t idx) const
3014 {
3015  return ie_.pdn_conn_set_ident[idx];
3016 }
3017 
3018 inline FqCsidIE &FqCsidIE::node_address(const ESocket::Address &val)
3019 {
3020  if (val.getFamily() == ESocket::Family::INET)
3021  return node_address(val.getInet().sin_addr);
3022  else if (val.getFamily() == ESocket::Family::INET6)
3023  return node_address(val.getInet6().sin6_addr);
3024  return *this;
3025 }
3026 
3027 inline FqCsidIE &FqCsidIE::node_address(const EIpAddress &val)
3028 {
3029  if (val.family() == AF_INET)
3030  return node_address(val.ipv4Address());
3031  else if (val.family() == AF_INET6)
3032  return node_address(val.ipv6Address());
3033  return *this;
3034 }
3035 
3036 inline FqCsidIE &FqCsidIE::node_address(const in_addr &val)
3037 {
3038  AliasPointer u;
3039  ie_.fqcsid_node_id_type = static_cast<uint8_t>(FqCsidNodeIdTypeEnum::ipv4);
3040  u.uint8_t_ptr = ie_.node_address;
3041  u.in_addr_ptr->s_addr = val.s_addr;
3042  setLength();
3043  return *this;
3044 }
3045 
3046 inline FqCsidIE &FqCsidIE::node_address(const in6_addr &val)
3047 {
3048  ie_.fqcsid_node_id_type = static_cast<uint8_t>(FqCsidNodeIdTypeEnum::ipv6);
3049  std::memcpy(ie_.node_address, val.s6_addr, sizeof(ie_.node_address));
3050  setLength();
3051  return *this;
3052 }
3053 
3054 inline FqCsidIE &FqCsidIE::node_address(uint32_t val)
3055 {
3056  AliasPointer u;
3057  ie_.fqcsid_node_id_type = static_cast<uint8_t>(FqCsidNodeIdTypeEnum::mcc_mnc_id);
3058  u.uint8_t_ptr = ie_.node_address;
3059  *u.uint32_t_ptr = htonl(val);
3060  setLength();
3061  return *this;
3062 }
3063 
3064 inline uint16_t &FqCsidIE::pdn_conn_set_ident(uint8_t idx)
3065 {
3066  setLength();
3067  return ie_.pdn_conn_set_ident[idx];
3068 }
3069 
3071 {
3072  return (ie_.number_of_csids < PDN_CONN_SET_IDENT_LEN) ?
3073  ie_.number_of_csids++ : -1;
3074 }
3075 
3076 inline pfcp_fqcsid_ie_t &FqCsidIE::data()
3077 {
3078  return ie_;
3079 }
3080 
3081 inline FqCsidIE::FqCsidIE(pfcp_fqcsid_ie_t &ie, LengthCalculator *parent)
3082  : IEHeader(ie.header, PFCP_IE_FQCSID, parent),
3083  ie_(ie)
3084 {
3085 }
3086 
3087 inline uint16_t FqCsidIE::calculateLength()
3088 {
3089  return
3090  1 + /* octet 5 */
3091  (ie_.fqcsid_node_id_type == 1 ? IPV6_ADDRESS_LEN : sizeof(uint32_t)) +
3092  (ie_.number_of_csids * sizeof(uint16_t))
3093  ;
3094 }
3095 
3097 
3098 inline Bool VolumeMeasurementIE::tovol() const
3099 {
3100  return ie_.tovol;
3101 }
3102 
3103 inline Bool VolumeMeasurementIE::ulvol() const
3104 {
3105  return ie_.ulvol;
3106 }
3107 
3108 inline Bool VolumeMeasurementIE::dlvol() const
3109 {
3110  return ie_.dlvol;
3111 }
3112 
3113 inline uint64_t VolumeMeasurementIE::total_volume() const
3114 {
3115  return ie_.total_volume;
3116 }
3117 
3118 inline uint64_t VolumeMeasurementIE::uplink_volume() const
3119 {
3120  return ie_.uplink_volume;
3121 }
3122 
3123 inline uint64_t VolumeMeasurementIE::downlink_volume() const
3124 {
3125  return ie_.downlink_volume;
3126 }
3127 
3128 inline VolumeMeasurementIE &VolumeMeasurementIE::total_volume(uint64_t val)
3129 {
3130  ie_.tovol = 1;
3131  ie_.total_volume = val;
3132  setLength();
3133  return *this;
3134 }
3135 
3136 inline VolumeMeasurementIE &VolumeMeasurementIE::uplink_volume(uint64_t val)
3137 {
3138  ie_.ulvol = 1;
3139  ie_.uplink_volume = val;
3140  setLength();
3141  return *this;
3142 }
3143 
3144 inline VolumeMeasurementIE &VolumeMeasurementIE::downlink_volume(uint64_t val)
3145 {
3146  ie_.dlvol = 1;
3147  ie_.downlink_volume = val;
3148  setLength();
3149  return *this;
3150 }
3151 
3152 inline pfcp_vol_meas_ie_t &VolumeMeasurementIE::data()
3153 {
3154  return ie_;
3155 }
3156 
3157 inline VolumeMeasurementIE::VolumeMeasurementIE(pfcp_vol_meas_ie_t &ie, LengthCalculator *parent)
3158  : IEHeader(ie.header, PFCP_IE_VOL_MEAS, parent),
3159  ie_(ie)
3160 {
3161 }
3162 
3163 inline uint16_t VolumeMeasurementIE::calculateLength()
3164 {
3165  return
3166  1 + /* octet 5 */
3167  (ie_.tovol ? sizeof(ie_.total_volume) : 0) +
3168  (ie_.ulvol ? sizeof(ie_.uplink_volume) : 0) +
3169  (ie_.dlvol ? sizeof(ie_.downlink_volume) : 0)
3170  ;
3171 }
3172 
3174 
3175 inline uint32_t DurationMeasurementIE::duration_value() const
3176 {
3177  return ie_.duration_value;
3178 }
3179 
3180 inline DurationMeasurementIE &DurationMeasurementIE::duration_value(uint32_t val)
3181 {
3182  ie_.duration_value = val;
3183  setLength();
3184  return *this;
3185 }
3186 
3187 inline pfcp_dur_meas_ie_t &DurationMeasurementIE::data()
3188 {
3189  return ie_;
3190 }
3191 
3192 inline DurationMeasurementIE::DurationMeasurementIE(pfcp_dur_meas_ie_t &ie, LengthCalculator *parent)
3193  : IEHeader(ie.header, PFCP_IE_DUR_MEAS, parent),
3194  ie_(ie)
3195 {
3196 }
3197 
3199 {
3200  return sizeof(pfcp_dur_meas_ie_t) - sizeof(pfcp_ie_header_t);
3201 }
3202 
3204 
3206 {
3207  ETime t;
3208  t.setNTPTime(ie_.time_of_frst_pckt);
3209  return t;
3210 }
3211 
3212 inline TimeOfFirstPacketIE &TimeOfFirstPacketIE::time_of_frst_pckt(ETime &val)
3213 {
3214  ie_.time_of_frst_pckt = val.getNTPTimeSeconds();
3215  setLength();
3216  return *this;
3217 }
3218 
3219 inline TimeOfFirstPacketIE &TimeOfFirstPacketIE::time_of_frst_pckt(uint32_t val)
3220 {
3221  ie_.time_of_frst_pckt = val;
3222  setLength();
3223  return *this;
3224 }
3225 
3226 inline pfcp_time_of_frst_pckt_ie_t &TimeOfFirstPacketIE::data()
3227 {
3228  return ie_;
3229 }
3230 
3231 inline TimeOfFirstPacketIE::TimeOfFirstPacketIE(pfcp_time_of_frst_pckt_ie_t &ie, LengthCalculator *parent)
3232  : IEHeader(ie.header, PFCP_IE_TIME_OF_FRST_PCKT, parent),
3233  ie_(ie)
3234 {
3235 }
3236 
3237 inline uint16_t TimeOfFirstPacketIE::calculateLength()
3238 {
3239  return sizeof(pfcp_time_of_frst_pckt_ie_t) - sizeof(pfcp_ie_header_t);
3240 }
3241 
3243 
3245 {
3246  ETime t;
3247  t.setNTPTime(ie_.time_of_lst_pckt);
3248  return t;
3249 }
3250 
3251 inline TimeOfLastPacketIE &TimeOfLastPacketIE::time_of_frst_pckt(ETime &val)
3252 {
3253  ie_.time_of_lst_pckt = val.getNTPTimeSeconds();
3254  setLength();
3255  return *this;
3256 }
3257 
3258 inline TimeOfLastPacketIE &TimeOfLastPacketIE::time_of_frst_pckt(uint32_t val)
3259 {
3260  ie_.time_of_lst_pckt = val;
3261  setLength();
3262  return *this;
3263 }
3264 
3265 inline pfcp_time_of_lst_pckt_ie_t &TimeOfLastPacketIE::data()
3266 {
3267  return ie_;
3268 }
3269 
3270 inline TimeOfLastPacketIE::TimeOfLastPacketIE(pfcp_time_of_lst_pckt_ie_t &ie, LengthCalculator *parent)
3271  : IEHeader(ie.header, PFCP_IE_TIME_OF_LST_PCKT, parent),
3272  ie_(ie)
3273 {
3274 }
3275 
3276 inline uint16_t TimeOfLastPacketIE::calculateLength()
3277 {
3278  return sizeof(pfcp_time_of_lst_pckt_ie_t) - sizeof(pfcp_ie_header_t);
3279 }
3280 
3282 
3283 inline uint32_t QuotaHoldingTimeIE::quota_hldng_time_val() const
3284 {
3285  return ie_.quota_hldng_time_val;
3286 }
3287 
3288 inline QuotaHoldingTimeIE &QuotaHoldingTimeIE::quota_hldng_time_val(uint32_t val)
3289 {
3290  ie_.quota_hldng_time_val = val;
3291  setLength();
3292  return *this;
3293 }
3294 
3295 inline pfcp_quota_hldng_time_ie_t &QuotaHoldingTimeIE::data()
3296 {
3297  return ie_;
3298 }
3299 
3300 inline QuotaHoldingTimeIE::QuotaHoldingTimeIE(pfcp_quota_hldng_time_ie_t &ie, LengthCalculator *parent)
3301  : IEHeader(ie.header, PFCP_IE_QUOTA_HLDNG_TIME, parent),
3302  ie_(ie)
3303 {
3304 }
3305 
3306 inline uint16_t QuotaHoldingTimeIE::calculateLength()
3307 {
3308  return sizeof(pfcp_quota_hldng_time_ie_t) - sizeof(pfcp_ie_header_t);
3309 }
3310 
3312 
3313 inline Bool DroppedDlTrafficThresholdIE::dlpa() const
3314 {
3315  return ie_.dlpa;
3316 }
3317 
3318 inline Bool DroppedDlTrafficThresholdIE::dlby() const
3319 {
3320  return ie_.dlby;
3321 }
3322 
3323 inline DroppedDlTrafficThresholdIE &DroppedDlTrafficThresholdIE::dnlnk_pckts(uint64_t val)
3324 {
3325  ie_.dlpa = 1;
3326  ie_.dnlnk_pckts = val;
3327  setLength();
3328  return *this;
3329 }
3330 
3331 inline DroppedDlTrafficThresholdIE &DroppedDlTrafficThresholdIE::nbr_of_bytes_of_dnlnk_data(uint64_t val)
3332 {
3333  ie_.dlby = 1;
3334  ie_.nbr_of_bytes_of_dnlnk_data = val;
3335  setLength();
3336  return *this;
3337 }
3338 
3339 inline pfcp_drpd_dl_traffic_thresh_ie_t &DroppedDlTrafficThresholdIE::data()
3340 {
3341  return ie_;
3342 }
3343 
3344 inline DroppedDlTrafficThresholdIE::DroppedDlTrafficThresholdIE(pfcp_drpd_dl_traffic_thresh_ie_t &ie, LengthCalculator *parent)
3345  : IEHeader(ie.header, PFCP_IE_DRPD_DL_TRAFFIC_THRESH, parent),
3346  ie_(ie)
3347 {
3348 }
3349 
3351 {
3352  return
3353  1 + /* octet 5 */
3354  (ie_.dlpa ? sizeof(ie_.dnlnk_pckts) : 0) +
3355  (ie_.dlby ? sizeof(ie_.nbr_of_bytes_of_dnlnk_data) : 0)
3356  ;
3357 }
3358 
3360 
3361 inline Bool VolumeQuotaIE::tovol() const
3362 {
3363  return ie_.tovol;
3364 }
3365 
3366 inline Bool VolumeQuotaIE::ulvol() const
3367 {
3368  return ie_.ulvol;
3369 }
3370 
3371 inline Bool VolumeQuotaIE::dlvol() const
3372 {
3373  return ie_.dlvol;
3374 }
3375 
3376 inline VolumeQuotaIE &VolumeQuotaIE::total_volume(uint64_t val)
3377 {
3378  ie_.tovol = 1;
3379  ie_.total_volume = val;
3380  setLength();
3381  return *this;
3382 }
3383 
3384 inline VolumeQuotaIE &VolumeQuotaIE::uplink_volume(uint64_t val)
3385 {
3386  ie_.ulvol = 1;
3387  ie_.uplink_volume = val;
3388  setLength();
3389  return *this;
3390 }
3391 
3392 inline VolumeQuotaIE &VolumeQuotaIE::downlink_volume(uint64_t val)
3393 {
3394  ie_.dlvol = 1;
3395  ie_.downlink_volume = val;
3396  setLength();
3397  return *this;
3398 }
3399 
3400 inline pfcp_volume_quota_ie_t &VolumeQuotaIE::data()
3401 {
3402  return ie_;
3403 }
3404 
3405 inline VolumeQuotaIE::VolumeQuotaIE(pfcp_volume_quota_ie_t &ie, LengthCalculator *parent)
3406  : IEHeader(ie.header, PFCP_IE_VOLUME_QUOTA, parent),
3407  ie_(ie)
3408 {
3409 }
3410 
3411 inline uint16_t VolumeQuotaIE::calculateLength()
3412 {
3413  return
3414  1 + /* octet 5 */
3415  (ie_.tovol ? sizeof(ie_.total_volume) : 0) +
3416  (ie_.ulvol ? sizeof(ie_.uplink_volume) : 0) +
3417  (ie_.dlvol ? sizeof(ie_.downlink_volume) : 0)
3418  ;
3419 }
3420 
3422 
3423 inline uint32_t TimeQuotaIE::time_quota_val() const
3424 {
3425  return ie_.time_quota_val;
3426 }
3427 
3428 inline TimeQuotaIE &TimeQuotaIE::time_quota_val(uint32_t val)
3429 {
3430  ie_.time_quota_val = val;
3431  setLength();
3432  return *this;
3433 }
3434 
3435 inline pfcp_time_quota_ie_t &TimeQuotaIE::data()
3436 {
3437  return ie_;
3438 }
3439 
3440 inline TimeQuotaIE::TimeQuotaIE(pfcp_time_quota_ie_t &ie, LengthCalculator *parent)
3441  : IEHeader(ie.header, PFCP_IE_TIME_QUOTA, parent),
3442  ie_(ie)
3443 {
3444 }
3445 
3446 inline uint16_t TimeQuotaIE::calculateLength()
3447 {
3448  return sizeof(pfcp_time_quota_ie_t) - sizeof(pfcp_ie_header_t);
3449 }
3450 
3452 
3453 inline ETime StartTimeIE::start_time() const
3454 {
3455  ETime t;
3456  t.setNTPTime(ie_.start_time);
3457  return t;
3458 }
3459 
3460 inline StartTimeIE &StartTimeIE::start_time(const ETime &val)
3461 {
3462  ie_.start_time = val.getNTPTimeSeconds();
3463  setLength();
3464  return *this;
3465 }
3466 
3467 inline StartTimeIE &StartTimeIE::start_time(uint32_t val)
3468 {
3469  ie_.start_time = val;
3470  setLength();
3471  return *this;
3472 }
3473 
3474 inline pfcp_start_time_ie_t &StartTimeIE::data()
3475 {
3476  return ie_;
3477 }
3478 
3479 inline StartTimeIE::StartTimeIE(pfcp_start_time_ie_t &ie, LengthCalculator *parent)
3480  : IEHeader(ie.header, PFCP_IE_START_TIME, parent),
3481  ie_(ie)
3482 {
3483 }
3484 
3485 inline uint16_t StartTimeIE::calculateLength()
3486 {
3487  return sizeof(pfcp_start_time_ie_t) - sizeof(pfcp_ie_header_t);
3488 }
3489 
3491 
3492 inline ETime EndTimeIE::end_time() const
3493 {
3494  ETime t;
3495  t.setNTPTime(ie_.end_time);
3496  return t;
3497 }
3498 
3499 inline EndTimeIE &EndTimeIE::end_time(const ETime &val)
3500 {
3501  ie_.end_time = val.getNTPTimeSeconds();
3502  setLength();
3503  return *this;
3504 }
3505 
3506 inline EndTimeIE &EndTimeIE::end_time(uint32_t val)
3507 {
3508  ie_.end_time = val;
3509  setLength();
3510  return *this;
3511 }
3512 
3513 inline pfcp_end_time_ie_t &EndTimeIE::data()
3514 {
3515  return ie_;
3516 }
3517 
3518 inline EndTimeIE::EndTimeIE(pfcp_end_time_ie_t &ie, LengthCalculator *parent)
3519  : IEHeader(ie.header, PFCP_IE_END_TIME, parent),
3520  ie_(ie)
3521 {
3522 }
3523 
3524 inline uint16_t EndTimeIE::calculateLength()
3525 {
3526  return sizeof(pfcp_end_time_ie_t) - sizeof(pfcp_ie_header_t);
3527 }
3528 
3530 
3531 inline uint32_t UrrIdIE::urr_id_value() const
3532 {
3533  return ie_.urr_id_value;
3534 }
3535 
3536 inline UrrIdIE &UrrIdIE::urr_id_value(uint32_t val)
3537 {
3538  ie_.urr_id_value = val;
3539  setLength();
3540  return *this;
3541 }
3542 
3543 inline pfcp_urr_id_ie_t &UrrIdIE::data()
3544 {
3545  return ie_;
3546 }
3547 
3548 inline UrrIdIE::UrrIdIE(pfcp_urr_id_ie_t &ie, LengthCalculator *parent)
3549  : IEHeader(ie.header, PFCP_IE_URR_ID, parent),
3550  ie_(ie)
3551 {
3552 }
3553 
3554 inline uint16_t UrrIdIE::calculateLength()
3555 {
3556  return sizeof(pfcp_urr_id_ie_t) - sizeof(pfcp_ie_header_t);
3557 }
3558 
3560 
3561 inline uint32_t LinkedUrrIdIE::lnkd_urr_id_val() const
3562 {
3563  return ie_.lnkd_urr_id_val;
3564 }
3565 
3566 inline LinkedUrrIdIE &LinkedUrrIdIE::lnkd_urr_id_val(uint32_t val)
3567 {
3568  ie_.lnkd_urr_id_val = val;
3569  setLength();
3570  return *this;
3571 }
3572 
3573 inline pfcp_linked_urr_id_ie_t &LinkedUrrIdIE::data()
3574 {
3575  return ie_;
3576 }
3577 
3578 inline LinkedUrrIdIE::LinkedUrrIdIE(pfcp_linked_urr_id_ie_t &ie, LengthCalculator *parent)
3579  : IEHeader(ie.header, PFCP_IE_LINKED_URR_ID, parent),
3580  ie_(ie)
3581 {
3582 }
3583 
3584 inline uint16_t LinkedUrrIdIE::calculateLength()
3585 {
3586  return sizeof(pfcp_linked_urr_id_ie_t) - sizeof(pfcp_ie_header_t);
3587 }
3588 
3590 
3591 inline Bool OuterHeaderCreationIE::gtpu_udp_ipv4() const
3592 {
3593  return ie_.outer_hdr_creation_desc.gtpu_udp_ipv4;
3594 }
3595 
3596 inline Bool OuterHeaderCreationIE::gtpu_udp_ipv6() const
3597 {
3598  return ie_.outer_hdr_creation_desc.gtpu_udp_ipv6;
3599 }
3600 
3601 inline Bool OuterHeaderCreationIE::udp_ipv4() const
3602 {
3603  return ie_.outer_hdr_creation_desc.udp_ipv4;
3604 }
3605 
3606 inline Bool OuterHeaderCreationIE::udp_ipv6() const
3607 {
3608  return ie_.outer_hdr_creation_desc.udp_ipv6;
3609 }
3610 
3611 inline Bool OuterHeaderCreationIE::ipv4() const
3612 {
3613  return ie_.outer_hdr_creation_desc.ipv4;
3614 }
3615 
3616 inline Bool OuterHeaderCreationIE::ipv6() const
3617 {
3618  return ie_.outer_hdr_creation_desc.ipv6;
3619 }
3620 
3621 inline Bool OuterHeaderCreationIE::ctag() const
3622 {
3623  return ie_.outer_hdr_creation_desc.ctag;
3624 }
3625 
3626 inline Bool OuterHeaderCreationIE::stag() const
3627 {
3628  return ie_.outer_hdr_creation_desc.stag;
3629 }
3630 
3631 inline uint32_t OuterHeaderCreationIE::teid() const
3632 {
3633  return ie_.teid;
3634 }
3635 
3636 inline const in_addr &OuterHeaderCreationIE::ipv4_address() const
3637 {
3638  AliasPointer u;
3639  u.uint32_t_ptr = &ie_.ipv4_address;
3640  return *u.in_addr_ptr;
3641 }
3642 
3643 inline const in6_addr &OuterHeaderCreationIE::ipv6_address() const
3644 {
3645  AliasPointer u;
3646  u.uint8_t_ptr = ie_.ipv6_address;
3647  return *u.in6_addr_ptr;
3648 }
3649 
3650 inline uint32_t OuterHeaderCreationIE::port_number() const
3651 {
3652  return ie_.port_number;
3653 }
3654 
3655 inline const uint8_t *OuterHeaderCreationIE::ctag_value() const
3656 {
3657  return ie_.ctag;
3658 }
3659 
3660 inline const uint8_t *OuterHeaderCreationIE::stag_value() const
3661 {
3662  return ie_.stag;
3663 }
3664 
3665 inline OuterHeaderCreationIE &OuterHeaderCreationIE::ip_address_teid(const ESocket::Address &addr, uint32_t teid)
3666 {
3667  if (addr.getFamily() == ESocket::Family::INET)
3668  ip_address_teid(addr.getInet().sin_addr, teid);
3669  else if (addr.getFamily() == ESocket::Family::INET6)
3670  ip_address_teid(addr.getInet6().sin6_addr, teid);
3671  return *this;
3672 }
3673 
3674 inline OuterHeaderCreationIE &OuterHeaderCreationIE::ip_address_teid(const EIpAddress &addr, uint32_t teid)
3675 {
3676  if (addr.family() == AF_INET)
3677  ip_address_teid(addr.ipv4Address(), teid);
3678  else if (addr.family() == AF_INET6)
3679  ip_address_teid(addr.ipv6Address(), teid);
3680  return *this;
3681 }
3682 
3683 inline OuterHeaderCreationIE &OuterHeaderCreationIE::ip_address_teid(const in_addr &addr, uint32_t teid)
3684 {
3685  ie_.outer_hdr_creation_desc.gtpu_udp_ipv4 = 1;
3686  ie_.outer_hdr_creation_desc.udp_ipv4 = 0;
3687  ie_.outer_hdr_creation_desc.udp_ipv6 = 0;
3688  ie_.outer_hdr_creation_desc.ipv4 = 0;
3689  ie_.outer_hdr_creation_desc.ipv6 = 0;
3690  ie_.outer_hdr_creation_desc.ctag = 0;
3691  ie_.outer_hdr_creation_desc.stag = 0;
3692  ie_.teid = teid;
3693  ie_.ipv4_address = addr.s_addr;
3694  setLength();
3695  return *this;
3696 }
3697 
3698 inline OuterHeaderCreationIE &OuterHeaderCreationIE::ip_address_teid(const in6_addr &addr, uint32_t teid)
3699 {
3700  ie_.outer_hdr_creation_desc.gtpu_udp_ipv6 = 1;
3701  ie_.outer_hdr_creation_desc.udp_ipv4 = 0;
3702  ie_.outer_hdr_creation_desc.udp_ipv6 = 0;
3703  ie_.outer_hdr_creation_desc.ipv4 = 0;
3704  ie_.outer_hdr_creation_desc.ipv6 = 0;
3705  ie_.outer_hdr_creation_desc.ctag = 0;
3706  ie_.outer_hdr_creation_desc.stag = 0;
3707  ie_.teid = teid;
3708  std::memcpy(ie_.ipv6_address, addr.s6_addr, sizeof(ie_.ipv6_address));
3709  setLength();
3710  return *this;
3711 }
3712 
3713 inline OuterHeaderCreationIE &OuterHeaderCreationIE::ip_address_port(const ESocket::Address &addr, uint16_t port, InternetProtocolEnum protocol)
3714 {
3715  if (addr.getFamily() == ESocket::Family::INET)
3716  ip_address_port(addr.getInet().sin_addr, port, protocol);
3717  else if (addr.getFamily() == ESocket::Family::INET6)
3718  ip_address_port(addr.getInet6().sin6_addr, port, protocol);
3719  return *this;
3720 }
3721 
3722 inline OuterHeaderCreationIE &OuterHeaderCreationIE::ip_address_port(const EIpAddress &addr, uint16_t port, InternetProtocolEnum protocol)
3723 {
3724  if (addr.family() == AF_INET)
3725  ip_address_port(addr.ipv4Address(), port, protocol);
3726  else if (addr.family() == AF_INET6)
3727  ip_address_port(addr.ipv6Address(), port, protocol);
3728  return *this;
3729 }
3730 
3731 inline OuterHeaderCreationIE &OuterHeaderCreationIE::ip_address_port(const in_addr &addr, uint16_t port, InternetProtocolEnum protocol)
3732 {
3733  if (protocol == InternetProtocolEnum::TCP)
3734  {
3735  ie_.outer_hdr_creation_desc.udp_ipv4 = 0;
3736  ie_.outer_hdr_creation_desc.udp_ipv6 = 0;
3737  ie_.outer_hdr_creation_desc.ipv4 = 1;
3738  ie_.outer_hdr_creation_desc.ipv6 = 0;
3739  }
3740  else if (protocol == InternetProtocolEnum::UDP)
3741  {
3742  ie_.outer_hdr_creation_desc.udp_ipv4 = 1;
3743  ie_.outer_hdr_creation_desc.udp_ipv6 = 0;
3744  ie_.outer_hdr_creation_desc.ipv4 = 0;
3745  ie_.outer_hdr_creation_desc.ipv6 = 0;
3746  }
3747  else
3748  {
3749  return *this;
3750  }
3751  ie_.port_number = port;
3752  ie_.ipv4_address = addr.s_addr;
3753  setLength();
3754  return *this;
3755 }
3756 
3757 inline OuterHeaderCreationIE &OuterHeaderCreationIE::ip_address_port(const in6_addr &addr, uint16_t port, InternetProtocolEnum protocol)
3758 {
3759  if (protocol == InternetProtocolEnum::TCP)
3760  {
3761  ie_.outer_hdr_creation_desc.udp_ipv4 = 0;
3762  ie_.outer_hdr_creation_desc.udp_ipv6 = 0;
3763  ie_.outer_hdr_creation_desc.ipv4 = 0;
3764  ie_.outer_hdr_creation_desc.ipv6 = 1;
3765  }
3766  else if (protocol == InternetProtocolEnum::UDP)
3767  {
3768  ie_.outer_hdr_creation_desc.udp_ipv4 = 0;
3769  ie_.outer_hdr_creation_desc.udp_ipv6 = 1;
3770  ie_.outer_hdr_creation_desc.ipv4 = 0;
3771  ie_.outer_hdr_creation_desc.ipv6 = 0;
3772  }
3773  else
3774  {
3775  return *this;
3776  }
3777  ie_.port_number = port;
3778  std::memcpy(ie_.ipv6_address, addr.s6_addr, sizeof(ie_.ipv6_address));
3779  setLength();
3780  return *this;
3781 }
3782 
3783 inline OuterHeaderCreationIE &OuterHeaderCreationIE::ctag(const uint8_t *val)
3784 {
3785  ie_.outer_hdr_creation_desc.ctag = 1;
3786  std::memcpy(ie_.ctag, val, sizeof(ie_.ctag));
3787  setLength();
3788  return *this;
3789 }
3790 
3791 inline OuterHeaderCreationIE &OuterHeaderCreationIE::stag(const uint8_t *val)
3792 {
3793  ie_.outer_hdr_creation_desc.stag = 1;
3794  std::memcpy(ie_.stag, val, sizeof(ie_.stag));
3795  setLength();
3796  return *this;
3797 }
3798 
3799 inline pfcp_outer_hdr_creation_ie_t &OuterHeaderCreationIE::data()
3800 {
3801  return ie_;
3802 }
3803 
3804 inline OuterHeaderCreationIE::OuterHeaderCreationIE(pfcp_outer_hdr_creation_ie_t &ie, LengthCalculator *parent)
3805  : IEHeader(ie.header, PFCP_IE_OUTER_HDR_CREATION, parent),
3806  ie_(ie)
3807 {
3808 }
3809 
3811 {
3812  return
3813  sizeof(ie_.outer_hdr_creation_desc) +
3814  (ie_.outer_hdr_creation_desc.gtpu_udp_ipv4 || ie_.outer_hdr_creation_desc.gtpu_udp_ipv6 ? sizeof(ie_.teid) : 0) +
3815  (ie_.outer_hdr_creation_desc.gtpu_udp_ipv4 ? sizeof(ie_.ipv4_address) : 0) +
3816  (ie_.outer_hdr_creation_desc.gtpu_udp_ipv6 ? sizeof(ie_.ipv6_address) : 0) +
3817  (ie_.outer_hdr_creation_desc.udp_ipv4 ? sizeof(ie_.ipv4_address) : 0) +
3818  (ie_.outer_hdr_creation_desc.udp_ipv6 ? sizeof(ie_.ipv6_address) : 0) +
3819  (ie_.outer_hdr_creation_desc.ipv4 ? sizeof(ie_.ipv4_address) : 0) +
3820  (ie_.outer_hdr_creation_desc.ipv6 ? sizeof(ie_.ipv6_address) : 0) +
3821  (ie_.outer_hdr_creation_desc.udp_ipv4 || ie_.outer_hdr_creation_desc.udp_ipv6 ||
3822  ie_.outer_hdr_creation_desc.ipv4 || ie_.outer_hdr_creation_desc.ipv6 ? sizeof(ie_.port_number) : 0) +
3823  (ie_.outer_hdr_creation_desc.ctag ? sizeof(ie_.ctag) : 0) +
3824  (ie_.outer_hdr_creation_desc.stag ? sizeof(ie_.stag) : 0)
3825  ;
3826 }
3827 
3829 
3830 inline uint8_t BarIdIE::bar_id_value() const
3831 {
3832  return ie_.bar_id_value;
3833 }
3834 
3835 inline BarIdIE &BarIdIE::bar_id_value(uint8_t val)
3836 {
3837  ie_.bar_id_value = val;
3838  setLength();
3839  return *this;
3840 }
3841 
3842 inline pfcp_bar_id_ie_t &BarIdIE::data()
3843 {
3844  return ie_;
3845 }
3846 
3847 inline BarIdIE::BarIdIE(pfcp_bar_id_ie_t &ie, LengthCalculator *parent)
3848  : IEHeader(ie.header, PFCP_IE_BAR_ID, parent),
3849  ie_(ie)
3850 {
3851 }
3852 
3853 inline uint16_t BarIdIE::calculateLength()
3854 {
3855  return sizeof(pfcp_bar_id_ie_t) - sizeof(pfcp_ie_header_t);
3856 }
3857 
3859 
3860 inline Bool CpFunctionFeaturesIE::load() const
3861 {
3862  return ie_.sup_feat.load;
3863 }
3864 
3865 inline Bool CpFunctionFeaturesIE::ovrl() const
3866 {
3867  return ie_.sup_feat.ovrl;
3868 }
3869 
3870 inline CpFunctionFeaturesIE &CpFunctionFeaturesIE::load(Bool val)
3871 {
3872  ie_.sup_feat.load = val ? 1 : 0; setLength();
3873  return *this;
3874 }
3875 
3876 inline CpFunctionFeaturesIE &CpFunctionFeaturesIE::ovrl(Bool val)
3877 {
3878  ie_.sup_feat.ovrl = val ? 1 : 0; setLength();
3879  return *this;
3880 }
3881 
3882 inline pfcp_cp_func_feat_ie_t &CpFunctionFeaturesIE::data()
3883 {
3884  return ie_;
3885 }
3886 
3887 inline CpFunctionFeaturesIE::CpFunctionFeaturesIE(pfcp_cp_func_feat_ie_t &ie, LengthCalculator *parent)
3888  : IEHeader(ie.header, PFCP_IE_CP_FUNC_FEAT, parent),
3889  ie_(ie)
3890 {
3891 }
3892 
3893 inline uint16_t CpFunctionFeaturesIE::calculateLength()
3894 {
3895  return sizeof(pfcp_cp_func_feat_ie_t) - sizeof(pfcp_ie_header_t);
3896 }
3897 
3899 
3900 inline Bool UsageInformationIE::bef() const
3901 {
3902  return ie_.bef;
3903 }
3904 
3905 inline Bool UsageInformationIE::aft() const
3906 {
3907  return ie_.aft;
3908 }
3909 
3910 inline Bool UsageInformationIE::uae() const
3911 {
3912  return ie_.uae;
3913 }
3914 
3915 inline Bool UsageInformationIE::ube() const
3916 {
3917  return ie_.ube;
3918 }
3919 
3920 inline UsageInformationIE &UsageInformationIE::bef(Bool val)
3921 {
3922  ie_.bef = val ? 1 : 0; setLength();
3923  return *this;
3924 }
3925 
3926 inline UsageInformationIE &UsageInformationIE::aft(Bool val)
3927 {
3928  ie_.aft = val ? 1 : 0; setLength();
3929  return *this;
3930 }
3931 
3932 inline UsageInformationIE &UsageInformationIE::uae(Bool val)
3933 {
3934  ie_.uae = val ? 1 : 0; setLength();
3935  return *this;
3936 }
3937 
3938 inline UsageInformationIE &UsageInformationIE::ube(Bool val)
3939 {
3940  ie_.ube = val ? 1 : 0; setLength();
3941  return *this;
3942 }
3943 
3944 inline pfcp_usage_info_ie_t &UsageInformationIE::data()
3945 {
3946  return ie_;
3947 }
3948 
3949 inline UsageInformationIE::UsageInformationIE(pfcp_usage_info_ie_t &ie, LengthCalculator *parent)
3950  : IEHeader(ie.header, PFCP_IE_USAGE_INFO, parent),
3951  ie_(ie)
3952 {
3953 }
3954 
3955 inline uint16_t UsageInformationIE::calculateLength()
3956 {
3957  return sizeof(pfcp_usage_info_ie_t) - sizeof(pfcp_ie_header_t);
3958 }
3959 
3961 
3962 inline const uint8_t *ApplicationInstanceIdIE::app_inst_ident() const
3963 {
3964  return ie_.app_inst_ident;
3965  }
3966 
3967 inline ApplicationInstanceIdIE &ApplicationInstanceIdIE::app_inst_ident(const uint8_t *val, uint16_t len)
3968 {
3969  if (len > sizeof(ie_.app_inst_ident))
3970  len = sizeof(ie_.app_inst_ident);
3971  std::memcpy(ie_.app_inst_ident, val, len);
3972  ie_.header.len = len;
3973  return *this;
3974 }
3975 
3976 inline pfcp_app_inst_id_ie_t &ApplicationInstanceIdIE::data()
3977 {
3978  return ie_;
3979 }
3980 
3981 inline ApplicationInstanceIdIE::ApplicationInstanceIdIE(pfcp_app_inst_id_ie_t &ie, LengthCalculator *parent)
3982  : IEHeader(ie.header, PFCP_IE_APP_INST_ID, parent),
3983  ie_(ie)
3984 {
3985 }
3986 
3988 {
3989  return ie_.header.len;
3990 }
3991 
3993 
3995 {
3996  return static_cast<FlowDirectionEnum>(ie_.flow_direction);
3997 }
3998 
3999 inline FlowInformationIE &FlowInformationIE::flow_direction(FlowDirectionEnum val)
4000 {
4001  ie_.flow_direction = static_cast<uint8_t>(val);
4002  setLength();
4003  return *this;
4004 }
4005 
4006 inline FlowInformationIE &FlowInformationIE::flow_desc(const uint8_t *val, uint16_t len)
4007 {
4008  if (len > sizeof(ie_.flow_desc))
4009  len = sizeof(ie_.flow_desc);
4010  ie_.len_of_flow_desc = len;
4011  std::memcpy(ie_.flow_desc, val, len);
4012  setLength();
4013  return *this;
4014 }
4015 
4016 inline pfcp_flow_info_ie_t &FlowInformationIE::data()
4017 {
4018  return ie_;
4019 }
4020 
4021 inline FlowInformationIE::FlowInformationIE(pfcp_flow_info_ie_t &ie, LengthCalculator *parent)
4022  : IEHeader(ie.header, PFCP_IE_FLOW_INFO, parent),
4023  ie_(ie)
4024 {
4025 }
4026 
4027 inline uint16_t FlowInformationIE::calculateLength()
4028 {
4029  return
4030  1 + /* octet 5 */
4031  sizeof(ie_.len_of_flow_desc) +
4032  ie_.len_of_flow_desc
4033  ;
4034 }
4035 
4037 
4038 inline Bool UeIpAddressIE::v6() const
4039 {
4040  return ie_.v6;
4041 }
4042 
4043 inline Bool UeIpAddressIE::v4() const
4044 {
4045  return ie_.v4;
4046 }
4047 
4048 inline Bool UeIpAddressIE::sd() const
4049 {
4050  return ie_.sd;
4051 }
4052 
4053 inline Bool UeIpAddressIE::ipv6d() const
4054 {
4055  return ie_.ipv6d;
4056 }
4057 
4058 inline const in_addr &UeIpAddressIE::ipv4_address() const
4059 {
4060  AliasPointer u;
4061  u.uint32_t_ptr = &ie_.ipv4_address;
4062  return *u.in_addr_ptr;
4063 }
4064 
4065 inline const in6_addr &UeIpAddressIE::ipv6_address() const
4066 {
4067  AliasPointer u;
4068  u.uint8_t_ptr = ie_.ipv6_address;
4069  return *u.in6_addr_ptr;
4070 }
4071 
4072 inline const uint8_t UeIpAddressIE::ipv6_pfx_dlgtn_bits() const
4073 {
4074  return ie_.ipv6_pfx_dlgtn_bits;
4075 }
4076 
4077 inline UeIpAddressIE &UeIpAddressIE::sd(Bool val)
4078 {
4079  ie_.sd = val ? 1 : 0;
4080  setLength();
4081  return *this;
4082 }
4083 
4084 inline UeIpAddressIE &UeIpAddressIE::ip_address(const ESocket::Address &val)
4085 {
4086  if (val.getFamily() == ESocket::Family::INET)
4087  return ip_address(val.getInet().sin_addr);
4088  else if (val.getFamily() == ESocket::Family::INET6)
4089  return ip_address(val.getInet6().sin6_addr);
4090  return *this;
4091 }
4092 
4093 inline UeIpAddressIE &UeIpAddressIE::ip_address(const EIpAddress &val)
4094 {
4095  if (val.family() == AF_INET)
4096  return ip_address(val.ipv4Address());
4097  else if (val.family() == AF_INET6)
4098  return ip_address(val.ipv6Address());
4099  return *this;
4100 }
4101 
4102 inline UeIpAddressIE &UeIpAddressIE::ip_address(const in_addr &val)
4103 {
4104  ie_.v4 = 1;
4105  ie_.ipv4_address = val.s_addr;
4106  setLength();
4107  return *this;
4108 }
4109 
4110 inline UeIpAddressIE &UeIpAddressIE::ip_address(const in6_addr &val)
4111 {
4112  ie_.v6 = 1;
4113  std::memcpy(ie_.ipv6_address, val.s6_addr, sizeof(ie_.ipv6_address));
4114  setLength();
4115  return *this;
4116 }
4117 
4118 inline UeIpAddressIE &UeIpAddressIE::ipv6_pfx_dlgtn_bits(uint8_t val)
4119 {
4120  ie_.ipv6d = 1;
4121  ie_.ipv6_pfx_dlgtn_bits = val;
4122  setLength();
4123  return *this;
4124 }
4125 
4126 inline pfcp_ue_ip_address_ie_t &UeIpAddressIE::data()
4127 {
4128  return ie_;
4129 }
4130 
4131 inline UeIpAddressIE::UeIpAddressIE(pfcp_ue_ip_address_ie_t &ie, LengthCalculator *parent)
4132  : IEHeader(ie.header, PFCP_IE_UE_IP_ADDRESS, parent),
4133  ie_(ie)
4134 {
4135 }
4136 
4137 inline uint16_t UeIpAddressIE::calculateLength()
4138 {
4139  return sizeof(pfcp_ue_ip_address_ie_t) - sizeof(pfcp_ie_header_t);
4140 }
4141 
4143 
4144 inline Bool PacketRateIE::ulpr() const
4145 {
4146  return ie_.ulpr;
4147 }
4148 
4149 inline Bool PacketRateIE::dlpr() const
4150 {
4151  return ie_.dlpr;
4152 }
4153 
4155 {
4156  return static_cast<UplinkDownlinkTimeUnitEnum>(ie_.uplnk_time_unit);
4157 }
4158 
4159 inline uint16_t PacketRateIE::max_uplnk_pckt_rate() const
4160 {
4161  return ie_.max_uplnk_pckt_rate;
4162 }
4163 
4165 {
4166  return static_cast<UplinkDownlinkTimeUnitEnum>(ie_.dnlnk_time_unit);
4167 }
4168 
4169 inline uint16_t PacketRateIE::max_dnlnk_pckt_rate() const
4170 {
4171  return ie_.max_dnlnk_pckt_rate;
4172 }
4173 
4174 inline PacketRateIE &PacketRateIE::max_uplnk_pckt_rate(uint16_t val, UplinkDownlinkTimeUnitEnum tu)
4175 {
4176  ie_.ulpr = 1;
4177  ie_.uplnk_time_unit = static_cast<uint8_t>(tu);
4178  ie_.max_uplnk_pckt_rate = val;
4179  setLength();
4180  return *this;
4181 }
4182 
4183 inline PacketRateIE &PacketRateIE::max_dnlnk_pckt_rate(uint16_t val, UplinkDownlinkTimeUnitEnum tu)
4184 {
4185  ie_.dlpr = 1;
4186  ie_.dnlnk_time_unit = static_cast<uint8_t>(tu);
4187  ie_.max_dnlnk_pckt_rate = val;
4188  setLength();
4189  return *this;
4190 }
4191 
4192 inline pfcp_packet_rate_ie_t &PacketRateIE::data()
4193 {
4194  return ie_;
4195 }
4196 
4197 inline PacketRateIE::PacketRateIE(pfcp_packet_rate_ie_t &ie, LengthCalculator *parent)
4198  : IEHeader(ie.header, PFCP_IE_PACKET_RATE, parent),
4199  ie_(ie)
4200 {
4201 }
4202 
4203 inline uint16_t PacketRateIE::calculateLength()
4204 {
4205  return
4206  1 + /* octet 5 */
4207  (ie_.ulpr ? 3 : 0) + /* uplink time unit + maximum uplink packet rate */
4208  (ie_.dlpr ? 3 : 0) /* downlink time unit + maximum downlink packet rate */
4209  ;
4210 }
4211 
4213 
4215 {
4216  return static_cast<OuterHeaderRemovalEnum>(ie_.outer_hdr_removal_desc);
4217 }
4218 
4220 {
4221  return ie_.gtpu_ext_hdr_del.pdu_session_container;
4222 }
4223 
4224 inline OuterHeaderRemovalIE &OuterHeaderRemovalIE::pdu_session_container(Bool val)
4225 {
4226  ie_.gtpu_ext_hdr_del.pdu_session_container = val ? 1 : 0;
4227  setLength();
4228  return *this;
4229 }
4230 
4231 inline pfcp_outer_hdr_removal_ie_t &OuterHeaderRemovalIE::data()
4232 {
4233  return ie_;
4234 }
4235 
4236 inline OuterHeaderRemovalIE::OuterHeaderRemovalIE(pfcp_outer_hdr_removal_ie_t &ie, LengthCalculator *parent)
4237  : IEHeader(ie.header, PFCP_IE_OUTER_HDR_REMOVAL, parent),
4238  ie_(ie)
4239 {
4240 }
4241 
4242 inline uint16_t OuterHeaderRemovalIE::calculateLength()
4243 {
4244  return
4245  1 + /* octet 5 */
4246  (ie_.gtpu_ext_hdr_del.pdu_session_container ? sizeof(ie_.gtpu_ext_hdr_del) : 0)
4247  ;
4248 }
4249 
4251 
4253 {
4254  ETime t;
4255  t.setNTPTime(ie_.rcvry_time_stmp_val);
4256  return t;
4257 }
4258 
4259 inline RecoveryTimeStampIE &RecoveryTimeStampIE::rcvry_time_stmp_val(const ETime &val)
4260 {
4261  ie_.rcvry_time_stmp_val = val.getNTPTimeSeconds();
4262  setLength();
4263  return *this;
4264 }
4265 
4266 inline pfcp_rcvry_time_stmp_ie_t &RecoveryTimeStampIE::data()
4267 {
4268  return ie_;
4269 }
4270 
4271 inline RecoveryTimeStampIE::RecoveryTimeStampIE(pfcp_rcvry_time_stmp_ie_t &ie, LengthCalculator *parent)
4272  : IEHeader(ie.header, PFCP_IE_RCVRY_TIME_STMP, parent),
4273  ie_(ie)
4274 {
4275 }
4276 
4277 inline uint16_t RecoveryTimeStampIE::calculateLength()
4278 {
4279  return sizeof(pfcp_rcvry_time_stmp_ie_t) - sizeof(pfcp_ie_header_t);
4280 }
4281 
4283 
4284 inline Bool DlFlowLevelMarkingIE::ttc() const
4285 {
4286  return ie_.ttc;
4287 }
4288 
4289 inline Bool DlFlowLevelMarkingIE::sci() const
4290 {
4291  return ie_.sci;
4292 }
4293 
4294 inline const uint8_t *DlFlowLevelMarkingIE::tostraffic_cls() const
4295 {
4296  return ie_.tostraffic_cls;
4297 }
4298 
4299 inline const uint8_t *DlFlowLevelMarkingIE::svc_cls_indctr() const
4300 {
4301  return ie_.svc_cls_indctr;
4302 }
4303 
4304 inline DlFlowLevelMarkingIE &DlFlowLevelMarkingIE::tostraffic_cls(const uint8_t *val)
4305 {
4306  ie_.ttc = 1;
4307  memcpy(ie_.tostraffic_cls, val, sizeof(ie_.tostraffic_cls));
4308  setLength();
4309  return *this;
4310 }
4311 
4312 inline DlFlowLevelMarkingIE &DlFlowLevelMarkingIE::svc_cls_indctr(const uint8_t *val)
4313 {
4314  ie_.sci = 1;
4315  memcpy(ie_.svc_cls_indctr, val, sizeof(ie_.svc_cls_indctr));
4316  setLength();
4317  return *this;
4318 }
4319 
4320 inline pfcp_dl_flow_lvl_marking_ie_t &DlFlowLevelMarkingIE::data()
4321 {
4322  return ie_;
4323 }
4324 
4325 inline DlFlowLevelMarkingIE::DlFlowLevelMarkingIE(pfcp_dl_flow_lvl_marking_ie_t &ie, LengthCalculator *parent)
4326  : IEHeader(ie.header, PFCP_IE_DL_FLOW_LVL_MARKING, parent),
4327  ie_(ie)
4328 {
4329 }
4330 
4331 inline uint16_t DlFlowLevelMarkingIE::calculateLength()
4332 {
4333  return
4334  1 + /* octet 5 */
4335  (ie_.ttc ? sizeof(ie_.svc_cls_indctr) : 0) +
4336  (ie_.sci ? sizeof(ie_.svc_cls_indctr) : 0)
4337  ;
4338 }
4339 
4341 
4343 {
4344  return static_cast<HeaderTypeEnum>(ie_.header_type);
4345 }
4346 
4347 inline uint8_t HeaderEnrichmentIE::len_of_hdr_fld_nm() const
4348 {
4349  return ie_.len_of_hdr_fld_nm;
4350 }
4351 
4352 inline const uint8_t *HeaderEnrichmentIE::hdr_fld_nm() const
4353 {
4354  return ie_.hdr_fld_nm;
4355 }
4356 
4357 inline uint8_t HeaderEnrichmentIE::len_of_hdr_fld_val() const
4358 {
4359  return ie_.len_of_hdr_fld_val;
4360 }
4361 
4362 inline const uint8_t *HeaderEnrichmentIE::hdr_fld_val() const
4363 {
4364  return ie_.hdr_fld_val;
4365 }
4366 
4367 inline HeaderEnrichmentIE &HeaderEnrichmentIE::header_type(HeaderTypeEnum val)
4368 {
4369  ie_.header_type = static_cast<uint8_t>(val);
4370  setLength();
4371  return *this;
4372 }
4373 
4374 inline HeaderEnrichmentIE &HeaderEnrichmentIE::header_fld_nm(const uint8_t *val, uint8_t len)
4375 {
4376  if (len > sizeof(ie_.hdr_fld_nm))
4377  len = sizeof(ie_.hdr_fld_nm);
4378  ie_.len_of_hdr_fld_nm = len;
4379  std::memcpy(ie_.hdr_fld_nm, val, len);
4380  setLength();
4381  return *this;
4382 }
4383 
4384 inline HeaderEnrichmentIE &HeaderEnrichmentIE::header_fld_val(const uint8_t *val, uint8_t len)
4385 {
4386  if (len > sizeof(ie_.hdr_fld_val))
4387  len = sizeof(ie_.hdr_fld_val);
4388  ie_.len_of_hdr_fld_val = len;
4389  std::memcpy(ie_.hdr_fld_val, val, len);
4390  setLength();
4391  return *this;
4392 }
4393 
4394 inline pfcp_hdr_enrchmt_ie_t &HeaderEnrichmentIE::data()
4395 {
4396  return ie_;
4397 }
4398 
4399 inline HeaderEnrichmentIE::HeaderEnrichmentIE(pfcp_hdr_enrchmt_ie_t &ie, LengthCalculator *parent)
4400  : IEHeader(ie.header, PFCP_IE_HDR_ENRCHMT, parent),
4401  ie_(ie)
4402 {
4403 }
4404 
4405 inline uint16_t HeaderEnrichmentIE::calculateLength()
4406 {
4407  return
4408  1 + /* octet 5 */
4409  sizeof(ie_.len_of_hdr_fld_nm) +
4410  ie_.len_of_hdr_fld_nm +
4411  sizeof(ie_.len_of_hdr_fld_val) +
4412  ie_.len_of_hdr_fld_val
4413  ;
4414 }
4415 
4417 
4418 inline Bool MeasurementInformationIE::mbqe() const
4419 {
4420  return ie_.mbqe;
4421 }
4422 
4423 inline Bool MeasurementInformationIE::inam() const
4424 {
4425  return ie_.inam;
4426 }
4427 
4428 inline Bool MeasurementInformationIE::radi() const
4429 {
4430  return ie_.radi;
4431 }
4432 
4433 inline Bool MeasurementInformationIE::istm() const
4434 {
4435  return ie_.istm;
4436 }
4437 
4438 inline MeasurementInformationIE &MeasurementInformationIE::mbqe(Bool val)
4439 {
4440  ie_.mbqe = val ? 1 : 0;
4441  setLength();
4442  return *this;
4443 }
4444 
4445 inline MeasurementInformationIE &MeasurementInformationIE::inam(Bool val)
4446 {
4447  ie_.inam = val ? 1 : 0;
4448  setLength();
4449  return *this;
4450 }
4451 
4452 inline MeasurementInformationIE &MeasurementInformationIE::radi(Bool val)
4453 {
4454  ie_.radi = val ? 1 : 0;
4455  setLength();
4456  return *this;
4457 }
4458 
4459 inline MeasurementInformationIE &MeasurementInformationIE::istm(Bool val)
4460 {
4461  ie_.istm = val ? 1 : 0;
4462  setLength();
4463  return *this;
4464 }
4465 
4466 inline pfcp_meas_info_ie_t &MeasurementInformationIE::data()
4467 {
4468  return ie_;
4469 }
4470 
4471 inline MeasurementInformationIE::MeasurementInformationIE(pfcp_meas_info_ie_t &ie, LengthCalculator *parent)
4472  : IEHeader(ie.header, PFCP_IE_MEAS_INFO, parent),
4473  ie_(ie)
4474 {
4475 }
4476 
4478 {
4479  return sizeof(pfcp_meas_info_ie_t) - sizeof(pfcp_ie_header_t);
4480 }
4481 
4483 
4484 inline Bool NodeReportTypeIE::upfr() const
4485 {
4486  return ie_.upfr;
4487 }
4488 
4489 inline NodeReportTypeIE &NodeReportTypeIE::upfr(Bool val)
4490 {
4491  ie_.upfr = val;
4492  setLength();
4493  return *this;
4494 }
4495 
4496 inline pfcp_node_rpt_type_ie_t &NodeReportTypeIE::data()
4497 {
4498  return ie_;
4499 }
4500 
4501 inline NodeReportTypeIE::NodeReportTypeIE(pfcp_node_rpt_type_ie_t &ie, LengthCalculator *parent)
4502  : IEHeader(ie.header, PFCP_IE_NODE_RPT_TYPE, parent),
4503  ie_(ie)
4504 {
4505 }
4506 
4507 inline uint16_t NodeReportTypeIE::calculateLength()
4508 {
4509  return sizeof(pfcp_node_rpt_type_ie_t) - sizeof(pfcp_ie_header_t);
4510 }
4511 
4513 
4514 inline Bool RemoteGTPUPeerIE::v6() const
4515 {
4516  return ie_.v6;
4517 }
4518 
4519 inline Bool RemoteGTPUPeerIE::v4() const
4520 {
4521  return ie_.v4;
4522 }
4523 
4524 inline Bool RemoteGTPUPeerIE::di() const
4525 {
4526  return ie_.di;
4527 }
4528 
4529 inline Bool RemoteGTPUPeerIE::ni() const
4530 {
4531  return ie_.ni;
4532 }
4533 
4534 inline const in_addr &RemoteGTPUPeerIE::ipv4_address() const
4535 {
4536  AliasPointer u;
4537  u.uint32_t_ptr = &ie_.ipv4_address;
4538  return *u.in_addr_ptr;
4539 }
4540 
4541 inline const in6_addr &RemoteGTPUPeerIE::ipv6_address() const
4542 {
4543  AliasPointer u;
4544  u.uint8_t_ptr = ie_.ipv6_address;
4545  return *u.in6_addr_ptr;
4546 }
4547 
4548 inline uint16_t RemoteGTPUPeerIE::len_of_dst_intfc_fld() const
4549 {
4550  return ie_.len_of_dst_intfc_fld;
4551 }
4552 
4554 {
4555  return static_cast<DestinationInterfaceEnum>(ie_.dst_intfc.intfc_value);
4556 }
4557 
4558 inline uint16_t RemoteGTPUPeerIE::len_of_ntwk_intfc_fld() const
4559 {
4560  return ie_.len_of_ntwk_instc_fld;
4561 }
4562 
4563 inline const uint8_t *RemoteGTPUPeerIE::ntwk_instc() const
4564 {
4565  return ie_.ntwk_instc;
4566 }
4567 
4568 inline RemoteGTPUPeerIE &RemoteGTPUPeerIE::ip_address(const ESocket::Address &val)
4569 {
4570  if (val.getFamily() == ESocket::Family::INET)
4571  return ip_address(val.getInet().sin_addr);
4572  else if (val.getFamily() == ESocket::Family::INET6)
4573  return ip_address(val.getInet6().sin6_addr);
4574  return *this;
4575 }
4576 
4577 inline RemoteGTPUPeerIE &RemoteGTPUPeerIE::ip_address(const EIpAddress &val)
4578 {
4579  if (val.family() == AF_INET)
4580  return ip_address(val.ipv4Address());
4581  else if (val.family() == AF_INET6)
4582  return ip_address(val.ipv6Address());
4583  return *this;
4584 }
4585 
4586 inline RemoteGTPUPeerIE &RemoteGTPUPeerIE::ip_address(const in_addr &val)
4587 {
4588  ie_.v4 = 1;
4589  ie_.ipv4_address = val.s_addr;
4590  setLength();
4591  return *this;
4592 }
4593 
4594 inline RemoteGTPUPeerIE &RemoteGTPUPeerIE::ip_address(const in6_addr &val)
4595 {
4596  ie_.v6 = 1;
4597  std::memcpy(ie_.ipv6_address, val.s6_addr, sizeof(ie_.ipv6_address));
4598  setLength();
4599  return *this;
4600 }
4601 
4602 inline RemoteGTPUPeerIE &RemoteGTPUPeerIE::dst_intfc_fld(DestinationInterfaceEnum val)
4603 {
4604  ie_.di = 1;
4605  ie_.len_of_dst_intfc_fld = sizeof(ie_.dst_intfc);
4606  ie_.dst_intfc.intfc_value = static_cast<uint8_t>(val);
4607  setLength();
4608  return *this;
4609 }
4610 
4611 inline RemoteGTPUPeerIE &RemoteGTPUPeerIE::ntwk_instc(const uint8_t *val, uint16_t len)
4612 {
4613  ie_.ni = 1;
4614  if (len > sizeof(ie_.ntwk_instc))
4615  len = sizeof(ie_.ntwk_instc);
4616  ie_.len_of_ntwk_instc_fld = len;
4617  std::memcpy(ie_.ntwk_instc, val, len);
4618  setLength();
4619  return *this;
4620 }
4621 
4622 inline pfcp_rmt_gtpu_peer_ie_t &RemoteGTPUPeerIE::data()
4623 {
4624  return ie_;
4625 }
4626 
4627 inline RemoteGTPUPeerIE::RemoteGTPUPeerIE(pfcp_rmt_gtpu_peer_ie_t &ie, LengthCalculator *parent)
4628  : IEHeader(ie.header, PFCP_IE_RMT_GTPU_PEER, parent),
4629  ie_(ie)
4630 {
4631 }
4632 
4633 inline uint16_t RemoteGTPUPeerIE::calculateLength()
4634 {
4635  return
4636  1 + /* octet 5 */
4637  (ie_.v4 ? sizeof(ie_.ipv4_address) : 0) +
4638  (ie_.v6 ? sizeof(ie_.ipv6_address) : 0) +
4639  (ie_.di ? sizeof(ie_.len_of_dst_intfc_fld) + ie_.len_of_dst_intfc_fld : 0) +
4640  (ie_.ni ? sizeof(ie_.len_of_ntwk_instc_fld) + ie_.len_of_ntwk_instc_fld : 0)
4641  ;
4642 }
4643 
4645 
4646 inline uint32_t UrSeqnIE::urseqn() const
4647 {
4648  return ie_.urseqn;
4649 }
4650 
4651 inline UrSeqnIE &UrSeqnIE::urseqn(uint32_t val)
4652 {
4653  ie_.urseqn = val;
4654  setLength();
4655  return *this;
4656 }
4657 
4658 inline pfcp_urseqn_ie_t &UrSeqnIE::data()
4659 {
4660  return ie_;
4661 }
4662 
4663 inline UrSeqnIE::UrSeqnIE(pfcp_urseqn_ie_t &ie, LengthCalculator *parent)
4664  : IEHeader(ie.header, PFCP_IE_URSEQN, parent),
4665  ie_(ie)
4666 {
4667 }
4668 
4669 inline uint16_t UrSeqnIE::calculateLength()
4670 {
4671  return sizeof(pfcp_urseqn_ie_t) - sizeof(pfcp_ie_header_t);
4672 }
4673 
4675 
4676 inline uint16_t ActivatePredefinedRulesIE::predef_rules_nm_len() const
4677 {
4678  return ie_.header.len;
4679 }
4680 
4681 inline const uint8_t *ActivatePredefinedRulesIE::predef_rules_nm() const
4682 {
4683  return ie_.predef_rules_nm;
4684 }
4685 
4686 inline ActivatePredefinedRulesIE &ActivatePredefinedRulesIE::predef_rules_nm(const uint8_t *val, uint16_t len)
4687 {
4688  if (len > sizeof(ie_.predef_rules_nm))
4689  len = sizeof(ie_.predef_rules_nm);
4690  std::memcpy(ie_.predef_rules_nm, val, len);
4691  ie_.header.len = len;
4692  return *this;
4693 }
4694 
4695 inline pfcp_actvt_predef_rules_ie_t &ActivatePredefinedRulesIE::data()
4696 {
4697  return ie_;
4698 }
4699 
4700 inline ActivatePredefinedRulesIE::ActivatePredefinedRulesIE(pfcp_actvt_predef_rules_ie_t &ie, LengthCalculator *parent)
4701  : IEHeader(ie.header, PFCP_IE_ACTVT_PREDEF_RULES, parent),
4702  ie_(ie)
4703 {
4704 }
4705 
4707 {
4708  return ie_.header.len;
4709 }
4710 
4712 
4714 {
4715  return ie_.header.len;
4716 }
4717 inline const uint8_t *DeactivatePredefinedRulesIE::predef_rules_nm() const
4718 {
4719  return ie_.predef_rules_nm;
4720 }
4721 
4722 inline DeactivatePredefinedRulesIE &DeactivatePredefinedRulesIE::predef_rules_nm(const uint8_t *val, uint16_t len)
4723 {
4724  if (len > sizeof(ie_.predef_rules_nm))
4725  len = sizeof(ie_.predef_rules_nm);
4726  std::memcpy(ie_.predef_rules_nm, val, len);
4727  ie_.header.len = len;
4728  return *this;
4729 }
4730 
4731 inline pfcp_deact_predef_rules_ie_t &DeactivatePredefinedRulesIE::data()
4732 {
4733  return ie_;
4734 }
4735 
4736 inline DeactivatePredefinedRulesIE::DeactivatePredefinedRulesIE(pfcp_deact_predef_rules_ie_t &ie, LengthCalculator *parent)
4737  : IEHeader(ie.header, PFCP_IE_DEACT_PREDEF_RULES, parent),
4738  ie_(ie)
4739 {
4740 }
4741 
4743 {
4744  return ie_.header.len;
4745 }
4746 
4748 
4749 inline uint32_t FarIdIE::far_id_value() const
4750 {
4751  return ie_.far_id_value;
4752 }
4753 
4754 inline FarIdIE &FarIdIE::far_id_value(uint32_t val)
4755 {
4756  ie_.far_id_value = val;
4757  setLength();
4758  return *this;
4759 }
4760 
4761 inline pfcp_far_id_ie_t &FarIdIE::data()
4762 {
4763  return ie_;
4764 }
4765 
4766 inline FarIdIE::FarIdIE(pfcp_far_id_ie_t &ie, LengthCalculator *parent)
4767  : IEHeader(ie.header, PFCP_IE_FAR_ID, parent),
4768  ie_(ie)
4769 {
4770 }
4771 
4772 inline uint16_t FarIdIE::calculateLength()
4773 {
4774  return sizeof(pfcp_far_id_ie_t) - sizeof(pfcp_ie_header_t);
4775 }
4776 
4778 
4779 inline uint32_t QerIdIE::qer_id_value() const
4780 {
4781  return ie_.qer_id_value;
4782 }
4783 
4784 inline QerIdIE &QerIdIE::qer_id_value(uint32_t val)
4785 {
4786  ie_.qer_id_value = val;
4787  setLength();
4788  return *this;
4789 }
4790 
4791 inline pfcp_qer_id_ie_t &QerIdIE::data()
4792 {
4793  return ie_;
4794 }
4795 
4796 inline QerIdIE::QerIdIE(pfcp_qer_id_ie_t &ie, LengthCalculator *parent)
4797  : IEHeader(ie.header, PFCP_IE_QER_ID, parent),
4798  ie_(ie)
4799 {
4800 }
4801 
4802 inline uint16_t QerIdIE::calculateLength()
4803 {
4804  return sizeof(pfcp_qer_id_ie_t) - sizeof(pfcp_ie_header_t);
4805 }
4806 
4808 inline Bool OciFlagsIE::aoci() const
4809 {
4810  return ie_.aoci;
4811 }
4812 
4813 inline OciFlagsIE &OciFlagsIE::aoci(Bool val)
4814 {
4815  ie_.aoci = val ? 1 : 0;
4816  setLength();
4817  return *this;
4818 }
4819 
4820 inline pfcp_oci_flags_ie_t &OciFlagsIE::data()
4821 {
4822  return ie_;
4823 }
4824 
4825 inline OciFlagsIE::OciFlagsIE(pfcp_oci_flags_ie_t &ie, LengthCalculator *parent)
4826  : IEHeader(ie.header, PFCP_IE_OCI_FLAGS, parent),
4827  ie_(ie)
4828 {
4829 }
4830 
4831 inline uint16_t OciFlagsIE::calculateLength()
4832 {
4833  return ie_.aoci ?
4834  sizeof(pfcp_oci_flags_ie_t) - sizeof(pfcp_ie_header_t) :
4835  0
4836  ;
4837 }
4838 
4840 
4841 inline Bool AssociationReleaseRequestIE::sarr() const
4842 {
4843  return ie_.sarr;
4844 }
4845 
4846 inline AssociationReleaseRequestIE &AssociationReleaseRequestIE::sarr(Bool val)
4847 {
4848  ie_.sarr = val ? 1 : 0;
4849  setLength();
4850  return *this;
4851 }
4852 
4853 inline pfcp_up_assn_rel_req_ie_t &AssociationReleaseRequestIE::data()
4854 {
4855  return ie_;
4856 }
4857 
4858 inline AssociationReleaseRequestIE::AssociationReleaseRequestIE(pfcp_up_assn_rel_req_ie_t &ie, LengthCalculator *parent)
4859  : IEHeader(ie.header, PFCP_IE_UP_ASSN_REL_REQ, parent),
4860  ie_(ie)
4861 {
4862 }
4863 
4865 {
4866  return ie_.sarr ?
4867  sizeof(pfcp_up_assn_rel_req_ie_t) - sizeof(pfcp_ie_header_t) :
4868  0
4869  ;
4870 }
4871 
4873 
4875 {
4876  return static_cast<GracefulReleasePeriodTimerUnitEnum>(ie_.timer_unit);
4877 }
4878 
4879 inline uint8_t GracefulReleasePeriodIE::timer_value() const
4880 {
4881  return ie_.timer_value;
4882 }
4883 
4884 inline GracefulReleasePeriodIE &GracefulReleasePeriodIE::timer_value(uint8_t val, GracefulReleasePeriodTimerUnitEnum tu)
4885 {
4886  ie_.timer_unit = static_cast<uint8_t>(tu);
4887  ie_.timer_value = val;
4888  setLength();
4889  return *this;
4890 }
4891 
4892 inline pfcp_graceful_rel_period_ie_t &GracefulReleasePeriodIE::data()
4893 {
4894  return ie_;
4895 }
4896 
4897 inline GracefulReleasePeriodIE::GracefulReleasePeriodIE(pfcp_graceful_rel_period_ie_t &ie, LengthCalculator *parent)
4898  : IEHeader(ie.header, PFCP_IE_GRACEFUL_REL_PERIOD, parent),
4899  ie_(ie)
4900 {
4901 }
4902 
4904 {
4905  return sizeof(pfcp_graceful_rel_period_ie_t) - sizeof(pfcp_ie_header_t);
4906 }
4907 
4909 
4910 inline PdnTypeEnum PdnTypeIE::pdn_type() const
4911 {
4912  return static_cast<PdnTypeEnum>(ie_.pdn_type);
4913 }
4914 
4915 inline PdnTypeIE &PdnTypeIE::pdn_type(PdnTypeEnum val)
4916 {
4917  ie_.pdn_type = static_cast<uint8_t>(val);
4918  setLength();
4919  return *this;
4920 }
4921 
4922 inline pfcp_pdn_type_ie_t &PdnTypeIE::data()
4923 {
4924  return ie_;
4925 }
4926 
4927 inline PdnTypeIE::PdnTypeIE(pfcp_pdn_type_ie_t &ie, LengthCalculator *parent)
4928  : IEHeader(ie.header, PFCP_IE_PDN_TYPE, parent),
4929  ie_(ie)
4930 {
4931 }
4932 
4933 inline uint16_t PdnTypeIE::calculateLength()
4934 {
4935  return sizeof(pfcp_pdn_type_ie_t) - sizeof(pfcp_ie_header_t);
4936 }
4937 
4939 
4941 {
4942  return static_cast<RuleIdTypeEnum>(ie_.rule_id_type);
4943 }
4944 
4945 inline uint32_t FailedRuleIdIE::rule_id_value() const
4946 {
4947  return ie_.rule_id_value;
4948 }
4949 
4950 inline FailedRuleIdIE &FailedRuleIdIE::rule_id_value(uint32_t val, RuleIdTypeEnum rt)
4951 {
4952  ie_.rule_id_type = static_cast<uint8_t>(rt);
4953  if (rt == RuleIdTypeEnum::pdr)
4954  ie_.rule_id_value = val & 0x0000ffff;
4955  else if (rt == RuleIdTypeEnum::bar)
4956  ie_.rule_id_value = val & 0x000000ff;
4957  else
4958  ie_.rule_id_value = val;
4959  setLength();
4960  return *this;
4961 }
4962 
4963 inline pfcp_failed_rule_id_ie_t &FailedRuleIdIE::data()
4964 {
4965  return ie_;
4966 }
4967 
4968 inline FailedRuleIdIE::FailedRuleIdIE(pfcp_failed_rule_id_ie_t &ie, LengthCalculator *parent)
4969  : IEHeader(ie.header, PFCP_IE_FAILED_RULE_ID, parent),
4970  ie_(ie)
4971 {
4972 }
4973 
4974 inline uint16_t FailedRuleIdIE::calculateLength()
4975 {
4976  return
4977  1 + /* octet 5 */
4978  (ie_.rule_id_type == 0 ? 2 :
4979  ie_.rule_id_type == 4 ? 1 : 4)
4980  ;
4981 }
4982 
4984 
4986 {
4987  return static_cast<BaseTimeIntervalTypeEnum>(ie_.btit);
4988 }
4989 
4990 inline uint32_t TimeQuotaMechanismIE::base_time_int() const
4991 {
4992  return ie_.base_time_int;
4993 }
4994 
4995 inline TimeQuotaMechanismIE &TimeQuotaMechanismIE::base_time_int(uint32_t val, BaseTimeIntervalTypeEnum btit)
4996 {
4997  ie_.btit = static_cast<uint8_t>(btit);
4998  ie_.base_time_int = val;
4999  setLength();
5000  return *this;
5001 }
5002 
5003 inline pfcp_time_quota_mech_ie_t &TimeQuotaMechanismIE::data()
5004 {
5005  return ie_;
5006 }
5007 
5008 inline TimeQuotaMechanismIE::TimeQuotaMechanismIE(pfcp_time_quota_mech_ie_t &ie, LengthCalculator *parent)
5009  : IEHeader(ie.header, PFCP_IE_TIME_QUOTA_MECH, parent),
5010  ie_(ie)
5011 {
5012 }
5013 
5014 inline uint16_t TimeQuotaMechanismIE::calculateLength()
5015 {
5016  return sizeof(pfcp_time_quota_mech_ie_t) - sizeof(pfcp_ie_header_t);
5017 }
5018 
5020 
5021 inline Bool UserPlaneIpResourceInformationIE::v4() const
5022 {
5023  return ie_.v4;
5024 }
5025 
5026 inline Bool UserPlaneIpResourceInformationIE::v6() const
5027 {
5028  return ie_.v6;
5029 }
5030 
5031 inline uint8_t UserPlaneIpResourceInformationIE::teidri() const
5032 {
5033  return ie_.teidri;
5034 }
5035 
5036 inline Bool UserPlaneIpResourceInformationIE::assoni() const
5037 {
5038  return ie_.assoni;
5039 }
5040 
5041 inline Bool UserPlaneIpResourceInformationIE::assosi() const
5042 {
5043  return ie_.assosi;
5044 }
5045 
5046 inline uint8_t UserPlaneIpResourceInformationIE::teid_range() const
5047 {
5048  return ie_.teid_range;
5049 }
5050 
5051 inline UserPlaneIpResourceInformationIE &UserPlaneIpResourceInformationIE::teid_range(uint8_t bits, uint8_t val)
5052 {
5053  ie_.teidri = bits;
5054  ie_.teid_range = val;
5055  return *this;
5056 }
5057 inline const in_addr &UserPlaneIpResourceInformationIE::ipv4_address() const
5058 {
5059  AliasPointer u;
5060  u.uint32_t_ptr = &ie_.ipv4_address;
5061  return *u.in_addr_ptr;
5062 }
5063 
5064 inline const in6_addr &UserPlaneIpResourceInformationIE::ipv6_address() const
5065 {
5066  AliasPointer u;
5067  u.uint8_t_ptr = ie_.ipv6_address;
5068  return *u.in6_addr_ptr;
5069 }
5070 
5072 {
5073  return ie_.ntwk_inst_len;
5074 }
5075 
5076 inline const uint8_t *UserPlaneIpResourceInformationIE::ntwk_inst() const
5077 {
5078  return ie_.ntwk_inst;
5079 }
5080 
5082 {
5083  return static_cast<SourceInterfaceEnum>(ie_.src_intfc);
5084 }
5085 
5086 inline UserPlaneIpResourceInformationIE &UserPlaneIpResourceInformationIE::ip_address(const ESocket::Address &val)
5087 {
5088  if (val.getFamily() == ESocket::Family::INET)
5089  return ip_address(val.getInet().sin_addr);
5090  else if (val.getFamily() == ESocket::Family::INET6)
5091  return ip_address(val.getInet6().sin6_addr);
5092  return *this;
5093 }
5094 
5095 inline UserPlaneIpResourceInformationIE &UserPlaneIpResourceInformationIE::ip_address(const EIpAddress &val)
5096 {
5097  if (val.family() == AF_INET)
5098  return ip_address(val.ipv4Address());
5099  else if (val.family() == AF_INET6)
5100  return ip_address(val.ipv6Address());
5101  return *this;
5102 }
5103 
5104 inline UserPlaneIpResourceInformationIE &UserPlaneIpResourceInformationIE::ip_address(const in_addr &val)
5105 {
5106  ie_.v4 = 1;
5107  ie_.ipv4_address = val.s_addr;
5108  setLength();
5109  return *this;
5110 }
5111 
5112 inline UserPlaneIpResourceInformationIE &UserPlaneIpResourceInformationIE::ip_address(const in6_addr &val)
5113 {
5114  ie_.v6 = 1;
5115  std::memcpy(ie_.ipv6_address, val.s6_addr, sizeof(ie_.ipv6_address));
5116  setLength();
5117  return *this;
5118 }
5119 
5120 inline UserPlaneIpResourceInformationIE &UserPlaneIpResourceInformationIE::ntwk_inst(const uint8_t *val, uint8_t len)
5121 {
5122  ie_.assoni = 1;
5123  if (len > sizeof(ie_.ntwk_inst))
5124  len = sizeof(ie_.ntwk_inst);
5125  ie_.ntwk_inst_len = len;
5126  std::memcpy(ie_.ntwk_inst, val, ie_.ntwk_inst_len);
5127  setLength();
5128  return *this;
5129 }
5130 
5131 inline UserPlaneIpResourceInformationIE &UserPlaneIpResourceInformationIE::src_intfc(SourceInterfaceEnum val)
5132 {
5133  ie_.assosi = 1;
5134  ie_.src_intfc = static_cast<uint8_t>(val);
5135  setLength();
5136  return *this;
5137 }
5138 
5139 inline pfcp_user_plane_ip_rsrc_info_ie_t &UserPlaneIpResourceInformationIE::data()
5140 {
5141  return ie_;
5142 }
5143 
5144 inline UserPlaneIpResourceInformationIE::UserPlaneIpResourceInformationIE(pfcp_user_plane_ip_rsrc_info_ie_t &ie, LengthCalculator *parent)
5145  : IEHeader(ie.header, PFCP_IE_USER_PLANE_IP_RSRC_INFO, parent),
5146  ie_(ie)
5147 {
5148 }
5149 
5151 {
5152  return
5153  1 + /* octet 5 */
5154  (ie_.teidri > 0 ? sizeof(ie_.teid_range) : 0) +
5155  (ie_.v4 ? sizeof(ie_.ipv4_address) : 0) +
5156  (ie_.v6 ? sizeof(ie_.ipv6_address) : 0) +
5157  (ie_.assoni ? ie_.ntwk_inst_len : 0) +
5158  (ie_.assosi ? 1 : 0)
5159  ;
5160 }
5161 
5164 {
5165  return ie_.user_plane_inact_timer;
5166 }
5167 
5168 inline UserPlaneInactivityTimerIE &UserPlaneInactivityTimerIE::user_plane_inact_timer(uint32_t val)
5169 {
5170  ie_.user_plane_inact_timer = val;
5171  setLength();
5172  return *this;
5173 }
5174 
5175 inline pfcp_user_plane_inact_timer_ie_t &UserPlaneInactivityTimerIE::data()
5176 {
5177  return ie_;
5178 }
5179 
5180 inline UserPlaneInactivityTimerIE::UserPlaneInactivityTimerIE(pfcp_user_plane_inact_timer_ie_t &ie, LengthCalculator *parent)
5181  : IEHeader(ie.header, PFCP_IE_USER_PLANE_INACT_TIMER, parent),
5182  ie_(ie)
5183 {
5184 }
5185 
5187 {
5188  return sizeof(pfcp_user_plane_inact_timer_ie_t) - sizeof(pfcp_ie_header_t);
5189 }
5190 
5192 
5193 inline int64_t MultiplierIE::value_digits() const
5194 {
5195  return ie_.value_digits;
5196 }
5197 
5198 inline int32_t MultiplierIE::exponent() const
5199 {
5200  return ie_.exponent;
5201 }
5202 
5203 inline MultiplierIE &MultiplierIE::value_digits(int64_t val)
5204 {
5205  ie_.value_digits = val;
5206  setLength();
5207  return *this;
5208 }
5209 
5210 inline MultiplierIE &MultiplierIE::exponent(int32_t val)
5211 {
5212  ie_.exponent = val;
5213  setLength();
5214  return *this;
5215 }
5216 
5217 inline pfcp_multiplier_ie_t &MultiplierIE::data()
5218 {
5219  return ie_;
5220 }
5221 
5222 inline MultiplierIE::MultiplierIE(pfcp_multiplier_ie_t &ie, LengthCalculator *parent)
5223  : IEHeader(ie.header, PFCP_IE_MULTIPLIER, parent),
5224  ie_(ie)
5225 {
5226 }
5227 
5228 inline uint16_t MultiplierIE::calculateLength()
5229 {
5230  return sizeof(pfcp_multiplier_ie_t) - sizeof(pfcp_ie_header_t);
5231 }
5232 
5234 
5235 inline uint32_t AggregatedUrrIdIE::urr_id_value() const
5236 {
5237  return ie_.urr_id_value;
5238 }
5239 
5240 inline AggregatedUrrIdIE &AggregatedUrrIdIE::urr_id_value(uint32_t val)
5241 {
5242  ie_.urr_id_value = val;
5243  setLength();
5244  return *this;
5245 }
5246 
5247 inline pfcp_agg_urr_id_ie_t &AggregatedUrrIdIE::data()
5248 {
5249  return ie_;
5250 }
5251 
5252 inline AggregatedUrrIdIE::AggregatedUrrIdIE(pfcp_agg_urr_id_ie_t &ie, LengthCalculator *parent)
5253  : IEHeader(ie.header, PFCP_IE_AGG_URR_ID, parent),
5254  ie_(ie)
5255 {
5256 }
5257 
5258 inline uint16_t AggregatedUrrIdIE::calculateLength()
5259 {
5260  return sizeof(pfcp_agg_urr_id_ie_t) - sizeof(pfcp_ie_header_t);
5261 }
5262 
5264 
5265 inline Bool SubsequentVolumeQuotaIE::tovol() const
5266 {
5267  return ie_.tovol;
5268 }
5269 
5270 inline Bool SubsequentVolumeQuotaIE::ulvol() const
5271 {
5272  return ie_.ulvol;
5273 }
5274 
5275 inline Bool SubsequentVolumeQuotaIE::dlvol() const
5276 {
5277  return ie_.dlvol;
5278 }
5279 
5280 inline SubsequentVolumeQuotaIE &SubsequentVolumeQuotaIE::total_volume(uint64_t val)
5281 {
5282  ie_.tovol = 1;
5283  ie_.total_volume = val;
5284  setLength();
5285  return *this;
5286 }
5287 
5288 inline SubsequentVolumeQuotaIE &SubsequentVolumeQuotaIE::uplink_volume(uint64_t val)
5289 {
5290  ie_.ulvol = 1;
5291  ie_.uplink_volume = val;
5292  setLength();
5293  return *this;
5294 }
5295 
5296 inline SubsequentVolumeQuotaIE &SubsequentVolumeQuotaIE::downlink_volume(uint64_t val)
5297 {
5298  ie_.dlvol = 1;
5299  ie_.downlink_volume = val;
5300  setLength();
5301  return *this;
5302 }
5303 
5304 inline pfcp_sbsqnt_vol_quota_ie_t &SubsequentVolumeQuotaIE::data()
5305 {
5306  return ie_;
5307 }
5308 
5309 inline SubsequentVolumeQuotaIE::SubsequentVolumeQuotaIE(pfcp_sbsqnt_vol_quota_ie_t &ie, LengthCalculator *parent)
5310  : IEHeader(ie.header, PFCP_IE_SBSQNT_VOL_QUOTA, parent),
5311  ie_(ie)
5312 {
5313 }
5314 
5316 {
5317  return
5318  1 + /* octet 5 */
5319  (ie_.tovol ? sizeof(ie_.total_volume) : 0) +
5320  (ie_.ulvol ? sizeof(ie_.uplink_volume) : 0) +
5321  (ie_.dlvol ? sizeof(ie_.downlink_volume) : 0)
5322  ;
5323 }
5324 
5326 
5327 inline uint32_t SubsequentTimeQuotaIE::time_quota_val() const
5328 {
5329  return ie_.time_quota_val;
5330 }
5331 
5332 inline SubsequentTimeQuotaIE &SubsequentTimeQuotaIE::time_quota_val(uint32_t val)
5333 {
5334  ie_.time_quota_val = val;
5335  setLength();
5336  return *this;
5337 }
5338 
5339 inline pfcp_sbsqnt_time_quota_ie_t &SubsequentTimeQuotaIE::data()
5340 {
5341  return ie_;
5342 }
5343 
5344 inline SubsequentTimeQuotaIE::SubsequentTimeQuotaIE(pfcp_sbsqnt_time_quota_ie_t &ie, LengthCalculator *parent)
5345  : IEHeader(ie.header, PFCP_IE_SBSQNT_TIME_QUOTA, parent),
5346  ie_(ie)
5347 {
5348 }
5349 
5351 {
5352  return sizeof(pfcp_sbsqnt_time_quota_ie_t) - sizeof(pfcp_ie_header_t);
5353 }
5354 
5356 
5357 inline Bool RqiIE::rqi() const
5358 {
5359  return ie_.rqi;
5360 }
5361 
5362 inline RqiIE &RqiIE::rqi(Bool val)
5363 {
5364  ie_.rqi = val ? 1 : 0;
5365  setLength();
5366  return *this;
5367 }
5368 
5369 inline pfcp_rqi_ie_t &RqiIE::data()
5370 {
5371  return ie_;
5372 }
5373 
5374 inline RqiIE::RqiIE(pfcp_rqi_ie_t &ie, LengthCalculator *parent)
5375  : IEHeader(ie.header, PFCP_IE_RQI, parent),
5376  ie_(ie)
5377 {
5378 }
5379 
5380 inline uint16_t RqiIE::calculateLength()
5381 {
5382  return sizeof(pfcp_rqi_ie_t) - sizeof(pfcp_ie_header_t);
5383 }
5384 
5386 
5387 inline uint8_t QfiIE::qfi_value() const
5388 {
5389  return ie_.qfi_value;
5390 }
5391 
5392 inline QfiIE &QfiIE::qfi_value(uint8_t val)
5393 {
5394  ie_.qfi_value = val;
5395  setLength();
5396  return *this;
5397 }
5398 
5399 inline pfcp_qfi_ie_t &QfiIE::data()
5400 {
5401  return ie_;
5402 }
5403 
5404 inline QfiIE::QfiIE(pfcp_qfi_ie_t &ie, LengthCalculator *parent)
5405  : IEHeader(ie.header, PFCP_IE_QFI, parent),
5406  ie_(ie)
5407 {
5408 }
5409 
5410 inline uint16_t QfiIE::calculateLength()
5411 {
5412  return sizeof(pfcp_qfi_ie_t) - sizeof(pfcp_ie_header_t);
5413 }
5414 
5416 
5417 inline uint32_t QueryUrrReferenceIE::query_urr_ref_val() const
5418 {
5419  return ie_.query_urr_ref_val;
5420 }
5421 
5422 inline QueryUrrReferenceIE &QueryUrrReferenceIE::query_urr_ref_val(uint32_t val)
5423 {
5424  ie_.query_urr_ref_val = val;
5425  setLength();
5426  return *this;
5427 }
5428 
5429 inline pfcp_query_urr_ref_ie_t &QueryUrrReferenceIE::data()
5430 {
5431  return ie_;
5432 }
5433 
5434 inline QueryUrrReferenceIE::QueryUrrReferenceIE(pfcp_query_urr_ref_ie_t &ie, LengthCalculator *parent)
5435  : IEHeader(ie.header, PFCP_IE_QUERY_URR_REF, parent),
5436  ie_(ie)
5437 {
5438 }
5439 
5440 inline uint16_t QueryUrrReferenceIE::calculateLength()
5441 {
5442  return sizeof(pfcp_query_urr_ref_ie_t) - sizeof(pfcp_ie_header_t);
5443 }
5444 
5446 
5448 {
5449  return ie_.auri;
5450 }
5451 
5453 {
5454  return ie_.nbr_of_add_usage_rpts_val;
5455 }
5456 
5457 inline AdditionalUsageReportsInformationIE &AdditionalUsageReportsInformationIE::auri(Bool val)
5458 {
5459  ie_.auri = val ? 1 : 0;
5460  setLength();
5461  return *this;
5462 }
5463 
5464 inline AdditionalUsageReportsInformationIE &AdditionalUsageReportsInformationIE::nbr_of_add_usage_rpts_val(uint16_t val)
5465 {
5466  ie_.nbr_of_add_usage_rpts_val = val;
5467  setLength();
5468  return *this;
5469 }
5470 
5471 inline pfcp_add_usage_rpts_info_ie_t &AdditionalUsageReportsInformationIE::data()
5472 {
5473  return ie_;
5474 }
5475 
5476 inline AdditionalUsageReportsInformationIE::AdditionalUsageReportsInformationIE(pfcp_add_usage_rpts_info_ie_t &ie, LengthCalculator *parent)
5477  : IEHeader(ie.header, PFCP_IE_ADD_USAGE_RPTS_INFO, parent),
5478  ie_(ie)
5479 {
5480 }
5481 
5483 {
5484  return sizeof(pfcp_add_usage_rpts_info_ie_t) - sizeof(pfcp_ie_header_t);
5485 }
5486 
5488 
5489 inline uint8_t TrafficEndpointIdIE::traffic_endpt_id_val() const
5490 {
5491  return ie_.traffic_endpt_id_val;
5492 }
5493 
5494 inline TrafficEndpointIdIE &TrafficEndpointIdIE::traffic_endpt_id_val(uint8_t val)
5495 {
5496  ie_.traffic_endpt_id_val = val;
5497  setLength();
5498  return *this;
5499 }
5500 
5501 inline pfcp_traffic_endpt_id_ie_t &TrafficEndpointIdIE::data()
5502 {
5503  return ie_;
5504 }
5505 
5506 inline TrafficEndpointIdIE::TrafficEndpointIdIE(pfcp_traffic_endpt_id_ie_t &ie, LengthCalculator *parent)
5507  : IEHeader(ie.header, PFCP_IE_TRAFFIC_ENDPT_ID, parent),
5508  ie_(ie)
5509 {
5510 }
5511 
5512 inline uint16_t TrafficEndpointIdIE::calculateLength()
5513 {
5514  return sizeof(pfcp_traffic_endpt_id_ie_t) - sizeof(pfcp_ie_header_t);
5515 }
5516 
5518 
5519 inline Bool MacAddressIE::sour() const
5520 {
5521  return ie_.sour;
5522 }
5523 
5524 inline Bool MacAddressIE::dest() const
5525 {
5526  return ie_.dest;
5527 }
5528 
5529 inline Bool MacAddressIE::usou() const
5530 {
5531  return ie_.usou;
5532 }
5533 
5534 inline Bool MacAddressIE::udes() const
5535 {
5536  return ie_.udes;
5537 }
5538 
5539 inline const uint8_t *MacAddressIE::src_mac_addr_val() const
5540 {
5541  return ie_.src_mac_addr_val;
5542 }
5543 
5544 inline const uint8_t *MacAddressIE::dst_mac_addr_val() const
5545 {
5546  return ie_.dst_mac_addr_val;
5547 }
5548 
5549 inline const uint8_t *MacAddressIE::upr_src_mac_addr_val() const
5550 {
5551  return ie_.upr_src_mac_addr_val;
5552 }
5553 
5554 inline const uint8_t *MacAddressIE::upr_dst_mac_addr_val() const
5555 {
5556  return ie_.upr_dst_mac_addr_val;
5557 }
5558 
5559 inline MacAddressIE &MacAddressIE::src_mac_addr_val(const uint8_t *val)
5560 {
5561  ie_.sour = 1;
5562  std::memcpy(ie_.src_mac_addr_val, val, sizeof(ie_.src_mac_addr_val));
5563  setLength();
5564  return *this;
5565 }
5566 
5567 inline MacAddressIE &MacAddressIE::dst_mac_addr_val(const uint8_t *val)
5568 {
5569  ie_.dest = 1;
5570  std::memcpy(ie_.dst_mac_addr_val, val, sizeof(ie_.dst_mac_addr_val));
5571  setLength();
5572  return *this;
5573 }
5574 
5575 inline MacAddressIE &MacAddressIE::upr_dst_mac_addr_val(const uint8_t *val)
5576 {
5577  ie_.usou = 1;
5578  std::memcpy(ie_.upr_dst_mac_addr_val, val, sizeof(ie_.upr_dst_mac_addr_val));
5579  setLength();
5580  return *this;
5581 }
5582 
5583 inline MacAddressIE &MacAddressIE::upr_src_mac_addr_val(const uint8_t *val)
5584 {
5585  ie_.udes = 1;
5586  std::memcpy(ie_.upr_src_mac_addr_val, val, sizeof(ie_.upr_src_mac_addr_val));
5587  setLength();
5588  return *this;
5589 }
5590 
5591 inline pfcp_mac_address_ie_t &MacAddressIE::data()
5592 {
5593  return ie_;
5594 }
5595 
5596 inline MacAddressIE::MacAddressIE(pfcp_mac_address_ie_t &ie, LengthCalculator *parent)
5597  : IEHeader(ie.header, PFCP_IE_MAC_ADDRESS, parent),
5598  ie_(ie)
5599 {
5600 }
5601 
5602 inline uint16_t MacAddressIE::calculateLength()
5603 {
5604  return
5605  1 + /* octet 5 */
5606  (ie_.sour ? sizeof(ie_.src_mac_addr_val) : 0) +
5607  (ie_.dest ? sizeof(ie_.dst_mac_addr_val) : 0) +
5608  (ie_.usou ? sizeof(ie_.upr_src_mac_addr_val) : 0) +
5609  (ie_.udes ? sizeof(ie_.upr_dst_mac_addr_val) : 0)
5610  ;
5611 }
5612 
5614 
5615 inline Bool CTagIE::pcp() const
5616 {
5617  return ie_.ctag_pcp;
5618 }
5619 
5620 inline Bool CTagIE::dei() const
5621 {
5622  return ie_.ctag_dei;
5623 }
5624 
5625 inline Bool CTagIE::vid() const
5626 {
5627  return ie_.ctag_vid;
5628 }
5629 
5630 inline uint8_t CTagIE::pcp_value() const
5631 {
5632  return ie_.ctag_pcp_value;
5633 }
5634 
5635 inline Bool CTagIE::dei_flag() const
5636 {
5637  return ie_.ctag_dei_flag;
5638 }
5639 
5640 inline uint8_t CTagIE::cvid_value() const
5641 {
5642  return ie_.cvid_value;
5643 }
5644 
5645 inline uint8_t CTagIE::cvid_value2() const
5646 {
5647  return ie_.cvid_value2;
5648 }
5649 
5650 inline CTagIE &CTagIE::pcp(Bool val)
5651 {
5652  ie_.ctag_pcp = val ? 1 : 0;
5653  setLength();
5654  return *this;
5655 }
5656 
5657 inline CTagIE &CTagIE::dei(Bool val)
5658 {
5659  ie_.ctag_dei = val ? 1 : 0;
5660  setLength();
5661  return *this;
5662 }
5663 
5664 inline CTagIE &CTagIE::vid(Bool val)
5665 {
5666  ie_.ctag_vid = val ? 1 : 0;
5667  setLength();
5668  return *this;
5669 }
5670 
5671 inline CTagIE &CTagIE::pcp_value(uint8_t val)
5672 {
5673  ie_.ctag_pcp_value = val;
5674  setLength();
5675  return *this;
5676 }
5677 
5678 inline CTagIE &CTagIE::dei_flag(Bool val)
5679 {
5680  ie_.ctag_dei_flag = val ? 1 : 0;
5681  setLength();
5682  return *this;
5683 }
5684 
5685 inline CTagIE &CTagIE::cvid_value(uint8_t val)
5686 {
5687  ie_.cvid_value = val;
5688  setLength();
5689  return *this;
5690 }
5691 
5692 inline CTagIE &CTagIE::cvid_value2(uint8_t val)
5693 {
5694  ie_.cvid_value2 = val;
5695  setLength();
5696  return *this;
5697 }
5698 
5699 inline pfcp_ctag_ie_t &CTagIE::data()
5700 {
5701  return ie_;
5702 }
5703 
5704 inline CTagIE::CTagIE(pfcp_ctag_ie_t &ie, LengthCalculator *parent)
5705  : IEHeader(ie.header, PFCP_IE_CTAG, parent),
5706  ie_(ie)
5707 {
5708 }
5709 
5710 inline uint16_t CTagIE::calculateLength()
5711 {
5712  return sizeof(pfcp_ctag_ie_t) - sizeof(pfcp_ie_header_t);
5713 }
5714 
5716 
5717 inline Bool STagIE::pcp() const
5718 {
5719  return ie_.stag_pcp;
5720 }
5721 
5722 inline Bool STagIE::dei() const
5723 {
5724  return ie_.stag_dei;
5725 }
5726 
5727 inline Bool STagIE::vid() const
5728 {
5729  return ie_.stag_vid;
5730 }
5731 
5732 inline uint8_t STagIE::pcp_value() const
5733 {
5734  return ie_.stag_pcp_value;
5735 }
5736 
5737 inline Bool STagIE::dei_flag() const
5738 {
5739  return ie_.stag_dei_flag;
5740 }
5741 
5742 inline uint8_t STagIE::svid_value() const
5743 {
5744  return ie_.svid_value;
5745 }
5746 
5747 inline uint8_t STagIE::svid_value2() const
5748 {
5749  return ie_.svid_value2;
5750 }
5751 
5752 inline STagIE &STagIE::pcp(Bool val)
5753 {
5754  ie_.stag_pcp = val ? 1 : 0;
5755  setLength();
5756  return *this;
5757 }
5758 
5759 inline STagIE &STagIE::dei(Bool val)
5760 {
5761  ie_.stag_dei = val ? 1 : 0;
5762  setLength();
5763  return *this;
5764 }
5765 
5766 inline STagIE &STagIE::vid(Bool val)
5767 {
5768  ie_.stag_vid = val ? 1 : 0;
5769  setLength();
5770  return *this;
5771 }
5772 
5773 inline STagIE &STagIE::pcp_value(uint8_t val)
5774 {
5775  ie_.stag_pcp_value = val;
5776  setLength();
5777  return *this;
5778 }
5779 
5780 inline STagIE &STagIE::dei_flag(Bool val)
5781 {
5782  ie_.stag_dei_flag = val ? 1 : 0;
5783  setLength();
5784  return *this;
5785 }
5786 
5787 inline STagIE &STagIE::svid_value(uint8_t val)
5788 {
5789  ie_.svid_value = val;
5790  setLength();
5791  return *this;
5792 }
5793 
5794 inline STagIE &STagIE::svid_value2(uint8_t val)
5795 {
5796  ie_.svid_value2 = val;
5797  setLength();
5798  return *this;
5799 }
5800 
5801 inline pfcp_stag_ie_t &STagIE::data()
5802 {
5803  return ie_;
5804 }
5805 
5806 inline STagIE::STagIE(pfcp_stag_ie_t &ie, LengthCalculator *parent)
5807  : IEHeader(ie.header, PFCP_IE_STAG, parent),
5808  ie_(ie)
5809 {
5810 }
5811 
5812 inline uint16_t STagIE::calculateLength()
5813 {
5814  return sizeof(pfcp_stag_ie_t) - sizeof(pfcp_ie_header_t);
5815 }
5816 
5818 
5819 inline uint16_t EthertypeIE::ethertype() const
5820 {
5821  return ie_.ethertype;
5822 }
5823 
5824 inline EthertypeIE &EthertypeIE::ethertype(uint16_t val)
5825 {
5826  ie_.ethertype = val;
5827  setLength();
5828  return *this;
5829 }
5830 
5831 inline pfcp_ethertype_ie_t &EthertypeIE::data()
5832 {
5833  return ie_;
5834 }
5835 
5836 inline EthertypeIE::EthertypeIE(pfcp_ethertype_ie_t &ie, LengthCalculator *parent)
5837  : IEHeader(ie.header, PFCP_IE_ETHERTYPE, parent),
5838  ie_(ie)
5839 {
5840 }
5841 
5842 inline uint16_t EthertypeIE::calculateLength()
5843 {
5844  return sizeof(pfcp_ethertype_ie_t) - sizeof(pfcp_ie_header_t);
5845 }
5846 
5848 
5849 inline Bool ProxyingIE::arp() const
5850 {
5851  return ie_.arp;
5852 }
5853 
5854 inline Bool ProxyingIE::ins() const
5855 {
5856  return ie_.ins;
5857 }
5858 
5859 inline ProxyingIE &ProxyingIE::arp(Bool val)
5860 {
5861  ie_.arp = val ? 1 : 0;
5862  setLength();
5863  return *this;
5864 }
5865 
5866 inline ProxyingIE &ProxyingIE::ins(Bool val)
5867 {
5868  ie_.ins = val ? 1 : 0;
5869  setLength();
5870  return *this;
5871 }
5872 
5873 inline pfcp_proxying_ie_t &ProxyingIE::data()
5874 {
5875  return ie_;
5876 }
5877 
5878 inline ProxyingIE::ProxyingIE(pfcp_proxying_ie_t &ie, LengthCalculator *parent)
5879  : IEHeader(ie.header, PFCP_IE_PROXYING, parent),
5880  ie_(ie)
5881 {
5882 }
5883 
5884 inline uint16_t ProxyingIE::calculateLength()
5885 {
5886  return sizeof(pfcp_proxying_ie_t) - sizeof(pfcp_ie_header_t);
5887 }
5888 
5890 
5891 inline uint32_t EthernetFilterIdIE::eth_fltr_id_val() const
5892 {
5893  return ie_.eth_fltr_id_val;
5894 }
5895 
5896 inline EthernetFilterIdIE &EthernetFilterIdIE::eth_fltr_id_val(uint32_t val)
5897 {
5898  ie_.eth_fltr_id_val = val;
5899  setLength();
5900  return *this;
5901 }
5902 
5903 inline pfcp_eth_fltr_id_ie_t &EthernetFilterIdIE::data()
5904 {
5905  return ie_;
5906 }
5907 
5908 inline EthernetFilterIdIE::EthernetFilterIdIE(pfcp_eth_fltr_id_ie_t &ie, LengthCalculator *parent)
5909  : IEHeader(ie.header, PFCP_IE_ETH_FLTR_ID, parent),
5910  ie_(ie)
5911 {
5912 }
5913 
5914 inline uint16_t EthernetFilterIdIE::calculateLength()
5915 {
5916  return sizeof(pfcp_eth_fltr_id_ie_t) - sizeof(pfcp_ie_header_t);
5917 }
5918 
5920 
5921 inline Bool EthernetFilterPropertiesIE::bide() const
5922 {
5923  return ie_.bide;
5924 }
5925 
5926 inline EthernetFilterPropertiesIE &EthernetFilterPropertiesIE::bide(Bool val)
5927 {
5928  ie_.bide = val ? 1 : 0;
5929  setLength();
5930  return *this;
5931 }
5932 
5933 inline pfcp_eth_fltr_props_ie_t &EthernetFilterPropertiesIE::data()
5934 {
5935  return ie_;
5936 }
5937 
5938 inline EthernetFilterPropertiesIE::EthernetFilterPropertiesIE(pfcp_eth_fltr_props_ie_t &ie, LengthCalculator *parent)
5939  : IEHeader(ie.header, PFCP_IE_ETH_FLTR_PROPS, parent),
5940  ie_(ie)
5941 {
5942 }
5943 
5945 {
5946  return sizeof(pfcp_eth_fltr_props_ie_t) - sizeof(pfcp_ie_header_t);
5947 }
5948 
5950 
5952 {
5953  return ie_.pckt_cnt_val;
5954 }
5955 
5956 inline SuggestedBufferingPacketsCountIE &SuggestedBufferingPacketsCountIE::pckt_cnt_val(uint8_t val)
5957 {
5958  ie_.pckt_cnt_val = val;
5959  setLength();
5960  return *this;
5961 }
5962 
5963 inline pfcp_suggstd_buf_pckts_cnt_ie_t &SuggestedBufferingPacketsCountIE::data()
5964 {
5965  return ie_;
5966 }
5967 
5968 inline SuggestedBufferingPacketsCountIE::SuggestedBufferingPacketsCountIE(pfcp_suggstd_buf_pckts_cnt_ie_t &ie, LengthCalculator *parent)
5969  : IEHeader(ie.header, PFCP_IE_SUGGSTD_BUF_PCKTS_CNT, parent),
5970  ie_(ie)
5971 {
5972 }
5973 
5975 {
5976  return sizeof(pfcp_suggstd_buf_pckts_cnt_ie_t) - sizeof(pfcp_ie_header_t);
5977 }
5978 
5980 
5981 inline Bool UserIdIE::imsif() const
5982 {
5983  return ie_.imsif;
5984 }
5985 
5986 inline Bool UserIdIE::imeif() const
5987 {
5988  return ie_.imeif;
5989 }
5990 
5991 inline Bool UserIdIE::msisdnf() const
5992 {
5993  return ie_.msisdnf;
5994 }
5995 
5996 inline Bool UserIdIE::naif() const
5997 {
5998  return ie_.naif;
5999 }
6000 
6001 inline uint8_t UserIdIE::length_of_imsi() const
6002 {
6003  return ie_.length_of_imsi;
6004 }
6005 
6006 inline uint8_t UserIdIE::length_of_imei() const
6007 {
6008  return ie_.length_of_imei;
6009 }
6010 
6011 inline uint8_t UserIdIE::len_of_msisdn() const
6012 {
6013  return ie_.len_of_msisdn;
6014 }
6015 
6016 inline uint8_t UserIdIE::length_of_nai() const
6017 {
6018  return ie_.length_of_nai;
6019 }
6020 
6021 inline const uint8_t *UserIdIE::imsi() const
6022 {
6023  return ie_.imsi;
6024 }
6025 
6026 inline const uint8_t *UserIdIE::imei() const
6027 {
6028  return ie_.imei;
6029 }
6030 
6031 inline const uint8_t *UserIdIE::msisdn() const
6032 {
6033  return ie_.msisdn;
6034 }
6035 
6036 inline const uint8_t *UserIdIE::nai() const
6037 {
6038  return ie_.nai;
6039 }
6040 
6041 inline UserIdIE &UserIdIE::imsi(const uint8_t *val, uint8_t len)
6042 {
6043  ie_.imsif = 1;
6044  if (len > sizeof(ie_.imsi))
6045  len = sizeof(ie_.imsi);
6046  ie_.length_of_imsi = len;
6047  std::memcpy(ie_.imsi, val, len);
6048  return *this;
6049 }
6050 
6051 inline UserIdIE &UserIdIE::imei(const uint8_t *val, uint8_t len)
6052 {
6053  ie_.imeif = 1;
6054  if (len > sizeof(ie_.imei))
6055  len = sizeof(ie_.imei);
6056  ie_.length_of_imei = len;
6057  std::memcpy(ie_.imei, val, len);
6058  return *this;
6059 }
6060 
6061 inline UserIdIE &UserIdIE::msisdn(const uint8_t *val, uint8_t len)
6062 {
6063  ie_.msisdnf = 1;
6064  if (len > sizeof(ie_.msisdn))
6065  len = sizeof(ie_.msisdn);
6066  ie_.len_of_msisdn = len;
6067  std::memcpy(ie_.msisdn, val, len);
6068  return *this;
6069 }
6070 
6071 inline UserIdIE &UserIdIE::nai(const uint8_t *val, uint8_t len)
6072 {
6073  ie_.naif = 1;
6074  if (len > sizeof(ie_.nai))
6075  len = sizeof(ie_.nai);
6076  ie_.length_of_nai = len;
6077  std::memcpy(ie_.nai, val, len);
6078  return *this;
6079 }
6080 
6081 inline pfcp_user_id_ie_t &UserIdIE::data()
6082 {
6083  return ie_;
6084 }
6085 
6086 inline UserIdIE::UserIdIE(pfcp_user_id_ie_t &ie, LengthCalculator *parent)
6087  : IEHeader(ie.header, PFCP_IE_USER_ID, parent),
6088  ie_(ie)
6089 {
6090 }
6091 
6092 inline uint16_t UserIdIE::calculateLength()
6093 {
6094  return
6095  1 + /* octet 5 */
6096  (ie_.imsif ? sizeof(ie_.length_of_imsi) + ie_.length_of_imsi : 0) +
6097  (ie_.imeif ? sizeof(ie_.length_of_imei) + ie_.length_of_imei : 0) +
6098  (ie_.msisdnf ? sizeof(ie_.len_of_msisdn) + ie_.len_of_msisdn : 0) +
6099  (ie_.naif ? sizeof(ie_.length_of_nai) + ie_.length_of_nai : 0)
6100  ;
6101 }
6102 
6104 
6105 inline Bool EthernetPduSessionInformationIE::ethi() const
6106 {
6107  return ie_.ethi;
6108 }
6109 
6110 inline EthernetPduSessionInformationIE &EthernetPduSessionInformationIE::ethi(Bool val)
6111 {
6112  ie_.ethi = val ? 1 : 0;
6113  setLength();
6114  return *this;
6115 }
6116 
6117 inline pfcp_eth_pdu_sess_info_ie_t &EthernetPduSessionInformationIE::data()
6118 {
6119  return ie_;
6120 }
6121 
6122 inline EthernetPduSessionInformationIE::EthernetPduSessionInformationIE(pfcp_eth_pdu_sess_info_ie_t &ie, LengthCalculator *parent)
6123  : IEHeader(ie.header, PFCP_IE_ETH_PDU_SESS_INFO, parent),
6124  ie_(ie)
6125 {
6126 }
6127 
6129 {
6130  return sizeof(pfcp_eth_pdu_sess_info_ie_t) - sizeof(pfcp_ie_header_t);
6131 }
6132 
6134 
6135 inline uint8_t MacAddressesDetectedIE::nbr_of_mac_addrs() const
6136 {
6137  return ie_.nbr_of_mac_addrs;
6138 }
6139 
6140 inline const uint8_t *MacAddressesDetectedIE::mac_addr_val(uint8_t idx)
6141 {
6142  if (idx > MAC_ADDR_VAL_LEN)
6143  return nullptr;
6144  return ie_.mac_addr_val[idx];
6145 }
6146 
6147 inline MacAddressesDetectedIE &MacAddressesDetectedIE::mac_addr_val(const uint8_t *val)
6148 {
6149  if (ie_.nbr_of_mac_addrs >= MAC_ADDR_VAL_LEN)
6150  return *this;
6151  std::memcpy(ie_.mac_addr_val[ie_.nbr_of_mac_addrs], val, 6);
6152  ie_.nbr_of_mac_addrs++;
6153  setLength();
6154  return *this;
6155 }
6156 
6157 inline pfcp_mac_addrs_detctd_ie_t &MacAddressesDetectedIE::data()
6158 {
6159  return ie_;
6160 }
6161 
6162 inline MacAddressesDetectedIE::MacAddressesDetectedIE(pfcp_mac_addrs_detctd_ie_t &ie, LengthCalculator *parent)
6163  : IEHeader(ie.header, PFCP_IE_MAC_ADDRS_DETCTD, parent),
6164  ie_(ie)
6165 {
6166 }
6167 
6169 {
6170  return
6171  sizeof(ie_.nbr_of_mac_addrs) +
6172  (ie_.nbr_of_mac_addrs * 6)
6173  ;
6174 }
6175 
6177 
6178 inline uint8_t MacAddressesRemovedIE::nbr_of_mac_addrs() const
6179 {
6180  return ie_.nbr_of_mac_addrs;
6181 }
6182 
6183 inline const uint8_t *MacAddressesRemovedIE::mac_addr_val(uint8_t idx)
6184 {
6185  if (idx > MAC_ADDR_VAL_LEN)
6186  return nullptr;
6187  return ie_.mac_addr_val[idx];
6188 }
6189 
6190 inline MacAddressesRemovedIE &MacAddressesRemovedIE::mac_addr_val(const uint8_t *val)
6191 {
6192  if (ie_.nbr_of_mac_addrs >= MAC_ADDR_VAL_LEN)
6193  return *this;
6194  std::memcpy(ie_.mac_addr_val[ie_.nbr_of_mac_addrs], val, 6);
6195  ie_.nbr_of_mac_addrs++;
6196  setLength();
6197  return *this;
6198 }
6199 
6200 inline pfcp_mac_addrs_rmvd_ie_t &MacAddressesRemovedIE::data()
6201 {
6202  return ie_;
6203 }
6204 
6205 inline MacAddressesRemovedIE::MacAddressesRemovedIE(pfcp_mac_addrs_rmvd_ie_t &ie, LengthCalculator *parent)
6206  : IEHeader(ie.header, PFCP_IE_MAC_ADDRS_RMVD, parent),
6207  ie_(ie)
6208 {
6209 }
6210 
6212 {
6213  return sizeof(pfcp_mac_addrs_rmvd_ie_t) - sizeof(pfcp_ie_header_t);
6214 }
6215 
6217 
6218 inline uint32_t EthernetInactivityTimerIE::eth_inact_timer() const
6219 {
6220  return ie_.eth_inact_timer;
6221 }
6222 
6223 inline EthernetInactivityTimerIE &EthernetInactivityTimerIE::eth_inact_timer(uint32_t val)
6224 {
6225  ie_.eth_inact_timer = val;
6226  setLength();
6227  return *this;
6228 }
6229 
6230 inline pfcp_eth_inact_timer_ie_t &EthernetInactivityTimerIE::data()
6231 {
6232  return ie_;
6233 }
6234 
6235 inline EthernetInactivityTimerIE::EthernetInactivityTimerIE(pfcp_eth_inact_timer_ie_t &ie, LengthCalculator *parent)
6236  : IEHeader(ie.header, PFCP_IE_ETH_INACT_TIMER, parent),
6237  ie_(ie)
6238 {
6239 }
6240 
6242 {
6243  return sizeof(pfcp_eth_inact_timer_ie_t) - sizeof(pfcp_ie_header_t);
6244 }
6245 
6247 
6248 inline uint32_t SubsequentEventQuotaIE::sbsqnt_evnt_quota() const
6249 {
6250  return ie_.sbsqnt_evnt_quota;
6251 }
6252 
6253 inline SubsequentEventQuotaIE &SubsequentEventQuotaIE::sbsqnt_evnt_quota(uint32_t val)
6254 {
6255  ie_. sbsqnt_evnt_quota = val;
6256  setLength();
6257  return *this;
6258 }
6259 
6260 inline pfcp_sbsqnt_evnt_quota_ie_t &SubsequentEventQuotaIE::data()
6261 {
6262  return ie_;
6263 }
6264 
6265 inline SubsequentEventQuotaIE::SubsequentEventQuotaIE(pfcp_sbsqnt_evnt_quota_ie_t &ie, LengthCalculator *parent)
6266  : IEHeader(ie.header, PFCP_IE_SBSQNT_EVNT_QUOTA, parent),
6267  ie_(ie)
6268 {
6269 }
6270 
6272 {
6273  return sizeof(pfcp_sbsqnt_evnt_quota_ie_t) - sizeof(pfcp_ie_header_t);
6274 }
6275 
6277 
6278 inline uint32_t SubsequentEventThresholdIE::sbsqnt_evnt_thresh() const
6279 {
6280  return ie_.sbsqnt_evnt_thresh;
6281 }
6282 
6283 inline SubsequentEventThresholdIE &SubsequentEventThresholdIE::sbsqnt_evnt_thresh(uint32_t val)
6284 {
6285  ie_.sbsqnt_evnt_thresh = val;
6286  setLength();
6287  return *this;
6288 }
6289 
6290 inline pfcp_sbsqnt_evnt_thresh_ie_t &SubsequentEventThresholdIE::data()
6291 {
6292  return ie_;
6293 }
6294 
6295 inline SubsequentEventThresholdIE::SubsequentEventThresholdIE(pfcp_sbsqnt_evnt_thresh_ie_t &ie, LengthCalculator *parent)
6296  : IEHeader(ie.header, PFCP_IE_SBSQNT_EVNT_THRESH, parent),
6297  ie_(ie)
6298 {
6299 }
6300 
6302 {
6303  return sizeof(pfcp_sbsqnt_evnt_thresh_ie_t) - sizeof(pfcp_ie_header_t);
6304 }
6305 
6307 
6308 inline uint8_t TraceInformationIE::mcc_digit_1() const
6309 {
6310  return ie_.mcc_digit_1;
6311 }
6312 
6313 inline uint8_t TraceInformationIE::mcc_digit_2() const
6314 {
6315  return ie_.mcc_digit_2;
6316 }
6317 
6318 inline uint8_t TraceInformationIE::mcc_digit_3() const
6319 {
6320  return ie_.mcc_digit_3;
6321 }
6322 
6323 inline uint8_t TraceInformationIE::mnc_digit_1() const
6324 {
6325  return ie_.mnc_digit_1;
6326 }
6327 
6328 inline uint8_t TraceInformationIE::mnc_digit_2() const
6329 {
6330  return ie_.mnc_digit_2;
6331 }
6332 
6333 inline uint8_t TraceInformationIE::mnc_digit_3() const
6334 {
6335  return ie_.mnc_digit_3;
6336 }
6337 
6338 inline uint32_t TraceInformationIE::trace_id() const
6339 {
6340  return ie_.trace_id;
6341 }
6342 
6343 inline uint8_t TraceInformationIE::len_of_trigrng_evnts() const
6344 {
6345  return ie_.len_of_trigrng_evnts;
6346 }
6347 
6348 inline const uint8_t *TraceInformationIE::trigrng_evnts() const
6349 {
6350  return ie_.trigrng_evnts;
6351 }
6352 
6353 inline uint16_t TraceInformationIE::sess_trc_depth() const
6354 {
6355  return ie_.sess_trc_depth;
6356 }
6357 
6358 inline uint32_t TraceInformationIE::len_of_list_of_intfcs() const
6359 {
6360  return ie_.len_of_list_of_intfcs;
6361 }
6362 
6363 inline const uint8_t *TraceInformationIE::list_of_intfcs() const
6364 {
6365  return ie_.list_of_intfcs;
6366 }
6367 
6369 {
6370  return ie_.len_of_ip_addr_of_trc_coll_ent;
6371 }
6372 
6373 inline in_addr &TraceInformationIE::ipv4_addr_of_trc_coll_ent() const
6374 {
6375  AliasPointer u;
6376  u.uint8_t_ptr = ie_.ip_addr_of_trc_coll_ent;
6377  return *u.in_addr_ptr;
6378 }
6379 
6380 inline in6_addr &TraceInformationIE::ipv6_addr_of_trc_coll_ent() const
6381 {
6382  AliasPointer u;
6383  u.uint8_t_ptr = ie_.ip_addr_of_trc_coll_ent;
6384  return *u.in6_addr_ptr;
6385 }
6386 
6387 inline TraceInformationIE &TraceInformationIE::mcc(const char *val, uint8_t len)
6388 {
6389  if (len != 3)
6390  return *this;
6391  ie_.mcc_digit_1 = val[0] - '0';
6392  ie_.mcc_digit_2 = val[1] - '0';
6393  ie_.mcc_digit_3 = val[2] - '0';
6394  setLength();
6395  return *this;
6396 }
6397 
6398 inline TraceInformationIE &TraceInformationIE::mnc(const char *val, uint8_t len)
6399 {
6400  if (len < 2 || len > 3)
6401  return *this;
6402  ie_.mnc_digit_1 = val[0];
6403  ie_.mnc_digit_2 = val[1];
6404  ie_.mnc_digit_3 = len == 2 ? 15 : val[2];
6405  setLength();
6406  return *this;
6407 }
6408 
6409 inline TraceInformationIE &TraceInformationIE::plmnid(const uint8_t *val)
6410 {
6411  std::memcpy(reinterpret_cast<uint8_t*>(&ie_) + sizeof(pfcp_ie_header_t), val, 3);
6412  setLength();
6413  return *this;
6414 }
6415 
6416 inline TraceInformationIE &TraceInformationIE::trace_id(uint32_t val)
6417 {
6418  ie_.trace_id = val;
6419  setLength();
6420  return *this;
6421 }
6422 
6423 inline TraceInformationIE &TraceInformationIE::trigrng_evnts(const uint8_t *val)
6424 {
6425  ie_.len_of_trigrng_evnts = sizeof(ie_.trigrng_evnts);
6426  std::memcpy(ie_.trigrng_evnts, val, sizeof(ie_.trigrng_evnts));
6427  setLength();
6428  return *this;
6429 }
6430 
6431 inline TraceInformationIE &TraceInformationIE::list_of_intfcs(const uint8_t *val)
6432 {
6433  ie_.len_of_list_of_intfcs = sizeof(ie_.list_of_intfcs);
6434  std::memcpy(ie_.list_of_intfcs, val, sizeof(ie_.list_of_intfcs));
6435  setLength();
6436  return *this;
6437 }
6438 
6439 inline TraceInformationIE &TraceInformationIE::ip_addr_of_trc_coll_ent(const ESocket::Address &val)
6440 {
6441  if (val.getFamily() == ESocket::Family::INET)
6442  return ip_addr_of_trc_coll_ent(val.getInet().sin_addr);
6443  else if (val.getFamily() == ESocket::Family::INET6)
6444  return ip_addr_of_trc_coll_ent(val.getInet6().sin6_addr);
6445  return *this;
6446 }
6447 
6448 inline TraceInformationIE &TraceInformationIE::ip_addr_of_trc_coll_ent(const EIpAddress &val)
6449 {
6450  if (val.family() == AF_INET)
6451  return ip_addr_of_trc_coll_ent(val.ipv4Address());
6452  else if (val.family() == AF_INET6)
6453  return ip_addr_of_trc_coll_ent(val.ipv6Address());
6454  return *this;
6455 }
6456 
6457 inline TraceInformationIE &TraceInformationIE::ip_addr_of_trc_coll_ent(const in_addr &val)
6458 {
6459  ie_.len_of_ip_addr_of_trc_coll_ent = sizeof(in_addr);
6460  std::memcpy(ie_.ip_addr_of_trc_coll_ent, &val, sizeof(in_addr));
6461  setLength();
6462  return *this;
6463 }
6464 
6465 inline TraceInformationIE &TraceInformationIE::ip_addr_of_trc_coll_ent(const in6_addr &val)
6466 {
6467  ie_.len_of_ip_addr_of_trc_coll_ent = sizeof(in6_addr);
6468  std::memcpy(ie_.ip_addr_of_trc_coll_ent, &val, sizeof(in6_addr));
6469  setLength();
6470  return *this;
6471 }
6472 
6473 inline pfcp_trc_info_ie_t &TraceInformationIE::data()
6474 {
6475  return ie_;
6476 }
6477 
6478 inline TraceInformationIE::TraceInformationIE(pfcp_trc_info_ie_t &ie, LengthCalculator *parent)
6479  : IEHeader(ie.header, PFCP_IE_TRC_INFO, parent),
6480  ie_(ie)
6481 {
6482 }
6483 
6484 inline uint16_t TraceInformationIE::calculateLength()
6485 {
6486  return
6487  3 + /* mcc/mnc */
6488  3 + /* trace id */
6489  sizeof(ie_.len_of_trigrng_evnts) + ie_.len_of_trigrng_evnts +
6490  sizeof(ie_.len_of_list_of_intfcs) + ie_.len_of_list_of_intfcs +
6491  sizeof(ie_.len_of_ip_addr_of_trc_coll_ent) + ie_.len_of_ip_addr_of_trc_coll_ent
6492  ;
6493 }
6494 
6496 
6497 inline uint16_t FramedRouteIE::framed_route_len() const
6498 {
6499  return ie_.header.len;
6500 }
6501 
6502 inline const uint8_t *FramedRouteIE::framed_route() const
6503 {
6504  return ie_.framed_route;
6505 }
6506 
6507 inline FramedRouteIE &FramedRouteIE::framed_route(const uint8_t *val, uint16_t len)
6508 {
6509  if (len > sizeof(ie_.framed_route))
6510  len = sizeof(ie_.framed_route);
6511  std::memcpy(ie_.framed_route, val, len);
6512  ie_.header.len = len;
6513  return *this;
6514 }
6515 
6516 inline pfcp_framed_route_ie_t &FramedRouteIE::data()
6517 {
6518  return ie_;
6519 }
6520 
6521 inline FramedRouteIE::FramedRouteIE(pfcp_framed_route_ie_t &ie, LengthCalculator *parent)
6522  : IEHeader(ie.header, PFCP_IE_FRAMED_ROUTE, parent),
6523  ie_(ie)
6524 {
6525 }
6526 
6527 inline uint16_t FramedRouteIE::calculateLength()
6528 {
6529  return sizeof(pfcp_framed_route_ie_t) - sizeof(pfcp_ie_header_t);
6530 }
6531 
6533 
6535 {
6536  return static_cast<FramedRoutingEnum>(ie_.framed_routing);
6537 }
6538 
6539 inline FramedRoutingIE &FramedRoutingIE::framed_routing(FramedRoutingEnum val)
6540 {
6541  ie_.framed_routing = static_cast<uint32_t>(val);
6542  setLength();
6543  return *this;
6544 }
6545 
6546 inline pfcp_framed_routing_ie_t &FramedRoutingIE::data()
6547 {
6548  return ie_;
6549 }
6550 
6551 inline FramedRoutingIE::FramedRoutingIE(pfcp_framed_routing_ie_t &ie, LengthCalculator *parent)
6552  : IEHeader(ie.header, PFCP_IE_FRAMED_ROUTING, parent),
6553  ie_(ie)
6554 {
6555 }
6556 
6557 inline uint16_t FramedRoutingIE::calculateLength()
6558 {
6559  return sizeof(pfcp_framed_routing_ie_t) - sizeof(pfcp_ie_header_t);
6560 }
6561 
6563 
6564 inline uint16_t FramedIpv6RouteIE::frmd_ipv6_rte_len() const
6565 {
6566  return ie_.header.len;
6567 }
6568 
6569 inline const uint8_t *FramedIpv6RouteIE::frmd_ipv6_rte() const
6570 {
6571  return ie_.frmd_ipv6_rte;
6572 }
6573 
6574 inline FramedIpv6RouteIE &FramedIpv6RouteIE::frmd_ipv6_rte(const uint8_t *val, uint16_t len)
6575 {
6576  if (len > sizeof(ie_.frmd_ipv6_rte))
6577  len = sizeof(ie_.frmd_ipv6_rte);
6578  std::memcpy(ie_.frmd_ipv6_rte, val, len);
6579  ie_.header.len = len;
6580  return *this;
6581 }
6582 
6583 inline pfcp_frmd_ipv6_rte_ie_t &FramedIpv6RouteIE::data()
6584 {
6585  return ie_;
6586 }
6587 
6588 inline FramedIpv6RouteIE::FramedIpv6RouteIE(pfcp_frmd_ipv6_rte_ie_t &ie, LengthCalculator *parent)
6589  : IEHeader(ie.header, PFCP_IE_FRMD_IPV6_RTE, parent),
6590  ie_(ie)
6591 {
6592 }
6593 
6594 inline uint16_t FramedIpv6RouteIE::calculateLength()
6595 {
6596  return sizeof(pfcp_frmd_ipv6_rte_ie_t) - sizeof(pfcp_ie_header_t);
6597 }
6598 
6600 
6601 inline uint32_t EventQuotaIE::sbsqnt_evnt_quota() const
6602 {
6603  return ie_.event_quota;
6604 }
6605 
6606 inline EventQuotaIE &EventQuotaIE::sbsqnt_evnt_quota(uint32_t val)
6607 {
6608  ie_.event_quota = val;
6609  setLength();
6610  return *this;
6611 }
6612 
6613 inline pfcp_event_quota_ie_t &EventQuotaIE::data()
6614 {
6615  return ie_;
6616 }
6617 
6618 inline EventQuotaIE::EventQuotaIE(pfcp_event_quota_ie_t &ie, LengthCalculator *parent)
6619  : IEHeader(ie.header, PFCP_IE_EVENT_QUOTA, parent),
6620  ie_(ie)
6621 {
6622 }
6623 
6624 inline uint16_t EventQuotaIE::calculateLength()
6625 {
6626  return sizeof(pfcp_event_quota_ie_t) - sizeof(pfcp_ie_header_t);
6627 }
6628 
6630 
6631 inline uint32_t EventThresholdIE::event_threshold() const
6632 {
6633  return ie_.event_threshold;
6634 }
6635 
6636 inline EventThresholdIE &EventThresholdIE::event_threshold(uint32_t val)
6637 {
6638  ie_.event_threshold = val;
6639  setLength();
6640  return *this;
6641 }
6642 
6643 inline pfcp_event_threshold_ie_t &EventThresholdIE::data()
6644 {
6645  return ie_;
6646 }
6647 
6648 inline EventThresholdIE::EventThresholdIE(pfcp_event_threshold_ie_t &ie, LengthCalculator *parent)
6649  : IEHeader(ie.header, PFCP_IE_EVENT_THRESHOLD, parent),
6650  ie_(ie)
6651 {
6652 }
6653 
6654 inline uint16_t EventThresholdIE::calculateLength()
6655 {
6656  return sizeof(pfcp_event_threshold_ie_t) - sizeof(pfcp_ie_header_t);
6657 }
6658 
6660 
6662 {
6663  ETime t;
6664  t.setNTPTime(ie_.evnt_time_stmp);
6665  return t;
6666 }
6667 
6668 inline EventTimeStampIE &EventTimeStampIE::evnt_time_stmp(const ETime &val)
6669 {
6670  ie_.evnt_time_stmp = val.getNTPTimeSeconds();
6671  setLength();
6672  return *this;
6673 }
6674 
6675 inline pfcp_evnt_time_stmp_ie_t &EventTimeStampIE::data()
6676 {
6677  return ie_;
6678 }
6679 
6680 inline EventTimeStampIE::EventTimeStampIE(pfcp_evnt_time_stmp_ie_t &ie, LengthCalculator *parent)
6681  : IEHeader(ie.header, PFCP_IE_EVNT_TIME_STMP, parent),
6682  ie_(ie)
6683 {
6684 }
6685 
6686 inline uint16_t EventTimeStampIE::calculateLength()
6687 {
6688  return sizeof(pfcp_evnt_time_stmp_ie_t) - sizeof(pfcp_ie_header_t);
6689 }
6690 
6692 
6693 inline uint32_t AveragingWindowIE::avgng_wnd() const
6694 {
6695  return ie_.avgng_wnd;
6696 }
6697 
6698 inline AveragingWindowIE &AveragingWindowIE::avgng_wnd(uint32_t val)
6699 {
6700  ie_.avgng_wnd = val;
6701  setLength();
6702  return *this;
6703 }
6704 
6705 inline pfcp_avgng_wnd_ie_t &AveragingWindowIE::data()
6706 {
6707  return ie_;
6708 }
6709 
6710 inline AveragingWindowIE::AveragingWindowIE(pfcp_avgng_wnd_ie_t &ie, LengthCalculator *parent)
6711  : IEHeader(ie.header, PFCP_IE_AVGNG_WND, parent),
6712  ie_(ie)
6713 {
6714 }
6715 
6716 inline uint16_t AveragingWindowIE::calculateLength()
6717 {
6718  return sizeof(pfcp_avgng_wnd_ie_t) - sizeof(pfcp_ie_header_t);
6719 }
6720 
6722 
6723 inline uint8_t PagingPolicyIndicatorIE::ppi_value() const
6724 {
6725  return ie_.ppi_value;
6726 }
6727 
6728 inline PagingPolicyIndicatorIE &PagingPolicyIndicatorIE::ppi_value(uint8_t val)
6729 {
6730  ie_.ppi_value = val;
6731  setLength();
6732  return *this;
6733 }
6734 
6735 inline pfcp_paging_plcy_indctr_ie_t &PagingPolicyIndicatorIE::data()
6736 {
6737  return ie_;
6738 }
6739 
6740 inline PagingPolicyIndicatorIE::PagingPolicyIndicatorIE(pfcp_paging_plcy_indctr_ie_t &ie, LengthCalculator *parent)
6741  : IEHeader(ie.header, PFCP_IE_PAGING_PLCY_INDCTR, parent),
6742  ie_(ie)
6743 {
6744 }
6745 
6747 {
6748  return sizeof(pfcp_paging_plcy_indctr_ie_t) - sizeof(pfcp_ie_header_t);
6749 }
6750 
6752 
6753 inline uint16_t ApnDnnIE::apn_dnn_len() const
6754 {
6755  return ie_.header.len;
6756 }
6757 
6758 inline const uint8_t *ApnDnnIE::apn_dnn() const
6759 {
6760  return ie_.apn_dnn;
6761 }
6762 
6763 inline ApnDnnIE &ApnDnnIE::apn_dnn(const uint8_t *val, uint16_t len)
6764 {
6765  if (len > sizeof(ie_.apn_dnn))
6766  len = sizeof(ie_.apn_dnn);
6767  std::memcpy(ie_.apn_dnn, val, len);
6768  ie_.header.len = len;
6769  return *this;
6770 }
6771 
6772 inline pfcp_apn_dnn_ie_t &ApnDnnIE::data()
6773 {
6774  return ie_;
6775 }
6776 
6777 inline ApnDnnIE::ApnDnnIE(pfcp_apn_dnn_ie_t &ie, LengthCalculator *parent)
6778  : IEHeader(ie.header, PFCP_IE_APN_DNN, parent),
6779  ie_(ie)
6780 {
6781 }
6782 
6783 inline uint16_t ApnDnnIE::calculateLength()
6784 {
6785  return sizeof(pfcp_apn_dnn_ie_t) - sizeof(pfcp_ie_header_t);
6786 }
6787 
6789 
6791 {
6792  return static_cast<TgppInterfaceTypeEnum>(ie_.interface_type_value);
6793 }
6794 
6796 {
6797  ie_.interface_type_value = static_cast<uint8_t>(val);
6798  setLength();
6799  return *this;
6800 }
6801 
6802 inline pfcp_3gpp_intfc_type_ie_t &TgppInterfaceTypeIE::data()
6803 {
6804  return ie_;
6805 }
6806 
6807 inline TgppInterfaceTypeIE::TgppInterfaceTypeIE(pfcp_3gpp_intfc_type_ie_t &ie, LengthCalculator *parent)
6808  : IEHeader(ie.header, PFCP_IE_3GPP_INTFC_TYPE, parent),
6809  ie_(ie)
6810 {
6811 }
6812 
6813 inline uint16_t TgppInterfaceTypeIE::calculateLength()
6814 {
6815  return sizeof(pfcp_3gpp_intfc_type_ie_t) - sizeof(pfcp_ie_header_t);
6816 }
6817 
6821 
6822 inline PfdContentsIE &PfdContextIE::pfdContents(uint8_t idx)
6823 {
6824  return pfdcnts_[idx];
6825 }
6826 
6827 inline pfcp_pfd_context_ie_t &PfdContextIE::data()
6828 {
6829  return ie_;
6830 }
6831 
6832 inline PfdContextIE::PfdContextIE(pfcp_pfd_context_ie_t &ie, LengthCalculator *parent)
6833  : IEHeader(ie.header, IE_PFD_CONTEXT, parent),
6834  ie_(ie)
6835 {
6836  for (int i=0; i<MAX_LIST_SIZE; i++)
6837  pfdcnts_.push_back(PfdContentsIE(ie_.pfd_contents[i],this));
6838 }
6839 
6840 inline uint16_t PfdContextIE::calculateLength()
6841 {
6842  uint16_t len = 0;
6843  for (int idx=0; idx<ie_.pfd_contents_count; idx++)
6844  len += pfdcnts_[idx].packedLength();
6845  return len;
6846 }
6847 
6849 
6850 inline ApplicationIdIE &ApplicationIdsPfdsIE::applicationId()
6851 {
6852  return appid_;
6853 }
6854 
6855 inline PfdContextIE &ApplicationIdsPfdsIE::pfdContext(uint8_t idx)
6856 {
6857  return pfdctxts_[idx];
6858 }
6859 
6861 {
6862  return (ie_.pfd_context_count < MAX_LIST_SIZE) ?
6863  ie_.pfd_context_count++ : -1;
6864 }
6865 
6866 inline pfcp_app_ids_pfds_ie_t &ApplicationIdsPfdsIE::data()
6867 {
6868  return ie_;
6869 }
6870 
6871 inline ApplicationIdsPfdsIE::ApplicationIdsPfdsIE(pfcp_app_ids_pfds_ie_t &ie, LengthCalculator *parent)
6872  : IEHeader(ie.header, IE_APP_IDS_PFDS, parent),
6873  ie_(ie),
6874  appid_(ie_.application_id, this)
6875 {
6876  for (int i=0; i<MAX_LIST_SIZE; i++)
6877  pfdctxts_.push_back(PfdContextIE(ie_.pfd_context[i], this));
6878 }
6879 
6880 inline uint16_t ApplicationIdsPfdsIE::calculateLength()
6881 {
6882  uint16_t len = appid_.packedLength();
6883  for (int i=0; i<ie_.pfd_context_count; i++)
6884  len += pfdctxts_[i].packedLength();
6885  return len;
6886 }
6887 
6889 
6890 inline TrafficEndpointIdIE &CreateTrafficEndpointIE::traffic_endpt_id()
6891 {
6892  return teid_;
6893 }
6894 
6895 inline FTeidIE &CreateTrafficEndpointIE::local_fteid()
6896 {
6897  return lfteid_;
6898 }
6899 
6900 inline NetworkInstanceIE &CreateTrafficEndpointIE::ntwk_inst()
6901 {
6902  return ni_;
6903 }
6904 
6905 inline UeIpAddressIE &CreateTrafficEndpointIE::ue_ip_address()
6906 {
6907  return ueip_;
6908 }
6909 
6910 inline EthernetPduSessionInformationIE &CreateTrafficEndpointIE::eth_pdu_sess_info()
6911 {
6912  return epsi_;
6913 }
6914 
6915 inline FramedRouteIE &CreateTrafficEndpointIE::framed_route(uint8_t idx)
6916 {
6917  return fr_[idx];
6918 }
6919 
6920 inline FramedRoutingIE &CreateTrafficEndpointIE::framed_routing()
6921 {
6922  return fring_;
6923 }
6924 
6925 inline FramedIpv6RouteIE &CreateTrafficEndpointIE::frmd_ipv6_rte(uint8_t idx)
6926 {
6927  return fr6_[idx];
6928 }
6929 
6931 {
6932  return (ie_.framed_route_count < MAX_LIST_SIZE) ?
6933  ie_.framed_route_count++ : -1;
6934 }
6935 
6937 {
6938  return (ie_.frmd_ipv6_rte_count < MAX_LIST_SIZE) ?
6939  ie_.frmd_ipv6_rte_count++ : -1;
6940 }
6941 
6942 inline pfcp_create_traffic_endpt_ie_t &CreateTrafficEndpointIE::data()
6943 {
6944  return ie_;
6945 }
6946 
6947 inline CreateTrafficEndpointIE::CreateTrafficEndpointIE(pfcp_create_traffic_endpt_ie_t &ie, LengthCalculator *parent)
6948  : IEHeader(ie.header, IE_CREATE_TRAFFIC_ENDPT, parent),
6949  ie_(ie),
6950  teid_(ie_.traffic_endpt_id, this),
6951  lfteid_(ie_.local_fteid, this),
6952  ni_(ie_.ntwk_inst, this),
6953  ueip_(ie_.ue_ip_address, this),
6954  epsi_(ie_.eth_pdu_sess_info, this),
6955  fring_(ie_.framed_routing, this)
6956 {
6957  for (int i=0; i<MAX_LIST_SIZE; i++)
6958  fr_.push_back(FramedRouteIE(ie_.framed_route[i],this));
6959  for (int i=0; i<MAX_LIST_SIZE; i++)
6960  fr6_.push_back(FramedIpv6RouteIE(ie_.frmd_ipv6_rte[i],this));
6961 }
6962 
6964 {
6965  uint16_t len = 0;
6966 
6967  len += teid_.packedLength();
6968  len += lfteid_.packedLength();
6969  len += ni_.packedLength();
6970  len += ueip_.packedLength();
6971  len += epsi_.packedLength();
6972  for (int i=0; i<ie_.framed_route_count; i++)
6973  len += fr_[i].packedLength();
6974  len += fring_.packedLength();
6975  for (int i=0; i<ie_.frmd_ipv6_rte_count; i++)
6976  len += fr6_[i].packedLength();
6977 
6978  return len;
6979 }
6980 
6982 
6983 inline BarIdIE &CreateBarIE::bar_id()
6984 {
6985  return barid_;
6986 }
6987 
6988 inline DownlinkDataNotificationDelayIE &CreateBarIE::dnlnk_data_notif_delay()
6989 {
6990  return ddndelay_;
6991 }
6992 
6993 inline SuggestedBufferingPacketsCountIE &CreateBarIE::suggstd_buf_pckts_cnt()
6994 {
6995  return sbpc_;
6996 }
6997 
6998 inline pfcp_create_bar_ie_t &CreateBarIE::data()
6999 {
7000  return ie_;
7001 }
7002 
7003 inline CreateBarIE::CreateBarIE(pfcp_create_bar_ie_t &ie, LengthCalculator *parent)
7004  : IEHeader(ie.header, IE_CREATE_BAR, parent),
7005  ie_(ie),
7006  barid_(ie_.bar_id, this),
7007  ddndelay_(ie_.dnlnk_data_notif_delay, this),
7008  sbpc_(ie_.suggstd_buf_pckts_cnt, this)
7009 {
7010 }
7011 
7012 inline uint16_t CreateBarIE::calculateLength()
7013 {
7014  return sizeof(pfcp_create_bar_ie_t) - sizeof(pfcp_ie_header_t);
7015 }
7016 
7018 
7019 inline QerIdIE &CreateQerIE::qer_id()
7020 {
7021  return qerid_;
7022 }
7023 
7024 inline QerCorrelationIdIE &CreateQerIE::qer_corr_id()
7025 {
7026  return qci_;
7027 }
7028 
7029 inline GateStatusIE &CreateQerIE::gate_status()
7030 {
7031  return gs_;
7032 }
7033 
7034 inline MbrIE &CreateQerIE::maximum_bitrate()
7035 {
7036  return mbr_;
7037 }
7038 
7039 inline GbrIE &CreateQerIE::guaranteed_bitrate()
7040 {
7041  return gbr_;
7042 }
7043 
7044 inline PacketRateIE &CreateQerIE::packet_rate()
7045 {
7046  return pr_;
7047 }
7048 
7049 inline DlFlowLevelMarkingIE &CreateQerIE::dl_flow_lvl_marking()
7050 {
7051  return dfm_;
7052 }
7053 
7054 inline QfiIE &CreateQerIE::qos_flow_ident()
7055 {
7056  return qfi_;
7057 }
7058 
7059 inline RqiIE &CreateQerIE::reflective_qos()
7060 {
7061  return rqi_;
7062 }
7063 
7064 inline PagingPolicyIndicatorIE &CreateQerIE::paging_plcy_indctr()
7065 {
7066  return ppi_;
7067 }
7068 
7069 inline AveragingWindowIE &CreateQerIE::avgng_wnd()
7070 {
7071  return aw_;
7072 }
7073 
7074 inline pfcp_create_qer_ie_t &CreateQerIE::data()
7075 {
7076  return ie_;
7077 }
7078 
7079 inline CreateQerIE::CreateQerIE(pfcp_create_qer_ie_t &ie, LengthCalculator *parent)
7080  : IEHeader(ie.header, IE_CREATE_QER, parent),
7081  ie_(ie),
7082  qerid_(ie_.qer_id, this),
7083  qci_(ie_.qer_corr_id, this),
7084  gs_(ie_.gate_status, this),
7085  mbr_(ie_.maximum_bitrate, this),
7086  gbr_(ie_.guaranteed_bitrate, this),
7087  pr_(ie_.packet_rate, this),
7088  dfm_(ie_.dl_flow_lvl_marking, this),
7089  qfi_(ie_.qos_flow_ident, this),
7090  rqi_(ie_.reflective_qos, this),
7091  ppi_(ie_.paging_plcy_indctr, this),
7092  aw_(ie_.avgng_wnd, this)
7093 {
7094 }
7095 
7096 inline uint16_t CreateQerIE::calculateLength()
7097 {
7098  return
7099  qerid_.packedLength() +
7100  qci_.packedLength() +
7101  gs_.packedLength() +
7102  mbr_.packedLength() +
7103  gbr_.packedLength() +
7104  pr_.packedLength() +
7105  dfm_.packedLength() +
7106  qfi_.packedLength() +
7107  rqi_.packedLength() +
7108  ppi_.packedLength() +
7109  aw_.packedLength();
7110 }
7111 
7113 
7114 inline MonitoringTimeIE &AdditionalMonitoringTimeIE::monitoring_time()
7115 {
7116  return mt_;
7117 }
7118 
7119 inline SubsequentVolumeThresholdIE &AdditionalMonitoringTimeIE::sbsqnt_vol_thresh()
7120 {
7121  return svt_;
7122 }
7123 
7124 inline SubsequentTimeThresholdIE &AdditionalMonitoringTimeIE::sbsqnt_time_thresh()
7125 {
7126  return stt_;
7127 }
7128 
7129 inline SubsequentVolumeQuotaIE &AdditionalMonitoringTimeIE::sbsqnt_vol_quota()
7130 {
7131  return svq_;
7132 }
7133 
7134 inline SubsequentTimeQuotaIE &AdditionalMonitoringTimeIE::sbsqnt_time_quota()
7135 {
7136  return stq_;
7137 }
7138 
7139 inline SubsequentEventThresholdIE &AdditionalMonitoringTimeIE::sbsqnt_evnt_thresh()
7140 {
7141  return set_;
7142 }
7143 
7144 inline SubsequentEventQuotaIE &AdditionalMonitoringTimeIE::sbsqnt_evnt_quota()
7145 {
7146  return seq_;
7147 }
7148 
7149 inline pfcp_add_mntrng_time_ie_t &AdditionalMonitoringTimeIE::data()
7150 {
7151  return ie_;
7152 }
7153 
7154 inline AdditionalMonitoringTimeIE::AdditionalMonitoringTimeIE(pfcp_add_mntrng_time_ie_t &ie, LengthCalculator *parent)
7155  : IEHeader(ie.header, IE_ADD_MNTRNG_TIME, parent),
7156  ie_(ie),
7157  mt_(ie_.monitoring_time, this),
7158  svt_(ie_.sbsqnt_vol_thresh, this),
7159  stt_(ie_.sbsqnt_time_thresh, this),
7160  svq_(ie_.sbsqnt_vol_quota, this),
7161  stq_(ie_.sbsqnt_time_quota, this),
7162  set_(ie_.sbsqnt_evnt_thresh, this),
7163  seq_(ie_.sbsqnt_evnt_quota, this)
7164 {
7165 }
7166 
7168 {
7169  return
7170  mt_.packedLength() +
7171  svt_.packedLength() +
7172  stt_.packedLength() +
7173  svq_.packedLength() +
7174  stq_.packedLength() +
7175  set_.packedLength() +
7176  seq_.packedLength();
7177 }
7178 
7180 
7181 inline AggregatedUrrIdIE &AggregatedUrrsIE::agg_urr_id()
7182 {
7183  return aui_;
7184 }
7185 
7186 inline MultiplierIE &AggregatedUrrsIE::multiplier()
7187 {
7188  return m_;
7189 }
7190 
7191 inline pfcp_aggregated_urrs_ie_t &AggregatedUrrsIE::data()
7192 {
7193  return ie_;
7194 }
7195 
7196 inline AggregatedUrrsIE::AggregatedUrrsIE(pfcp_aggregated_urrs_ie_t &ie, LengthCalculator *parent)
7197  : IEHeader(ie.header, IE_AGGREGATED_URRS, parent),
7198  ie_(ie),
7199  aui_(ie_.agg_urr_id, this),
7200  m_(ie_.multiplier, this)
7201 {
7202 }
7203 
7204 inline uint16_t AggregatedUrrsIE::calculateLength()
7205 {
7206  return
7207  aui_.packedLength() +
7208  m_.packedLength();
7209 }
7210 
7212 
7213 inline UrrIdIE &CreateUrrIE::urr_id()
7214 {
7215  return ui_;
7216 }
7217 
7218 inline MeasurementMethodIE &CreateUrrIE::meas_mthd()
7219 {
7220  return mm_;
7221 }
7222 
7223 inline ReportingTriggersIE &CreateUrrIE::rptng_triggers()
7224 {
7225  return rt_;
7226 }
7227 
7228 inline MeasurementPeriodIE &CreateUrrIE::meas_period()
7229 {
7230  return mp_;
7231 }
7232 
7233 inline VolumeThresholdIE &CreateUrrIE::vol_thresh()
7234 {
7235  return vt_;
7236 }
7237 
7238 inline VolumeQuotaIE &CreateUrrIE::volume_quota()
7239 {
7240  return vq_;
7241 }
7242 
7243 inline EventThresholdIE &CreateUrrIE::event_threshold()
7244 {
7245  return et_;
7246 }
7247 
7248 inline EventQuotaIE &CreateUrrIE::event_quota()
7249 {
7250  return eq_;
7251 }
7252 
7253 inline TimeThresholdIE &CreateUrrIE::time_threshold()
7254 {
7255  return tt_;
7256 }
7257 
7258 inline TimeQuotaIE &CreateUrrIE::time_quota()
7259 {
7260  return tq_;
7261 }
7262 
7263 inline QuotaHoldingTimeIE &CreateUrrIE::quota_hldng_time()
7264 {
7265  return qht_;
7266 }
7267 
7268 inline DroppedDlTrafficThresholdIE &CreateUrrIE::drpd_dl_traffic_thresh()
7269 {
7270  return ddtt_;
7271 }
7272 
7273 inline MonitoringTimeIE &CreateUrrIE::monitoring_time()
7274 {
7275  return mt_;
7276 }
7277 
7278 inline SubsequentVolumeThresholdIE &CreateUrrIE::sbsqnt_vol_thresh()
7279 {
7280  return svt_;
7281 }
7282 
7283 inline SubsequentTimeThresholdIE &CreateUrrIE::sbsqnt_time_thresh()
7284 {
7285  return stt_;
7286 }
7287 
7288 inline SubsequentVolumeQuotaIE &CreateUrrIE::sbsqnt_vol_quota()
7289 {
7290  return svq_;
7291 }
7292 
7293 inline SubsequentTimeQuotaIE &CreateUrrIE::sbsqnt_time_quota()
7294 {
7295  return stq_;
7296 }
7297 
7298 inline SubsequentEventThresholdIE &CreateUrrIE::sbsqnt_evnt_thresh()
7299 {
7300  return set_;
7301 }
7302 
7303 inline SubsequentEventQuotaIE &CreateUrrIE::sbsqnt_evnt_quota()
7304 {
7305  return seq_;
7306 }
7307 
7308 inline InactivityDetectionTimeIE &CreateUrrIE::inact_det_time()
7309 {
7310  return idt_;
7311 }
7312 
7313 inline LinkedUrrIdIE &CreateUrrIE::linked_urr_id(uint8_t idx)
7314 {
7315  return lui_[idx];
7316 }
7317 
7318 inline MeasurementInformationIE &CreateUrrIE::meas_info()
7319 {
7320  return mi_;
7321 }
7322 
7323 inline TimeQuotaMechanismIE &CreateUrrIE::time_quota_mech()
7324 {
7325  return tqm_;
7326 }
7327 
7328 inline AggregatedUrrsIE &CreateUrrIE::aggregated_urrs(uint8_t idx)
7329 {
7330  return aus_[idx];
7331 }
7332 
7333 inline FarIdIE &CreateUrrIE::far_id_for_quota_act()
7334 {
7335  return fiqa_;
7336 }
7337 
7338 inline EthernetInactivityTimerIE &CreateUrrIE::eth_inact_timer()
7339 {
7340  return eit_;
7341 }
7342 
7343 inline AdditionalMonitoringTimeIE &CreateUrrIE::add_mntrng_time(uint8_t idx)
7344 {
7345  return amt_[idx];
7346 }
7347 
7349 {
7350  return (ie_.linked_urr_id_count < MAX_LIST_SIZE) ?
7351  ie_.linked_urr_id_count++ : -1;
7352 }
7353 
7355 {
7356  return (ie_.aggregated_urrs_count < MAX_LIST_SIZE) ?
7357  ie_.aggregated_urrs_count++ : -1;
7358 }
7359 
7361 {
7362  return (ie_.add_mntrng_time_count < MAX_LIST_SIZE) ?
7363  ie_.add_mntrng_time_count++ : -1;
7364 }
7365 
7366 inline pfcp_create_urr_ie_t &CreateUrrIE::data()
7367 {
7368  return ie_;
7369 }
7370 
7371 inline CreateUrrIE::CreateUrrIE(pfcp_create_urr_ie_t &ie, LengthCalculator *parent)
7372  : IEHeader(ie.header, IE_CREATE_URR, parent),
7373  ie_(ie),
7374  ui_(ie_.urr_id, this),
7375  mm_(ie_.meas_mthd, this),
7376  rt_(ie_.rptng_triggers, this),
7377  mp_(ie_.meas_period, this),
7378  vt_(ie_.vol_thresh, this),
7379  vq_(ie_.volume_quota, this),
7380  et_(ie_.event_threshold, this),
7381  eq_(ie_.event_quota, this),
7382  tt_(ie_.time_threshold, this),
7383  tq_(ie_.time_quota, this),
7384  qht_(ie_.quota_hldng_time, this),
7385  ddtt_(ie_.drpd_dl_traffic_thresh, this),
7386  mt_(ie_.monitoring_time, this),
7387  svt_(ie_.sbsqnt_vol_thresh, this),
7388  stt_(ie_.sbsqnt_time_thresh, this),
7389  svq_(ie_.sbsqnt_vol_quota, this),
7390  stq_(ie_.sbsqnt_time_quota, this),
7391  set_(ie_.sbsqnt_evnt_thresh, this),
7392  seq_(ie_.sbsqnt_evnt_quota, this),
7393  idt_(ie_.inact_det_time, this),
7394  mi_(ie_.meas_info, this),
7395  tqm_(ie_.time_quota_mech, this),
7396  fiqa_(ie_.far_id_for_quota_act, this),
7397  eit_(ie_.eth_inact_timer, this)
7398 {
7399  for (int i=0; i<MAX_LIST_SIZE; i++)
7400  {
7401  lui_.push_back(LinkedUrrIdIE(ie_.linked_urr_id[i], this));
7402  aus_.push_back(AggregatedUrrsIE(ie_.aggregated_urrs[i], this));
7403  amt_.push_back(AdditionalMonitoringTimeIE(ie_.add_mntrng_time[i], this));
7404  }
7405 }
7406 
7407 inline uint16_t CreateUrrIE::calculateLength()
7408 {
7409  uint16_t len = 0;
7410 
7411  len += ui_.packedLength();
7412  len += mm_.packedLength();
7413  len += rt_.packedLength();
7414  len += mp_.packedLength();
7415  len += vt_.packedLength();
7416  len += vq_.packedLength();
7417  len += et_.packedLength();
7418  len += eq_.packedLength();
7419  len += tt_.packedLength();
7420  len += tq_.packedLength();
7421  len += qht_.packedLength();
7422  len += ddtt_.packedLength();
7423  len += mt_.packedLength();
7424  len += svt_.packedLength();
7425  len += stt_.packedLength();
7426  len += svq_.packedLength();
7427  len += stq_.packedLength();
7428  len += set_.packedLength();
7429  len += seq_.packedLength();
7430  len += idt_.packedLength();
7431  len += mi_.packedLength();
7432  len += tqm_.packedLength();
7433  len += fiqa_.packedLength();
7434  len += eit_.packedLength();
7435 
7436  for (int i=0; i<ie_.linked_urr_id_count; i++)
7437  len += lui_[i].packedLength();
7438  for (int i=0; i<ie_.aggregated_urrs_count; i++)
7439  len += aus_[i].packedLength();
7440  for (int i=0; i<ie_.add_mntrng_time_count; i++)
7441  len += amt_[i].packedLength();
7442 
7443  return len;
7444 }
7445 
7447 
7448 inline DestinationInterfaceIE &DuplicatingParametersIE::dst_intfc()
7449 {
7450  return di_;
7451 }
7452 
7453 inline OuterHeaderCreationIE &DuplicatingParametersIE::outer_hdr_creation()
7454 {
7455  return ohc_;
7456 }
7457 
7458 inline TransportLevelMarkingIE &DuplicatingParametersIE::trnspt_lvl_marking()
7459 {
7460  return tlm_;
7461 }
7462 
7463 inline ForwardingPolicyIE &DuplicatingParametersIE::frwdng_plcy()
7464 {
7465  return fp_;
7466 }
7467 
7468 inline pfcp_dupng_parms_ie_t &DuplicatingParametersIE::data()
7469 {
7470  return ie_;
7471 }
7472 
7473 inline DuplicatingParametersIE::DuplicatingParametersIE(pfcp_dupng_parms_ie_t &ie, LengthCalculator *parent)
7474  : IEHeader(ie.header, IE_DUPNG_PARMS, parent),
7475  ie_(ie),
7476  di_(ie_.dst_intfc, this),
7477  ohc_(ie_.outer_hdr_creation, this),
7478  tlm_(ie_.trnspt_lvl_marking, this),
7479  fp_(ie_.frwdng_plcy, this)
7480 {
7481 }
7482 
7484 {
7485  return
7486  di_.packedLength() +
7487  ohc_.packedLength() +
7488  tlm_.packedLength() +
7489  fp_.packedLength();
7490 }
7491 
7493 
7494 inline DestinationInterfaceIE &ForwardingParametersIE::dst_intfc()
7495 {
7496  return di_;
7497 }
7498 
7499 inline NetworkInstanceIE &ForwardingParametersIE::ntwk_inst()
7500 {
7501  return ni_;
7502 }
7503 
7504 inline RedirectInformationIE &ForwardingParametersIE::redir_info()
7505 {
7506  return ri_;
7507 }
7508 
7509 inline OuterHeaderCreationIE &ForwardingParametersIE::outer_hdr_creation()
7510 {
7511  return ohc_;
7512 }
7513 
7514 inline TransportLevelMarkingIE &ForwardingParametersIE::trnspt_lvl_marking()
7515 {
7516  return tlm_;
7517 }
7518 
7519 inline ForwardingPolicyIE &ForwardingParametersIE::frwdng_plcy()
7520 {
7521  return fp_;
7522 }
7523 
7524 inline HeaderEnrichmentIE &ForwardingParametersIE::hdr_enrchmt()
7525 {
7526  return he_;
7527 }
7528 
7529 inline TrafficEndpointIdIE &ForwardingParametersIE::lnkd_traffic_endpt_id()
7530 {
7531  return ltei_;
7532 }
7533 
7534 inline ProxyingIE &ForwardingParametersIE::proxying()
7535 {
7536  return p_;
7537 }
7538 
7539 inline TgppInterfaceTypeIE &ForwardingParametersIE::dst_intfc_type()
7540 {
7541  return dit_;
7542 }
7543 
7544 inline pfcp_frwdng_parms_ie_t &ForwardingParametersIE::data()
7545 {
7546  return ie_;
7547 }
7548 
7549 inline ForwardingParametersIE::ForwardingParametersIE(pfcp_frwdng_parms_ie_t &ie, LengthCalculator *parent)
7550  : IEHeader(ie.header, IE_FRWDNG_PARMS, parent),
7551  ie_(ie),
7552  di_(ie_.dst_intfc, this),
7553  ni_(ie_.ntwk_inst, this),
7554  ri_(ie_.redir_info, this),
7555  ohc_(ie_.outer_hdr_creation, this),
7556  tlm_(ie_.trnspt_lvl_marking, this),
7557  fp_(ie_.frwdng_plcy, this),
7558  he_(ie_.hdr_enrchmt, this),
7559  ltei_(ie_.lnkd_traffic_endpt_id, this),
7560  p_(ie_.proxying, this),
7561  dit_(ie_.dst_intfc_type, this)
7562 {
7563 }
7564 
7566 {
7567  return
7568  di_.packedLength() +
7569  ni_.packedLength() +
7570  ri_.packedLength() +
7571  ohc_.packedLength() +
7572  tlm_.packedLength() +
7573  fp_.packedLength() +
7574  he_.packedLength() +
7575  ltei_.packedLength() +
7576  p_.packedLength() +
7577  dit_.packedLength();
7578 }
7579 
7581 
7582 inline FarIdIE &CreateFarIE::far_id()
7583 {
7584  return fi_;
7585 }
7586 
7587 inline ApplyActionIE &CreateFarIE::apply_action()
7588 {
7589  return aa_;
7590 }
7591 
7592 inline ForwardingParametersIE &CreateFarIE::frwdng_parms()
7593 {
7594  return fp_;
7595 }
7596 
7597 inline DuplicatingParametersIE &CreateFarIE::dupng_parms(uint8_t idx)
7598 {
7599  return dp_[idx];
7600 }
7601 
7602 inline BarIdIE &CreateFarIE::bar_id()
7603 {
7604  return bi_;
7605 }
7606 
7607 inline int CreateFarIE::next_dupng_parms()
7608 {
7609  return (ie_.dupng_parms_count < MAX_LIST_SIZE) ?
7610  ie_.dupng_parms_count++ : -1;
7611 }
7612 
7613 inline pfcp_create_far_ie_t &CreateFarIE::data()
7614 {
7615  return ie_;
7616 }
7617 
7618 inline CreateFarIE::CreateFarIE(pfcp_create_far_ie_t &ie, LengthCalculator *parent)
7619  : IEHeader(ie.header, IE_CREATE_FAR, parent),
7620  ie_(ie),
7621  fi_(ie_.far_id, this),
7622  aa_(ie_.apply_action, this),
7623  fp_(ie_.frwdng_parms, this),
7624  bi_(ie_.bar_id, this)
7625 {
7626  for (int i=0; i<MAX_LIST_SIZE; i++)
7627  dp_.push_back(DuplicatingParametersIE(ie_.dupng_parms[i], this));
7628 }
7629 
7630 inline uint16_t CreateFarIE::calculateLength()
7631 {
7632  uint16_t len = 0;
7633 
7634  len += fi_.packedLength();
7635  len += aa_.packedLength();
7636  len += fp_.packedLength();
7637  len += bi_.packedLength();
7638 
7639  for (int i=0; i<ie_.dupng_parms_count; i++)
7640  len += dp_[i].packedLength();
7641 
7642  return len;
7643 }
7644 
7646 
7647 inline EthernetFilterIdIE &EthernetPacketFilterIE::eth_fltr_id()
7648 {
7649  return efi_;
7650 }
7651 
7652 inline EthernetFilterPropertiesIE &EthernetPacketFilterIE::eth_fltr_props()
7653 {
7654  return efp_;
7655 }
7656 
7657 inline MacAddressIE &EthernetPacketFilterIE::mac_address()
7658 {
7659  return ma_;
7660 }
7661 
7662 inline EthertypeIE &EthernetPacketFilterIE::ethertype()
7663 {
7664  return e_;
7665 }
7666 
7667 inline CTagIE &EthernetPacketFilterIE::ctag()
7668 {
7669  return ctag_;
7670 }
7671 
7672 inline STagIE &EthernetPacketFilterIE::stag()
7673 {
7674  return stag_;
7675 }
7676 
7677 inline SdfFilterIE &EthernetPacketFilterIE::sdf_filter(uint8_t idx)
7678 {
7679  return sf_[idx];
7680 }
7681 
7683 {
7684  return (ie_.sdf_filter_count < MAX_LIST_SIZE) ?
7685  ie_.sdf_filter_count++ : -1;
7686 }
7687 
7688 inline pfcp_eth_pckt_fltr_ie_t &EthernetPacketFilterIE::data()
7689 {
7690  return ie_;
7691 }
7692 
7693 inline EthernetPacketFilterIE::EthernetPacketFilterIE(pfcp_eth_pckt_fltr_ie_t &ie, LengthCalculator *parent)
7694  : IEHeader(ie.header, IE_ETH_PCKT_FLTR, parent),
7695  ie_(ie),
7696  efi_(ie_.eth_fltr_id, this),
7697  efp_(ie_.eth_fltr_props, this),
7698  ma_(ie_.mac_address, this),
7699  e_(ie_.ethertype, this),
7700  ctag_(ie_.ctag, this),
7701  stag_(ie_.stag, this)
7702 {
7703  for (int i=0; i<MAX_LIST_SIZE; i++)
7704  sf_.push_back(SdfFilterIE(ie_.sdf_filter[i], this));
7705 }
7706 
7708 {
7709  uint16_t len = 0;
7710 
7711  len += efi_.packedLength();
7712  len += efp_.packedLength();
7713  len += ma_.packedLength();
7714  len += e_.packedLength();
7715  len += ctag_.packedLength();
7716  len += stag_.packedLength();
7717 
7718  for (int i=0; i<ie_.sdf_filter_count; i++)
7719  len += sf_[i].packedLength();
7720 
7721  return len;
7722 }
7723 
7725 
7726 inline SourceInterfaceIE &PdiIE::src_intfc()
7727 {
7728  return si_;
7729 }
7730 
7731 inline FTeidIE &PdiIE::local_fteid()
7732 {
7733  return lft_;
7734 }
7735 
7736 inline NetworkInstanceIE &PdiIE::ntwk_inst()
7737 {
7738  return ni_;
7739 }
7740 
7741 inline UeIpAddressIE &PdiIE::ue_ip_address()
7742 {
7743  return uia_;
7744 }
7745 
7746 inline TrafficEndpointIdIE &PdiIE::traffic_endpt_id()
7747 {
7748  return tei_;
7749 }
7750 
7751 inline ApplicationIdIE &PdiIE::application_id()
7752 {
7753  return ai_;
7754 }
7755 
7756 inline EthernetPduSessionInformationIE &PdiIE::eth_pdu_sess_info()
7757 {
7758  return epsi_;
7759 }
7760 
7761 inline FramedRoutingIE &PdiIE::framed_routing()
7762 {
7763  return fring_;
7764 }
7765 
7766 inline TgppInterfaceTypeIE &PdiIE::src_intrc_type()
7767 {
7768  return sit_;
7769 }
7770 
7771 inline SdfFilterIE &PdiIE::sdf_filter(uint8_t idx)
7772 {
7773  return sf_[idx];
7774 }
7775 
7776 inline EthernetPacketFilterIE &PdiIE::eth_pckt_fltr(uint8_t idx)
7777 {
7778  return epf_[idx];
7779 }
7780 
7781 inline QfiIE &PdiIE::qfi(uint8_t idx)
7782 {
7783  return qfi_[idx];
7784 }
7785 
7786 inline FramedRouteIE &PdiIE::framed_route(uint8_t idx)
7787 {
7788  return fr_[idx];
7789 }
7790 
7791 inline FramedIpv6RouteIE &PdiIE::frmd_ipv6_rte(uint8_t idx)
7792 {
7793  return fr6_[idx];
7794 }
7795 
7796 inline int PdiIE::next_sdf_filter()
7797 {
7798  return (ie_.sdf_filter_count < MAX_LIST_SIZE) ?
7799  ie_.sdf_filter_count++ : -1;
7800 }
7801 
7802 inline int PdiIE::next_eth_pckt_fltr()
7803 {
7804  return (ie_.eth_pckt_fltr_count < MAX_LIST_SIZE) ?
7805  ie_.eth_pckt_fltr_count++ : -1;
7806 }
7807 
7808 inline int PdiIE::next_qfi()
7809 {
7810  return (ie_.qfi_count < MAX_LIST_SIZE) ?
7811  ie_.qfi_count++ : -1;
7812 }
7813 
7814 inline int PdiIE::next_framed_route()
7815 {
7816  return (ie_.framed_route_count < MAX_LIST_SIZE) ?
7817  ie_.framed_route_count++ : -1;
7818 }
7819 
7820 inline int PdiIE::next_frmd_ipv6_rte()
7821 {
7822  return (ie_.frmd_ipv6_rte_count < MAX_LIST_SIZE) ?
7823  ie_.frmd_ipv6_rte_count++ : -1;
7824 }
7825 
7826 inline pfcp_pdi_ie_t &PdiIE::data()
7827 {
7828  return ie_;
7829 }
7830 
7831 inline PdiIE::PdiIE(pfcp_pdi_ie_t &ie, LengthCalculator *parent)
7832  : IEHeader(ie.header, IE_PDI, parent),
7833  ie_(ie),
7834  si_(ie_.src_intfc, this),
7835  lft_(ie_.local_fteid, this),
7836  ni_(ie_.ntwk_inst, this),
7837  uia_(ie_.ue_ip_address, this),
7838  tei_(ie_.traffic_endpt_id, this),
7839  ai_(ie_.application_id, this),
7840  epsi_(ie_.eth_pdu_sess_info, this),
7841  fring_(ie_.framed_routing, this),
7842  sit_(ie_.src_intrc_type, this)
7843 {
7844  for (int i=0; i<MAX_LIST_SIZE; i++)
7845  {
7846  sf_.push_back(SdfFilterIE(ie_.sdf_filter[i], this));
7847  epf_.push_back(EthernetPacketFilterIE(ie_.eth_pckt_fltr[i], this));
7848  qfi_.push_back(QfiIE(ie_.qfi[i], this));
7849  fr_.push_back(FramedRouteIE(ie_.framed_route[i], this));
7850  fr6_.push_back(FramedIpv6RouteIE(ie_.frmd_ipv6_rte[i], this));
7851  }
7852 }
7853 
7854 inline uint16_t PdiIE::calculateLength()
7855 {
7856  uint16_t len = 0;
7857 
7858  len += si_.packedLength();
7859  len += lft_.packedLength();
7860  len += ni_.packedLength();
7861  len += uia_.packedLength();
7862  len += tei_.packedLength();
7863  len += ai_.packedLength();
7864  len += epsi_.packedLength();
7865  len += fring_.packedLength();
7866  len += sit_.packedLength();
7867 
7868  for (int i=0; i<ie_.sdf_filter_count; i++)
7869  len += sf_[i].packedLength();
7870  for (int i=0; i<ie_.eth_pckt_fltr_count; i++)
7871  len += epf_[i].packedLength();
7872  for (int i=0; i<ie_.qfi_count; i++)
7873  len += qfi_[i].packedLength();
7874  for (int i=0; i<ie_.framed_route_count; i++)
7875  len += fr_[i].packedLength();
7876  for (int i=0; i<ie_.frmd_ipv6_rte_count; i++)
7877  len += fr6_[i].packedLength();
7878 
7879  return len;
7880 }
7881 
7883 
7884 inline PdrIdIE &CreatePdrIE::pdr_id()
7885 {
7886  return pi_;
7887 }
7888 
7889 inline PrecedenceIE &CreatePdrIE::precedence()
7890 {
7891  return p_;
7892 }
7893 
7894 inline PdiIE &CreatePdrIE::pdi()
7895 {
7896  return pdi_;
7897 }
7898 
7899 inline OuterHeaderRemovalIE &CreatePdrIE::outer_hdr_removal()
7900 {
7901  return ohr_;
7902 }
7903 
7904 inline FarIdIE &CreatePdrIE::far_id()
7905 {
7906  return fi_;
7907 }
7908 
7909 inline UrrIdIE &CreatePdrIE::urr_id(uint8_t idx)
7910 {
7911  return ui_[idx];
7912 }
7913 
7914 inline QerIdIE &CreatePdrIE::qer_id(uint8_t idx)
7915 {
7916  return qi_[idx];
7917 }
7918 
7919 inline ActivatePredefinedRulesIE &CreatePdrIE::actvt_predef_rules(uint8_t idx)
7920 {
7921  return apr_[idx];
7922 }
7923 
7924 inline int CreatePdrIE::next_urr_id()
7925 {
7926  return (ie_.urr_id_count < MAX_LIST_SIZE) ?
7927  ie_.urr_id_count++ : -1;
7928 }
7929 
7930 inline int CreatePdrIE::next_qer_id()
7931 {
7932  return (ie_.qer_id_count < MAX_LIST_SIZE) ?
7933  ie_.qer_id_count++ : -1;
7934 }
7935 
7937 {
7938  return (ie_.actvt_predef_rules_count < MAX_LIST_SIZE) ?
7939  ie_.actvt_predef_rules_count++ : -1;
7940 }
7941 
7942 inline pfcp_create_pdr_ie_t &CreatePdrIE::data()
7943 {
7944  return ie_;
7945 }
7946 
7947 inline CreatePdrIE::CreatePdrIE(pfcp_create_pdr_ie_t &ie, LengthCalculator *parent)
7948  : IEHeader(ie.header, IE_CREATE_PDR, parent),
7949  ie_(ie),
7950  pi_(ie_.pdr_id, this),
7951  p_(ie_.precedence, this),
7952  pdi_(ie_.pdi, this),
7953  ohr_(ie_.outer_hdr_removal, this),
7954  fi_(ie_.far_id, this)
7955 {
7956  for (int i=0; i<MAX_LIST_SIZE; i++)
7957  {
7958  ui_.push_back(UrrIdIE(ie_.urr_id[i], this));
7959  qi_.push_back(QerIdIE(ie_.qer_id[i], this));
7960  apr_.push_back(ActivatePredefinedRulesIE(ie_.actvt_predef_rules[i], this));
7961  }
7962 }
7963 
7964 inline uint16_t CreatePdrIE::calculateLength()
7965 {
7966  uint16_t len = 0;
7967 
7968  len += pi_.packedLength();
7969  len += p_.packedLength();
7970  len += pdi_.packedLength();
7971  len += ohr_.packedLength();
7972  len += fi_.packedLength();
7973 
7974  for (int i=0; i<ie_.urr_id_count; i++)
7975  len += ui_[i].packedLength();
7976  for (int i=0; i<ie_.qer_id_count; i++)
7977  len += qi_[i].packedLength();
7978  for (int i=0; i<ie_.actvt_predef_rules_count; i++)
7979  len += apr_[i].packedLength();
7980 
7981  return len;
7982 }
7983 
7985 
7986 inline TrafficEndpointIdIE &CreatedTrafficEndpointIE::traffic_endpt_id()
7987 {
7988  return tei_;
7989 }
7990 
7991 inline FTeidIE &CreatedTrafficEndpointIE::local_fteid()
7992 {
7993  return lft_;
7994 }
7995 
7996 inline pfcp_created_traffic_endpt_ie_t &CreatedTrafficEndpointIE::data()
7997 {
7998  return ie_;
7999 }
8000 
8001 inline CreatedTrafficEndpointIE::CreatedTrafficEndpointIE(pfcp_created_traffic_endpt_ie_t &ie, LengthCalculator *parent)
8002  : IEHeader(ie.header, IE_CREATED_TRAFFIC_ENDPT, parent),
8003  ie_(ie),
8004  tei_(ie_.traffic_endpt_id, this),
8005  lft_(ie_.local_fteid, this)
8006 {
8007 }
8008 
8010 {
8011  return
8012  tei_.packedLength() +
8013  lft_.packedLength();
8014 }
8015 
8017 
8018 inline SequenceNumberIE &OverloadControlInformationIE::ovrld_ctl_seqn_nbr()
8019 {
8020  return ocsn_;
8021 }
8022 
8024 {
8025  return orm_;
8026 }
8027 
8029 {
8030  return pov_;
8031 }
8032 
8034 {
8035  return ocif_;
8036 }
8037 
8038 inline pfcp_ovrld_ctl_info_ie_t &OverloadControlInformationIE::data()
8039 {
8040  return ie_;
8041 }
8042 
8043 inline OverloadControlInformationIE::OverloadControlInformationIE(pfcp_ovrld_ctl_info_ie_t &ie, LengthCalculator *parent)
8044  : IEHeader(ie.header, IE_OVRLD_CTL_INFO, parent),
8045  ie_(ie),
8046  ocsn_(ie_.ovrld_ctl_seqn_nbr, this),
8047  orm_(ie_.ovrld_reduction_metric, this),
8048  pov_(ie_.period_of_validity, this),
8049  ocif_(ie_.ovrld_ctl_info_flgs, this)
8050 {
8051 }
8052 
8054 {
8055  return
8056  ocsn_.packedLength() +
8057  orm_.packedLength() +
8058  pov_.packedLength() +
8059  ocif_.packedLength();
8060 }
8061 
8063 
8064 inline SequenceNumberIE &LoadControlInformationIE::load_ctl_seqn_nbr()
8065 {
8066  return lcsn_;
8067 }
8068 
8069 inline MetricIE &LoadControlInformationIE::load_metric()
8070 {
8071  return lm_;
8072 }
8073 
8074 inline pfcp_load_ctl_info_ie_t &LoadControlInformationIE::data()
8075 {
8076  return ie_;
8077 }
8078 
8079 inline LoadControlInformationIE::LoadControlInformationIE(pfcp_load_ctl_info_ie_t &ie, LengthCalculator *parent)
8080  : IEHeader(ie.header, IE_LOAD_CTL_INFO, parent),
8081  ie_(ie),
8082  lcsn_(ie_.load_ctl_seqn_nbr, this),
8083  lm_(ie_.load_metric, this)
8084 {
8085 }
8086 
8088 {
8089  return
8090  lcsn_.packedLength() +
8091  lm_.packedLength();
8092 }
8093 
8095 
8096 inline PdrIdIE &CreatedPdrIE::pdr_id()
8097 {
8098  return pi_;
8099 }
8100 
8101 inline FTeidIE &CreatedPdrIE::local_fteid()
8102 {
8103  return lft_;
8104 }
8105 
8106 inline pfcp_created_pdr_ie_t &CreatedPdrIE::data()
8107 {
8108  return ie_;
8109 }
8110 
8111 inline CreatedPdrIE::CreatedPdrIE(pfcp_created_pdr_ie_t &ie, LengthCalculator *parent)
8112  : IEHeader(ie.header, IE_CREATED_PDR, parent),
8113  ie_(ie),
8114  pi_(ie_.pdr_id, this),
8115  lft_(ie_.local_fteid, this)
8116 {
8117 }
8118 
8119 inline uint16_t CreatedPdrIE::calculateLength()
8120 {
8121  return
8122  pi_.packedLength() +
8123  lft_.packedLength();
8124 }
8125 
8127 
8128 inline RemoteGTPUPeerIE &UserPlanePathFailureReportIE::rmt_gtpu_peer(uint8_t idx)
8129 {
8130  return rgp_[idx];
8131 }
8132 
8134 {
8135  return (ie_.rmt_gtpu_peer_count < MAX_LIST_SIZE) ?
8136  ie_.rmt_gtpu_peer_count++ : -1;
8137 }
8138 
8139 inline pfcp_user_plane_path_fail_rpt_ie_t &UserPlanePathFailureReportIE::data()
8140 {
8141  return ie_;
8142 }
8143 
8144 inline UserPlanePathFailureReportIE::UserPlanePathFailureReportIE(pfcp_user_plane_path_fail_rpt_ie_t &ie, LengthCalculator *parent)
8145  : IEHeader(ie.header, IE_USER_PLANE_PATH_FAIL_RPT, parent),
8146  ie_(ie)
8147 {
8148  for (int i=0; i<MAX_LIST_SIZE; i++)
8149  rgp_.push_back(RemoteGTPUPeerIE(ie_.rmt_gtpu_peer[i], this));
8150 }
8151 
8153 {
8154  uint16_t len = 0;
8155  for (int i=0; i<ie_.rmt_gtpu_peer_count; i++)
8156  len += rgp_[i].packedLength();
8157  return len;
8158 }
8159 
8161 
8162 inline TrafficEndpointIdIE &RemoveTrafficEndpointIE::traffic_endpt_id()
8163 {
8164  return tei_;
8165 }
8166 
8167 inline pfcp_rmv_traffic_endpt_ie_t &RemoveTrafficEndpointIE::data()
8168 {
8169  return ie_;
8170 }
8171 
8172 inline RemoveTrafficEndpointIE::RemoveTrafficEndpointIE(pfcp_rmv_traffic_endpt_ie_t &ie, LengthCalculator *parent)
8173  : IEHeader(ie.header, IE_RMV_TRAFFIC_ENDPT, parent),
8174  ie_(ie),
8175  tei_(ie_.traffic_endpt_id, this)
8176 {
8177 }
8178 
8180 {
8181  return
8182  tei_.packedLength();
8183 }
8184 
8186 
8187 inline TrafficEndpointIdIE &UpdateTrafficEndpointIE::traffic_endpt_id()
8188 {
8189  return tei_;
8190 }
8191 
8192 inline FTeidIE &UpdateTrafficEndpointIE::local_fteid()
8193 {
8194  return lft_;
8195 }
8196 
8197 inline NetworkInstanceIE &UpdateTrafficEndpointIE::ntwk_inst()
8198 {
8199  return ni_;
8200 }
8201 
8202 inline UeIpAddressIE &UpdateTrafficEndpointIE::ue_ip_address()
8203 {
8204  return uia_;
8205 }
8206 
8207 inline FramedRoutingIE &UpdateTrafficEndpointIE::framed_routing()
8208 {
8209  return fring_;
8210 }
8211 
8212 inline FramedRouteIE &UpdateTrafficEndpointIE::framed_route(uint8_t idx)
8213 {
8214  return fr_[idx];
8215 }
8216 
8217 inline FramedIpv6RouteIE &UpdateTrafficEndpointIE::frmd_ipv6_rte(uint8_t idx)
8218 {
8219  return fr6_[idx];
8220 }
8221 
8223 {
8224  return (ie_.framed_route_count < MAX_LIST_SIZE) ?
8225  ie_.framed_route_count++ : -1;
8226 }
8227 
8229 {
8230  return (ie_.frmd_ipv6_rte_count < MAX_LIST_SIZE) ?
8231  ie_.frmd_ipv6_rte_count++ : -1;
8232 }
8233 
8234 inline pfcp_upd_traffic_endpt_ie_t &UpdateTrafficEndpointIE::data()
8235 {
8236  return ie_;
8237 }
8238 
8239 inline UpdateTrafficEndpointIE::UpdateTrafficEndpointIE(pfcp_upd_traffic_endpt_ie_t &ie, LengthCalculator *parent)
8240  : IEHeader(ie.header, IE_UPD_TRAFFIC_ENDPT, parent),
8241  ie_(ie),
8242  tei_(ie_.traffic_endpt_id, this),
8243  lft_(ie_.local_fteid, this),
8244  ni_(ie_.ntwk_inst, this),
8245  uia_(ie_.ue_ip_address, this),
8246  fring_(ie_.framed_routing, this)
8247 {
8248  for (int i=0; i<MAX_LIST_SIZE; i++)
8249  {
8250  fr_.push_back(FramedRouteIE(ie_.framed_route[i], this));
8251  fr6_.push_back(FramedIpv6RouteIE(ie_.frmd_ipv6_rte[i], this));
8252  }
8253 }
8254 
8256 {
8257  uint16_t len = 0;
8258 
8259  len += tei_.packedLength();
8260  len += lft_.packedLength();
8261  len += ni_.packedLength();
8262  len += uia_.packedLength();
8263  len += fring_.packedLength();
8264 
8265  for (int i=0; i<ie_.framed_route_count; i++)
8266  len += fr_[i].packedLength();
8267  for (int i=0; i<ie_.frmd_ipv6_rte_count; i++)
8268  len += fr6_[i].packedLength();
8269 
8270  return len;
8271 }
8272 
8274 
8275 inline BarIdIE &RemoveBarIE::bar_id()
8276 {
8277  return bi_;
8278 }
8279 
8280 inline pfcp_remove_bar_ie_t &RemoveBarIE::data()
8281 {
8282  return ie_;
8283 }
8284 
8285 inline RemoveBarIE::RemoveBarIE(pfcp_remove_bar_ie_t &ie, LengthCalculator *parent)
8286  : IEHeader(ie.header, IE_REMOVE_BAR, parent),
8287  ie_(ie),
8288  bi_(ie_.bar_id, this)
8289 {
8290 }
8291 
8292 inline uint16_t RemoveBarIE::calculateLength()
8293 {
8294  return bi_.packedLength();
8295 }
8296 
8298 
8300 {
8301  return bi_;
8302 }
8303 
8304 inline DownlinkDataNotificationDelayIE &UpdateBarSessionModificationReqIE::dnlnk_data_notif_delay()
8305 {
8306  return ddnd_;
8307 }
8308 
8309 inline SuggestedBufferingPacketsCountIE &UpdateBarSessionModificationReqIE::suggstd_buf_pckts_cnt()
8310 {
8311  return sbpc_;
8312 }
8313 
8314 inline pfcp_upd_bar_sess_mod_req_ie_t &UpdateBarSessionModificationReqIE::data()
8315 {
8316  return ie_;
8317 }
8318 
8319 inline UpdateBarSessionModificationReqIE::UpdateBarSessionModificationReqIE(pfcp_upd_bar_sess_mod_req_ie_t &ie, LengthCalculator *parent)
8320  : IEHeader(ie.header, IE_UPD_BAR_SESS_MOD_REQ, parent),
8321  ie_(ie),
8322  bi_(ie_.bar_id, this),
8323  ddnd_(ie_.dnlnk_data_notif_delay, this),
8324  sbpc_(ie_.suggstd_buf_pckts_cnt, this)
8325 {
8326 }
8327 
8329 {
8330  return
8331  bi_.packedLength() +
8332  ddnd_.packedLength() +
8333  sbpc_.packedLength();
8334 }
8335 
8337 
8338 inline UrrIdIE &QueryUrrIE::urr_id()
8339 {
8340  return ui_;
8341 }
8342 
8343 inline pfcp_query_urr_ie_t &QueryUrrIE::data()
8344 {
8345  return ie_;
8346 }
8347 
8348 inline QueryUrrIE::QueryUrrIE(pfcp_query_urr_ie_t &ie, LengthCalculator *parent)
8349  : IEHeader(ie.header, IE_QUERY_URR, parent),
8350  ie_(ie),
8351  ui_(ie_.urr_id, this)
8352 {
8353 }
8354 
8355 inline uint16_t QueryUrrIE::calculateLength()
8356 {
8357  return ui_.packedLength();
8358 }
8359 
8361 
8362 inline QerIdIE RemoveQerIE::qer_id()
8363 {
8364  return qi_;
8365 }
8366 
8367 inline pfcp_remove_qer_ie_t &RemoveQerIE::data()
8368 {
8369  return ie_;
8370 }
8371 
8372 inline RemoveQerIE::RemoveQerIE(pfcp_remove_qer_ie_t &ie, LengthCalculator *parent)
8373  : IEHeader(ie.header, IE_REMOVE_QER, parent),
8374  ie_(ie),
8375  qi_(ie_.qer_id, this)
8376 {
8377 }
8378 
8379 inline uint16_t RemoveQerIE::calculateLength()
8380 {
8381  return qi_.packedLength();
8382 }
8383 
8385 
8386 inline UrrIdIE &RemoveUrrIE::urr_id()
8387 {
8388  return ui_;
8389 }
8390 
8391 inline pfcp_remove_urr_ie_t &RemoveUrrIE::data()
8392 {
8393  return ie_;
8394 }
8395 
8396 inline RemoveUrrIE::RemoveUrrIE(pfcp_remove_urr_ie_t &ie, LengthCalculator *parent)
8397  : IEHeader(ie.header, IE_REMOVE_URR, parent),
8398  ie_(ie),
8399  ui_(ie_.urr_id, this)
8400 {
8401 }
8402 
8403 inline uint16_t RemoveUrrIE::calculateLength()
8404 {
8405  return ui_.packedLength();
8406 }
8407 
8409 
8410 inline FarIdIE &RemoveFarIE::far_id()
8411 {
8412  return fi_;
8413 }
8414 
8415 inline pfcp_remove_far_ie_t &RemoveFarIE::data()
8416 {
8417  return ie_;
8418 }
8419 
8420 inline RemoveFarIE::RemoveFarIE(pfcp_remove_far_ie_t &ie, LengthCalculator *parent)
8421  : IEHeader(ie.header, IE_REMOVE_FAR, parent),
8422  ie_(ie),
8423  fi_(ie_.far_id, this)
8424 {
8425 }
8426 
8427 inline uint16_t RemoveFarIE::calculateLength()
8428 {
8429  return fi_.packedLength();
8430 }
8431 
8433 
8434 inline PdrIdIE &RemovePdrIE::pdr_id()
8435 {
8436  return pi_;
8437 }
8438 
8439 inline pfcp_remove_pdr_ie_t &RemovePdrIE::data()
8440 {
8441  return ie_;
8442 }
8443 
8444 inline RemovePdrIE::RemovePdrIE(pfcp_remove_pdr_ie_t &ie, LengthCalculator *parent)
8445  : IEHeader(ie.header, IE_REMOVE_PDR, parent),
8446  ie_(ie),
8447  pi_(ie_.pdr_id, this)
8448 {
8449 }
8450 
8451 inline uint16_t RemovePdrIE::calculateLength()
8452 {
8453  return pi_.packedLength();
8454 }
8455 
8457 
8458 inline QerIdIE &UpdateQerIE::qer_id()
8459 {
8460  return qi_;
8461 }
8462 
8463 inline QerCorrelationIdIE &UpdateQerIE::qer_corr_id()
8464 {
8465  return qci_;
8466 }
8467 
8468 inline GateStatusIE &UpdateQerIE::gate_status()
8469 {
8470  return gs_;
8471 }
8472 
8473 inline MbrIE &UpdateQerIE::maximum_bitrate()
8474 {
8475  return mb_;
8476 }
8477 
8478 inline GbrIE &UpdateQerIE::guaranteed_bitrate()
8479 {
8480  return gb_;
8481 }
8482 
8483 inline PacketRateIE &UpdateQerIE::packet_rate()
8484 {
8485  return pr;
8486 }
8487 
8488 inline DlFlowLevelMarkingIE &UpdateQerIE::dl_flow_lvl_marking()
8489 {
8490  return dflm_;
8491 }
8492 
8493 inline QfiIE &UpdateQerIE::qos_flow_ident()
8494 {
8495  return qfi_;
8496 }
8497 
8498 inline RqiIE &UpdateQerIE::reflective_qos()
8499 {
8500  return rqi_;
8501 }
8502 
8503 inline PagingPolicyIndicatorIE &UpdateQerIE::paging_plcy_indctr()
8504 {
8505  return ppi_;
8506 }
8507 
8508 inline AveragingWindowIE &UpdateQerIE::avgng_wnd()
8509 {
8510  return aw_;
8511 }
8512 
8513 inline pfcp_update_qer_ie_t &UpdateQerIE::data()
8514 {
8515  return ie_;
8516 }
8517 
8518 inline UpdateQerIE::UpdateQerIE(pfcp_update_qer_ie_t &ie, LengthCalculator *parent)
8519  : IEHeader(ie.header, IE_UPDATE_QER, parent),
8520  ie_(ie),
8521  qi_(ie_.qer_id, this),
8522  qci_(ie_.qer_corr_id, this),
8523  gs_(ie_.gate_status, this),
8524  mb_(ie_.maximum_bitrate, this),
8525  gb_(ie_.guaranteed_bitrate, this),
8526  pr(ie_.packet_rate, this),
8527  dflm_(ie_.dl_flow_lvl_marking, this),
8528  qfi_(ie_.qos_flow_ident, this),
8529  rqi_(ie_.reflective_qos, this),
8530  ppi_(ie_.paging_plcy_indctr, this),
8531  aw_(ie_.avgng_wnd, this)
8532 {
8533 }
8534 
8535 inline uint16_t UpdateQerIE::calculateLength()
8536 {
8537  return
8538  qi_.packedLength() +
8539  qci_.packedLength() +
8540  gs_.packedLength() +
8541  mb_.packedLength() +
8542  gb_.packedLength() +
8543  pr.packedLength() +
8544  dflm_.packedLength() +
8545  qfi_.packedLength() +
8546  rqi_.packedLength() +
8547  ppi_.packedLength() +
8548  aw_.packedLength();
8549 }
8550 
8552 
8553 inline UrrIdIE &UpdateUrrIE::urr_id()
8554 {
8555  return ui_;
8556 }
8557 
8558 inline MeasurementMethodIE &UpdateUrrIE::meas_mthd()
8559 {
8560  return mm_;
8561 }
8562 
8563 inline ReportingTriggersIE &UpdateUrrIE::rptng_triggers()
8564 {
8565  return rt_;
8566 }
8567 
8568 inline MeasurementPeriodIE &UpdateUrrIE::meas_period()
8569 {
8570  return mp_;
8571 }
8572 
8573 inline VolumeThresholdIE &UpdateUrrIE::vol_thresh()
8574 {
8575  return vt_;
8576 }
8577 
8578 inline VolumeQuotaIE &UpdateUrrIE::volume_quota()
8579 {
8580  return vq_;
8581 }
8582 
8583 inline TimeThresholdIE &UpdateUrrIE::time_threshold()
8584 {
8585  return tt_;
8586 }
8587 
8588 inline TimeQuotaIE &UpdateUrrIE::time_quota()
8589 {
8590  return tq_;
8591 }
8592 
8593 inline EventThresholdIE &UpdateUrrIE::event_threshold()
8594 {
8595  return et_;
8596 }
8597 
8598 inline EventQuotaIE &UpdateUrrIE::event_quota()
8599 {
8600  return eq_;
8601 }
8602 
8603 inline QuotaHoldingTimeIE &UpdateUrrIE::quota_hldng_time()
8604 {
8605  return qht_;
8606 }
8607 
8608 inline DroppedDlTrafficThresholdIE &UpdateUrrIE::drpd_dl_traffic_thresh()
8609 {
8610  return ddtt_;
8611 }
8612 
8613 inline MonitoringTimeIE &UpdateUrrIE::monitoring_time()
8614 {
8615  return mt_;
8616 }
8617 
8618 inline SubsequentVolumeThresholdIE &UpdateUrrIE::sbsqnt_vol_thresh()
8619 {
8620  return svt_;
8621 }
8622 
8623 inline SubsequentTimeThresholdIE &UpdateUrrIE::sbsqnt_time_thresh()
8624 {
8625  return stt_;
8626 }
8627 
8628 inline SubsequentVolumeQuotaIE &UpdateUrrIE::sbsqnt_vol_quota()
8629 {
8630  return svq_;
8631 }
8632 
8633 inline SubsequentTimeQuotaIE &UpdateUrrIE::sbsqnt_time_quota()
8634 {
8635  return stq_;
8636 }
8637 
8638 inline SubsequentEventThresholdIE &UpdateUrrIE::sbsqnt_evnt_thresh()
8639 {
8640  return set_;
8641 }
8642 
8643 inline SubsequentEventQuotaIE &UpdateUrrIE::sbsqnt_evnt_quota()
8644 {
8645  return seq_;
8646 }
8647 
8648 inline InactivityDetectionTimeIE &UpdateUrrIE::inact_det_time()
8649 {
8650  return idt_;
8651 }
8652 
8653 inline MeasurementInformationIE &UpdateUrrIE::meas_info()
8654 {
8655  return mi_;
8656 }
8657 
8658 inline TimeQuotaMechanismIE &UpdateUrrIE::time_quota_mech()
8659 {
8660  return tqm_;
8661 }
8662 
8663 inline FarIdIE &UpdateUrrIE::far_id_for_quota_act()
8664 {
8665  return fifqa_;
8666 }
8667 
8668 inline EthernetInactivityTimerIE &UpdateUrrIE::eth_inact_timer()
8669 {
8670  return eit_;
8671 }
8672 
8673 inline AdditionalMonitoringTimeIE &UpdateUrrIE::add_mntrng_time()
8674 {
8675  return amt_;
8676 }
8677 
8678 inline LinkedUrrIdIE &UpdateUrrIE::linked_urr_id(uint8_t idx)
8679 {
8680  return lui_[idx];
8681 }
8682 
8683 inline AggregatedUrrsIE &UpdateUrrIE::aggregated_urrs(uint8_t idx)
8684 {
8685  return au_[idx];
8686 }
8687 
8689 {
8690  return (ie_.linked_urr_id_count < MAX_LIST_SIZE) ?
8691  ie_.linked_urr_id_count++ : -1;
8692 }
8693 
8695 {
8696  return (ie_.aggregated_urrs_count < MAX_LIST_SIZE) ?
8697  ie_.aggregated_urrs_count++ : -1;
8698 }
8699 
8700 inline pfcp_update_urr_ie_t &UpdateUrrIE::data()
8701 {
8702  return ie_;
8703 }
8704 
8705 inline UpdateUrrIE::UpdateUrrIE(pfcp_update_urr_ie_t &ie, LengthCalculator *parent)
8706  : IEHeader(ie.header, IE_UPDATE_URR, parent),
8707  ie_(ie),
8708  ui_(ie_.urr_id, this),
8709  mm_(ie_.meas_mthd, this),
8710  rt_(ie_.rptng_triggers, this),
8711  mp_(ie_.meas_period, this),
8712  vt_(ie_.vol_thresh, this),
8713  vq_(ie_.volume_quota, this),
8714  tt_(ie_.time_threshold, this),
8715  tq_(ie_.time_quota, this),
8716  et_(ie_.event_threshold, this),
8717  eq_(ie_.event_quota, this),
8718  qht_(ie_.quota_hldng_time, this),
8719  ddtt_(ie_.drpd_dl_traffic_thresh, this),
8720  mt_(ie_.monitoring_time, this),
8721  svt_(ie_.sbsqnt_vol_thresh, this),
8722  stt_(ie_.sbsqnt_time_thresh, this),
8723  svq_(ie_.sbsqnt_vol_quota, this),
8724  stq_(ie_.sbsqnt_time_quota, this),
8725  set_(ie_.sbsqnt_evnt_thresh, this),
8726  seq_(ie_.sbsqnt_evnt_quota, this),
8727  idt_(ie_.inact_det_time, this),
8728  mi_(ie_.meas_info, this),
8729  tqm_(ie_.time_quota_mech, this),
8730  fifqa_(ie_.far_id_for_quota_act, this),
8731  eit_(ie_.eth_inact_timer, this),
8732  amt_(ie_.add_mntrng_time, this)
8733 {
8734  for (int i=0; i<MAX_LIST_SIZE; i++)
8735  {
8736  lui_.push_back(LinkedUrrIdIE(ie_.linked_urr_id[i], this));
8737  au_.push_back(AggregatedUrrsIE(ie_.aggregated_urrs[i], this));
8738  }
8739 }
8740 
8741 inline uint16_t UpdateUrrIE::calculateLength()
8742 {
8743  uint16_t len = 0;
8744  len += ui_.packedLength();
8745  len += mm_.packedLength();
8746  len += rt_.packedLength();
8747  len += mp_.packedLength();
8748  len += vt_.packedLength();
8749  len += vq_.packedLength();
8750  len += tt_.packedLength();
8751  len += tq_.packedLength();
8752  len += et_.packedLength();
8753  len += eq_.packedLength();
8754  len += qht_.packedLength();
8755  len += ddtt_.packedLength();
8756  len += mt_.packedLength();
8757  len += svt_.packedLength();
8758  len += stt_.packedLength();
8759  len += svq_.packedLength();
8760  len += stq_.packedLength();
8761  len += set_.packedLength();
8762  len += seq_.packedLength();
8763  len += idt_.packedLength();
8764  len += mi_.packedLength();
8765  len += tqm_.packedLength();
8766  len += fifqa_.packedLength();
8767  len += eit_.packedLength();
8768  len += amt_.packedLength();
8769 
8770  for (int i=0; i<ie_.linked_urr_id_count; i++)
8771  len += lui_[i].packedLength();
8772  for (int i=0; i<ie_.aggregated_urrs_count; i++)
8773  len += au_[i].packedLength();
8774 
8775  return len;
8776 }
8777 
8779 
8780 inline DestinationInterfaceIE &UpdateDuplicatingParametersIE::dst_intfc()
8781 {
8782  return di_;
8783 }
8784 
8785 inline OuterHeaderCreationIE &UpdateDuplicatingParametersIE::outer_hdr_creation()
8786 {
8787  return ohc_;
8788 }
8789 
8790 inline TransportLevelMarkingIE &UpdateDuplicatingParametersIE::trnspt_lvl_marking()
8791 {
8792  return tlm_;
8793 }
8794 
8795 inline ForwardingPolicyIE &UpdateDuplicatingParametersIE::frwdng_plcy()
8796 {
8797  return fp_;
8798 }
8799 
8800 inline pfcp_upd_dupng_parms_ie_t &UpdateDuplicatingParametersIE::data()
8801 {
8802  return ie_;
8803 }
8804 
8805 inline UpdateDuplicatingParametersIE::UpdateDuplicatingParametersIE(pfcp_upd_dupng_parms_ie_t &ie, LengthCalculator *parent)
8806  : IEHeader(ie.header, IE_UPD_DUPNG_PARMS, parent),
8807  ie_(ie),
8808  di_(ie_.dst_intfc, this),
8809  ohc_(ie_.outer_hdr_creation, this),
8810  tlm_(ie_.trnspt_lvl_marking, this),
8811  fp_(ie_.frwdng_plcy, this)
8812 {
8813 }
8814 
8816 {
8817  return
8818  di_.packedLength() +
8819  ohc_.packedLength() +
8820  tlm_.packedLength() +
8821  fp_.packedLength();
8822 }
8823 
8825 
8826 inline DestinationInterfaceIE &UpdateForwardingParametersIE::dst_intfc()
8827 {
8828  return di_;
8829 }
8830 
8831 inline NetworkInstanceIE &UpdateForwardingParametersIE::ntwk_inst()
8832 {
8833  return ni_;
8834 }
8835 
8836 inline RedirectInformationIE &UpdateForwardingParametersIE::redir_info()
8837 {
8838  return ri_;
8839 }
8840 
8841 inline OuterHeaderCreationIE &UpdateForwardingParametersIE::outer_hdr_creation()
8842 {
8843  return ohc_;
8844 }
8845 
8846 inline TransportLevelMarkingIE &UpdateForwardingParametersIE::trnspt_lvl_marking()
8847 {
8848  return tlm_;
8849 }
8850 
8851 inline ForwardingPolicyIE &UpdateForwardingParametersIE::frwdng_plcy()
8852 {
8853  return fp_;
8854 }
8855 
8856 inline HeaderEnrichmentIE &UpdateForwardingParametersIE::hdr_enrchmt()
8857 {
8858  return he_;
8859 }
8860 
8861 inline PfcpSmReqFlagsIE &UpdateForwardingParametersIE::pfcpsmreq_flags()
8862 {
8863  return f_;
8864 }
8865 
8866 inline TrafficEndpointIdIE &UpdateForwardingParametersIE::lnkd_traffic_endpt_id()
8867 {
8868  return ltei_;
8869 }
8870 
8871 inline TgppInterfaceTypeIE &UpdateForwardingParametersIE::dst_intfc_type()
8872 {
8873  return dit_;
8874 }
8875 
8876 inline pfcp_upd_frwdng_parms_ie_t &UpdateForwardingParametersIE::data()
8877 {
8878  return ie_;
8879 }
8880 
8881 inline UpdateForwardingParametersIE::UpdateForwardingParametersIE(pfcp_upd_frwdng_parms_ie_t &ie, LengthCalculator *parent)
8882  : IEHeader(ie.header, IE_UPD_FRWDNG_PARMS, parent),
8883  ie_(ie),
8884  di_(ie_.dst_intfc, this),
8885  ni_(ie_.ntwk_inst, this),
8886  ri_(ie_.redir_info, this),
8887  ohc_(ie_.outer_hdr_creation, this),
8888  tlm_(ie_.trnspt_lvl_marking, this),
8889  fp_(ie_.frwdng_plcy, this),
8890  he_(ie_.hdr_enrchmt, this),
8891  f_(ie_.pfcpsmreq_flags, this),
8892  ltei_(ie_.lnkd_traffic_endpt_id, this),
8893  dit_(ie_.dst_intfc_type, this)
8894 {
8895 }
8896 
8898 {
8899  return
8900  di_.packedLength() +
8901  ni_.packedLength() +
8902  ri_.packedLength() +
8903  ohc_.packedLength() +
8904  tlm_.packedLength() +
8905  fp_.packedLength() +
8906  he_.packedLength() +
8907  f_.packedLength() +
8908  ltei_.packedLength() +
8909  dit_.packedLength();
8910 }
8911 
8913 
8914 inline FarIdIE &UpdateFarIE::far_id()
8915 {
8916  return fi_;
8917 }
8918 
8919 inline ApplyActionIE &UpdateFarIE::apply_action()
8920 {
8921  return aa_;
8922 }
8923 
8924 inline UpdateForwardingParametersIE &UpdateFarIE::upd_frwdng_parms()
8925 {
8926  return ufp_;
8927 }
8928 
8929 inline BarIdIE &UpdateFarIE::bar_id()
8930 {
8931  return bi_;
8932 }
8933 
8934 inline UpdateDuplicatingParametersIE &UpdateFarIE::upd_dupng_parms(uint8_t idx)
8935 {
8936  return udp_[idx];
8937 }
8938 
8940 {
8941  return (ie_.upd_dupng_parms_count < MAX_LIST_SIZE) ?
8942  ie_.upd_dupng_parms_count++ : -1;
8943 }
8944 
8945 inline pfcp_update_far_ie_t &UpdateFarIE::data()
8946 {
8947  return ie_;
8948 }
8949 
8950 inline UpdateFarIE::UpdateFarIE(pfcp_update_far_ie_t &ie, LengthCalculator *parent)
8951  : IEHeader(ie.header, IE_UPDATE_FAR, parent),
8952  ie_(ie),
8953  fi_(ie_.far_id, this),
8954  aa_(ie_.apply_action, this),
8955  ufp_(ie_.upd_frwdng_parms, this),
8956  bi_(ie_.bar_id, this)
8957 {
8958  for (int i=0; i<MAX_LIST_SIZE; i++)
8959  udp_.push_back(UpdateDuplicatingParametersIE(ie_.upd_dupng_parms[i], this));
8960 }
8961 
8962 inline uint16_t UpdateFarIE::calculateLength()
8963 {
8964  uint16_t len = 0;
8965 
8966  len += fi_.packedLength();
8967  len += aa_.packedLength();
8968  len += ufp_.packedLength();
8969  len += bi_.packedLength();
8970 
8971  for (int i=0; i<ie_.upd_dupng_parms_count; i++)
8972  len += udp_[i].packedLength();
8973 
8974  return len;
8975 }
8976 
8978 
8979 inline PdrIdIE &UpdatePdrIE::pdr_id()
8980 {
8981  return pi_;
8982 }
8983 
8984 inline OuterHeaderRemovalIE &UpdatePdrIE::outer_hdr_removal()
8985 {
8986  return ohr_;
8987 }
8988 
8989 inline PrecedenceIE &UpdatePdrIE::precedence()
8990 {
8991  return p_;
8992 }
8993 
8994 inline PdiIE &UpdatePdrIE::pdi()
8995 {
8996  return pdi_;
8997 }
8998 
8999 inline FarIdIE &UpdatePdrIE::far_id()
9000 {
9001  return fi_;
9002 }
9003 
9004 inline UrrIdIE &UpdatePdrIE::urr_id()
9005 {
9006  return ui_;
9007 }
9008 
9009 inline QerIdIE &UpdatePdrIE::qer_id()
9010 {
9011  return qi_;
9012 }
9013 
9014 inline ActivatePredefinedRulesIE &UpdatePdrIE::actvt_predef_rules(uint8_t idx)
9015 {
9016  return apr_[idx];
9017 }
9018 
9019 inline DeactivatePredefinedRulesIE &UpdatePdrIE::deact_predef_rules(uint8_t idx)
9020 {
9021  return dpr_[idx];
9022 }
9023 
9025 {
9026  return (ie_.actvt_predef_rules_count < MAX_LIST_SIZE) ?
9027  ie_.actvt_predef_rules_count++ : -1;
9028 }
9029 
9031 {
9032  return (ie_.deact_predef_rules_count < MAX_LIST_SIZE) ?
9033  ie_.deact_predef_rules_count++ : -1;
9034 }
9035 
9036 inline pfcp_update_pdr_ie_t &UpdatePdrIE::data()
9037 {
9038  return ie_;
9039 }
9040 
9041 inline UpdatePdrIE::UpdatePdrIE(pfcp_update_pdr_ie_t &ie, LengthCalculator *parent)
9042  : IEHeader(ie.header, IE_UPDATE_PDR, parent),
9043  ie_(ie),
9044  pi_(ie_.pdr_id, this),
9045  ohr_(ie_.outer_hdr_removal, this),
9046  p_(ie_.precedence, this),
9047  pdi_(ie_.pdi, this),
9048  fi_(ie_.far_id, this),
9049  ui_(ie_.urr_id, this),
9050  qi_(ie_.qer_id, this)
9051 {
9052  for ( int i=0; i<MAX_LIST_SIZE; i++)
9053  {
9054  apr_.push_back(ActivatePredefinedRulesIE(ie_.actvt_predef_rules[i], this));
9055  dpr_.push_back(DeactivatePredefinedRulesIE(ie_.deact_predef_rules[i], this));
9056  }
9057 }
9058 
9059 inline uint16_t UpdatePdrIE::calculateLength()
9060 {
9061  uint16_t len = 0;
9062 
9063  len += pi_.packedLength();
9064  len += ohr_.packedLength();
9065  len += p_.packedLength();
9066  len += pdi_.packedLength();
9067  len += fi_.packedLength();
9068  len += ui_.packedLength();
9069  len += qi_.packedLength();
9070 
9071  for (int i=0; i<ie_.actvt_predef_rules_count; i++)
9072  len += apr_[i].packedLength();
9073  for (int i=0; i<ie_.deact_predef_rules_count; i++)
9074  len += dpr_[i].packedLength();
9075 
9076  return len;
9077 }
9078 
9080 
9081 inline MacAddressesDetectedIE &EthernetTrafficInformationIE::mac_addrs_detctd()
9082 {
9083  return mad_;
9084 }
9085 
9086 inline MacAddressesRemovedIE &EthernetTrafficInformationIE::mac_addrs_rmvd()
9087 {
9088  return mar_;
9089 }
9090 
9091 inline pfcp_eth_traffic_info_ie_t &EthernetTrafficInformationIE::data()
9092 {
9093  return ie_;
9094 }
9095 
9096 inline EthernetTrafficInformationIE::EthernetTrafficInformationIE(pfcp_eth_traffic_info_ie_t &ie, LengthCalculator *parent)
9097  : IEHeader(ie.header, IE_ETH_TRAFFIC_INFO, parent),
9098  ie_(ie),
9099  mad_(ie_.mac_addrs_detctd, this),
9100  mar_(ie_.mac_addrs_rmvd, this)
9101 {
9102 }
9103 
9105 {
9106  return
9107  mad_.packedLength() +
9108  mar_.packedLength();
9109 }
9110 
9112 
9114 {
9115  return ui_;
9116 }
9117 
9119 {
9120  return us_;
9121 }
9122 
9123 inline UsageReportTriggerIE &UsageReportSessionModificationRspIE::usage_rpt_trig()
9124 {
9125  return urt_;
9126 }
9127 
9129 {
9130  return st_;
9131 }
9132 
9134 {
9135  return et_;
9136 }
9137 
9138 inline VolumeMeasurementIE &UsageReportSessionModificationRspIE::vol_meas()
9139 {
9140  return vm_;
9141 }
9142 
9143 inline DurationMeasurementIE &UsageReportSessionModificationRspIE::dur_meas()
9144 {
9145  return dm_;
9146 }
9147 
9148 inline TimeOfFirstPacketIE &UsageReportSessionModificationRspIE::time_of_frst_pckt()
9149 {
9150  return tofp_;
9151 }
9152 
9153 inline TimeOfLastPacketIE &UsageReportSessionModificationRspIE::time_of_lst_pckt()
9154 {
9155  return tolp_;
9156 }
9157 
9158 inline UsageInformationIE &UsageReportSessionModificationRspIE::usage_info()
9159 {
9160  return uinfo_;
9161 }
9162 
9163 inline QueryUrrReferenceIE &UsageReportSessionModificationRspIE::query_urr_ref()
9164 {
9165  return qur_;
9166 }
9167 
9168 inline EthernetTrafficInformationIE &UsageReportSessionModificationRspIE::eth_traffic_info()
9169 {
9170  return eti_;
9171 }
9172 
9173 inline pfcp_usage_rpt_sess_mod_rsp_ie_t &UsageReportSessionModificationRspIE::data()
9174 {
9175  return ie_;
9176 }
9177 
9178 inline UsageReportSessionModificationRspIE::UsageReportSessionModificationRspIE(pfcp_usage_rpt_sess_mod_rsp_ie_t &ie, LengthCalculator *parent)
9179  : IEHeader(ie.header, IE_USAGE_RPT_SESS_MOD_RSP, parent),
9180  ie_(ie),
9181  ui_(ie_.urr_id, this),
9182  us_(ie_.urseqn, this),
9183  urt_(ie_.usage_rpt_trig, this),
9184  st_(ie_.start_time, this),
9185  et_(ie_.end_time, this),
9186  vm_(ie_.vol_meas, this),
9187  dm_(ie_.dur_meas, this),
9188  tofp_(ie_.time_of_frst_pckt, this),
9189  tolp_(ie_.time_of_lst_pckt, this),
9190  uinfo_(ie_.usage_info, this),
9191  qur_(ie_.query_urr_ref, this),
9192  eti_(ie_.eth_traffic_info, this)
9193 {
9194 }
9195 
9197 {
9198  return
9199  ui_.packedLength() +
9200  us_.packedLength() +
9201  urt_.packedLength() +
9202  st_.packedLength() +
9203  et_.packedLength() +
9204  vm_.packedLength() +
9205  dm_.packedLength() +
9206  tofp_.packedLength() +
9207  tolp_.packedLength() +
9208  uinfo_.packedLength() +
9209  qur_.packedLength() +
9210  eti_.packedLength();
9211 }
9212 
9214 
9216 {
9217  return ui_;
9218 }
9219 
9220 inline UrSeqnIE &UsageReportSessionDeletionRspIE::urseqn()
9221 {
9222  return us_;
9223 }
9224 
9225 inline UsageReportTriggerIE &UsageReportSessionDeletionRspIE::usage_rpt_trig()
9226 {
9227  return urt_;
9228 }
9229 
9230 inline StartTimeIE &UsageReportSessionDeletionRspIE::start_time()
9231 {
9232  return st_;
9233 }
9234 
9236 {
9237  return et_;
9238 }
9239 
9240 inline VolumeMeasurementIE &UsageReportSessionDeletionRspIE::vol_meas()
9241 {
9242  return vm_;
9243 }
9244 
9245 inline DurationMeasurementIE &UsageReportSessionDeletionRspIE::dur_meas()
9246 {
9247  return dm_;
9248 }
9249 
9250 inline TimeOfFirstPacketIE &UsageReportSessionDeletionRspIE::time_of_frst_pckt()
9251 {
9252  return tofp_;
9253 }
9254 
9255 inline TimeOfLastPacketIE &UsageReportSessionDeletionRspIE::time_of_lst_pckt()
9256 {
9257  return tolp_;
9258 }
9259 
9260 inline UsageInformationIE &UsageReportSessionDeletionRspIE::usage_info()
9261 {
9262  return uinfo_;
9263 }
9264 
9265 inline EthernetTrafficInformationIE &UsageReportSessionDeletionRspIE::eth_traffic_info()
9266 {
9267  return eti_;
9268 }
9269 
9270 inline pfcp_usage_rpt_sess_del_rsp_ie_t &UsageReportSessionDeletionRspIE::data()
9271 {
9272  return ie_;
9273 }
9274 
9275 inline UsageReportSessionDeletionRspIE::UsageReportSessionDeletionRspIE(pfcp_usage_rpt_sess_del_rsp_ie_t &ie, LengthCalculator *parent)
9276  : IEHeader(ie.header, IE_USAGE_RPT_SESS_DEL_RSP, parent),
9277  ie_(ie),
9278  ui_(ie_.urr_id, this),
9279  us_(ie_.urseqn, this),
9280  urt_(ie_.usage_rpt_trig, this),
9281  st_(ie_.start_time, this),
9282  et_(ie_.end_time, this),
9283  vm_(ie_.vol_meas, this),
9284  dm_(ie_.dur_meas, this),
9285  tofp_(ie_.time_of_frst_pckt, this),
9286  tolp_(ie_.time_of_lst_pckt, this),
9287  uinfo_(ie_.usage_info, this),
9288  eti_(ie_.eth_traffic_info, this)
9289 {
9290 }
9291 
9293 {
9294  return
9295  ui_.packedLength() +
9296  us_.packedLength() +
9297  urt_.packedLength() +
9298  st_.packedLength() +
9299  et_.packedLength() +
9300  vm_.packedLength() +
9301  dm_.packedLength() +
9302  tofp_.packedLength() +
9303  tolp_.packedLength() +
9304  uinfo_.packedLength() +
9305  eti_.packedLength();
9306 }
9307 
9309 
9310 inline FTeidIE &ErrorIndicationReportIE::remote_fteid(uint8_t idx)
9311 {
9312  return rft_[idx];
9313 }
9314 
9316 {
9317  return (ie_.remote_fteid_count < MAX_LIST_SIZE) ?
9318  ie_.remote_fteid_count++ : -1;
9319 }
9320 
9321 inline pfcp_err_indctn_rpt_ie_t &ErrorIndicationReportIE::data()
9322 {
9323  return ie_;
9324 }
9325 
9326 inline ErrorIndicationReportIE::ErrorIndicationReportIE(pfcp_err_indctn_rpt_ie_t &ie, LengthCalculator *parent)
9327  : IEHeader(ie.header, IE_ERR_INDCTN_RPT, parent),
9328  ie_(ie)
9329 {
9330  for (int i=0; i<MAX_LIST_SIZE; i++)
9331  rft_.push_back(FTeidIE(ie_.remote_fteid[i], this));
9332 }
9333 
9335 {
9336  uint16_t len = 0;
9337  for (int i=0; i<ie_.remote_fteid_count; i++)
9338  len += rft_[i].packedLength();
9339  return len;
9340 }
9341 
9343 
9344 inline ApplicationIdIE &ApplicationDetectionInformationIE::application_id()
9345 {
9346  return ai_;
9347 }
9348 
9349 inline ApplicationInstanceIdIE &ApplicationDetectionInformationIE::app_inst_id()
9350 {
9351  return aii_;
9352 }
9353 
9354 inline FlowInformationIE &ApplicationDetectionInformationIE::flow_info()
9355 {
9356  return fi_;
9357 }
9358 
9359 inline pfcp_app_det_info_ie_t &ApplicationDetectionInformationIE::data()
9360 {
9361  return ie_;
9362 }
9363 
9364 inline ApplicationDetectionInformationIE::ApplicationDetectionInformationIE(pfcp_app_det_info_ie_t &ie, LengthCalculator *parent)
9365  : IEHeader(ie.header, IE_APP_DET_INFO, parent),
9366  ie_(ie),
9367  ai_(ie_.application_id, this),
9368  aii_(ie_.app_inst_id, this),
9369  fi_(ie_.flow_info, this)
9370 {
9371 }
9372 
9374 {
9375  return
9376  ai_.packedLength() +
9377  aii_.packedLength() +
9378  fi_.packedLength();
9379 }
9380 
9382 
9383 inline UrrIdIE &UsageReportSessionReportReqIE::urr_id()
9384 {
9385  return ui_;
9386 }
9387 
9388 inline UrSeqnIE &UsageReportSessionReportReqIE::urseqn()
9389 {
9390  return us_;
9391 }
9392 
9393 inline UsageReportTriggerIE &UsageReportSessionReportReqIE::usage_rpt_trig()
9394 {
9395  return urt_;
9396 }
9397 
9398 inline StartTimeIE &UsageReportSessionReportReqIE::start_time()
9399 {
9400  return st_;
9401 }
9402 
9403 inline EndTimeIE &UsageReportSessionReportReqIE::end_time()
9404 {
9405  return et_;
9406 }
9407 
9408 inline VolumeMeasurementIE &UsageReportSessionReportReqIE::vol_meas()
9409 {
9410  return vm_;
9411 }
9412 
9413 inline DurationMeasurementIE &UsageReportSessionReportReqIE::dur_meas()
9414 {
9415  return dm_;
9416 }
9417 
9418 inline ApplicationDetectionInformationIE &UsageReportSessionReportReqIE::app_det_info()
9419 {
9420  return adi_;
9421 }
9422 
9423 inline UeIpAddressIE &UsageReportSessionReportReqIE::ue_ip_address()
9424 {
9425  return uia_;
9426 }
9427 
9428 inline NetworkInstanceIE &UsageReportSessionReportReqIE::ntwk_inst()
9429 {
9430  return ni_;
9431 }
9432 
9433 inline TimeOfFirstPacketIE &UsageReportSessionReportReqIE::time_of_frst_pckt()
9434 {
9435  return tofp_;
9436 }
9437 
9438 inline TimeOfLastPacketIE &UsageReportSessionReportReqIE::time_of_lst_pckt()
9439 {
9440  return tolp_;
9441 }
9442 
9443 inline UsageInformationIE &UsageReportSessionReportReqIE::usage_info()
9444 {
9445  return uinfo_;
9446 }
9447 
9448 inline QueryUrrReferenceIE &UsageReportSessionReportReqIE::query_urr_ref()
9449 {
9450  return qur_;
9451 }
9452 
9453 inline EthernetTrafficInformationIE &UsageReportSessionReportReqIE::eth_traffic_info()
9454 {
9455  return eti_;
9456 }
9457 
9458 
9459 inline EventTimeStampIE &UsageReportSessionReportReqIE::evnt_time_stmp(uint8_t idx)
9460 {
9461  return ets_[idx];
9462 }
9463 
9465 {
9466  return (ie_.evnt_time_stmp_count < MAX_LIST_SIZE) ?
9467  ie_.evnt_time_stmp_count++ : -1;
9468 }
9469 
9470 inline pfcp_usage_rpt_sess_rpt_req_ie_t &UsageReportSessionReportReqIE::data()
9471 {
9472  return ie_;
9473 }
9474 
9475 inline UsageReportSessionReportReqIE::UsageReportSessionReportReqIE(pfcp_usage_rpt_sess_rpt_req_ie_t &ie, LengthCalculator *parent)
9476  : IEHeader(ie.header, IE_USAGE_RPT_SESS_RPT_REQ, parent),
9477  ie_(ie),
9478  ui_(ie_.urr_id, this),
9479  us_(ie_.urseqn, this),
9480  urt_(ie_.usage_rpt_trig, this),
9481  st_(ie_.start_time, this),
9482  et_(ie_.end_time, this),
9483  vm_(ie_.vol_meas, this),
9484  dm_(ie_.dur_meas, this),
9485  adi_(ie_.app_det_info, this),
9486  uia_(ie_.ue_ip_address, this),
9487  ni_(ie_.ntwk_inst, this),
9488  tofp_(ie_.time_of_frst_pckt, this),
9489  tolp_(ie_.time_of_lst_pckt, this),
9490  uinfo_(ie_.usage_info, this),
9491  qur_(ie_.query_urr_ref, this),
9492  eti_(ie_.eth_traffic_info, this)
9493 {
9494  for (int i=0; i<MAX_LIST_SIZE; i++)
9495  ets_.push_back(EventTimeStampIE(ie_.evnt_time_stmp[i], this));
9496 }
9497 
9499 {
9500  uint16_t len = 0;
9501 
9502  len += ui_.packedLength();
9503  len += us_.packedLength();
9504  len += urt_.packedLength();
9505  len += st_.packedLength();
9506  len += et_.packedLength();
9507  len += vm_.packedLength();
9508  len += dm_.packedLength();
9509  len += adi_.packedLength();
9510  len += uia_.packedLength();
9511  len += ni_.packedLength();
9512  len += tofp_.packedLength();
9513  len += tolp_.packedLength();
9514  len += uinfo_.packedLength();
9515  len += qur_.packedLength();
9516  len += eti_.packedLength();
9517 
9518  for (int i=0; i<ie_.evnt_time_stmp_count; i++)
9519  len += ets_[i].packedLength();
9520 
9521  return len;
9522 }
9523 
9525 
9526 inline PdrIdIE &DownlinkDataReportIE::pdr_id(uint8_t idx)
9527 {
9528  return pi_[idx];
9529 }
9530 
9531 inline DownlinkDataServiceInformationIE &DownlinkDataReportIE::dnlnk_data_svc_info(uint8_t idx)
9532 {
9533  return ddsi_[idx];
9534 }
9535 
9537 {
9538  return (ie_.pdr_id_count < MAX_LIST_SIZE) ?
9539  ie_.pdr_id_count++ : -1;
9540 }
9541 
9543 {
9544  return (ie_.dnlnk_data_svc_info_count < MAX_LIST_SIZE) ?
9545  ie_.dnlnk_data_svc_info_count++ : -1;
9546 }
9547 
9548 inline pfcp_dnlnk_data_rpt_ie_t &DownlinkDataReportIE::data()
9549 {
9550  return ie_;
9551 }
9552 
9553 inline DownlinkDataReportIE::DownlinkDataReportIE(pfcp_dnlnk_data_rpt_ie_t &ie, LengthCalculator *parent)
9554  : IEHeader(ie.header, IE_DNLNK_DATA_RPT, parent),
9555  ie_(ie)
9556 {
9557  for (int i=0; i<MAX_LIST_SIZE; i++)
9558  {
9559  pi_.push_back(PdrIdIE(ie_.pdr_id[i], this));
9560  ddsi_.push_back(DownlinkDataServiceInformationIE(ie_.dnlnk_data_svc_info[i], this));
9561  }
9562 }
9563 
9564 inline uint16_t DownlinkDataReportIE::calculateLength()
9565 {
9566  uint16_t len = 0;
9567 
9568  for (int i=0; i<ie_.pdr_id_count; i++)
9569  len += pi_[i].packedLength();
9570  for (int i=0; i<ie_.dnlnk_data_svc_info_count; i++)
9571  len += ddsi_[i].packedLength();
9572 
9573  return len;
9574 }
9575 
9577 
9578 inline BarIdIE &UpdateBarSessionReportRspIE::bar_id()
9579 {
9580  return bi_;
9581 }
9582 
9583 inline DownlinkDataNotificationDelayIE &UpdateBarSessionReportRspIE::dnlnk_data_notif_delay()
9584 {
9585  return ddnd_;
9586 }
9587 
9588 inline DlBufferingDurationIE &UpdateBarSessionReportRspIE::dl_buf_dur()
9589 {
9590  return dbd_;
9591 }
9592 
9593 inline DlBufferingSuggestedPacketCountIE &UpdateBarSessionReportRspIE::dl_buf_suggstd_pckt_cnt()
9594 {
9595  return dbspc_;
9596 }
9597 
9598 inline SuggestedBufferingPacketsCountIE &UpdateBarSessionReportRspIE::suggstd_buf_pckts_cnt()
9599 {
9600  return sbpc_;
9601 }
9602 
9603 inline pfcp_upd_bar_sess_rpt_rsp_ie_t &UpdateBarSessionReportRspIE::data()
9604 {
9605  return ie_;
9606 }
9607 
9608 inline UpdateBarSessionReportRspIE::UpdateBarSessionReportRspIE(pfcp_upd_bar_sess_rpt_rsp_ie_t &ie, LengthCalculator *parent)
9609  : IEHeader(ie.header, IE_UPD_BAR_SESS_RPT_RSP, parent),
9610  ie_(ie),
9611  bi_(ie_.bar_id, this),
9612  ddnd_(ie_.dnlnk_data_notif_delay, this),
9613  dbd_(ie_.dl_buf_dur, this),
9614  dbspc_(ie_.dl_buf_suggstd_pckt_cnt, this),
9615  sbpc_(ie_.suggstd_buf_pckts_cnt, this)
9616 {
9617 }
9618 
9620 {
9621  return
9622  bi_.packedLength() +
9623  ddnd_.packedLength() +
9624  dbd_.packedLength() +
9625  dbspc_.packedLength() +
9626  sbpc_.packedLength();
9627 }
9628 
9632 
9633 inline HeartbeatReq::HeartbeatReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr)
9634  : PFCP::AppMsgNodeReq(ln,rn,allocSeqNbr),
9635  data_({})
9636 {
9637  setMsgType(PFCP_HRTBEAT_REQ);
9638  data_.header.message_type = msgType();
9639  data_.header.version = 1;
9640 }
9641 
9642 inline uint16_t HeartbeatReq::length() const
9643 {
9644  return data_.header.message_len;
9645 }
9646 
9647 inline RecoveryTimeStampIE &HeartbeatReq::rcvry_time_stmp(Bool forceInit)
9648 {
9649  if (forceInit || data_.rcvry_time_stmp.header.type == 0)
9650  new (&(reinterpret_cast<_HeartbeatReq*>(iebuffer_))->rts_) RecoveryTimeStampIE(data_.rcvry_time_stmp, nullptr);
9651  return (reinterpret_cast<_HeartbeatReq*>(iebuffer_))->rts_;
9652 }
9653 
9654 inline HeartbeatReq &HeartbeatReq::encode(uint8_t *dest)
9655 {
9656  data_.header.seid_seqno.no_seid.seq_no = seqNbr();
9657  UShort len = encode_pfcp_hrtbeat_req_t(&data_, dest);
9658  data_.header.seid_seqno.no_seid.seq_no = seqNbr();
9659  data_.header.message_len = len;
9660  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
9661  return *this;
9662 }
9663 
9664 inline pfcp_hrtbeat_req_t &HeartbeatReq::data()
9665 {
9666  return data_;
9667 }
9668 
9669 inline Void HeartbeatReq::postDecode()
9670 {
9671  if (data_.rcvry_time_stmp.header.len > 0) rcvry_time_stmp(True);
9672 }
9673 
9675 
9677  : data_({})
9678 {
9679  setMsgType(PFCP_HRTBEAT_RSP);
9680  data_.header.message_type = msgType();
9681  data_.header.version = 1;
9682 }
9683 
9684 inline uint16_t HeartbeatRsp::length() const
9685 {
9686  return data_.header.message_len;
9687 }
9688 
9689 inline RecoveryTimeStampIE &HeartbeatRsp::rcvry_time_stmp(Bool forceInit)
9690 {
9691  if (forceInit || data_.rcvry_time_stmp.header.type == 0)
9692  new (&(reinterpret_cast<_HeartbeatRsp*>(iebuffer_))->rts_) RecoveryTimeStampIE(data_.rcvry_time_stmp, nullptr);
9693  return (reinterpret_cast<_HeartbeatRsp*>(iebuffer_))->rts_;
9694 }
9695 
9696 inline HeartbeatRsp &HeartbeatRsp::encode(uint8_t *dest)
9697 {
9698  data_.header.seid_seqno.no_seid.seq_no = req()->seqNbr();
9699  UShort len = encode_pfcp_hrtbeat_rsp_t(&data_, dest);
9700  data_.header.message_len = len;
9701  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
9702  return *this;
9703 }
9704 
9705 inline pfcp_hrtbeat_rsp_t &HeartbeatRsp::data()
9706 {
9707  return data_;
9708 }
9709 
9710 inline Void HeartbeatRsp::postDecode()
9711 {
9712  if (data_.rcvry_time_stmp.header.len > 0) rcvry_time_stmp(True);
9713 }
9714 
9716 
9717 inline PfdMgmtReq::PfdMgmtReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr)
9718  : PFCP::AppMsgNodeReq(ln,rn,allocSeqNbr),
9719  data_({})
9720 {
9721  setMsgType(PFCP_PFD_MGMT_REQ);
9722  data_.header.message_type = msgType();
9723  data_.header.version = 1;
9724  for (int i=0; i<MAX_LIST_SIZE; i++)
9725  appids_.push_back(ApplicationIdsPfdsIE(data_.app_ids_pfds[i],NULL));
9726 }
9727 
9728 inline uint16_t PfdMgmtReq::length() const
9729 {
9730  return data_.header.message_len;
9731 }
9732 
9733 inline ApplicationIdsPfdsIE &PfdMgmtReq::app_ids_pfds(uint8_t idx)
9734 {
9735  if (idx >= appids_.size())
9736  {
9737  for (auto i = appids_.size(); i < static_cast<size_t>(idx)+1; i++)
9738  appids_.push_back(ApplicationIdsPfdsIE(data_.app_ids_pfds[i], nullptr));
9739  }
9740  return appids_[idx];
9741 }
9742 
9743 inline int PfdMgmtReq::next_app_ids_pfds()
9744 {
9745  return (data_.app_ids_pfds_count < MAX_LIST_SIZE) ?
9746  data_.app_ids_pfds_count++ : -1;
9747 }
9748 
9749 inline PfdMgmtReq &PfdMgmtReq::encode(uint8_t *dest)
9750 {
9751  data_.header.seid_seqno.no_seid.seq_no = seqNbr();
9752  UShort len = encode_pfcp_pfd_mgmt_req_t(&data_, dest);
9753  data_.header.message_len = len;
9754  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
9755  return *this;
9756 }
9757 
9758 inline pfcp_pfd_mgmt_req_t &PfdMgmtReq::data()
9759 {
9760  return data_;
9761 }
9762 
9763 inline Void PfdMgmtReq::postDecode()
9764 {
9765  for (int i=0; i<MAX_LIST_SIZE; i++)
9766  {
9767  if (data_.app_ids_pfds[i].header.len > 0)
9768  {
9769  next_app_ids_pfds();
9770  app_ids_pfds(i);
9771  }
9772  }
9773 }
9774 
9776 
9777 inline PfdMgmtRsp::PfdMgmtRsp()
9778  : data_({})
9779 {
9780  setMsgType(PFCP_PFD_MGMT_RSP);
9781  data_.header.message_type = msgType();
9782  data_.header.version = 1;
9783 }
9784 
9785 inline uint16_t PfdMgmtRsp::length() const
9786 {
9787  return data_.header.message_len;
9788 }
9789 
9790 inline CauseIE &PfdMgmtRsp::cause(Bool forceInit)
9791 {
9792  if (forceInit || data_.cause.header.type == 0)
9793  new (&(reinterpret_cast<_PfdMgmtRsp*>(iebuffer_))->c_) CauseIE(data_.cause, nullptr);
9794  return (reinterpret_cast<_PfdMgmtRsp*>(iebuffer_))->c_;
9795 }
9796 
9797 inline OffendingIeIE &PfdMgmtRsp::offending_ie(Bool forceInit)
9798 {
9799  if (forceInit || data_.offending_ie.header.type == 0)
9800  new (&(reinterpret_cast<_PfdMgmtRsp*>(iebuffer_))->oi_) OffendingIeIE(data_.offending_ie, nullptr);
9801  return (reinterpret_cast<_PfdMgmtRsp*>(iebuffer_))->oi_;
9802 }
9803 
9804 inline PfdMgmtRsp &PfdMgmtRsp::encode(uint8_t *dest)
9805 {
9806  data_.header.seid_seqno.no_seid.seq_no = req()->seqNbr();
9807  uint16_t len = encode_pfcp_pfd_mgmt_rsp_t(&data_, dest);
9808  data_.header.message_len = len;
9809  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
9810  return *this;
9811 }
9812 
9813 inline pfcp_pfd_mgmt_rsp_t &PfdMgmtRsp::data()
9814 {
9815  return data_;
9816 }
9817 
9818 inline Void PfdMgmtRsp::postDecode()
9819 {
9820  if (data_.cause.header.len > 0) cause(True);
9821  if (data_.offending_ie.header.len > 0) offending_ie(True);
9822 }
9823 
9825 
9826 inline AssnSetupReq::AssnSetupReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr)
9827  : PFCP::AppMsgNodeReq(ln,rn,allocSeqNbr),
9828  data_({})
9829 {
9830  setMsgType(PFCP_ASSN_SETUP_REQ);
9831  data_.header.message_type = msgType();
9832  data_.header.version = 1;
9833 }
9834 
9835 inline uint16_t AssnSetupReq::length() const
9836 {
9837  return data_.header.message_len;
9838 }
9839 
9840 inline NodeIdIE &AssnSetupReq::node_id(Bool forceInit)
9841 {
9842  if (forceInit || data_.node_id.header.type == 0)
9843  new (&(reinterpret_cast<_AssnSetupReq*>(iebuffer_))->ni_) NodeIdIE(data_.node_id, nullptr);
9844  return (reinterpret_cast<_AssnSetupReq*>(iebuffer_))->ni_;
9845 }
9846 
9847 inline RecoveryTimeStampIE &AssnSetupReq::rcvry_time_stmp(Bool forceInit)
9848 {
9849  if (forceInit || data_.rcvry_time_stmp.header.type == 0)
9850  new (&(reinterpret_cast<_AssnSetupReq*>(iebuffer_))->rts_) RecoveryTimeStampIE(data_.rcvry_time_stmp, nullptr);
9851  return (reinterpret_cast<_AssnSetupReq*>(iebuffer_))->rts_;
9852 }
9853 
9854 inline UpFunctionFeaturesIE &AssnSetupReq::up_func_feat(Bool forceInit)
9855 {
9856  if (forceInit || data_.up_func_feat.header.type == 0)
9857  new (&(reinterpret_cast<_AssnSetupReq*>(iebuffer_))->uff_) UpFunctionFeaturesIE(data_.up_func_feat, nullptr);
9858  return (reinterpret_cast<_AssnSetupReq*>(iebuffer_))->uff_;
9859 }
9860 
9861 inline CpFunctionFeaturesIE &AssnSetupReq::cp_func_feat(Bool forceInit)
9862 {
9863  if (forceInit || data_.cp_func_feat.header.type == 0)
9864  new (&(reinterpret_cast<_AssnSetupReq*>(iebuffer_))->cff_) CpFunctionFeaturesIE(data_.cp_func_feat, nullptr);
9865  return (reinterpret_cast<_AssnSetupReq*>(iebuffer_))->cff_;
9866 }
9867 
9868 inline UserPlaneIpResourceInformationIE &AssnSetupReq::user_plane_ip_rsrc_info(uint8_t idx)
9869 {
9870  if (idx >= upiri_.size())
9871  {
9872  for (auto i = upiri_.size(); i < static_cast<size_t>(idx)+1; i++)
9873  upiri_.push_back(UserPlaneIpResourceInformationIE(data_.user_plane_ip_rsrc_info[i], nullptr));
9874  }
9875  return upiri_[idx];
9876 }
9877 
9879 {
9880  return (data_.user_plane_ip_rsrc_info_count < MAX_LIST_SIZE) ?
9881  data_.user_plane_ip_rsrc_info_count++ : -1;
9882 }
9883 
9884 inline AssnSetupReq &AssnSetupReq::encode(uint8_t *dest)
9885 {
9886  data_.header.seid_seqno.no_seid.seq_no = seqNbr();
9887  uint16_t len = encode_pfcp_assn_setup_req_t(&data_, dest);
9888  data_.header.message_len = len;
9889  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
9890  return *this;
9891 }
9892 
9893 inline pfcp_assn_setup_req_t &AssnSetupReq::data()
9894 {
9895  return data_;
9896 }
9897 
9898 inline Void AssnSetupReq::postDecode()
9899 {
9900  if (data_.node_id.header.len > 0) node_id(True);
9901  if (data_.rcvry_time_stmp.header.len > 0) rcvry_time_stmp(True);
9902  if (data_.up_func_feat.header.len > 0) up_func_feat(True);
9903  if (data_.cp_func_feat.header.len > 0) cp_func_feat(True);
9904 
9905  for (int i=0; i<MAX_LIST_SIZE; i++)
9906  {
9907  if (data_.user_plane_ip_rsrc_info[i].header.len > 0) { next_user_plane_ip_rsrc_info(); user_plane_ip_rsrc_info(i); }
9908  }
9909 }
9910 
9912 
9914  : data_({})
9915 {
9916  setMsgType(PFCP_ASSN_SETUP_RSP);
9917  data_.header.message_type = msgType();
9918  data_.header.version = 1;
9919 }
9920 
9921 inline uint16_t AssnSetupRsp::length() const
9922 {
9923  return data_.header.message_len;
9924 }
9925 
9926 inline NodeIdIE &AssnSetupRsp::node_id(Bool forceInit)
9927 {
9928  if (forceInit || data_.node_id.header.type == 0)
9929  new (&(reinterpret_cast<_AssnSetupRsp*>(iebuffer_))->ni_) NodeIdIE(data_.node_id, nullptr);
9930  return (reinterpret_cast<_AssnSetupRsp*>(iebuffer_))->ni_;
9931 }
9932 
9933 inline CauseIE &AssnSetupRsp::cause(Bool forceInit)
9934 {
9935  if (forceInit || data_.cause.header.type == 0)
9936  new (&(reinterpret_cast<_AssnSetupRsp*>(iebuffer_))->c_) CauseIE(data_.cause, nullptr);
9937  return (reinterpret_cast<_AssnSetupRsp*>(iebuffer_))->c_;
9938 }
9939 
9940 inline RecoveryTimeStampIE &AssnSetupRsp::rcvry_time_stmp(Bool forceInit)
9941 {
9942  if (forceInit || data_.rcvry_time_stmp.header.type == 0)
9943  new (&(reinterpret_cast<_AssnSetupRsp*>(iebuffer_))->rts_) RecoveryTimeStampIE(data_.rcvry_time_stmp, nullptr);
9944  return (reinterpret_cast<_AssnSetupRsp*>(iebuffer_))->rts_;
9945 }
9946 
9947 inline UpFunctionFeaturesIE &AssnSetupRsp::up_func_feat(Bool forceInit)
9948 {
9949  if (forceInit || data_.up_func_feat.header.type == 0)
9950  new (&(reinterpret_cast<_AssnSetupRsp*>(iebuffer_))->uff_) UpFunctionFeaturesIE(data_.up_func_feat, nullptr);
9951  return (reinterpret_cast<_AssnSetupRsp*>(iebuffer_))->uff_;
9952 }
9953 
9954 inline CpFunctionFeaturesIE &AssnSetupRsp::cp_func_feat(Bool forceInit)
9955 {
9956  if (forceInit || data_.cp_func_feat.header.type == 0)
9957  new (&(reinterpret_cast<_AssnSetupRsp*>(iebuffer_))->cff_) CpFunctionFeaturesIE(data_.cp_func_feat, nullptr);
9958  return (reinterpret_cast<_AssnSetupRsp*>(iebuffer_))->cff_;
9959 }
9960 
9961 inline UserPlaneIpResourceInformationIE &AssnSetupRsp::user_plane_ip_rsrc_info(uint8_t idx)
9962 {
9963  if (idx >= upiri_.size())
9964  {
9965  for (auto i = upiri_.size(); i < static_cast<size_t>(idx)+1; i++)
9966  upiri_.push_back(UserPlaneIpResourceInformationIE(data_.user_plane_ip_rsrc_info[i], nullptr));
9967  }
9968  return upiri_[idx];
9969 }
9970 
9972 {
9973  return (data_.user_plane_ip_rsrc_info_count < MAX_LIST_SIZE) ?
9974  data_.user_plane_ip_rsrc_info_count++ : -1;
9975 }
9976 
9977 inline AssnSetupRsp &AssnSetupRsp::encode(uint8_t *dest)
9978 {
9979  data_.header.seid_seqno.no_seid.seq_no = req()->seqNbr();
9980  uint16_t len = encode_pfcp_assn_setup_rsp_t(&data_, dest);
9981  data_.header.message_len = len;
9982  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
9983  return *this;
9984 }
9985 
9986 inline pfcp_assn_setup_rsp_t &AssnSetupRsp::data()
9987 {
9988  return data_;
9989 }
9990 
9991 inline Void AssnSetupRsp::postDecode()
9992 {
9993  if (data_.node_id.header.len > 0) node_id(True);
9994  if (data_.cause.header.len > 0) cause(True);
9995  if (data_.rcvry_time_stmp.header.len > 0) rcvry_time_stmp(True);
9996  if (data_.up_func_feat.header.len > 0) up_func_feat(True);
9997  if (data_.cp_func_feat.header.len > 0) cp_func_feat(True);
9998 
9999  for (int i=0; i<MAX_LIST_SIZE; i++)
10000  {
10001  if (data_.user_plane_ip_rsrc_info[i].header.len > 0) { next_user_plane_ip_rsrc_info(); user_plane_ip_rsrc_info(i); }
10002  }
10003 }
10004 
10006 
10007 inline AssnUpdateReq::AssnUpdateReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr)
10008  : PFCP::AppMsgNodeReq(ln,rn,allocSeqNbr),
10009  data_({})
10010 {
10011  setMsgType(PFCP_ASSN_UPD_REQ);
10012  data_.header.message_type = msgType();
10013  data_.header.version = 1;
10014 }
10015 
10016 inline uint16_t AssnUpdateReq::length() const
10017 {
10018  return data_.header.message_len;
10019 }
10020 
10021 inline NodeIdIE &AssnUpdateReq::node_id(Bool forceInit)
10022 {
10023  if (forceInit || data_.node_id.header.type == 0)
10024  new (&(reinterpret_cast<_AssnUpdateReq*>(iebuffer_))->ni_) NodeIdIE(data_.node_id, nullptr);
10025  return (reinterpret_cast<_AssnUpdateReq*>(iebuffer_))->ni_;
10026 }
10027 
10028 inline UpFunctionFeaturesIE &AssnUpdateReq::up_func_feat(Bool forceInit)
10029 {
10030  if (forceInit || data_.up_func_feat.header.type == 0)
10031  new (&(reinterpret_cast<_AssnUpdateReq*>(iebuffer_))->uff_) UpFunctionFeaturesIE(data_.up_func_feat, nullptr);
10032  return (reinterpret_cast<_AssnUpdateReq*>(iebuffer_))->uff_;
10033 }
10034 
10035 inline CpFunctionFeaturesIE &AssnUpdateReq::cp_func_feat(Bool forceInit)
10036 {
10037  if (forceInit || data_.cp_func_feat.header.type == 0)
10038  new (&(reinterpret_cast<_AssnUpdateReq*>(iebuffer_))->cff_) CpFunctionFeaturesIE(data_.cp_func_feat, nullptr);
10039  return (reinterpret_cast<_AssnUpdateReq*>(iebuffer_))->cff_;
10040 }
10041 
10042 inline AssociationReleaseRequestIE &AssnUpdateReq::up_assn_rel_req(Bool forceInit)
10043 {
10044  if (forceInit || data_.up_assn_rel_req.header.type == 0)
10045  new (&(reinterpret_cast<_AssnUpdateReq*>(iebuffer_))->arr_) AssociationReleaseRequestIE(data_.up_assn_rel_req, nullptr);
10046  return (reinterpret_cast<_AssnUpdateReq*>(iebuffer_))->arr_;
10047 }
10048 
10049 inline GracefulReleasePeriodIE &AssnUpdateReq::graceful_rel_period(Bool forceInit)
10050 {
10051  if (forceInit || data_.graceful_rel_period.header.type == 0)
10052  new (&(reinterpret_cast<_AssnUpdateReq*>(iebuffer_))->grp_) GracefulReleasePeriodIE(data_.graceful_rel_period, nullptr);
10053  return (reinterpret_cast<_AssnUpdateReq*>(iebuffer_))->grp_;
10054 }
10055 
10056 inline UserPlaneIpResourceInformationIE &AssnUpdateReq::user_plane_ip_rsrc_info(uint8_t idx)
10057 {
10058  if (idx >= upiri_.size())
10059  {
10060  for (auto i = upiri_.size(); i < static_cast<size_t>(idx)+1; i++)
10061  upiri_.push_back(UserPlaneIpResourceInformationIE(data_.user_plane_ip_rsrc_info[i], nullptr));
10062  }
10063  return upiri_[idx];
10064 }
10065 
10067 {
10068  return (data_.user_plane_ip_rsrc_info_count < MAX_LIST_SIZE) ?
10069  data_.user_plane_ip_rsrc_info_count++ : -1;
10070 }
10071 
10072 inline AssnUpdateReq &AssnUpdateReq::encode(uint8_t *dest)
10073 {
10074  data_.header.seid_seqno.no_seid.seq_no = seqNbr();
10075  uint16_t len = encode_pfcp_assn_upd_req_t(&data_, dest);
10076  data_.header.message_len = len;
10077  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
10078  return *this;
10079 }
10080 
10081 inline pfcp_assn_upd_req_t &AssnUpdateReq::data()
10082 {
10083  return data_;
10084 }
10085 
10086 inline Void AssnUpdateReq::postDecode()
10087 {
10088  if (data_.node_id.header.len > 0) node_id(True);
10089  if (data_.up_func_feat.header.len > 0) up_func_feat(True);
10090  if (data_.cp_func_feat.header.len > 0) cp_func_feat(True);
10091  if (data_.up_assn_rel_req.header.len > 0) up_assn_rel_req(True);
10092  if (data_.graceful_rel_period.header.len > 0) graceful_rel_period(True);
10093 
10094  for (int i=0; i<MAX_LIST_SIZE; i++)
10095  {
10096  if (data_.user_plane_ip_rsrc_info[i].header.len > 0) { next_user_plane_ip_rsrc_info(); user_plane_ip_rsrc_info(i); }
10097  }
10098 }
10099 
10101 
10103  : data_({})
10104 {
10105  setMsgType(PFCP_ASSN_UPD_RSP);
10106  data_.header.message_type = msgType();
10107  data_.header.version = 1;
10108 }
10109 
10110 inline uint16_t AssnUpdateRsp::length() const
10111 {
10112  return data_.header.message_len;
10113 }
10114 
10115 inline NodeIdIE &AssnUpdateRsp::node_id(Bool forceInit)
10116 {
10117  if (forceInit || data_.node_id.header.type == 0)
10118  new (&(reinterpret_cast<_AssnUpdateRsp*>(iebuffer_))->ni_) NodeIdIE(data_.node_id, nullptr);
10119  return (reinterpret_cast<_AssnUpdateRsp*>(iebuffer_))->ni_;
10120 }
10121 
10122 inline CauseIE &AssnUpdateRsp::cause(Bool forceInit)
10123 {
10124  if (forceInit || data_.cause.header.type == 0)
10125  new (&(reinterpret_cast<_AssnUpdateRsp*>(iebuffer_))->c_) CauseIE(data_.cause, nullptr);
10126  return (reinterpret_cast<_AssnUpdateRsp*>(iebuffer_))->c_;
10127 }
10128 
10129 inline UpFunctionFeaturesIE &AssnUpdateRsp::up_func_feat(Bool forceInit)
10130 {
10131  if (forceInit || data_.up_func_feat.header.type == 0)
10132  new (&(reinterpret_cast<_AssnUpdateRsp*>(iebuffer_))->uff_) UpFunctionFeaturesIE(data_.up_func_feat, nullptr);
10133  return (reinterpret_cast<_AssnUpdateRsp*>(iebuffer_))->uff_;
10134 }
10135 
10136 inline CpFunctionFeaturesIE &AssnUpdateRsp::cp_func_feat(Bool forceInit)
10137 {
10138  if (forceInit || data_.cp_func_feat.header.type == 0)
10139  new (&(reinterpret_cast<_AssnUpdateRsp*>(iebuffer_))->cff_) CpFunctionFeaturesIE(data_.cp_func_feat, nullptr);
10140  return (reinterpret_cast<_AssnUpdateRsp*>(iebuffer_))->cff_;
10141 }
10142 
10143 inline AssnUpdateRsp &AssnUpdateRsp::encode(uint8_t *dest)
10144 {
10145  data_.header.seid_seqno.no_seid.seq_no = req()->seqNbr();
10146  uint16_t len = encode_pfcp_assn_upd_rsp_t(&data_, dest);
10147  data_.header.message_len = len;
10148  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
10149  return *this;
10150 }
10151 
10152 inline pfcp_assn_upd_rsp_t &AssnUpdateRsp::data()
10153 {
10154  return data_;
10155 }
10156 
10157 inline Void AssnUpdateRsp::postDecode()
10158 {
10159  if (data_.node_id.header.len > 0) node_id(True);
10160  if (data_.cause.header.len > 0) cause(True);
10161  if (data_.up_func_feat.header.len > 0) up_func_feat(True);
10162  if (data_.cp_func_feat.header.len > 0) cp_func_feat(True);
10163 }
10164 
10166 
10167 inline AssnReleaseReq::AssnReleaseReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr)
10168  : PFCP::AppMsgNodeReq(ln,rn,allocSeqNbr),
10169  data_({})
10170 {
10171  setMsgType(PFCP_ASSN_REL_REQ);
10172  data_.header.message_type = msgType();
10173  data_.header.version = 1;
10174 }
10175 
10176 inline uint16_t AssnReleaseReq::length() const
10177 {
10178  return data_.header.message_len;
10179 }
10180 
10181 inline NodeIdIE &AssnReleaseReq::node_id(Bool forceInit)
10182 {
10183  if (forceInit || data_.node_id.header.type == 0)
10184  new (&(reinterpret_cast<_AssnReleaseReq*>(iebuffer_))->ni_) NodeIdIE(data_.node_id, nullptr);
10185  return (reinterpret_cast<_AssnReleaseReq*>(iebuffer_))->ni_;
10186 }
10187 
10188 inline AssnReleaseReq &AssnReleaseReq::encode(uint8_t *dest)
10189 {
10190  data_.header.seid_seqno.no_seid.seq_no = seqNbr();
10191  uint16_t len = encode_pfcp_assn_rel_req_t(&data_, dest);
10192  data_.header.message_len = len;
10193  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
10194  return *this;
10195 }
10196 
10197 inline pfcp_assn_rel_req_t &AssnReleaseReq::data()
10198 {
10199  return data_;
10200 }
10201 
10202 inline Void AssnReleaseReq::postDecode()
10203 {
10204  if (data_.node_id.header.len > 0) node_id(True);
10205 }
10206 
10208 
10210  : data_({})
10211 {
10212  setMsgType(PFCP_ASSN_REL_RSP);
10213  data_.header.message_type = msgType();
10214  data_.header.version = 1;
10215 }
10216 
10217 inline uint16_t AssnReleaseRsp::length() const
10218 {
10219  return data_.header.message_len;
10220 }
10221 
10222 inline NodeIdIE &AssnReleaseRsp::node_id(Bool forceInit)
10223 {
10224  if (forceInit || data_.node_id.header.type == 0)
10225  new (&(reinterpret_cast<_AssnReleaseRsp*>(iebuffer_))->ni_) NodeIdIE(data_.node_id, nullptr);
10226  return (reinterpret_cast<_AssnReleaseRsp*>(iebuffer_))->ni_;
10227 }
10228 
10229 inline CauseIE &AssnReleaseRsp::cause(Bool forceInit)
10230 {
10231  if (forceInit || data_.cause.header.type == 0)
10232  new (&(reinterpret_cast<_AssnReleaseRsp*>(iebuffer_))->c_) CauseIE(data_.cause, nullptr);
10233  return (reinterpret_cast<_AssnReleaseRsp*>(iebuffer_))->c_;
10234 }
10235 
10236 inline AssnReleaseRsp &AssnReleaseRsp::encode(uint8_t *dest)
10237 {
10238  data_.header.seid_seqno.no_seid.seq_no = req()->seqNbr();
10239  uint16_t len = encode_pfcp_assn_rel_rsp_t(&data_, dest);
10240  data_.header.message_len = len;
10241  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
10242  return *this;
10243 }
10244 
10245 inline pfcp_assn_rel_rsp_t &AssnReleaseRsp::data()
10246 {
10247  return data_;
10248 }
10249 
10250 inline Void AssnReleaseRsp::postDecode()
10251 {
10252  if (data_.node_id.header.len > 0) node_id(True);
10253  if (data_.cause.header.len > 0) cause(True);
10254 }
10255 
10257 
10259  : data_({})
10260 {
10261  setMsgType(PFCP_VERSION_NOT_SUPPORTED);
10262  data_.message_type = msgType();
10263  data_.version = 1;
10264 }
10265 
10266 inline uint16_t VersionNotSupportedRsp::length() const
10267 {
10268  return data_.message_len;
10269 }
10270 
10271 inline VersionNotSupportedRsp &VersionNotSupportedRsp::encode(uint8_t *dest)
10272 {
10273  data_.seid_seqno.no_seid.seq_no = 0;
10274  uint16_t len = encode_pfcp_header_t(&data_, dest);
10275  data_.message_len = len;
10276  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.message_len - 4);
10277  return *this;
10278 }
10279 
10280 inline pfcp_header_t &VersionNotSupportedRsp::data()
10281 {
10282  return data_;
10283 }
10284 
10286 
10287 inline NodeReportReq::NodeReportReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr)
10288  : PFCP::AppMsgNodeReq(ln,rn,allocSeqNbr),
10289  data_({})
10290 {
10291  setMsgType(PFCP_NODE_RPT_REQ);
10292  data_.header.message_type = msgType();
10293  data_.header.version = 1;
10294 }
10295 
10296 inline uint16_t NodeReportReq::length() const
10297 {
10298  return data_.header.message_len;
10299 }
10300 
10301 inline NodeIdIE &NodeReportReq::node_id(Bool forceInit)
10302 {
10303  if (forceInit || data_.node_id.header.type == 0)
10304  new (&(reinterpret_cast<_NodeReportReq*>(iebuffer_))->ni_) NodeIdIE(data_.node_id, nullptr);
10305  return (reinterpret_cast<_NodeReportReq*>(iebuffer_))->ni_;
10306 }
10307 
10308 inline NodeReportTypeIE &NodeReportReq::node_rpt_type(Bool forceInit)
10309 {
10310  if (forceInit || data_.node_rpt_type.header.type == 0)
10311  new (&(reinterpret_cast<_NodeReportReq*>(iebuffer_))->nrt_) NodeReportTypeIE(data_.node_rpt_type, nullptr);
10312  return (reinterpret_cast<_NodeReportReq*>(iebuffer_))->nrt_;
10313 }
10314 
10315 inline UserPlanePathFailureReportIE &NodeReportReq::user_plane_path_fail_rpt(Bool forceInit)
10316 {
10317  if (forceInit || data_.user_plane_path_fail_rpt.header.type == 0)
10318  new (&(reinterpret_cast<_NodeReportReq*>(iebuffer_))->uprfr_) UserPlanePathFailureReportIE(data_.user_plane_path_fail_rpt, nullptr);
10319  return (reinterpret_cast<_NodeReportReq*>(iebuffer_))->uprfr_;
10320 }
10321 
10322 inline NodeReportReq &NodeReportReq::encode(uint8_t *dest)
10323 {
10324  data_.header.seid_seqno.no_seid.seq_no = seqNbr();
10325  uint16_t len = encode_pfcp_node_rpt_req_t(&data_, dest);
10326  data_.header.message_len = len;
10327  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
10328  return *this;
10329 }
10330 
10331 inline pfcp_node_rpt_req_t &NodeReportReq::data()
10332 {
10333  return data_;
10334 }
10335 
10336 inline Void NodeReportReq::postDecode()
10337 {
10338  if (data_.node_id.header.len > 0) node_id(True);
10339  if (data_.node_rpt_type.header.len > 0) node_rpt_type(True);
10340  if (data_.user_plane_path_fail_rpt.header.len > 0) user_plane_path_fail_rpt(True);
10341 }
10342 
10344 
10346  : data_({})
10347 {
10348  setMsgType(PFCP_NODE_RPT_RSP);
10349  data_.header.message_type = msgType();
10350  data_.header.version = 1;
10351 }
10352 
10353 inline uint16_t NodeReportRsp::length() const
10354 {
10355  return data_.header.message_len;
10356 }
10357 
10358 inline NodeIdIE &NodeReportRsp::node_id(Bool forceInit)
10359 {
10360  if (forceInit || data_.node_id.header.type == 0)
10361  new (&(reinterpret_cast<_NodeReportRsp*>(iebuffer_))->ni_) NodeIdIE(data_.node_id, nullptr);
10362  return (reinterpret_cast<_NodeReportRsp*>(iebuffer_))->ni_;
10363 }
10364 
10365 inline CauseIE &NodeReportRsp::cause(Bool forceInit)
10366 {
10367  if (forceInit || data_.cause.header.type == 0)
10368  new (&(reinterpret_cast<_NodeReportRsp*>(iebuffer_))->c_) CauseIE(data_.cause, nullptr);
10369  return (reinterpret_cast<_NodeReportRsp*>(iebuffer_))->c_;
10370 }
10371 
10372 inline OffendingIeIE &NodeReportRsp::offending_ie(Bool forceInit)
10373 {
10374  if (forceInit || data_.offending_ie.header.type == 0)
10375  new (&(reinterpret_cast<_NodeReportRsp*>(iebuffer_))->oi_) OffendingIeIE(data_.offending_ie, nullptr);
10376  return (reinterpret_cast<_NodeReportRsp*>(iebuffer_))->oi_;
10377 }
10378 
10379 inline NodeReportRsp &NodeReportRsp::encode(uint8_t *dest)
10380 {
10381  data_.header.seid_seqno.no_seid.seq_no = req()->seqNbr();
10382  uint16_t len = encode_pfcp_node_rpt_rsp_t(&data_, dest);
10383  data_.header.message_len = len;
10384  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
10385  return *this;
10386 }
10387 
10388 inline pfcp_node_rpt_rsp_t &NodeReportRsp::data()
10389 {
10390  return data_;
10391 }
10392 
10393 inline Void NodeReportRsp::postDecode()
10394 {
10395  if (data_.node_id.header.len > 0) node_id(True);
10396  if (data_.cause.header.len > 0) cause(True);
10397  if (data_.offending_ie.header.len > 0) offending_ie(True);
10398 }
10399 
10401 
10402 inline SessionSetDeletionReq::SessionSetDeletionReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr)
10403  : PFCP::AppMsgNodeReq(ln,rn,allocSeqNbr),
10404  data_({})
10405 {
10406  setMsgType(PFCP_SESS_SET_DEL_REQ);
10407  data_.header.message_type = msgType();
10408  data_.header.version = 1;
10409 }
10410 
10411 inline uint16_t SessionSetDeletionReq::length() const
10412 {
10413  return data_.header.message_len;
10414 }
10415 
10416 inline NodeIdIE &SessionSetDeletionReq::node_id(Bool forceInit)
10417 {
10418  if (forceInit || data_.node_id.header.type == 0)
10419  new (&(reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->ni_) NodeIdIE(data_.node_id, nullptr);
10420  return (reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->ni_;
10421 }
10422 
10423 inline FqCsidIE &SessionSetDeletionReq::sgw_c_fqcsid(Bool forceInit)
10424 {
10425  if (forceInit || data_.sgw_c_fqcsid.header.type == 0)
10426  new (&(reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->sc_) FqCsidIE(data_.sgw_c_fqcsid, nullptr);
10427  return (reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->sc_;
10428 }
10429 
10430 inline FqCsidIE &SessionSetDeletionReq::pgw_c_fqcsid(Bool forceInit)
10431 {
10432  if (forceInit || data_.pgw_c_fqcsid.header.type == 0)
10433  new (&(reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->pc_) FqCsidIE(data_.pgw_c_fqcsid, nullptr);
10434  return (reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->pc_;
10435 }
10436 
10437 inline FqCsidIE &SessionSetDeletionReq::up_fqcsid(Bool forceInit)
10438 {
10439  if (forceInit || data_.up_fqcsid.header.type == 0)
10440  new (&(reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->u_) FqCsidIE(data_.up_fqcsid, nullptr);
10441  return (reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->u_;
10442 }
10443 
10444 inline FqCsidIE &SessionSetDeletionReq::twan_fqcsid(Bool forceInit)
10445 {
10446  if (forceInit || data_.twan_fqcsid.header.type == 0)
10447  new (&(reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->t_) FqCsidIE(data_.twan_fqcsid, nullptr);
10448  return (reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->t_;
10449 }
10450 
10451 inline FqCsidIE &SessionSetDeletionReq::epdg_fqcsid(Bool forceInit)
10452 {
10453  if (forceInit || data_.epdg_fqcsid.header.type == 0)
10454  new (&(reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->e_) FqCsidIE(data_.epdg_fqcsid, nullptr);
10455  return (reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->e_;
10456 }
10457 
10458 inline FqCsidIE &SessionSetDeletionReq::mme_fqcsid(Bool forceInit)
10459 {
10460  if (forceInit || data_.mme_fqcsid.header.type == 0)
10461  new (&(reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->m_) FqCsidIE(data_.mme_fqcsid, nullptr);
10462  return (reinterpret_cast<_SessionSetDeletionReq*>(iebuffer_))->m_;
10463 }
10464 
10465 inline SessionSetDeletionReq &SessionSetDeletionReq::encode(uint8_t *dest)
10466 {
10467  data_.header.seid_seqno.no_seid.seq_no = seqNbr();
10468  uint16_t len = encode_pfcp_sess_set_del_req_t(&data_, dest);
10469  data_.header.message_len = len;
10470  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
10471  return *this;
10472 }
10473 
10474 inline pfcp_sess_set_del_req_t &SessionSetDeletionReq::data()
10475 {
10476  return data_;
10477 }
10478 
10480 {
10481  if (data_.node_id.header.len > 0) node_id(True);
10482  if (data_.sgw_c_fqcsid.header.len > 0) sgw_c_fqcsid(True);
10483  if (data_.pgw_c_fqcsid.header.len > 0) pgw_c_fqcsid(True);
10484  if (data_.up_fqcsid.header.len > 0) up_fqcsid(True);
10485  if (data_.twan_fqcsid.header.len > 0) twan_fqcsid(True);
10486  if (data_.epdg_fqcsid.header.len > 0) epdg_fqcsid(True);
10487  if (data_.mme_fqcsid.header.len > 0) mme_fqcsid(True);
10488 }
10489 
10491 
10493  : data_({})
10494 {
10495  setMsgType(PFCP_SESS_SET_DEL_RSP);
10496  data_.header.message_type = msgType();
10497  data_.header.version = 1;
10498 }
10499 
10500 inline uint16_t SessionSetDeletionRsp::length() const
10501 {
10502  return data_.header.message_len;
10503 }
10504 
10505 inline NodeIdIE &SessionSetDeletionRsp::node_id(Bool forceInit)
10506 {
10507  if (forceInit || data_.node_id.header.type == 0)
10508  new (&(reinterpret_cast<_SessionSetDeletionRsp*>(iebuffer_))->ni_) NodeIdIE(data_.node_id, nullptr);
10509  return (reinterpret_cast<_SessionSetDeletionRsp*>(iebuffer_))->ni_;
10510 }
10511 
10512 inline CauseIE &SessionSetDeletionRsp::cause(Bool forceInit)
10513 {
10514  if (forceInit || data_.cause.header.type == 0)
10515  new (&(reinterpret_cast<_SessionSetDeletionRsp*>(iebuffer_))->c_) CauseIE(data_.cause, nullptr);
10516  return (reinterpret_cast<_SessionSetDeletionRsp*>(iebuffer_))->c_;
10517 }
10518 
10519 inline OffendingIeIE &SessionSetDeletionRsp::offending_ie(Bool forceInit)
10520 {
10521  if (forceInit || data_.offending_ie.header.type == 0)
10522  new (&(reinterpret_cast<_SessionSetDeletionRsp*>(iebuffer_))->oi_) OffendingIeIE(data_.offending_ie, nullptr);
10523  return (reinterpret_cast<_SessionSetDeletionRsp*>(iebuffer_))->oi_;
10524 }
10525 
10526 inline SessionSetDeletionRsp &SessionSetDeletionRsp::encode(uint8_t *dest)
10527 {
10528  data_.header.seid_seqno.no_seid.seq_no = req()->seqNbr();
10529  uint16_t len = encode_pfcp_sess_set_del_rsp_t(&data_, dest);
10530  data_.header.message_len = len;
10531  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
10532  return *this;
10533 }
10534 
10535 inline pfcp_sess_set_del_rsp_t &SessionSetDeletionRsp::data()
10536 {
10537  return data_;
10538 }
10539 
10541 {
10542  if (data_.node_id.header.len > 0) node_id(True);
10543  if (data_.cause.header.len > 0) cause(True);
10544  if (data_.offending_ie.header.len > 0) offending_ie(True);
10545 }
10546 
10548 
10550  : PFCP::AppMsgSessionReq(ses,allocSeqNbr),
10551  data_({})
10552 {
10553  setMsgType(PFCP_SESS_ESTAB_REQ);
10554  data_.header.message_type = msgType();
10555  data_.header.version = 1;
10556  data_.header.s = 1;
10557 }
10558 
10559 inline uint16_t SessionEstablishmentReq::length() const
10560 {
10561  return data_.header.message_len;
10562 }
10563 
10564 inline NodeIdIE &SessionEstablishmentReq::node_id(Bool forceInit)
10565 {
10566  if (forceInit || data_.node_id.header.type == 0)
10567  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->ni_) NodeIdIE(data_.node_id, nullptr);
10568  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->ni_;
10569 }
10570 
10571 inline FSeidIE &SessionEstablishmentReq::cp_fseid(Bool forceInit)
10572 {
10573  if (forceInit || data_.cp_fseid.header.type == 0)
10574  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->cpf_) FSeidIE(data_.cp_fseid, nullptr);
10575  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->cpf_;
10576 }
10577 
10578 inline CreateBarIE &SessionEstablishmentReq::create_bar(Bool forceInit)
10579 {
10580  if (forceInit || data_.create_bar.header.type == 0)
10581  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->cb_) CreateBarIE(data_.create_bar, nullptr);
10582  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->cb_;
10583 }
10584 
10585 inline PdnTypeIE &SessionEstablishmentReq::pdn_type(Bool forceInit)
10586 {
10587  if (forceInit || data_.pdn_type.header.type == 0)
10588  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->pt_) PdnTypeIE(data_.pdn_type, nullptr);
10589  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->pt_;
10590 }
10591 
10592 inline FqCsidIE &SessionEstablishmentReq::sgw_c_fqcsid(Bool forceInit)
10593 {
10594  if (forceInit || data_.sgw_c_fqcsid.header.type == 0)
10595  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->sfc_) FqCsidIE(data_.sgw_c_fqcsid, nullptr);
10596  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->sfc_;
10597 }
10598 
10599 inline FqCsidIE &SessionEstablishmentReq::mme_fqcsid(Bool forceInit)
10600 {
10601  if (forceInit || data_.mme_fqcsid.header.type == 0)
10602  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->mfc_) FqCsidIE(data_.mme_fqcsid, nullptr);
10603  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->mfc_;
10604 }
10605 
10606 inline FqCsidIE &SessionEstablishmentReq::pgw_c_fqcsid(Bool forceInit)
10607 {
10608  if (forceInit || data_.pgw_c_fqcsid.header.type == 0)
10609  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->pfc_) FqCsidIE(data_.pgw_c_fqcsid, nullptr);
10610  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->pfc_;
10611 }
10612 
10613 inline FqCsidIE &SessionEstablishmentReq::epdg_fqcsid(Bool forceInit)
10614 {
10615  if (forceInit || data_.epdg_fqcsid.header.type == 0)
10616  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->efc_) FqCsidIE(data_.epdg_fqcsid, nullptr);
10617  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->efc_;
10618 }
10619 
10620 inline FqCsidIE &SessionEstablishmentReq::twan_fqcsid(Bool forceInit)
10621 {
10622  if (forceInit || data_.twan_fqcsid.header.type == 0)
10623  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->tfc_) FqCsidIE(data_.twan_fqcsid, nullptr);
10624  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->tfc_;
10625 }
10626 
10627 inline UserPlaneInactivityTimerIE &SessionEstablishmentReq::user_plane_inact_timer(Bool forceInit)
10628 {
10629  if (forceInit || data_.user_plane_inact_timer.header.type == 0)
10630  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->upit_) UserPlaneInactivityTimerIE(data_.user_plane_inact_timer, nullptr);
10631  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->upit_;
10632 }
10633 
10634 inline UserIdIE &SessionEstablishmentReq::user_id(Bool forceInit)
10635 {
10636  if (forceInit || data_.user_id.header.type == 0)
10637  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->ui_) UserIdIE(data_.user_id, nullptr);
10638  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->ui_;
10639 }
10640 
10641 inline TraceInformationIE &SessionEstablishmentReq::trc_info(Bool forceInit)
10642 {
10643  if (forceInit || data_.trc_info.header.type == 0)
10644  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->ti_) TraceInformationIE(data_.trc_info, nullptr);
10645  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->ti_;
10646 }
10647 
10648 inline ApnDnnIE &SessionEstablishmentReq::apn_dnn(Bool forceInit)
10649 {
10650  if (forceInit || data_.apn_dnn.header.type == 0)
10651  new (&(reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->ad_) ApnDnnIE(data_.apn_dnn, nullptr);
10652  return (reinterpret_cast<_SessionEstablishmentReq*>(iebuffer_))->ad_;
10653 }
10654 
10655 inline CreatePdrIE &SessionEstablishmentReq::create_pdr(uint8_t idx)
10656 {
10657  if (idx >= cp_.size())
10658  {
10659  for (auto i = cp_.size(); i < static_cast<size_t>(idx)+1; i++)
10660  cp_.push_back(CreatePdrIE(data_.create_pdr[i], nullptr));
10661  }
10662  return cp_[idx];
10663 }
10664 
10665 inline CreateFarIE &SessionEstablishmentReq::create_far(uint8_t idx)
10666 {
10667  if (idx >= cf_.size())
10668  {
10669  for (auto i = cf_.size(); i < static_cast<size_t>(idx)+1; i++)
10670  cf_.push_back(CreateFarIE(data_.create_far[i], nullptr));
10671  }
10672  return cf_[idx];
10673 }
10674 
10675 inline CreateUrrIE &SessionEstablishmentReq::create_urr(uint8_t idx)
10676 {
10677  if (idx >= cu_.size())
10678  {
10679  for (auto i = cu_.size(); i < static_cast<size_t>(idx)+1; i++)
10680  cu_.push_back(CreateUrrIE(data_.create_urr[i], nullptr));
10681  }
10682  return cu_[idx];
10683 }
10684 
10685 inline CreateQerIE &SessionEstablishmentReq::create_qer(uint8_t idx)
10686 {
10687  if (idx >= cq_.size())
10688  {
10689  for (auto i = cq_.size(); i < static_cast<size_t>(idx)+1; i++)
10690  cq_.push_back(CreateQerIE(data_.create_qer[i], nullptr));
10691  }
10692  return cq_[idx];
10693 }
10694 
10695 inline CreateTrafficEndpointIE &SessionEstablishmentReq::create_traffic_endpt(uint8_t idx)
10696 {
10697  if (idx >= cte_.size())
10698  {
10699  for (auto i = cte_.size(); i < static_cast<size_t>(idx)+1; i++)
10700  cte_.push_back(CreateTrafficEndpointIE(data_.create_traffic_endpt[i], nullptr));
10701  }
10702  return cte_[idx];
10703 }
10704 
10706 {
10707  return (data_.create_pdr_count < MAX_LIST_SIZE) ?
10708  data_.create_pdr_count++ : -1;
10709 }
10710 
10712 {
10713  return (data_.create_far_count < MAX_LIST_SIZE) ?
10714  data_.create_far_count++ : -1;
10715 }
10716 
10718 {
10719  return (data_.create_urr_count < MAX_LIST_SIZE) ?
10720  data_.create_urr_count++ : -1;
10721 }
10722 
10724 {
10725  return (data_.create_qer_count < MAX_LIST_SIZE) ?
10726  data_.create_qer_count++ : -1;
10727 }
10728 
10730 {
10731  return (data_.create_traffic_endpt_count < MAX_LIST_SIZE) ?
10732  data_.create_traffic_endpt_count++ : -1;
10733 }
10734 
10735 inline SessionEstablishmentReq &SessionEstablishmentReq::encode(uint8_t *dest)
10736 {
10737  data_.header.seid_seqno.has_seid.seq_no = seqNbr();
10738  data_.header.seid_seqno.has_seid.seid = session()->remoteSeid();
10739  UShort len = encode_pfcp_sess_estab_req_t(&data_, dest);
10740  data_.header.message_len = len;
10741  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
10742  return *this;
10743 }
10744 
10745 inline pfcp_sess_estab_req_t &SessionEstablishmentReq::data()
10746 {
10747  return data_;
10748 }
10749 
10751 {
10752  if (data_.node_id.header.len > 0) node_id(True);
10753  if (data_.cp_fseid.header.len > 0) cp_fseid(True);
10754  if (data_.create_bar.header.len > 0) create_bar(True);
10755  if (data_.pdn_type.header.len > 0) pdn_type(True);
10756  if (data_.sgw_c_fqcsid.header.len > 0) sgw_c_fqcsid(True);
10757  if (data_.mme_fqcsid.header.len > 0) mme_fqcsid(True);
10758  if (data_.pgw_c_fqcsid.header.len > 0) pgw_c_fqcsid(True);
10759  if (data_.epdg_fqcsid.header.len > 0) epdg_fqcsid(True);
10760  if (data_.twan_fqcsid.header.len > 0) twan_fqcsid(True);
10761  if (data_.user_plane_inact_timer.header.len > 0) user_plane_inact_timer(True);
10762  if (data_.user_id.header.len > 0) user_id(True);
10763  if (data_.trc_info.header.len > 0) trc_info(True);
10764  if (data_.apn_dnn.header.len > 0) apn_dnn(True);
10765 
10766  // for (int i=0; i<MAX_LIST_SIZE; i++)
10767  // {
10768  // if (data_.create_pdr[i].header.len > 0) { next_create_pdr(); create_pdr(i); }
10769  // if (data_.create_far[i].header.len > 0) { next_create_far(); create_far(i); }
10770  // if (data_.create_urr[i].header.len > 0) { next_create_urr(); create_urr(i); }
10771  // if (data_.create_qer[i].header.len > 0) { next_create_qer(); create_qer(i); }
10772  // if (data_.create_traffic_endpt[i].header.len > 0) { next_create_traffic_endpt(); create_traffic_endpt(i); }
10773  // }
10774 }
10775 
10777 
10779  : data_({})
10780 {
10781  setMsgType(PFCP_SESS_ESTAB_RSP);
10782  data_.header.message_type = msgType();
10783  data_.header.version = 1;
10784  data_.header.s = 1;
10785 }
10786 
10787 inline uint16_t SessionEstablishmentRsp::length() const
10788 {
10789  return data_.header.message_len;
10790 }
10791 
10792 inline NodeIdIE &SessionEstablishmentRsp::node_id(Bool forceInit)
10793 {
10794  if (forceInit || data_.node_id.header.type == 0)
10795  new (&(reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->ni_) NodeIdIE(data_.node_id, nullptr);
10796  return (reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->ni_;
10797 }
10798 
10799 inline CauseIE &SessionEstablishmentRsp::cause(Bool forceInit)
10800 {
10801  if (forceInit || data_.cause.header.type == 0)
10802  new (&(reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->c_) CauseIE(data_.cause, nullptr);
10803  return (reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->c_;
10804 }
10805 
10806 inline OffendingIeIE &SessionEstablishmentRsp::offending_ie(Bool forceInit)
10807 {
10808  if (forceInit || data_.offending_ie.header.type == 0)
10809  new (&(reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->oi_) OffendingIeIE(data_.offending_ie, nullptr);
10810  return (reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->oi_;
10811 }
10812 
10813 inline FSeidIE &SessionEstablishmentRsp::up_fseid(Bool forceInit)
10814 {
10815  if (forceInit || data_.up_fseid.header.type == 0)
10816  new (&(reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->ufs_) FSeidIE(data_.up_fseid, nullptr);
10817  return (reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->ufs_;
10818 }
10819 
10820 inline LoadControlInformationIE &SessionEstablishmentRsp::load_ctl_info(Bool forceInit)
10821 {
10822  if (forceInit || data_.load_ctl_info.header.type == 0)
10823  new (&(reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->lci_) LoadControlInformationIE(data_.load_ctl_info, nullptr);
10824  return (reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->lci_;
10825 }
10826 
10827 inline OverloadControlInformationIE &SessionEstablishmentRsp::ovrld_ctl_info(Bool forceInit)
10828 {
10829  if (forceInit || data_.ovrld_ctl_info.header.type == 0)
10830  new (&(reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->oci_) OverloadControlInformationIE(data_.ovrld_ctl_info, nullptr);
10831  return (reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->oci_;
10832 }
10833 
10834 inline FqCsidIE &SessionEstablishmentRsp::up_fqcsid(Bool forceInit)
10835 {
10836  if (forceInit || data_.up_fqcsid.header.type == 0)
10837  new (&(reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->ufc_) FqCsidIE(data_.up_fqcsid, nullptr);
10838  return (reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->ufc_;
10839 }
10840 
10841 inline FailedRuleIdIE &SessionEstablishmentRsp::failed_rule_id(Bool forceInit)
10842 {
10843  if (forceInit || data_.failed_rule_id.header.type == 0)
10844  new (&(reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->fri_) FailedRuleIdIE(data_.failed_rule_id, nullptr);
10845  return (reinterpret_cast<_SessionEstablishmentRsp*>(iebuffer_))->fri_;
10846 }
10847 
10848 inline CreatedPdrIE &SessionEstablishmentRsp::created_pdr(uint8_t idx)
10849 {
10850  if (idx >= cp_.size())
10851  {
10852  for (auto i = cp_.size(); i < static_cast<size_t>(idx)+1; i++)
10853  cp_.push_back(CreatedPdrIE(data_.created_pdr[i], nullptr));
10854  }
10855  return cp_[idx];
10856 }
10857 
10858 inline CreatedTrafficEndpointIE &SessionEstablishmentRsp::created_traffic_endpt(uint8_t idx)
10859 {
10860  if (idx >= cte_.size())
10861  {
10862  for (auto i = cte_.size(); i < static_cast<size_t>(idx)+1; i++)
10863  cte_.push_back(CreatedTrafficEndpointIE(data_.created_traffic_endpt[i], nullptr));
10864  }
10865  return cte_[idx];
10866 }
10867 
10869 {
10870  return (data_.created_pdr_count < MAX_LIST_SIZE) ?
10871  data_.created_pdr_count++ : -1;
10872 }
10873 
10875 {
10876  return (data_.created_traffic_endpt_count < MAX_LIST_SIZE) ?
10877  data_.created_traffic_endpt_count++ : -1;
10878 }
10879 
10880 inline SessionEstablishmentRsp &SessionEstablishmentRsp::encode(uint8_t *dest)
10881 {
10882  data_.header.seid_seqno.has_seid.seq_no = req()->seqNbr();
10883  data_.header.seid_seqno.has_seid.seid = req()->session()->remoteSeid();
10884  uint16_t len = encode_pfcp_sess_estab_rsp_t(&data_, dest);
10885  data_.header.message_len = len;
10886  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
10887  return *this;
10888 }
10889 
10890 inline pfcp_sess_estab_rsp_t &SessionEstablishmentRsp::data()
10891 {
10892  return data_;
10893 }
10894 
10896 {
10897  if (data_.node_id.header.len > 0) node_id(True);
10898  if (data_.cause.header.len > 0) cause(True);
10899  if (data_.offending_ie.header.len > 0) offending_ie(True);
10900  if (data_.up_fseid.header.len > 0) up_fseid(True);
10901  if (data_.load_ctl_info.header.len > 0) load_ctl_info(True);
10902  if (data_.ovrld_ctl_info.header.len > 0) ovrld_ctl_info(True);
10903  if (data_.up_fqcsid.header.len > 0) up_fqcsid(True);
10904  if (data_.failed_rule_id.header.len > 0) failed_rule_id(True);
10905 
10906  for (int i=0; i<MAX_LIST_SIZE; i++)
10907  {
10908  if (data_.created_pdr[i].header.len > 0) { next_created_pdr(); created_pdr(i); }
10909  if (data_.created_traffic_endpt[i].header.len > 0) { next_created_traffic_endpt(); created_traffic_endpt(i); }
10910  }
10911 }
10912 
10914 
10916  : PFCP::AppMsgSessionReq(ses,allocSeqNbr),
10917  data_({})
10918 {
10919  setMsgType(PFCP_SESS_MOD_REQ);
10920  data_.header.message_type = msgType();
10921  data_.header.version = 1;
10922  data_.header.s = 1;
10923 }
10924 
10925 inline uint16_t SessionModificationReq::length() const
10926 {
10927  return data_.header.message_len;
10928 }
10929 
10930 inline FSeidIE &SessionModificationReq::cp_fseid(Bool forceInit)
10931 {
10932  if (forceInit || data_.cp_fseid.header.type == 0)
10933  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->cfs_) FSeidIE(data_.cp_fseid, nullptr);
10934  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->cfs_;
10935 }
10936 
10937 inline RemoveBarIE &SessionModificationReq::remove_bar(Bool forceInit)
10938 {
10939  if (forceInit || data_.remove_bar.header.type == 0)
10940  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->rb_) RemoveBarIE(data_.remove_bar, nullptr);
10941  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->rb_;
10942 }
10943 
10944 inline RemoveTrafficEndpointIE &SessionModificationReq::rmv_traffic_endpt(Bool forceInit)
10945 {
10946  if (forceInit || data_.rmv_traffic_endpt.header.type == 0)
10947  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->rte_) RemoveTrafficEndpointIE(data_.rmv_traffic_endpt, nullptr);
10948  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->rte_;
10949 }
10950 
10951 inline CreateBarIE &SessionModificationReq::create_bar(Bool forceInit)
10952 {
10953  if (forceInit || data_.create_bar.header.type == 0)
10954  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->cb_) CreateBarIE(data_.create_bar, nullptr);
10955  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->cb_;
10956 }
10957 
10958 inline CreateTrafficEndpointIE &SessionModificationReq::create_traffic_endpt(Bool forceInit)
10959 {
10960  if (forceInit || data_.create_traffic_endpt.header.type == 0)
10961  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->cte_) CreateTrafficEndpointIE(data_.create_traffic_endpt, nullptr);
10962  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->cte_;
10963 }
10964 
10965 inline UpdateBarSessionModificationReqIE &SessionModificationReq::update_bar(Bool forceInit)
10966 {
10967  if (forceInit || data_.update_bar.header.type == 0)
10968  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->ub_) UpdateBarSessionModificationReqIE(data_.update_bar, nullptr);
10969  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->ub_;
10970 }
10971 
10972 inline UpdateTrafficEndpointIE &SessionModificationReq::upd_traffic_endpt(Bool forceInit)
10973 {
10974  if (forceInit || data_.upd_traffic_endpt.header.type == 0)
10975  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->ute_) UpdateTrafficEndpointIE(data_.upd_traffic_endpt, nullptr);
10976  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->ute_;
10977 }
10978 
10979 inline PfcpSmReqFlagsIE &SessionModificationReq::pfcpsmreq_flags(Bool forceInit)
10980 {
10981  if (forceInit || data_.pfcpsmreq_flags.header.type == 0)
10982  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->f_) PfcpSmReqFlagsIE(data_.pfcpsmreq_flags, nullptr);
10983  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->f_;
10984 }
10985 
10986 inline FqCsidIE &SessionModificationReq::pgw_c_fqcsid(Bool forceInit)
10987 {
10988  if (forceInit || data_.pgw_c_fqcsid.header.type == 0)
10989  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->pcfc_) FqCsidIE(data_.pgw_c_fqcsid, nullptr);
10990  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->pcfc_;
10991 }
10992 
10993 inline FqCsidIE &SessionModificationReq::sgw_c_fqcsid(Bool forceInit)
10994 {
10995  if (forceInit || data_.sgw_c_fqcsid.header.type == 0)
10996  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->scfc_) FqCsidIE(data_.sgw_c_fqcsid, nullptr);
10997  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->scfc_;
10998 }
10999 
11000 inline FqCsidIE &SessionModificationReq::mme_fqcsid(Bool forceInit)
11001 {
11002  if (forceInit || data_.mme_fqcsid.header.type == 0)
11003  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->mfc_) FqCsidIE(data_.mme_fqcsid, nullptr);
11004  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->mfc_;
11005 }
11006 
11007 inline FqCsidIE &SessionModificationReq::epdg_fqcsid(Bool forceInit)
11008 {
11009  if (forceInit || data_.epdg_fqcsid.header.type == 0)
11010  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->efc_) FqCsidIE(data_.epdg_fqcsid, nullptr);
11011  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->efc_;
11012 }
11013 
11014 inline FqCsidIE &SessionModificationReq::twan_fqcsid(Bool forceInit)
11015 {
11016  if (forceInit || data_.twan_fqcsid.header.type == 0)
11017  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->tfc_) FqCsidIE(data_.twan_fqcsid, nullptr);
11018  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->tfc_;
11019 }
11020 
11021 inline UserPlaneInactivityTimerIE &SessionModificationReq::user_plane_inact_timer(Bool forceInit)
11022 {
11023  if (forceInit || data_.user_plane_inact_timer.header.type == 0)
11024  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->upit_) UserPlaneInactivityTimerIE(data_.user_plane_inact_timer, nullptr);
11025  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->upit_;
11026 }
11027 
11028 inline QueryUrrReferenceIE &SessionModificationReq::query_urr_ref(Bool forceInit)
11029 {
11030  if (forceInit || data_.query_urr_ref.header.type == 0)
11031  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->qur_) QueryUrrReferenceIE(data_.query_urr_ref, nullptr);
11032  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->qur_;
11033 }
11034 
11035 inline TraceInformationIE &SessionModificationReq::trc_info(Bool forceInit)
11036 {
11037  if (forceInit || data_.trc_info.header.type == 0)
11038  new (&(reinterpret_cast<_SessionModificationReq*>(iebuffer_))->ti_) TraceInformationIE(data_.trc_info, nullptr);
11039  return (reinterpret_cast<_SessionModificationReq*>(iebuffer_))->ti_;
11040 }
11041 
11042 inline RemovePdrIE &SessionModificationReq::remove_pdr(uint8_t idx)
11043 {
11044  if (idx >= rp_.size())
11045  {
11046  for (auto i = rp_.size(); i < static_cast<size_t>(idx)+1; i++)
11047  rp_.push_back(RemovePdrIE(data_.remove_pdr[i], nullptr));
11048  }
11049  return rp_[idx];
11050 }
11051 
11052 inline RemoveFarIE &SessionModificationReq::remove_far(uint8_t idx)
11053 {
11054  if (idx >= rf_.size())
11055  {
11056  for (auto i = rf_.size(); i < static_cast<size_t>(idx)+1; i++)
11057  rf_.push_back(RemoveFarIE(data_.remove_far[i], nullptr));
11058  }
11059  return rf_[idx];
11060 }
11061 
11062 inline RemoveUrrIE &SessionModificationReq::remove_urr(uint8_t idx)
11063 {
11064  if (idx >= ru_.size())
11065  {
11066  for (auto i = ru_.size(); i < static_cast<size_t>(idx)+1; i++)
11067  ru_.push_back(RemoveUrrIE(data_.remove_urr[i], nullptr));
11068  }
11069  return ru_[idx];
11070 }
11071 
11072 inline RemoveQerIE &SessionModificationReq::remove_qer(uint8_t idx)
11073 {
11074  if (idx >= rq_.size())
11075  {
11076  for (auto i = rq_.size(); i < static_cast<size_t>(idx)+1; i++)
11077  rq_.push_back(RemoveQerIE(data_.remove_qer[i], nullptr));
11078  }
11079  return rq_[idx];
11080 }
11081 
11082 inline CreatePdrIE &SessionModificationReq::create_pdr(uint8_t idx)
11083 {
11084  if (idx >= cp_.size())
11085  {
11086  for (auto i = cp_.size(); i < static_cast<size_t>(idx)+1; i++)
11087  cp_.push_back(CreatePdrIE(data_.create_pdr[i], nullptr));
11088  }
11089  return cp_[idx];
11090 }
11091 
11092 inline CreateFarIE &SessionModificationReq::create_far(uint8_t idx)
11093 {
11094  if (idx >= cf_.size())
11095  {
11096  for (auto i = cf_.size(); i < static_cast<size_t>(idx)+1; i++)
11097  cf_.push_back(CreateFarIE(data_.create_far[i], nullptr));
11098  }
11099  return cf_[idx];
11100 }
11101 
11102 inline CreateUrrIE &SessionModificationReq::create_urr(uint8_t idx)
11103 {
11104  if (idx >= cu_.size())
11105  {
11106  for (auto i = cu_.size(); i < static_cast<size_t>(idx)+1; i++)
11107  cu_.push_back(CreateUrrIE(data_.create_urr[i], nullptr));
11108  }
11109  return cu_[idx];
11110 }
11111 
11112 inline CreateQerIE &SessionModificationReq::create_qer(uint8_t idx)
11113 {
11114  if (idx >= cq_.size())
11115  {
11116  for (auto i = cq_.size(); i < static_cast<size_t>(idx)+1; i++)
11117  cq_.push_back(CreateQerIE(data_.create_qer[i], nullptr));
11118  }
11119  return cq_[idx];
11120 }
11121 
11122 inline UpdatePdrIE &SessionModificationReq::update_pdr(uint8_t idx)
11123 {
11124  if (idx >= up_.size())
11125  {
11126  for (auto i = up_.size(); i < static_cast<size_t>(idx)+1; i++)
11127  up_.push_back(UpdatePdrIE(data_.update_pdr[i], nullptr));
11128  }
11129  return up_[idx];
11130 }
11131 
11132 inline UpdateFarIE &SessionModificationReq::update_far(uint8_t idx)
11133 {
11134  if (idx >= uf_.size())
11135  {
11136  for (auto i = uf_.size(); i < static_cast<size_t>(idx)+1; i++)
11137  uf_.push_back(UpdateFarIE(data_.update_far[i], nullptr));
11138  }
11139  return uf_[idx];
11140 }
11141 
11142 inline UpdateUrrIE &SessionModificationReq::update_urr(uint8_t idx)
11143 {
11144  if (idx >= uu_.size())
11145  {
11146  for (auto i = uu_.size(); i < static_cast<size_t>(idx)+1; i++)
11147  uu_.push_back(UpdateUrrIE(data_.update_urr[i], nullptr));
11148  }
11149  return uu_[idx];
11150 }
11151 
11152 inline UpdateQerIE &SessionModificationReq::update_qer(uint8_t idx)
11153 {
11154  if (idx >= uq_.size())
11155  {
11156  for (auto i = uq_.size(); i < static_cast<size_t>(idx)+1; i++)
11157  uq_.push_back(UpdateQerIE(data_.update_qer[i], nullptr));
11158  }
11159  return uq_[idx];
11160 }
11161 
11162 inline QueryUrrIE &SessionModificationReq::query_urr(uint8_t idx)
11163 {
11164  if (idx >= qu_.size())
11165  {
11166  for (auto i = qu_.size(); i < static_cast<size_t>(idx)+1; i++)
11167  qu_.push_back(QueryUrrIE(data_.query_urr[i], nullptr));
11168  }
11169  return qu_[idx];
11170 }
11171 
11173 {
11174  return (data_.remove_pdr_count < MAX_LIST_SIZE) ?
11175  data_.remove_pdr_count++ : -1;
11176 }
11177 
11179 {
11180  return (data_.remove_far_count < MAX_LIST_SIZE) ?
11181  data_.remove_far_count++ : -1;
11182 }
11183 
11185 {
11186  return (data_.remove_urr_count < MAX_LIST_SIZE) ?
11187  data_.remove_urr_count++ : -1;
11188 }
11189 
11191 {
11192  return (data_.remove_qer_count < MAX_LIST_SIZE) ?
11193  data_.remove_qer_count++ : -1;
11194 }
11195 
11197 {
11198  return (data_.create_pdr_count < MAX_LIST_SIZE) ?
11199  data_.create_pdr_count++ : -1;
11200 }
11201 
11203 {
11204  return (data_.create_far_count < MAX_LIST_SIZE) ?
11205  data_.create_far_count++ : -1;
11206 }
11207 
11209 {
11210  return (data_.create_urr_count < MAX_LIST_SIZE) ?
11211  data_.create_urr_count++ : -1;
11212 }
11213 
11215 {
11216  return (data_.create_qer_count < MAX_LIST_SIZE) ?
11217  data_.create_qer_count++ : -1;
11218 }
11219 
11221 {
11222  return (data_.update_pdr_count < MAX_LIST_SIZE) ?
11223  data_.update_pdr_count++ : -1;
11224 }
11225 
11227 {
11228  return (data_.update_far_count < MAX_LIST_SIZE) ?
11229  data_.update_far_count++ : -1;
11230 }
11231 
11233 {
11234  return (data_.update_urr_count < MAX_LIST_SIZE) ?
11235  data_.update_urr_count++ : -1;
11236 }
11237 
11239 {
11240  return (data_.update_qer_count < MAX_LIST_SIZE) ?
11241  data_.update_qer_count++ : -1;
11242 }
11243 
11245 {
11246  return (data_.query_urr_count < MAX_LIST_SIZE) ?
11247  data_.query_urr_count++ : -1;
11248 }
11249 
11250 inline SessionModificationReq &SessionModificationReq::encode(uint8_t *dest)
11251 {
11252  data_.header.seid_seqno.has_seid.seq_no = seqNbr();
11253  data_.header.seid_seqno.has_seid.seid = session()->remoteSeid();
11254  uint16_t len = encode_pfcp_sess_mod_req_t(&data_, dest);
11255  data_.header.message_len = len;
11256  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
11257  return *this;
11258 }
11259 
11260 inline pfcp_sess_mod_req_t &SessionModificationReq::data()
11261 {
11262  return data_;
11263 }
11264 
11266 {
11267  if (data_.cp_fseid.header.len > 0) cp_fseid(True);
11268  if (data_.remove_bar.header.len > 0) remove_bar(True);
11269  if (data_.rmv_traffic_endpt.header.len > 0) rmv_traffic_endpt(True);
11270  if (data_.create_bar.header.len > 0) create_bar(True);
11271  if (data_.create_traffic_endpt.header.len > 0) create_traffic_endpt(True);
11272  if (data_.update_bar.header.len > 0) update_bar(True);
11273  if (data_.upd_traffic_endpt.header.len > 0) upd_traffic_endpt(True);
11274  if (data_.pfcpsmreq_flags.header.len > 0) pfcpsmreq_flags(True);
11275  if (data_.pgw_c_fqcsid.header.len > 0) pgw_c_fqcsid(True);
11276  if (data_.sgw_c_fqcsid.header.len > 0) sgw_c_fqcsid(True);
11277  if (data_.mme_fqcsid.header.len > 0) mme_fqcsid(True);
11278  if (data_.epdg_fqcsid.header.len > 0) epdg_fqcsid(True);
11279  if (data_.twan_fqcsid.header.len > 0) twan_fqcsid(True);
11280  if (data_.user_plane_inact_timer.header.len > 0) user_plane_inact_timer(True);
11281  if (data_.query_urr_ref.header.len > 0) query_urr_ref(True);
11282  if (data_.trc_info.header.len > 0) trc_info(True);
11283 
11284  for (int i=0; i<MAX_LIST_SIZE; i++)
11285  {
11286  if (data_.remove_pdr[i].header.len > 0) { next_remove_pdr(); remove_pdr(i); }
11287  if (data_.remove_far[i].header.len > 0) { next_remove_far(); remove_far(i); }
11288  if (data_.remove_urr[i].header.len > 0) { next_remove_urr(); remove_urr(i); }
11289  if (data_.remove_qer[i].header.len > 0) { next_remove_qer(); remove_qer(i); }
11290  if (data_.create_pdr[i].header.len > 0) { next_create_pdr(); create_pdr(i); }
11291  if (data_.create_far[i].header.len > 0) { next_create_far(); create_far(i); }
11292  if (data_.create_urr[i].header.len > 0) { next_create_urr(); create_urr(i); }
11293  if (data_.create_qer[i].header.len > 0) { next_create_qer(); create_qer(i); }
11294  if (data_.update_pdr[i].header.len > 0) { next_update_pdr(); update_pdr(i); }
11295  if (data_.update_far[i].header.len > 0) { next_update_far(); update_far(i); }
11296  if (data_.update_urr[i].header.len > 0) { next_update_urr(); update_urr(i); }
11297  if (data_.update_qer[i].header.len > 0) { next_update_qer(); update_qer(i); }
11298  if (data_.query_urr[i].header.len > 0) { next_query_urr(); query_urr(i); }
11299  }
11300 }
11301 
11303 
11305  : data_({})
11306 {
11307  setMsgType(PFCP_SESS_MOD_RSP);
11308  data_.header.message_type = msgType();
11309  data_.header.version = 1;
11310  data_.header.s = 1;
11311 }
11312 
11313 inline uint16_t SessionModificationRsp::length() const
11314 {
11315  return data_.header.message_len;
11316 }
11317 
11318 inline CauseIE &SessionModificationRsp::cause(Bool forceInit)
11319 {
11320  if (forceInit || data_.cause.header.type == 0)
11321  new (&(reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->c_) CauseIE(data_.cause, nullptr);
11322  return (reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->c_;
11323 }
11324 
11325 inline OffendingIeIE &SessionModificationRsp::offending_ie(Bool forceInit)
11326 {
11327  if (forceInit || data_.offending_ie.header.type == 0)
11328  new (&(reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->oi_) OffendingIeIE(data_.offending_ie, nullptr);
11329  return (reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->oi_;
11330 }
11331 
11332 inline CreatedPdrIE &SessionModificationRsp::created_pdr(Bool forceInit)
11333 {
11334  if (forceInit || data_.created_pdr.header.type == 0)
11335  new (&(reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->cp_) CreatedPdrIE(data_.created_pdr, nullptr);
11336  return (reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->cp_;
11337 }
11338 
11339 inline LoadControlInformationIE &SessionModificationRsp::load_ctl_info(Bool forceInit)
11340 {
11341  if (forceInit || data_.load_ctl_info.header.type == 0)
11342  new (&(reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->lci_) LoadControlInformationIE(data_.load_ctl_info, nullptr);
11343  return (reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->lci_;
11344 }
11345 
11346 inline OverloadControlInformationIE &SessionModificationRsp::ovrld_ctl_info(Bool forceInit)
11347 {
11348  if (forceInit || data_.ovrld_ctl_info.header.type == 0)
11349  new (&(reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->oci_) OverloadControlInformationIE(data_.ovrld_ctl_info, nullptr);
11350  return (reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->oci_;
11351 }
11352 
11353 inline FailedRuleIdIE &SessionModificationRsp::failed_rule_id(Bool forceInit)
11354 {
11355  if (forceInit || data_.failed_rule_id.header.type == 0)
11356  new (&(reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->fri_) FailedRuleIdIE(data_.failed_rule_id, nullptr);
11357  return (reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->fri_;
11358 }
11359 
11360 inline AdditionalUsageReportsInformationIE &SessionModificationRsp::add_usage_rpts_info(Bool forceInit)
11361 {
11362  if (forceInit || data_.add_usage_rpts_info.header.type == 0)
11363  new (&(reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->auri_) AdditionalUsageReportsInformationIE(data_.add_usage_rpts_info, nullptr);
11364  return (reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->auri_;
11365 }
11366 
11367 inline CreatedTrafficEndpointIE &SessionModificationRsp::createdupdated_traffic_endpt(Bool forceInit)
11368 {
11369  if (forceInit || data_.createdupdated_traffic_endpt.header.type == 0)
11370  new (&(reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->cute_) CreatedTrafficEndpointIE(data_.createdupdated_traffic_endpt, nullptr);
11371  return (reinterpret_cast<_SessionModificationRsp*>(iebuffer_))->cute_;
11372 }
11373 
11374 inline UsageReportSessionModificationRspIE &SessionModificationRsp::usage_report(uint8_t idx)
11375 {
11376  if (idx >= ur_.size())
11377  {
11378  for (auto i = ur_.size(); i < static_cast<size_t>(idx)+1; i++)
11379  ur_.push_back(UsageReportSessionModificationRspIE(data_.usage_report[i], nullptr));
11380  }
11381  return ur_[idx];
11382 }
11383 
11385 {
11386  return (data_.usage_report_count < MAX_LIST_SIZE) ?
11387  data_.usage_report_count++ : -1;
11388 }
11389 
11390 inline SessionModificationRsp &SessionModificationRsp::encode(uint8_t *dest)
11391 {
11392  data_.header.seid_seqno.has_seid.seq_no = req()->seqNbr();
11393  data_.header.seid_seqno.has_seid.seid = req()->session()->remoteSeid();
11394  uint16_t len = encode_pfcp_sess_mod_rsp_t(&data_, dest);
11395  data_.header.message_len = len;
11396  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
11397  return *this;
11398 }
11399 
11400 inline pfcp_sess_mod_rsp_t &SessionModificationRsp::data()
11401 {
11402  return data_;
11403 }
11404 
11406 {
11407  if (data_.cause.header.len > 0) cause(True);
11408  if (data_.offending_ie.header.len > 0) offending_ie(True);
11409  if (data_.created_pdr.header.len > 0) created_pdr(True);
11410  if (data_.load_ctl_info.header.len > 0) load_ctl_info(True);
11411  if (data_.ovrld_ctl_info.header.len > 0) ovrld_ctl_info(True);
11412  if (data_.failed_rule_id.header.len > 0) failed_rule_id(True);
11413  if (data_.add_usage_rpts_info.header.len > 0) add_usage_rpts_info(True);
11414  if (data_.createdupdated_traffic_endpt.header.len > 0) createdupdated_traffic_endpt(True);
11415 }
11416 
11418 
11420  : PFCP::AppMsgSessionReq(ses,allocSeqNbr),
11421  data_({})
11422 {
11423  setMsgType(PFCP_SESS_DEL_REQ);
11424  data_.header.message_type = msgType();
11425  data_.header.version = 1;
11426  data_.header.s = 1;
11427 }
11428 
11429 inline uint16_t SessionDeletionReq::length() const
11430 {
11431  return data_.header.message_len;
11432 }
11433 
11434 inline SessionDeletionReq &SessionDeletionReq::encode(uint8_t *dest)
11435 {
11436  data_.header.seid_seqno.has_seid.seq_no = seqNbr();
11437  data_.header.seid_seqno.has_seid.seid = session()->remoteSeid();
11438  uint16_t len = encode_pfcp_sess_del_req_t(&data_, dest);
11439  data_.header.message_len = len;
11440  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
11441  return *this;
11442 }
11443 
11444 inline pfcp_sess_del_req_t &SessionDeletionReq::data()
11445 {
11446  return data_;
11447 }
11448 
11450 
11452  : data_({})
11453 {
11454  setMsgType(PFCP_SESS_DEL_RSP);
11455  data_.header.message_type = msgType();
11456  data_.header.version = 1;
11457  data_.header.s = 1;
11458 }
11459 
11460 inline uint16_t SessionDeletionRsp::length() const
11461 {
11462  return data_.header.message_len;
11463 }
11464 
11465 inline CauseIE &SessionDeletionRsp::cause(Bool forceInit)
11466 {
11467  if (forceInit || data_.cause.header.type == 0)
11468  new (&(reinterpret_cast<_SessionDeletionRsp*>(iebuffer_))->c_) CauseIE(data_.cause, nullptr);
11469  return (reinterpret_cast<_SessionDeletionRsp*>(iebuffer_))->c_;
11470 }
11471 
11472 inline OffendingIeIE &SessionDeletionRsp::offending_ie(Bool forceInit)
11473 {
11474  if (forceInit || data_.offending_ie.header.type == 0)
11475  new (&(reinterpret_cast<_SessionDeletionRsp*>(iebuffer_))->oi_) OffendingIeIE(data_.offending_ie, nullptr);
11476  return (reinterpret_cast<_SessionDeletionRsp*>(iebuffer_))->oi_;
11477 }
11478 
11479 inline LoadControlInformationIE &SessionDeletionRsp::load_ctl_info(Bool forceInit)
11480 {
11481  if (forceInit || data_.load_ctl_info.header.type == 0)
11482  new (&(reinterpret_cast<_SessionDeletionRsp*>(iebuffer_))->lci_) LoadControlInformationIE(data_.load_ctl_info, nullptr);
11483  return (reinterpret_cast<_SessionDeletionRsp*>(iebuffer_))->lci_;
11484 }
11485 
11486 inline OverloadControlInformationIE &SessionDeletionRsp::ovrld_ctl_info(Bool forceInit)
11487 {
11488  if (forceInit || data_.ovrld_ctl_info.header.type == 0)
11489  new (&(reinterpret_cast<_SessionDeletionRsp*>(iebuffer_))->oci_) OverloadControlInformationIE(data_.ovrld_ctl_info, nullptr);
11490  return (reinterpret_cast<_SessionDeletionRsp*>(iebuffer_))->oci_;
11491 }
11492 
11493 inline UsageReportSessionDeletionRspIE &SessionDeletionRsp::usage_report(uint8_t idx)
11494 {
11495  if (idx >= ur_.size())
11496  {
11497  for (auto i = ur_.size(); i < static_cast<size_t>(idx)+1; i++)
11498  ur_.push_back(UsageReportSessionDeletionRspIE(data_.usage_report[i], nullptr));
11499  }
11500  return ur_[idx];
11501 }
11502 
11504 {
11505  return (data_.usage_report_count < MAX_LIST_SIZE) ?
11506  data_.usage_report_count++ : -1;
11507 }
11508 
11509 inline SessionDeletionRsp &SessionDeletionRsp::encode(uint8_t *dest)
11510 {
11511  data_.header.seid_seqno.has_seid.seq_no = req()->seqNbr();
11512  data_.header.seid_seqno.has_seid.seid = req()->session()->remoteSeid();
11513  uint16_t len = encode_pfcp_sess_del_rsp_t(&data_, dest);
11514  data_.header.message_len = len;
11515  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
11516  return *this;
11517 }
11518 
11519 inline pfcp_sess_del_rsp_t &SessionDeletionRsp::data()
11520 {
11521  return data_;
11522 }
11523 
11524 inline Void SessionDeletionRsp::postDecode()
11525 {
11526  if (data_.cause.header.len > 0) cause(True);
11527  if (data_.offending_ie.header.len > 0) offending_ie(True);
11528  if (data_.load_ctl_info.header.len > 0) load_ctl_info(True);
11529  if (data_.ovrld_ctl_info.header.len > 0) ovrld_ctl_info(True);
11530 
11531  for (int i=0; i<MAX_LIST_SIZE; i++)
11532  {
11533  if (data_.usage_report[i].header.len > 0) { next_usage_report(); usage_report(i); }
11534  }
11535 }
11536 
11538 
11539 inline SessionReportReq::SessionReportReq(PFCP::SessionBaseSPtr &ses, Bool allocSeqNbr)
11540  : PFCP::AppMsgSessionReq(ses,allocSeqNbr),
11541  data_({})
11542 {
11543  setMsgType(PFCP_SESS_RPT_REQ);
11544  data_.header.message_type = msgType();
11545  data_.header.version = 1;
11546  data_.header.s = 1;
11547 }
11548 
11549 inline uint16_t SessionReportReq::length() const
11550 {
11551  return data_.header.message_len;
11552 }
11553 
11554 inline ReportTypeIE &SessionReportReq::report_type(Bool forceInit)
11555 {
11556  if (forceInit || data_.report_type.header.type == 0)
11557  new (&(reinterpret_cast<_SessionReportReq*>(iebuffer_))->rt_) ReportTypeIE(data_.report_type, nullptr);
11558  return (reinterpret_cast<_SessionReportReq*>(iebuffer_))->rt_;
11559 }
11560 
11561 inline DownlinkDataReportIE &SessionReportReq::dnlnk_data_rpt(Bool forceInit)
11562 {
11563  if (forceInit || data_.dnlnk_data_rpt.header.type == 0)
11564  new (&(reinterpret_cast<_SessionReportReq*>(iebuffer_))->ddr_) DownlinkDataReportIE(data_.dnlnk_data_rpt, nullptr);
11565  return (reinterpret_cast<_SessionReportReq*>(iebuffer_))->ddr_;
11566 }
11567 
11568 inline ErrorIndicationReportIE &SessionReportReq::err_indctn_rpt(Bool forceInit)
11569 {
11570  if (forceInit || data_.err_indctn_rpt.header.type == 0)
11571  new (&(reinterpret_cast<_SessionReportReq*>(iebuffer_))->eir_) ErrorIndicationReportIE(data_.err_indctn_rpt, nullptr);
11572  return (reinterpret_cast<_SessionReportReq*>(iebuffer_))->eir_;
11573 }
11574 
11575 inline LoadControlInformationIE &SessionReportReq::load_ctl_info(Bool forceInit)
11576 {
11577  if (forceInit || data_.load_ctl_info.header.type == 0)
11578  new (&(reinterpret_cast<_SessionReportReq*>(iebuffer_))->lci_) LoadControlInformationIE(data_.load_ctl_info, nullptr);
11579  return (reinterpret_cast<_SessionReportReq*>(iebuffer_))->lci_;
11580 }
11581 
11582 inline OverloadControlInformationIE &SessionReportReq::ovrld_ctl_info(Bool forceInit)
11583 {
11584  if (forceInit || data_.ovrld_ctl_info.header.type == 0)
11585  new (&(reinterpret_cast<_SessionReportReq*>(iebuffer_))->oci_) OverloadControlInformationIE(data_.ovrld_ctl_info, nullptr);
11586  return (reinterpret_cast<_SessionReportReq*>(iebuffer_))->oci_;
11587 }
11588 
11589 inline AdditionalUsageReportsInformationIE &SessionReportReq::add_usage_rpts_info(Bool forceInit)
11590 {
11591  if (forceInit || data_.add_usage_rpts_info.header.type == 0)
11592  new (&(reinterpret_cast<_SessionReportReq*>(iebuffer_))->auri_) AdditionalUsageReportsInformationIE(data_.add_usage_rpts_info, nullptr);
11593  return (reinterpret_cast<_SessionReportReq*>(iebuffer_))->auri_;
11594 }
11595 
11596 inline UsageReportSessionReportReqIE &SessionReportReq::usage_report(uint8_t idx)
11597 {
11598  if (idx >= ur_.size())
11599  {
11600  for (auto i = ur_.size(); i < static_cast<size_t>(idx)+1; i++)
11601  ur_.push_back(UsageReportSessionReportReqIE(data_.usage_report[i], nullptr));
11602  }
11603  return ur_[idx];
11604 }
11605 
11607 {
11608  return (data_.usage_report_count < MAX_LIST_SIZE) ?
11609  data_.usage_report_count++ : -1;
11610 }
11611 
11612 inline SessionReportReq &SessionReportReq::encode(uint8_t *dest)
11613 {
11614  data_.header.seid_seqno.has_seid.seq_no = seqNbr();
11615  data_.header.seid_seqno.has_seid.seid = session()->remoteSeid();
11616  uint16_t len = encode_pfcp_sess_rpt_req_t(&data_, dest);
11617  data_.header.message_len = len;
11618  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
11619  return *this;
11620 }
11621 
11622 inline pfcp_sess_rpt_req_t &SessionReportReq::data()
11623 {
11624  return data_;
11625 }
11626 
11627 inline Void SessionReportReq::postDecode()
11628 {
11629  if (data_.report_type.header.len > 0) report_type(True);
11630  if (data_.dnlnk_data_rpt.header.len > 0) dnlnk_data_rpt(True);
11631  if (data_.err_indctn_rpt.header.len > 0) err_indctn_rpt(True);
11632  if (data_.load_ctl_info.header.len > 0) load_ctl_info(True);
11633  if (data_.ovrld_ctl_info.header.len > 0) ovrld_ctl_info(True);
11634  if (data_.add_usage_rpts_info.header.len > 0) add_usage_rpts_info(True);
11635 
11636  for (int i=0; i<MAX_LIST_SIZE; i++)
11637  {
11638  if (data_.usage_report[i].header.len > 0) { next_usage_report(); usage_report(i); }
11639  }
11640 }
11641 
11643 
11645  : data_({})
11646 {
11647  setMsgType(PFCP_SESS_RPT_RSP);
11648  data_.header.message_type = msgType();
11649  data_.header.version = 1;
11650  data_.header.s = 1;
11651 }
11652 
11653 inline uint16_t SessionReportRsp::length() const
11654 {
11655  return data_.header.message_len;
11656 }
11657 
11658 inline CauseIE &SessionReportRsp::cause(Bool forceInit)
11659 {
11660  if (forceInit || data_.cause.header.type == 0)
11661  new (&(reinterpret_cast<_SessionReportRsp*>(iebuffer_))->c_) CauseIE(data_.cause, nullptr);
11662  return (reinterpret_cast<_SessionReportRsp*>(iebuffer_))->c_;
11663 }
11664 
11665 inline OffendingIeIE &SessionReportRsp::offending_ie(Bool forceInit)
11666 {
11667  if (forceInit || data_.offending_ie.header.type == 0)
11668  new (&(reinterpret_cast<_SessionReportRsp*>(iebuffer_))->oi_) OffendingIeIE(data_.offending_ie, nullptr);
11669  return (reinterpret_cast<_SessionReportRsp*>(iebuffer_))->oi_;
11670 }
11671 
11672 inline UpdateBarSessionReportRspIE &SessionReportRsp::update_bar(Bool forceInit)
11673 {
11674  if (forceInit || data_.update_bar.header.type == 0)
11675  new (&(reinterpret_cast<_SessionReportRsp*>(iebuffer_))->ub_) UpdateBarSessionReportRspIE(data_.update_bar, nullptr);
11676  return (reinterpret_cast<_SessionReportRsp*>(iebuffer_))->ub_;
11677 }
11678 
11679 inline PfcpSrRspFlagsIE &SessionReportRsp::sxsrrsp_flags(Bool forceInit)
11680 {
11681  if (forceInit || data_.sxsrrsp_flags.header.type == 0)
11682  new (&(reinterpret_cast<_SessionReportRsp*>(iebuffer_))->flags_) PfcpSrRspFlagsIE(data_.sxsrrsp_flags, nullptr);
11683  return (reinterpret_cast<_SessionReportRsp*>(iebuffer_))->flags_;
11684 }
11685 
11686 inline SessionReportRsp &SessionReportRsp::encode(uint8_t *dest)
11687 {
11688  data_.header.seid_seqno.has_seid.seq_no = req()->seqNbr();
11689  data_.header.seid_seqno.has_seid.seid = req()->session()->remoteSeid();
11690  uint16_t len = encode_pfcp_sess_rpt_rsp_t(&data_, dest);
11691  data_.header.message_len = len;
11692  reinterpret_cast<pfcp_header_t*>(dest)->message_len = htons(data_.header.message_len - 4);
11693  return *this;
11694 }
11695 
11696 inline pfcp_sess_rpt_rsp_t &SessionReportRsp::data()
11697 {
11698  return data_;
11699 }
11700 
11701 inline Void SessionReportRsp::postDecode()
11702 {
11703  if (data_.cause.header.len > 0) cause(True);
11704  if (data_.offending_ie.header.len > 0) offending_ie(True);
11705  if (data_.update_bar.header.len > 0) update_bar(True);
11706  if (data_.sxsrrsp_flags.header.len > 0) sxsrrsp_flags(True);
11707 }
11708 
11709 } // namespace PFCP_R15
11711 
11712 #endif // __PFCPR15INL_H
pfcp_volume_quota_ie_t & data()
uint8_t mcc_digit_3() const
pfcp_user_plane_path_fail_rpt_ie_t & data()
pfcp_sess_del_rsp_t & data()
pfcp_sbsqnt_vol_quota_ie_t & data()
GracefulReleasePeriodIE & graceful_rel_period(Bool forceInit=False)
uint16_t length() const
uint16_t calculateLength()
pfcp_created_pdr_ie_t & data()
Bool dei() const
DestinationInterfaceIE & dst_intfc()
DurationMeasurementIE & dur_meas()
const uint8_t * domain_name_prot() const
QueryUrrIE & query_urr(uint8_t idx)
const uint8_t * ntwk_instc() const
SubsequentVolumeThresholdIE & sbsqnt_vol_thresh()
uint32_t sequence_number() const
uint16_t calculateLength()
ReportingTriggersIE & setMacar(Bool val)
SuggestedBufferingPacketsCountIE & suggstd_buf_pckts_cnt()
uint16_t len_of_ip_addr_of_trc_coll_ent() const
CauseIE & cause(Bool forceInit=False)
uint16_t calculateLength()
Bool dei() const
pfcp_upd_bar_sess_mod_req_ie_t & data()
uint64_t ul_mbr() const
CpFunctionFeaturesIE & cp_func_feat(Bool forceInit=False)
uint16_t calculateLength()
pfcp_sess_mod_rsp_t & data()
uint16_t length() const
const uint8_t * svc_cls_indctr() const
HeartbeatReq & encode(uint8_t *dest)
SuggestedBufferingPacketsCountIE & suggstd_buf_pckts_cnt()
int32_t exponent() const
QerCorrelationIdIE & qer_corr_id()
pfcp_remove_qer_ie_t & data()
pfcp_traffic_endpt_id_ie_t & data()
AveragingWindowIE & avgng_wnd()
pfcp_frwdng_plcy_ie_t & data()
const uint8_t * upr_dst_mac_addr_val() const
CreateTrafficEndpointIE & create_traffic_endpt(Bool forceInit=False)
UpFunctionFeaturesIE & up_func_feat(Bool forceInit=False)
SessionModificationReq & encode(uint8_t *dest)
MeasurementPeriodIE & meas_period()
FarIdIE & far_id_for_quota_act()
UrrIdIE & urr_id(uint8_t idx)
pfcp_app_ids_pfds_ie_t & data()
SdfFilterIE & sdf_filter(uint8_t idx)
ReportingTriggersIE & setStart(Bool val)
UserPlaneInactivityTimerIE & user_plane_inact_timer(Bool forceInit=False)
pfcp_linked_urr_id_ie_t & data()
pfcp_src_intfc_ie_t & data()
const in6_addr & ipv6_node_address() const
const uint8_t * app_inst_ident() const
NodeIdTypeEnum
Definition: pfcpr15.h:1143
TimeQuotaIE & time_quota()
#define True
True.
Definition: ebase.h:25
PrecedenceIE & precedence()
OffendingIeIE & offending_ie(Bool forceInit=False)
EventTimeStampIE & evnt_time_stmp(uint8_t idx)
pfcp_failed_rule_id_ie_t & data()
VolumeThresholdIE & vol_thresh()
NodeIdIE & node_id(Bool forceInit=False)
uint16_t calculateLength()
OverloadControlInformationIE & ovrld_ctl_info(Bool forceInit=False)
RemoveBarIE & remove_bar(Bool forceInit=False)
TransportLevelMarkingIE & trnspt_lvl_marking()
SourceInterfaceEnum
Definition: pfcpr15.h:172
ReportingTriggersIE & setEveth(Bool val)
RedirectInformationIE & redir_info()
FramedRoutingEnum
Definition: pfcpr15.h:3011
FlowDirectionEnum flow_direction() const
DownlinkGateEnum
Definition: pfcpr15.h:324
CreatePdrIE & create_pdr(uint8_t idx)
CreateFarIE & create_far(uint8_t idx)
const uint8_t * add_flow_desc() const
OffendingIeIE & offending_ie(Bool forceInit=False)
pfcp_multiplier_ie_t & data()
PagingPolicyIndicatorIE & paging_plcy_indctr()
const uint8_t * apn_dnn() const
uint8_t mcc_digit_2() const
uint16_t calculateLength()
const uint8_t * flow_label() const
NetworkInstanceIE & ntwk_inst()
uint8_t traffic_endpt_id_val() const
uint16_t calculateLength()
DuplicatingParametersIE & dupng_parms(uint8_t idx)
const struct sockaddr_in6 & getInet6() const
Retrieves a reference to this address as an IPv6 address.
Definition: esocket.h:296
MonitoringTimeIE & monitoring_time()
DownlinkDataReportIE & dnlnk_data_rpt(Bool forceInit=False)
uint8_t mcc_digit_1() const
CauseIE & cause(Bool forceInit=False)
SubsequentTimeThresholdIE & sbsqnt_time_thresh()
pfcp_assn_upd_rsp_t & data()
DestinationInterfaceIE & dst_intfc()
uint8_t len_of_hdr_fld_val() const
UsageReportSessionReportReqIE & usage_report(uint8_t idx)
pfcp_pdn_type_ie_t & data()
const uint8_t * upr_src_mac_addr_val() const
InternetProtocolEnum
Definition: pfcpr15.h:1656
pfcp_node_rpt_req_t & data()
TimeOfFirstPacketIE & time_of_frst_pckt()
DestinationInterfaceEnum dst_intfc_value() const
SessionDeletionReq(PFCP::SessionBaseSPtr &ses, Bool allocSeqNbr=True)
pfcp_sess_rpt_rsp_t & data()
DownlinkDataNotificationDelayIE & dnlnk_data_notif_delay()
NodeIdIE & node_id(Bool forceInit=False)
uint16_t length() const
pfcp_pfd_mgmt_req_t & data()
EthernetFilterPropertiesIE & eth_fltr_props()
Represents an OctetString as defined in RFC 6733.
Definition: eostring.h:33
OverloadControlInformationIE & ovrld_ctl_info(Bool forceInit=False)
pfcp_up_assn_rel_req_ie_t & data()
uint16_t sess_trc_depth() const
const uint8_t * dst_mac_addr_val() const
uint16_t len_of_dst_intfc_fld() const
pfcp_app_inst_id_ie_t & data()
const uint8_t * add_domain_nm_prot() const
uint32_t qer_corr_id_val() const
uint16_t calculateLength()
TimeQuotaIE & time_quota()
NetworkInstanceIE & ntwk_inst()
pfcp_qer_id_ie_t & data()
pfcp_pfd_mgmt_rsp_t & data()
uint8_t mnc_digit_3() const
FramedRouteIE & framed_route(uint8_t idx)
pfcp_add_mntrng_time_ie_t & data()
DestinationInterfaceEnum interface_value() const
pfcp_sbsqnt_vol_thresh_ie_t & data()
uint16_t calculateLength()
const uint8_t * add_url() const
uint16_t len_of_flow_desc() const
pfcp_node_id_ie_t & data()
pfcp_rqi_ie_t & data()
SessionModificationRsp & encode(uint8_t *dest)
const uint8_t * trigrng_evnts() const
ReportingTriggersIE & setDroth(Bool val)
MeasurementMethodIE & meas_mthd()
TimerTimerUnitEnum timer_unit() const
SessionReportReq(PFCP::SessionBaseSPtr &ses, Bool allocSeqNbr=True)
pfcp_remove_bar_ie_t & data()
DlBufferingSuggestedPacketCountIE & dl_buf_suggstd_pckt_cnt()
PFCP stack namespace.
Definition: epfcp.h:36
HeaderTypeEnum
Definition: pfcpr15.h:1977
NodeReportReq & encode(uint8_t *dest)
uint16_t len_of_domain_nm() const
uint16_t ethertype() const
const uint8_t * frmd_ipv6_rte() const
Bool ins() const
pfcp_mac_addrs_detctd_ie_t & data()
TrafficEndpointIdIE & traffic_endpt_id()
uint32_t event_threshold() const
uint16_t calculateLength()
MonitoringTimeIE & monitoring_time()
pfcp_rptng_triggers_ie_t & data()
uint32_t time_quota_val() const
QueryUrrReferenceIE & query_urr_ref(Bool forceInit=False)
UpFunctionFeaturesIE & up_func_feat(Bool forceInit=False)
SessionReportRsp & encode(uint8_t *dest)
EthernetTrafficInformationIE & eth_traffic_info()
pfcp_oci_flags_ie_t & data()
uint16_t calculateLength()
uint32_t avgng_wnd() const
CauseIE & cause(Bool forceInit=False)
uint16_t calculateLength()
ReportingTriggersIE & setStopt(Bool val)
DownlinkDataNotificationDelayIE & dnlnk_data_notif_delay()
pfcp_agg_urr_id_ie_t & data()
UeIpAddressIE & ue_ip_address()
uint8_t cvid_value2() const
pfcp_err_indctn_rpt_ie_t & data()
UpFunctionFeaturesIE & up_func_feat(Bool forceInit=False)
uint16_t node_id_valud_fqdn_len() const
pfcp_dst_intfc_ie_t & data()
PfcpSrRspFlagsIE & sxsrrsp_flags(Bool forceInit=False)
RemoteGTPUPeerIE & rmt_gtpu_peer(uint8_t idx)
uint32_t prcdnc_val() const
FqCsidIE & pgw_c_fqcsid(Bool forceInit=False)
uint64_t uplink_volume() const
MeasurementPeriodIE & meas_period()
ErrorIndicationReportIE & err_indctn_rpt(Bool forceInit=False)
pfcp_meas_info_ie_t & data()
TimeQuotaMechanismIE & time_quota_mech()
uint16_t app_ident_len() const
const uint8_t * tos_traffic_cls() const
FqCsidNodeIdTypeEnum fqcsid_node_id_type() const
int next_eth_pckt_fltr()
pfcp_eth_pdu_sess_info_ie_t & data()
NetworkInstanceIE & ntwk_inst()
uint16_t length() const
SubsequentEventQuotaIE & sbsqnt_evnt_quota()
uint32_t lnkd_urr_id_val() const
uint16_t frmd_ipv6_rte_len() const
pfcp_report_type_ie_t & data()
uint16_t calculateLength()
pfcp_urseqn_ie_t & data()
LoadControlInformationIE & load_ctl_info(Bool forceInit=False)
pfcp_sequence_number_ie_t & data()
UserPlaneIpResourceInformationIE & user_plane_ip_rsrc_info(uint8_t idx)
OuterHeaderRemovalEnum outer_hdr_removal_desc() const
uint16_t calculateLength()
RemoteGTPUPeerIE & dst_intfc_fld(DestinationInterfaceEnum val)
pfcp_sbsqnt_evnt_quota_ie_t & data()
uint8_t timer_value() const
const uint8_t ipv6_pfx_dlgtn_bits() const
uint16_t redir_svr_addr_len() const
const in6_addr & ipv6_address() const
const uint8_t * nai() const
AdditionalUsageReportsInformationIE & add_usage_rpts_info(Bool forceInit=False)
pfcp_assn_setup_rsp_t & data()
pfcp_load_ctl_info_ie_t & data()
uint16_t calculateLength()
UpdatePdrIE & update_pdr(uint8_t idx)
RemoveUrrIE & remove_urr(uint8_t idx)
pfcp_meas_mthd_ie_t & data()
VolumeQuotaIE & uplink_volume(uint64_t val)
pfcp_dnlnk_data_notif_delay_ie_t & data()
uint16_t calculateLength()
pfcp_usage_rpt_trig_ie_t & data()
PfdMgmtReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr=True)
uint32_t qer_id_value() const
uint8_t len_of_trigrng_evnts() const
pfcp_urr_id_ie_t & data()
uint16_t calculateLength()
PfdMgmtReq & encode(uint8_t *dest)
AssnSetupReq & encode(uint8_t *dest)
TimeOfLastPacketIE & time_of_frst_pckt(ETime &val)
EventQuotaIE & event_quota()
pfcp_query_urr_ie_t & data()
RecoveryTimeStampIE & rcvry_time_stmp(Bool forceInit=False)
NodeIdIE & node_id(Bool forceInit=False)
const uint8_t * mac_addr_val(uint8_t idx)
TraceInformationIE & mcc(const char *val, uint8_t len)
NodeIdIE & node_id(Bool forceInit=False)
UpdateUrrIE & update_urr(uint8_t idx)
TimeThresholdIE & time_threshold()
UpdateTrafficEndpointIE & upd_traffic_endpt(Bool forceInit=False)
pfcp_avgng_wnd_ie_t & data()
DroppedDlTrafficThresholdIE & drpd_dl_traffic_thresh()
ETime rcvry_time_stmp_val() const
pfcp_upd_dupng_parms_ie_t & data()
NodeIdIE & node_id(Bool forceInit=False)
pfcp_event_threshold_ie_t & data()
pfcp_far_id_ie_t & data()
uint16_t rule_id() const
CauseIE & cause(Bool forceInit=False)
Bool v6() const
FlowInformationIE & flow_desc(const uint8_t *val, uint16_t len)
UpdateBarSessionReportRspIE & update_bar(Bool forceInit=False)
FqCsidIE & mme_fqcsid(Bool forceInit=False)
FSeidIE & cp_fseid(Bool forceInit=False)
size_type length() const
Returns the length of the assigned value of this object.
Definition: eostring.h:558
pfcp_create_traffic_endpt_ie_t & data()
OuterHeaderCreationIE & outer_hdr_creation()
pfcp_ntwk_inst_ie_t & data()
ReportingTriggersIE & rptng_triggers()
DownlinkGateEnum dl_gate() const
pfcp_framed_routing_ie_t & data()
const uint8_t * tostraffic_cls() const
pfcp_dl_flow_lvl_marking_ie_t & data()
SessionEstablishmentRsp & encode(uint8_t *dest)
pfcp_actvt_predef_rules_ie_t & data()
pfcp_time_quota_ie_t & data()
uint32_t duration_value() const
pfcp_remove_pdr_ie_t & data()
pfcp_dl_buf_suggstd_pckt_cnt_ie_t & data()
CauseIE & cause(Bool forceInit=False)
pfcp_assn_setup_req_t & data()
FqCsidIE & sgw_c_fqcsid(Bool forceInit=False)
EthernetTrafficInformationIE & eth_traffic_info()
const uint8_t * ctag_value() const
ApplyActionIE & apply_action()
const in6_addr & node_id_value_ipv6_address() const
pfcp_rmv_traffic_endpt_ie_t & data()
uint64_t dl_gbr() const
OuterHeaderCreationIE & outer_hdr_creation()
pfcp_fseid_ie_t & data()
PfdContextIE & pfdContext(uint8_t idx)
pfcp_ue_ip_address_ie_t & data()
uint16_t calculateLength()
SessionDeletionReq & encode(uint8_t *dest)
uint32_t urseqn() const
const in6_addr & ipv6_address() const
Bool dei_flag() const
uint16_t calculateLength()
uint8_t metric() const
Contains the class definitions for the PFCP release 15 messages and information elements.
Definition: pfcpr15.h:59
FTeidIE & remote_fteid(uint8_t idx)
FqCsidIE & pgw_c_fqcsid(Bool forceInit=False)
ApplyActionIE & apply_action()
pfcp_dur_meas_ie_t & data()
pfcp_pfcpsrrsp_flags_ie_t & data()
const in_addr & ipv4_node_address() const
uint16_t calculateLength()
FqCsidIE & node_address(const ESocket::Address &val)
CreateFarIE & create_far(uint8_t idx)
in6_addr & ipv6_addr_of_trc_coll_ent() const
uint16_t calculateLength()
SubsequentVolumeThresholdIE & sbsqnt_vol_thresh()
SubsequentVolumeQuotaIE & sbsqnt_vol_quota()
uint16_t calculateLength()
pfcp_3gpp_intfc_type_ie_t & data()
uint16_t calculateLength()
uint16_t calculateLength()
pfcp_ovrld_ctl_info_ie_t & data()
pfcp_assn_upd_req_t & data()
pfcp_sess_mod_req_t & data()
FqCsidIE & epdg_fqcsid(Bool forceInit=False)
uint8_t nbr_of_mac_addrs() const
uint16_t calculateLength()
uint32_t base_time_int() const
NodeIdTypeEnum node_id_type() const
pfcp_create_urr_ie_t & data()
SourceInterfaceEnum interface_value() const
pfcp_paging_plcy_indctr_ie_t & data()
const struct sockaddr_in & getInet() const
Retrieves a reference to this address as an IPv4 address.
Definition: esocket.h:287
const uint8_t * domain_name() const
const in6_addr & ipv6_address() const
FqCsidIE & sgw_c_fqcsid(Bool forceInit=False)
const in_addr & ipv4_address() const
const uint8_t * flow_desc() const
pfcp_cause_ie_t & data()
TgppInterfaceTypeIE & dst_intfc_type()
pfcp_user_plane_inact_timer_ie_t & data()
uint16_t calculateLength()
ETime time_of_lst_pckt() const
pfcp_assn_rel_req_t & data()
OffendingIeIE & offending_ie(Bool forceInit=False)
TraceInformationIE & plmnid(const uint8_t *val)
uint16_t calculateLength()
SubsequentVolumeQuotaIE & total_volume(uint64_t val)
FqCsidIE & epdg_fqcsid(Bool forceInit=False)
const in_addr & ipv4_address() const
const uint8_t * src_mac_addr_val() const
SubsequentVolumeQuotaIE & sbsqnt_vol_quota()
pfcp_event_quota_ie_t & data()
AssociationReleaseRequestIE & up_assn_rel_req(Bool forceInit=False)
DestinationInterfaceIE & dst_intfc()
const ETime monitoring_time() const
SuggestedBufferingPacketsCountIE & suggstd_buf_pckts_cnt()
AdditionalMonitoringTimeIE & add_mntrng_time(uint8_t idx)
TgppInterfaceTypeIE & src_intrc_type()
pfcp_user_plane_ip_rsrc_info_ie_t & data()
RedirectAddressTypeEnum redir_addr_type() const
pfcp_ctag_ie_t & data()
pfcp_update_urr_ie_t & data()
pfcp_qfi_ie_t & data()
SubsequentEventQuotaIE & sbsqnt_evnt_quota()
pfcp_end_time_ie_t & data()
DurationMeasurementIE & dur_meas()
SourceInterfaceIE & src_intfc()
EventThresholdIE & event_threshold()
uint16_t length() const
#define PFCP_VERSION_NOT_SUPPORTED
Definition: pfcpr15.h:4856
pfcp_trnspt_lvl_marking_ie_t & data()
NetworkInstanceIE & ntwk_inst()
EthernetPacketFilterIE & eth_pckt_fltr(uint8_t idx)
#define False
False.
Definition: ebase.h:27
uint32_t urr_id_value() const
pfcp_sess_estab_rsp_t & data()
UpFunctionFeaturesIE & up_func_feat(Bool forceInit=False)
uint16_t max_uplnk_pckt_rate() const
uint16_t max_dnlnk_pckt_rate() const
Bool ch() const
HeaderEnrichmentIE & hdr_enrchmt()
ReportingTriggersIE & setTimth(Bool val)
pfcp_outer_hdr_removal_ie_t & data()
RemoveTrafficEndpointIE & rmv_traffic_endpt(Bool forceInit=False)
CreateBarIE & create_bar(Bool forceInit=False)
EthernetPduSessionInformationIE & eth_pdu_sess_info()
uint16_t length() const
BaseTimeIntervalTypeEnum btit() const
FlowDirectionEnum
Definition: pfcpr15.h:1801
pfcp_usage_rpt_sess_del_rsp_ie_t & data()
Bool vid() const
uint8_t length_of_nai() const
DlBufferingDurationTimerUnitEnum timer_unit() const
Class for manipulating date and time of day values.
Definition: etime.h:199
pfcp_up_func_feat_ie_t & data()
pfcp_user_id_ie_t & data()
PfdMgmtRsp & encode(uint8_t *dest)
pfcp_hrtbeat_rsp_t & data()
HeaderTypeEnum header_type() const
pfcp_hrtbeat_req_t & data()
uint16_t calculateLength()
SubsequentEventThresholdIE & sbsqnt_evnt_thresh()
uint16_t calculateLength()
UserPlaneIpResourceInformationIE & user_plane_ip_rsrc_info(uint8_t idx)
UpdateDuplicatingParametersIE & upd_dupng_parms(uint8_t idx)
FSeidIE & ip_address(const ESocket::Address &val)
NodeIdIE & node_id(Bool forceInit=False)
SubsequentEventThresholdIE & sbsqnt_evnt_thresh()
pfcp_gbr_ie_t & data()
TimeThresholdIE & time_threshold()
uint8_t number_of_csids() const
SubsequentTimeThresholdIE & sbsqnt_time_thresh()
uint32_t trace_id() const
FqCsidIE & twan_fqcsid(Bool forceInit=False)
Bool pcp() const
pfcp_eth_pckt_fltr_ie_t & data()
const in_addr & ipv4_address() const
InactivityDetectionTimeIE & inact_det_time()
pfcp_hdr_enrchmt_ie_t & data()
CreatedTrafficEndpointIE & createdupdated_traffic_endpt(Bool forceInit=False)
uint32_t user_plane_inact_timer() const
uint32_t far_id_value() const
uint8_t cvid_value() const
uint8_t pcp_value() const
TraceInformationIE & ip_addr_of_trc_coll_ent(const ESocket::Address &val)
TrafficEndpointIdIE & traffic_endpt_id()
uint16_t len_of_flow_desc() const
Bool aoci() const
uint16_t calculateLength()
uint32_t time_threshold() const
VolumeQuotaIE & total_volume(uint64_t val)
EventThresholdIE & event_threshold()
SessionSetDeletionReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr=True)
RecoveryTimeStampIE & rcvry_time_stmp(Bool forceInit=False)
uint16_t calculateLength()
SessionReportReq & encode(uint8_t *dest)
pfcp_add_usage_rpts_info_ie_t & data()
pfcp_vol_thresh_ie_t & data()
pfcp_sdf_filter_ie_t & data()
CauseIE & cause(Bool forceInit=False)
uint16_t length() const
uint16_t calculateLength()
UplinkDownlinkTimeUnitEnum dnlnk_time_unit() const
OuterHeaderRemovalIE & outer_hdr_removal()
UsageReportSessionDeletionRspIE & usage_report(uint8_t idx)
uint16_t calculateLength()
ReportingTriggersIE & setTimqu(Bool val)
OuterHeaderCreationIE & outer_hdr_creation()
GracefulReleasePeriodTimerUnitEnum timer_unit() const
TimeOfFirstPacketIE & time_of_frst_pckt()
FramedRoutingIE & framed_routing()
UsageReportTriggerIE & usage_rpt_trig()
AssnUpdateReq & encode(uint8_t *dest)
pfcp_node_rpt_type_ie_t & data()
pfcp_graceful_rel_period_ie_t & data()
uint8_t qfi_value() const
QuotaHoldingTimeIE & quota_hldng_time()
ReportingTriggersIE & setVolth(Bool val)
uint8_t frwdng_plcy_ident_len() const
SdfFilterIE & sdf_filter(uint8_t idx)
MeasurementInformationIE & meas_info()
FqCsidIE & up_fqcsid(Bool forceInit=False)
pfcp_redir_info_ie_t & data()
BaseTimeIntervalTypeEnum
Definition: pfcpr15.h:2322
pfcp_mac_address_ie_t & data()
FqCsidNodeIdTypeEnum
Definition: pfcpr15.h:1344
uint16_t calculateLength()
SequenceNumberIE & load_ctl_seqn_nbr()
pfcp_remove_urr_ie_t & data()
uint8_t svid_value2() const
pfcp_trc_info_ie_t & data()
FramedRoutingIE & framed_routing()
FramedIpv6RouteIE & frmd_ipv6_rte(uint8_t idx)
ULong seqNbr() const
Returns the sequence number associated wtih this message.
Definition: epfcp.h:1120
pfcp_pdr_id_ie_t & data()
uint16_t length() const
pfcp_bar_id_ie_t & data()
uint16_t other_redir_svr_addr_len() const
uint32_t rule_id_value() const
uint64_t ul_gbr() const
CreatedTrafficEndpointIE & created_traffic_endpt(uint8_t idx)
const in_addr & node_id_value_ipv4_address() const
FSeidIE & up_fseid(Bool forceInit=False)
uint32_t quota_hldng_time_val() const
NodeIdIE & node_id(Bool forceInit=False)
CreateBarIE & create_bar(Bool forceInit=False)
UsageReportSessionModificationRspIE & usage_report(uint8_t idx)
Bool pcp() const
pfcp_gate_status_ie_t & data()
DownlinkDataNotificationDelayIE & dnlnk_data_notif_delay()
pfcp_outer_hdr_creation_ie_t & data()
pfcp_upd_traffic_endpt_ie_t & data()
uint16_t calculateLength()
pfcp_upd_bar_sess_rpt_rsp_ie_t & data()
uint16_t calculateLength()
RedirectInformationIE & redir_info()
pfcp_pfd_context_ie_t & data()
FqCsidIE & sgw_c_fqcsid(Bool forceInit=False)
const uint8_t * app_ident() const
pfcp_sess_rpt_req_t & data()
uint16_t calculateLength()
std::shared_ptr< SessionBase > SessionBaseSPtr
Definition: epfcp.h:530
pfcp_rmt_gtpu_peer_ie_t & data()
ApplicationInstanceIdIE & app_inst_id()
uint32_t query_urr_ref_val() const
uint64_t dl_mbr() const
TransportLevelMarkingIE & trnspt_lvl_marking()
uint8_t len_of_hdr_fld_nm() const
const uint8_t * hdr_fld_val() const
AggregatedUrrsIE & aggregated_urrs(uint8_t idx)
FqCsidIE & epdg_fqcsid(Bool forceInit=False)
Bool imeif() const
DlFlowLevelMarkingIE & dl_flow_lvl_marking()
pfcp_monitoring_time_ie_t & data()
DlFlowLevelMarkingIE & dl_flow_lvl_marking()
pfcp_packet_rate_ie_t & data()
CauseIE & cause(Bool forceInit=False)
RuleIdTypeEnum
Definition: pfcpr15.h:2292
uint16_t apn_dnn_len() const
InactivityDetectionTimeIE & inact_det_time()
uint16_t calculateLength()
HeaderEnrichmentIE & header_fld_val(const uint8_t *val, uint8_t len)
pfcp_update_pdr_ie_t & data()
uint32_t urr_id_value() const
UpdateForwardingParametersIE & upd_frwdng_parms()
uint32_t mcc_mnc_id_node_address() const
uint32_t sbsqnt_evnt_quota() const
pfcp_time_quota_mech_ie_t & data()
UpdateBarSessionModificationReqIE & update_bar(Bool forceInit=False)
NodeReportTypeIE & node_rpt_type(Bool forceInit=False)
FqCsidIE & mme_fqcsid(Bool forceInit=False)
LoadControlInformationIE & load_ctl_info(Bool forceInit=False)
uint16_t type_of_the_offending_ie() const
SubsequentTimeThresholdIE & sbsqnt_time_thresh()
const in_addr & ipv4_address() const
FqCsidIE & mme_fqcsid(Bool forceInit=False)
AveragingWindowIE & avgng_wnd()
VolumeQuotaIE & volume_quota()
CreatePdrIE & create_pdr(uint8_t idx)
ActivatePredefinedRulesIE & actvt_predef_rules(uint8_t idx)
PfdContentsIE & pfdContents(uint8_t idx)
uint64_t seid() const
AssnUpdateReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr=True)
pfcp_eth_traffic_info_ie_t & data()
MeasurementMethodIE & meas_mthd()
Represents an IP address with mask.
Definition: eip.h:40
uint16_t calculateLength()
CreateUrrIE & create_urr(uint8_t idx)
SessionEstablishmentReq & encode(uint8_t *dest)
pfcp_created_traffic_endpt_ie_t & data()
NodeIdIE & node_id(Bool forceInit=False)
uint8_t bar_id_value() const
pfcp_mac_addrs_rmvd_ie_t & data()
CpFunctionFeaturesIE & cp_func_feat(Bool forceInit=False)
SubsequentVolumeQuotaIE & uplink_volume(uint64_t val)
DownlinkDataServiceInformationIE & dnlnk_data_svc_info(uint8_t idx)
GateStatusIE & gate_status()
uint16_t calculateLength()
pfcp_sess_set_del_rsp_t & data()
pfcp_dnlnk_data_rpt_ie_t & data()
pfcp_ethertype_ie_t & data()
Bool naif() const
AssnReleaseRsp & encode(uint8_t *dest)
uint16_t len_of_add_domain_nm_prot() const
UserPlaneIpResourceInformationIE & ip_address(const ESocket::Address &val)
NodeIdIE & node_id(Bool forceInit=False)
pfcp_timer_ie_t & data()
ForwardingPolicyIE & frwdng_plcy()
ETime evnt_time_stmp() const
const uint8_t * imei() const
uint16_t calculateLength()
HeaderEnrichmentIE & hdr_enrchmt()
AssnUpdateRsp & encode(uint8_t *dest)
FailedRuleIdIE & failed_rule_id(Bool forceInit=False)
pfcp_fqcsid_ie_t & data()
AggregatedUrrIdIE & agg_urr_id()
ReportingTriggersIE & setPerio(Bool val)
pfcp_deact_predef_rules_ie_t & data()
FqCsidIE & up_fqcsid(Bool forceInit=False)
UpdateQerIE & update_qer(uint8_t idx)
uint32_t time_quota_val() const
const in_addr & ipv4Address() const
Returns a reference to the in_addr structure that represents an IPv4 address.
Definition: eip.h:225
FramedRoutingIE & framed_routing()
FramedRouteIE & framed_route(uint8_t idx)
pfcp_proxying_ie_t & data()
GateStatusIE & gate_status()
FSeidIE & cp_fseid(Bool forceInit=False)
HeartbeatReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr=True)
Bool v4() const
const sa_family_t family() const
Returns the address family associated with this address object.
Definition: eip.h:231
DroppedDlTrafficThresholdIE & dnlnk_pckts(uint64_t val)
TrafficEndpointIdIE & traffic_endpt_id()
uint16_t length() const
ActivatePredefinedRulesIE & actvt_predef_rules(uint8_t idx)
CauseEnum cause() const
pfcp_flow_info_ie_t & data()
pfcp_sbsqnt_time_thresh_ie_t & data()
DestinationInterfaceEnum
Definition: pfcpr15.h:762
NodeReportRsp & encode(uint8_t *dest)
pfcp_offending_ie_ie_t & data()
UserIdIE & user_id(Bool forceInit=False)
int next_frmd_ipv6_rte()
SourceInterfaceEnum src_intfc() const
OffendingIeIE & offending_ie(Bool forceInit=False)
AdditionalMonitoringTimeIE & add_mntrng_time()
pfcp_rcvry_time_stmp_ie_t & data()
uint8_t mnc_digit_1() const
UplinkDownlinkTimeUnitEnum uplnk_time_unit() const
AssnReleaseReq & encode(uint8_t *dest)
SessionEstablishmentReq(PFCP::SessionBaseSPtr &ses, Bool allocSeqNbr=True)
uint8_t mnc_digit_2() const
uint16_t len_of_ntwk_intfc_fld() const
CreatedPdrIE & created_pdr(Bool forceInit=False)
const uint8_t * list_of_intfcs() const
pfcp_upd_frwdng_parms_ie_t & data()
const uint8_t * flow_desc() const
UplinkGateEnum
Definition: pfcpr15.h:332
pfcp_pfd_contents_ie_t & data()
PacketRateIE & packet_rate()
TrafficEndpointIdIE & lnkd_traffic_endpt_id()
pfcp_qer_corr_id_ie_t & data()
CauseIE & cause(Bool forceInit=False)
const uint8_t * predef_rules_nm() const
pfcp_sess_estab_req_t & data()
pfcp_application_id_ie_t & data()
pfcp_assn_rel_rsp_t & data()
pfcp_query_urr_ref_ie_t & data()
EthernetInactivityTimerIE & eth_inact_timer()
pfcp_create_far_ie_t & data()
uint32_t len_of_list_of_intfcs() const
pfcp_frmd_ipv6_rte_ie_t & data()
RemovePdrIE & remove_pdr(uint8_t idx)
TrafficEndpointIdIE & lnkd_traffic_endpt_id()
SubsequentTimeQuotaIE & sbsqnt_time_quota()
ReportingTriggersIE & setQuhti(Bool val)
pfcp_suggstd_buf_pckts_cnt_ie_t & data()
ApplicationIdIE & applicationId()
SubsequentVolumeQuotaIE & sbsqnt_vol_quota()
QfiIE & qfi(uint8_t idx)
GbrIE & guaranteed_bitrate()
CauseEnum
Definition: pfcpr15.h:119
CreatedPdrIE & created_pdr(uint8_t idx)
CreateQerIE & create_qer(uint8_t idx)
uint16_t calculateLength()
Bool msisdnf() const
uint16_t calculateLength()
CreateUrrIE & create_urr(uint8_t idx)
pfcp_dupng_parms_ie_t & data()
FTeidIE & ip_address(const ESocket::Address &val)
in_addr & ipv4_addr_of_trc_coll_ent() const
uint16_t len_of_cstm_pfd_cntnt() const
OverloadControlInformationIE & ovrld_ctl_info(Bool forceInit=False)
EthernetPduSessionInformationIE & eth_pdu_sess_info()
GbrIE & guaranteed_bitrate()
PdrIdIE & pdr_id(uint8_t idx)
QueryUrrReferenceIE & query_urr_ref()
PacketRateIE & packet_rate()
TraceInformationIE & mnc(const char *val, uint8_t len)
FramedRoutingEnum framed_routing() const
ForwardingPolicyIE & frwdng_plcy()
TgppInterfaceTypeEnum interface_type_value() const
ETime start_time() const
pfcp_sbsqnt_evnt_thresh_ie_t & data()
DestinationInterfaceIE & dst_intfc()
SubsequentTimeQuotaIE & sbsqnt_time_quota()
uint16_t length() const
TraceInformationIE & trc_info(Bool forceInit=False)
uint16_t length() const
ApplicationIdsPfdsIE & app_ids_pfds(uint8_t idx)
RemoteGTPUPeerIE & ip_address(const ESocket::Address &val)
TimerTimerUnitEnum
Definition: pfcpr15.h:1052
NodeIdIE & node_id(Bool forceInit=False)
SessionSetDeletionReq & encode(uint8_t *dest)
uint16_t calculateLength()
TimeQuotaMechanismIE & time_quota_mech()
pfcp_mbr_ie_t & data()
FqCsidIE & twan_fqcsid(Bool forceInit=False)
EthernetTrafficInformationIE & eth_traffic_info()
const in6_addr & ipv6_address() const
const uint8_t * secur_parm_idx() const
DroppedDlTrafficThresholdIE & drpd_dl_traffic_thresh()
uint32_t sbsqnt_evnt_quota() const
pfcp_inact_det_time_ie_t & data()
pfcp_eth_fltr_props_ie_t & data()
PdnTypeIE & pdn_type(Bool forceInit=False)
AssnReleaseReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr=True)
const uint8_t * tostraffic_cls() const
MeasurementInformationIE & meas_info()
TimeOfLastPacketIE & time_of_lst_pckt()
pfcp_meas_period_ie_t & data()
uint16_t len_of_add_url() const
SubsequentVolumeThresholdIE & sbsqnt_vol_thresh()
UeIpAddressIE & ip_address(const ESocket::Address &val)
FramedRouteIE & framed_route(uint8_t idx)
const uint8_t * predef_rules_nm() const
CauseIE & cause(Bool forceInit=False)
OffendingIeIE & offending_ie(Bool forceInit=False)
EventQuotaIE & event_quota()
IPv4 address.
MacAddressesDetectedIE & mac_addrs_detctd()
uint64_t total_volume() const
pfcp_time_threshold_ie_t & data()
uint16_t length() const
FqCsidIE & pgw_c_fqcsid(Bool forceInit=False)
int64_t value_digits() const
UsageReportTriggerIE & usage_rpt_trig()
OffendingIeIE & offending_ie(Bool forceInit=False)
RecoveryTimeStampIE & rcvry_time_stmp(Bool forceInit=False)
RemoveQerIE & remove_qer(uint8_t idx)
uint16_t len_of_add_flow_desc() const
uint8_t choose_id() const
uint16_t framed_route_len() const
pfcp_pdi_ie_t & data()
LoadControlInformationIE & load_ctl_info(Bool forceInit=False)
Bool vid() const
NodeReportReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr=True)
RuleIdTypeEnum rule_id_type() const
QerCorrelationIdIE & qer_corr_id()
cpUChar data() const
Returns a pointer to the internal data buffer.
Definition: eostring.h:516
pfcp_dl_buf_dur_ie_t & data()
uint16_t calculateLength()
DlBufferingDurationIE & dl_buf_dur()
const uint8_t * mac_addr_val(uint8_t idx)
VolumeQuotaIE & downlink_volume(uint64_t val)
Bool rqi() const
Bool dei_flag() const
pfcp_apply_action_ie_t & data()
uint64_t total_volume() const
QerIdIE & qer_id(uint8_t idx)
ApplicationIdIE & application_id()
uint16_t calculateLength()
PfcpSmReqFlagsIE & pfcpsmreq_flags(Bool forceInit=False)
uint64_t downlink_volume() const
ReportingTriggersIE & setEnvcl(Bool val)
uint8_t svid_value() const
EthernetFilterIdIE & eth_fltr_id()
CpFunctionFeaturesIE & cp_func_feat(Bool forceInit=False)
EthernetInactivityTimerIE & eth_inact_timer()
ETime end_time() const
LinkedUrrIdIE & linked_urr_id(uint8_t idx)
UserPlaneIpResourceInformationIE & user_plane_ip_rsrc_info(uint8_t idx)
TraceInformationIE & trc_info(Bool forceInit=False)
uint8_t length_of_imsi() const
TgppInterfaceTypeEnum
Definition: pfcpr15.h:3181
const uint8_t * stag_value() const
uint16_t calculateLength()
TransportLevelMarkingIE & trnspt_lvl_marking()
uint16_t calculateLength()
TransportLevelMarkingIE & trnspt_lvl_marking()
DroppedDlTrafficThresholdIE & nbr_of_bytes_of_dnlnk_data(uint64_t val)
ReportingTriggersIE & setEvequ(Bool val)
NodeIdIE & node_id(Bool forceInit=False)
OuterHeaderRemovalIE & outer_hdr_removal()
uint16_t calculateLength()
uint16_t length() const
UpdateFarIE & update_far(uint8_t idx)
NodeIdIE & node_id(Bool forceInit=False)
PdnTypeEnum pdn_type() const
const uint16_t ntwk_inst_len() const
pfcp_create_qer_ie_t & data()
pfcp_eth_inact_timer_ie_t & data()
pfcp_pfcpsmreq_flags_ie_t & data()
uint16_t length() const
const uint8_t * hdr_fld_nm() const
UInt getNTPTimeSeconds() const
Retrieves the NTP time seconds representation of this ETime object.
Definition: etime.h:496
const uint8_t * redir_svr_addr() const
AdditionalUsageReportsInformationIE & add_usage_rpts_info(Bool forceInit=False)
FailedRuleIdIE & failed_rule_id(Bool forceInit=False)
OffendingIeIE & offending_ie(Bool forceInit=False)
const uint8_t * framed_route() const
const uint8_t * other_redir_svr_addr() const
const uint8_t * frwdng_plcy_ident() const
ForwardingParametersIE & frwdng_parms()
pfcp_metric_ie_t & data()
const uint8_t * ntwk_inst() const
OuterHeaderRemovalEnum
Definition: pfcpr15.h:1897
uint16_t len_of_domain_nm_prot() const
OuterHeaderCreationIE & ip_address_port(const ESocket::Address &addr, uint16_t port, InternetProtocolEnum protocol)
pfcp_sess_set_del_req_t & data()
uint32_t sdf_filter_id() const
pfcp_usage_info_ie_t & data()
uint64_t uplink_volume() const
OverloadControlInformationIE & ovrld_ctl_info(Bool forceInit=False)
const in6_addr & ipv6_address() const
AssnSetupReq(PFCP::LocalNodeSPtr &ln, PFCP::RemoteNodeSPtr &rn, Bool allocSeqNbr=True)
FramedIpv6RouteIE & frmd_ipv6_rte(uint8_t idx)
pfcp_remove_far_ie_t & data()
pfcp_usage_rpt_sess_rpt_req_ie_t & data()
PrecedenceIE & precedence()
UserPlanePathFailureReportIE & user_plane_path_fail_rpt(Bool forceInit=False)
ReportingTriggersIE & setVolqu(Bool val)
Bool arp() const
Bool chid() const
PdnTypeEnum
Definition: pfcpr15.h:2264
RedirectAddressTypeEnum
Definition: pfcpr15.h:654
pfcp_quota_hldng_time_ie_t & data()
FramedIpv6RouteIE & frmd_ipv6_rte(uint8_t idx)
VolumeThresholdIE & vol_thresh()
pfcp_update_far_ie_t & data()
Bool imsif() const
SessionSetDeletionRsp & encode(uint8_t *dest)
UplinkDownlinkTimeUnitEnum
Definition: pfcpr15.h:1862
uint16_t calculateLength()
ReportingTriggersIE & setLiusa(Bool val)
GracefulReleasePeriodTimerUnitEnum
Definition: pfcpr15.h:2234
Void setNTPTime(const ntp_time_t &ntp)
Assigns the time represented by the NTP time to this ETime object.
Definition: etime.cpp:1188
ETime time_of_frst_pckt() const
OuterHeaderCreationIE & ip_address_teid(const ESocket::Address &addr, uint32_t teid)
uint32_t eth_fltr_id_val() const
SequenceNumberIE & ovrld_ctl_seqn_nbr()
pfcp_node_rpt_rsp_t & data()
MonitoringTimeIE & monitoring_time()
SubsequentEventQuotaIE & sbsqnt_evnt_quota()
ForwardingPolicyIE & frwdng_plcy()
uint16_t length() const
pfcp_frwdng_parms_ie_t & data()
pfcp_vol_meas_ie_t & data()
VersionNotSupportedRsp & encode(uint8_t *dest)
pfcp_time_of_frst_pckt_ie_t & data()
ReportingTriggersIE & rptng_triggers()
const uint8_t * imsi() const
PagingPolicyIndicatorIE & paging_plcy_indctr()
uint16_t length() const
const in6_addr & ipv6Address() const
Returns a reference to the in6_addr structure that represents an IPv6 address.
Definition: eip.h:228
CpFunctionFeaturesIE & cp_func_feat(Bool forceInit=False)
FarIdIE & far_id_for_quota_act()
SubsequentTimeQuotaIE & sbsqnt_time_quota()
uint16_t calculateLength()
pfcp_usage_rpt_sess_mod_rsp_ie_t & data()
OuterHeaderCreationIE & outer_hdr_creation()
SubsequentEventThresholdIE & sbsqnt_evnt_thresh()
UplinkGateEnum ul_gate() const
ApplicationDetectionInformationIE & app_det_info()
pfcp_start_time_ie_t & data()
Encapsulates a sockaddr_storage structure that represents a socket address.
Definition: esocket.h:148
LinkedUrrIdIE & linked_urr_id(uint8_t idx)
uint16_t pdn_conn_set_ident(uint8_t idx) const
FqCsidIE & twan_fqcsid(Bool forceInit=False)
RecoveryTimeStampIE & rcvry_time_stmp(Bool forceInit=False)
VolumeQuotaIE & volume_quota()
pfcp_time_of_lst_pckt_ie_t & data()
pfcp_stag_ie_t & data()
pfcp_cp_func_feat_ie_t & data()
pfcp_dnlnk_data_svc_info_ie_t & data()
LoadControlInformationIE & load_ctl_info(Bool forceInit=False)
Family getFamily() const
Retrieves the address family for this address.
Definition: esocket.h:272
AggregatedUrrsIE & aggregated_urrs(uint8_t idx)
pfcp_evnt_time_stmp_ie_t & data()
ReportTypeIE & report_type(Bool forceInit=False)
const in6_addr & ipv6_address() const
pfcp_fteid_ie_t & data()
TrafficEndpointIdIE & traffic_endpt_id()
const uint8_t * url2() const
pfcp_sess_del_req_t & data()
uint8_t pcp_value() const
uint8_t length_of_imei() const
DeactivatePredefinedRulesIE & deact_predef_rules(uint8_t idx)
pfcp_create_bar_ie_t & data()
pfcp_apn_dnn_ie_t & data()
CauseIE & cause(Bool forceInit=False)
UserPlaneInactivityTimerIE & user_plane_inact_timer(Bool forceInit=False)
pfcp_create_pdr_ie_t & data()
SessionModificationReq(PFCP::SessionBaseSPtr &ses, Bool allocSeqNbr=True)
TgppInterfaceTypeIE & dst_intfc_type()
pfcp_framed_route_ie_t & data()
RemoveFarIE & remove_far(uint8_t idx)
const uint8_t * cstm_pfd_cntnt() const
MultiplierIE & multiplier()
CreateTrafficEndpointIE & create_traffic_endpt(uint8_t idx)
uint16_t calculateLength()
FTeidIE & local_fteid()
pfcp_drpd_dl_traffic_thresh_ie_t & data()
QuotaHoldingTimeIE & quota_hldng_time()
pfcp_update_qer_ie_t & data()
SessionDeletionRsp & encode(uint8_t *dest)
int next_framed_route()
uint16_t calculateLength()
SubsequentVolumeQuotaIE & downlink_volume(uint64_t val)
uint16_t length_of_url() const
HeaderEnrichmentIE & header_fld_nm(const uint8_t *val, uint8_t len)
const in_addr & ipv4_address() const
ApnDnnIE & apn_dnn(Bool forceInit=False)
HeartbeatRsp & encode(uint8_t *dest)
const uint8_t * node_id_value_fqdn() const
int next_pdn_conn_set_ident()
Bool v4() const
pfcp_precedence_ie_t & data()
DlBufferingDurationTimerUnitEnum
Definition: pfcpr15.h:920
uint32_t teid() const
pfcp_sbsqnt_time_quota_ie_t & data()
NodeIdIE & node_id_value(const ESocket::Address &val)
uint64_t downlink_volume() const
uint32_t meas_period() const
AssnSetupRsp & encode(uint8_t *dest)
uint8_t len_of_msisdn() const
pfcp_eth_fltr_id_ie_t & data()
Bool v6() const
const uint8_t * msisdn() const
uint16_t calculateLength()
TrafficEndpointIdIE & traffic_endpt_id()
pfcp_aggregated_urrs_ie_t & data()
CreateQerIE & create_qer(uint8_t idx)
MacAddressesRemovedIE & mac_addrs_rmvd()