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