A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
epc-gtpc-header.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Manuel Requena <manuel.requena@cttc.es>
7 */
8
9#ifndef EPC_GTPC_HEADER_H
10#define EPC_GTPC_HEADER_H
11
12#include "epc-tft.h"
13#include "eps-bearer.h"
14
15#include "ns3/header.h"
16
17namespace ns3
18{
19
20/**
21 * \ingroup lte
22 *
23 * \brief Header of the GTPv2-C protocol
24 *
25 * Implementation of the GPRS Tunnelling Protocol for Control Plane (GTPv2-C) header
26 * according to the 3GPP TS 29.274 document
27 */
28class GtpcHeader : public Header
29{
30 public:
31 GtpcHeader();
32 ~GtpcHeader() override;
33 /**
34 * \brief Get the type ID.
35 * \return the object TypeId
36 */
37 static TypeId GetTypeId();
38 TypeId GetInstanceTypeId() const override;
39 uint32_t GetSerializedSize() const override;
40 void Serialize(Buffer::Iterator start) const override;
42 void Print(std::ostream& os) const override;
43
44 /**
45 * Get the message size.
46 *
47 * Subclasses are supposed to have a message size greater than zero.
48 *
49 * \returns the message size
50 */
51 virtual uint32_t GetMessageSize() const;
52
53 /**
54 * Get message type
55 * \returns the message type
56 */
57 uint8_t GetMessageType() const;
58 /**
59 * Get message length
60 * \returns the message length
61 */
62 uint16_t GetMessageLength() const;
63 /**
64 * Get TEID
65 * \returns the TEID
66 */
67 uint32_t GetTeid() const;
68 /**
69 * Get sequence number
70 * \returns the sequence number
71 */
73
74 /**
75 * Set message type
76 * \param messageType the message type
77 */
78 void SetMessageType(uint8_t messageType);
79 /**
80 * Set message length
81 * \param messageLength the message length
82 */
83 void SetMessageLength(uint16_t messageLength);
84 /**
85 * Set TEID
86 * \param teid the TEID
87 */
88 void SetTeid(uint32_t teid);
89 /**
90 * Set sequence number
91 * \param sequenceNumber the sequence number
92 */
93 void SetSequenceNumber(uint32_t sequenceNumber);
94 /**
95 * Set IEs length. It is used to compute the message length
96 * \param iesLength the IEs length
97 */
98 void SetIesLength(uint16_t iesLength);
99
100 /**
101 * Compute the message length according to the message type
102 */
104
105 /// Interface Type enumeration
115
116 /// FTEID structure
117 struct Fteid_t
118 {
119 InterfaceType_t interfaceType{}; //!< Interface type
120 Ipv4Address addr; //!< IPv4 address
121 uint32_t teid; //!< TEID
122 };
123
124 /// Message Type enumeration
138
139 private:
140 /**
141 * TEID flag.
142 * This flag indicates if TEID field is present or not
143 */
145 /**
146 * Message type field.
147 * It can be one of the values of MessageType_t
148 */
150 /**
151 * Message length field.
152 * This field indicates the length of the message in octets excluding
153 * the mandatory part of the GTP-C header (the first 4 octets)
154 */
156 /**
157 * Tunnel Endpoint Identifier (TEID) field
158 */
160 /**
161 * GTP Sequence number field
162 */
164
165 protected:
166 /**
167 * Serialize the GTP-C header in the GTP-C messages
168 * \param i the buffer iterator
169 */
170 void PreSerialize(Buffer::Iterator& i) const;
171 /**
172 * Deserialize the GTP-C header in the GTP-C messages
173 * \param i the buffer iterator
174 * \return number of bytes deserialized
175 */
177};
178
179/**
180 * \ingroup lte
181 * GTP-C Information Elements
182 */
184{
185 public:
186 /**
187 * Cause
188 */
190 {
193 };
194
195 const uint32_t serializedSizeImsi = 12; //!< IMSI serialized size
196 const uint32_t serializedSizeCause = 6; //!< Cause serialized size
197 const uint32_t serializedSizeEbi = 5; //!< EBI serialized size
198 const uint32_t serializedSizeBearerQos = 26; //!< Bearer QoS serialized size
200 3 + 9 + 9 + 5 + 5 + 3; //!< Packet filter serialized size
201 /**
202 * \return the BearerTft serialized size
203 * \param packetFilters The packet filter
204 */
205 uint32_t GetSerializedSizeBearerTft(std::list<EpcTft::PacketFilter> packetFilters) const;
206 const uint32_t serializedSizeUliEcgi = 12; //!< UliEcgi serialized size
207 const uint32_t serializedSizeFteid = 13; //!< Fteid serialized size
208 const uint32_t serializedSizeBearerContextHeader = 4; //!< Fteid serialized size
209
210 /**
211 * Serialize the IMSI
212 * \param i Buffer iterator
213 * \param imsi The IMSI
214 */
215 void SerializeImsi(Buffer::Iterator& i, uint64_t imsi) const;
216 /**
217 * Deserialize the IMSI
218 * \param i Buffer iterator
219 * \param [out] imsi The IMSI
220 * \return the number of deserialized bytes
221 */
222 uint32_t DeserializeImsi(Buffer::Iterator& i, uint64_t& imsi) const;
223
224 /**
225 * Serialize the Cause
226 * \param i Buffer iterator
227 * \param cause The Cause
228 */
229 void SerializeCause(Buffer::Iterator& i, Cause_t cause) const;
230 /**
231 * Deserialize the Cause
232 * \param i Buffer iterator
233 * \param [out] cause The cause
234 * \return the number of deserialized bytes
235 */
237
238 /**
239 * Serialize the eps Bearer Id
240 * \param i Buffer iterator
241 * \param epsBearerId The eps Bearer Id
242 */
243 void SerializeEbi(Buffer::Iterator& i, uint8_t epsBearerId) const;
244 /**
245 * Deserialize the eps Bearer Id
246 * \param i Buffer iterator
247 * \param [out] epsBearerId The eps Bearer Id
248 * \return the number of deserialized bytes
249 */
250 uint32_t DeserializeEbi(Buffer::Iterator& i, uint8_t& epsBearerId) const;
251
252 /**
253 * \param i Buffer iterator
254 * \param data data to write in buffer
255 *
256 * Write the data in buffer and advance the iterator position
257 * by five bytes. The data is written in network order and the
258 * input data is expected to be in host order.
259 */
260 void WriteHtonU40(Buffer::Iterator& i, uint64_t data) const;
261 /**
262 * \param i Buffer iterator
263 * \return the five bytes read in the buffer.
264 *
265 * Read data and advance the Iterator by the number of bytes
266 * read.
267 * The data is read in network format and returned in host format.
268 */
269 uint64_t ReadNtohU40(Buffer::Iterator& i);
270
271 /**
272 * Serialize the eps Bearer QoS
273 * \param i Buffer iterator
274 * \param bearerQos The Bearer QoS
275 */
276 void SerializeBearerQos(Buffer::Iterator& i, EpsBearer bearerQos) const;
277 /**
278 * Deserialize the eps Bearer QoS
279 * \param i Buffer iterator
280 * \param [out] bearerQos The Bearer QoS
281 * \return the number of deserialized bytes
282 */
284
285 /**
286 * Serialize the Bearer TFT
287 * \param i Buffer iterator
288 * \param packetFilters The Packet filters
289 */
291 std::list<EpcTft::PacketFilter> packetFilters) const;
292 /**
293 * Deserialize the Bearer TFT
294 * \param i Buffer iterator
295 * \param [out] epcTft The Bearer TFT
296 * \return the number of deserialized bytes
297 */
299
300 /**
301 * Serialize the UliEcgi
302 * \param i Buffer iterator
303 * \param uliEcgi The UliEcgi
304 */
305 void SerializeUliEcgi(Buffer::Iterator& i, uint32_t uliEcgi) const;
306 /**
307 * Deserialize the UliEcgi
308 * \param i Buffer iterator
309 * \param [out] uliEcgi UliEcgi
310 * \return the number of deserialized bytes
311 */
313
314 /**
315 * Serialize the Fteid_t
316 * \param i Buffer iterator
317 * \param fteid The Fteid_t
318 */
320 /**
321 * Deserialize the Fteid
322 * \param i Buffer iterator
323 * \param [out] fteid Fteid
324 * \return the number of deserialized bytes
325 */
327
328 /**
329 * Serialize the Bearer Context Header
330 * \param i Buffer iterator
331 * \param length The length
332 */
333 void SerializeBearerContextHeader(Buffer::Iterator& i, uint16_t length) const;
334 /**
335 * Deserialize the Bearer Context Header
336 * \param i Buffer iterator
337 * \param [out] length length
338 * \return the number of deserialized bytes
339 */
340 uint32_t DeserializeBearerContextHeader(Buffer::Iterator& i, uint16_t& length) const;
341};
342
343/**
344 * \ingroup lte
345 * GTP-C Create Session Request Message
346 */
348{
349 public:
352 /**
353 * \brief Get the type ID.
354 * \return the object TypeId
355 */
356 static TypeId GetTypeId();
357 TypeId GetInstanceTypeId() const override;
358 uint32_t GetSerializedSize() const override;
359 void Serialize(Buffer::Iterator start) const override;
360 uint32_t Deserialize(Buffer::Iterator start) override;
361 void Print(std::ostream& os) const override;
362 uint32_t GetMessageSize() const override;
363
364 /**
365 * Get the IMSI
366 * \return IMSI
367 */
368 uint64_t GetImsi() const;
369 /**
370 * Set the IMSI
371 * \param imsi IMSI
372 */
373 void SetImsi(uint64_t imsi);
374
375 /**
376 * Get the UliEcgi
377 * \return UliEcgi
378 */
379 uint32_t GetUliEcgi() const;
380 /**
381 * Set the UliEcgi
382 * \param uliEcgi UliEcgi
383 */
384 void SetUliEcgi(uint32_t uliEcgi);
385
386 /**
387 * Get the Sender CpFteid
388 * \return Sender CpFteid
389 */
391 /**
392 * Set the Sender CpFteid
393 * \param fteid Sender CpFteid
394 */
396
397 /**
398 * Bearer Context structure
399 */
401 {
403 uint8_t epsBearerId; ///< EPS bearer ID
404 Ptr<EpcTft> tft; ///< traffic flow template
405 EpsBearer bearerLevelQos; ///< bearer QOS level
406 };
407
408 /**
409 * Get the Bearer Contexts
410 * \return the Bearer Context list
411 */
412 std::list<BearerContextToBeCreated> GetBearerContextsToBeCreated() const;
413 /**
414 * Set the Bearer Contexts
415 * \param bearerContexts the Bearer Context list
416 */
417 void SetBearerContextsToBeCreated(std::list<BearerContextToBeCreated> bearerContexts);
418
419 private:
420 uint64_t m_imsi; //!< IMSI
421 uint32_t m_uliEcgi; //!< UliEcgi
423
424 /// Bearer Context list
425 std::list<BearerContextToBeCreated> m_bearerContextsToBeCreated;
426};
427
428/**
429 * \ingroup lte
430 * GTP-C Create Session Response Message
431 */
433{
434 public:
437 /**
438 * \brief Get the type ID.
439 * \return the object TypeId
440 */
441 static TypeId GetTypeId();
442 TypeId GetInstanceTypeId() const override;
443 uint32_t GetSerializedSize() const override;
444 void Serialize(Buffer::Iterator start) const override;
445 uint32_t Deserialize(Buffer::Iterator start) override;
446 void Print(std::ostream& os) const override;
447 uint32_t GetMessageSize() const override;
448
449 /**
450 * Get the Cause
451 * \return the Cause
452 */
453 Cause_t GetCause() const;
454 /**
455 * Set the Cause
456 * \param cause The cause
457 */
458 void SetCause(Cause_t cause);
459
460 /**
461 * Get the Sender CpFteid
462 * \return the Sender CpFteid
463 */
465 /**
466 * Set the Sender CpFteid
467 * \param fteid the Sender CpFteid
468 */
470
471 /**
472 * Bearer Context structure
473 */
475 {
476 uint8_t epsBearerId; ///< EPS bearer ID
477 uint8_t cause; ///< Cause
478 Ptr<EpcTft> tft; ///< Bearer traffic flow template
480 EpsBearer bearerLevelQos; ///< Bearer QOS level
481 };
482
483 /**
484 * Get the Container of Bearer Contexts
485 * \return a list of Bearer Contexts
486 */
487 std::list<BearerContextCreated> GetBearerContextsCreated() const;
488 /**
489 * Set the Bearer Contexts
490 * \param bearerContexts a list of Bearer Contexts
491 */
492 void SetBearerContextsCreated(std::list<BearerContextCreated> bearerContexts);
493
494 private:
495 Cause_t m_cause; //!< Cause
497 /// Container of Bearer Contexts
498 std::list<BearerContextCreated> m_bearerContextsCreated;
499};
500
501/**
502 * \ingroup lte
503 * GTP-C Modify Bearer Request Message
504 */
506{
507 public:
510 /**
511 * \brief Get the type ID.
512 * \return the object TypeId
513 */
514 static TypeId GetTypeId();
515 TypeId GetInstanceTypeId() const override;
516 uint32_t GetSerializedSize() const override;
517 void Serialize(Buffer::Iterator start) const override;
518 uint32_t Deserialize(Buffer::Iterator start) override;
519 void Print(std::ostream& os) const override;
520 uint32_t GetMessageSize() const override;
521
522 /**
523 * Get the IMSI
524 * \return IMSI
525 */
526 uint64_t GetImsi() const;
527 /**
528 * Set the IMSI
529 * \param imsi IMSI
530 */
531 void SetImsi(uint64_t imsi);
532
533 /**
534 * Get the UliEcgi
535 * \return UliEcgi
536 */
537 uint32_t GetUliEcgi() const;
538 /**
539 * Set the UliEcgi
540 * \param uliEcgi UliEcgi
541 */
542 void SetUliEcgi(uint32_t uliEcgi);
543
544 /**
545 * Bearer Context structure
546 */
548 {
549 uint8_t epsBearerId; ///< EPS bearer ID
551 };
552
553 /**
554 * Get the Bearer Contexts
555 * \return the Bearer Context list
556 */
557 std::list<BearerContextToBeModified> GetBearerContextsToBeModified() const;
558 /**
559 * Set the Bearer Contexts
560 * \param bearerContexts the Bearer Context list
561 */
562 void SetBearerContextsToBeModified(std::list<BearerContextToBeModified> bearerContexts);
563
564 private:
565 uint64_t m_imsi; //!< IMSI
566 uint32_t m_uliEcgi; //!< UliEcgi
567
568 /// Bearer Context list
569 std::list<BearerContextToBeModified> m_bearerContextsToBeModified;
570};
571
572/**
573 * \ingroup lte
574 * GTP-C Modify Bearer Response Message
575 */
577{
578 public:
581 /**
582 * \brief Get the type ID.
583 * \return the object TypeId
584 */
585 static TypeId GetTypeId();
586 TypeId GetInstanceTypeId() const override;
587 uint32_t GetSerializedSize() const override;
588 void Serialize(Buffer::Iterator start) const override;
589 uint32_t Deserialize(Buffer::Iterator start) override;
590 void Print(std::ostream& os) const override;
591 uint32_t GetMessageSize() const override;
592
593 /**
594 * Get the Cause
595 * \return the Cause
596 */
597 Cause_t GetCause() const;
598 /**
599 * Set the Cause
600 * \param cause The cause
601 */
602 void SetCause(Cause_t cause);
603
604 private:
605 Cause_t m_cause; //!< Cause
606};
607
608/**
609 * \ingroup lte
610 * GTP-C Delete Bearer Command Message
611 */
613{
614 public:
617 /**
618 * \brief Get the type ID.
619 * \return the object TypeId
620 */
621 static TypeId GetTypeId();
622 TypeId GetInstanceTypeId() const override;
623 uint32_t GetSerializedSize() const override;
624 void Serialize(Buffer::Iterator start) const override;
625 uint32_t Deserialize(Buffer::Iterator start) override;
626 void Print(std::ostream& os) const override;
627 uint32_t GetMessageSize() const override;
628
629 /// Bearer context
631 {
632 uint8_t m_epsBearerId; ///< EPS bearer ID
633 };
634
635 /**
636 * Get the Bearer contexts
637 * \return container of beraer contexts
638 */
639 std::list<BearerContext> GetBearerContexts() const;
640 /**
641 * Set the Bearer contexts
642 * \param bearerContexts container of beraer contexts
643 */
644 void SetBearerContexts(std::list<BearerContext> bearerContexts);
645
646 private:
647 std::list<BearerContext> m_bearerContexts; //!< Container of Bearer Contexts
648};
649
650/**
651 * \ingroup lte
652 * GTP-C Delete Bearer Request Message
653 */
655{
656 public:
659 /**
660 * \brief Get the type ID.
661 * \return the object TypeId
662 */
663 static TypeId GetTypeId();
664 TypeId GetInstanceTypeId() const override;
665 uint32_t GetSerializedSize() const override;
666 void Serialize(Buffer::Iterator start) const override;
667 uint32_t Deserialize(Buffer::Iterator start) override;
668 void Print(std::ostream& os) const override;
669 uint32_t GetMessageSize() const override;
670
671 /**
672 * Get the Bearers IDs
673 * \return a container of Bearers IDs
674 */
675 std::list<uint8_t> GetEpsBearerIds() const;
676 /**
677 * Set the Bearers IDs
678 * \param epsBearerIds The container of Bearers IDs
679 */
680 void SetEpsBearerIds(std::list<uint8_t> epsBearerIds);
681
682 private:
683 std::list<uint8_t> m_epsBearerIds; //!< Container of Bearers IDs
684};
685
686/**
687 * \ingroup lte
688 * GTP-C Delete Bearer Response Message
689 */
691{
692 public:
695 /**
696 * \brief Get the type ID.
697 * \return the object TypeId
698 */
699 static TypeId GetTypeId();
700 TypeId GetInstanceTypeId() const override;
701 uint32_t GetSerializedSize() const override;
702 void Serialize(Buffer::Iterator start) const override;
703 uint32_t Deserialize(Buffer::Iterator start) override;
704 void Print(std::ostream& os) const override;
705 uint32_t GetMessageSize() const override;
706
707 /**
708 * Get the Cause
709 * \return the Cause
710 */
711 Cause_t GetCause() const;
712 /**
713 * Set the Cause
714 * \param cause The cause
715 */
716 void SetCause(Cause_t cause);
717
718 /**
719 * Get the Bearers IDs
720 * \return a container of Bearers IDs
721 */
722 std::list<uint8_t> GetEpsBearerIds() const;
723 /**
724 * Set the Bearers IDs
725 * \param epsBearerIds The container of Bearers IDs
726 */
727 void SetEpsBearerIds(std::list<uint8_t> epsBearerIds);
728
729 private:
730 Cause_t m_cause; //!< Cause
731 std::list<uint8_t> m_epsBearerIds; //!< Container of Bearers IDs
732};
733
734} // namespace ns3
735
736#endif // EPC_GTPC_HEADER_H
iterator in a Buffer instance
Definition buffer.h:89
This class contains the specification of EPS Bearers.
Definition eps-bearer.h:80
GTP-C Create Session Request Message.
std::list< BearerContextToBeCreated > m_bearerContextsToBeCreated
Bearer Context list.
static TypeId GetTypeId()
Get the type ID.
uint64_t GetImsi() const
Get the IMSI.
uint32_t Deserialize(Buffer::Iterator start) override
void SetUliEcgi(uint32_t uliEcgi)
Set the UliEcgi.
GtpcHeader::Fteid_t GetSenderCpFteid() const
Get the Sender CpFteid.
uint32_t GetUliEcgi() const
Get the UliEcgi.
uint32_t GetMessageSize() const override
Get the message size.
uint32_t GetSerializedSize() const override
GtpcHeader::Fteid_t m_senderCpFteid
Sender CpFteid.
void SetBearerContextsToBeCreated(std::list< BearerContextToBeCreated > bearerContexts)
Set the Bearer Contexts.
std::list< BearerContextToBeCreated > GetBearerContextsToBeCreated() const
Get the Bearer Contexts.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void Serialize(Buffer::Iterator start) const override
void SetImsi(uint64_t imsi)
Set the IMSI.
void Print(std::ostream &os) const override
void SetSenderCpFteid(GtpcHeader::Fteid_t fteid)
Set the Sender CpFteid.
GTP-C Create Session Response Message.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void SetCause(Cause_t cause)
Set the Cause.
static TypeId GetTypeId()
Get the type ID.
uint32_t Deserialize(Buffer::Iterator start) override
void SetBearerContextsCreated(std::list< BearerContextCreated > bearerContexts)
Set the Bearer Contexts.
Cause_t GetCause() const
Get the Cause.
void Print(std::ostream &os) const override
void SetSenderCpFteid(GtpcHeader::Fteid_t fteid)
Set the Sender CpFteid.
void Serialize(Buffer::Iterator start) const override
uint32_t GetSerializedSize() const override
std::list< BearerContextCreated > m_bearerContextsCreated
Container of Bearer Contexts.
std::list< BearerContextCreated > GetBearerContextsCreated() const
Get the Container of Bearer Contexts.
uint32_t GetMessageSize() const override
Get the message size.
GtpcHeader::Fteid_t m_senderCpFteid
Sender CpFteid.
GtpcHeader::Fteid_t GetSenderCpFteid() const
Get the Sender CpFteid.
GTP-C Delete Bearer Command Message.
void Print(std::ostream &os) const override
std::list< BearerContext > GetBearerContexts() const
Get the Bearer contexts.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
std::list< BearerContext > m_bearerContexts
Container of Bearer Contexts.
void SetBearerContexts(std::list< BearerContext > bearerContexts)
Set the Bearer contexts.
uint32_t GetMessageSize() const override
Get the message size.
static TypeId GetTypeId()
Get the type ID.
uint32_t GetSerializedSize() const override
uint32_t Deserialize(Buffer::Iterator start) override
void Serialize(Buffer::Iterator start) const override
GTP-C Delete Bearer Request Message.
uint32_t GetSerializedSize() const override
uint32_t GetMessageSize() const override
Get the message size.
static TypeId GetTypeId()
Get the type ID.
void Print(std::ostream &os) const override
std::list< uint8_t > m_epsBearerIds
Container of Bearers IDs.
uint32_t Deserialize(Buffer::Iterator start) override
void Serialize(Buffer::Iterator start) const override
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
std::list< uint8_t > GetEpsBearerIds() const
Get the Bearers IDs.
void SetEpsBearerIds(std::list< uint8_t > epsBearerIds)
Set the Bearers IDs.
GTP-C Delete Bearer Response Message.
void Serialize(Buffer::Iterator start) const override
uint32_t GetSerializedSize() const override
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void SetCause(Cause_t cause)
Set the Cause.
Cause_t GetCause() const
Get the Cause.
std::list< uint8_t > m_epsBearerIds
Container of Bearers IDs.
uint32_t GetMessageSize() const override
Get the message size.
std::list< uint8_t > GetEpsBearerIds() const
Get the Bearers IDs.
void Print(std::ostream &os) const override
uint32_t Deserialize(Buffer::Iterator start) override
static TypeId GetTypeId()
Get the type ID.
void SetEpsBearerIds(std::list< uint8_t > epsBearerIds)
Set the Bearers IDs.
Header of the GTPv2-C protocol.
void PreSerialize(Buffer::Iterator &i) const
Serialize the GTP-C header in the GTP-C messages.
uint16_t m_messageLength
Message length field.
void SetMessageLength(uint16_t messageLength)
Set message length.
static TypeId GetTypeId()
Get the type ID.
uint16_t GetMessageLength() const
Get message length.
uint8_t m_messageType
Message type field.
void Serialize(Buffer::Iterator start) const override
uint8_t GetMessageType() const
Get message type.
void SetMessageType(uint8_t messageType)
Set message type.
virtual uint32_t GetMessageSize() const
Get the message size.
InterfaceType_t
Interface Type enumeration.
uint32_t GetSequenceNumber() const
Get sequence number.
uint32_t m_sequenceNumber
GTP Sequence number field.
void Print(std::ostream &os) const override
uint32_t m_teid
Tunnel Endpoint Identifier (TEID) field.
bool m_teidFlag
TEID flag.
uint32_t GetSerializedSize() const override
uint32_t Deserialize(Buffer::Iterator start) override
MessageType_t
Message Type enumeration.
void SetSequenceNumber(uint32_t sequenceNumber)
Set sequence number.
uint32_t PreDeserialize(Buffer::Iterator &i)
Deserialize the GTP-C header in the GTP-C messages.
void ComputeMessageLength()
Compute the message length according to the message type.
~GtpcHeader() override
void SetIesLength(uint16_t iesLength)
Set IEs length.
void SetTeid(uint32_t teid)
Set TEID.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint32_t GetTeid() const
Get TEID.
GTP-C Information Elements.
uint32_t DeserializeFteid(Buffer::Iterator &i, GtpcHeader::Fteid_t &fteid) const
Deserialize the Fteid.
void SerializeEbi(Buffer::Iterator &i, uint8_t epsBearerId) const
Serialize the eps Bearer Id.
void SerializeBearerContextHeader(Buffer::Iterator &i, uint16_t length) const
Serialize the Bearer Context Header.
uint32_t DeserializeImsi(Buffer::Iterator &i, uint64_t &imsi) const
Deserialize the IMSI.
uint32_t DeserializeEbi(Buffer::Iterator &i, uint8_t &epsBearerId) const
Deserialize the eps Bearer Id.
const uint32_t serializedSizeEbi
EBI serialized size.
void WriteHtonU40(Buffer::Iterator &i, uint64_t data) const
void SerializeImsi(Buffer::Iterator &i, uint64_t imsi) const
Serialize the IMSI.
uint32_t DeserializeUliEcgi(Buffer::Iterator &i, uint32_t &uliEcgi) const
Deserialize the UliEcgi.
const uint32_t serializedSizeBearerContextHeader
Fteid serialized size.
uint32_t DeserializeCause(Buffer::Iterator &i, Cause_t &cause) const
Deserialize the Cause.
uint32_t GetSerializedSizeBearerTft(std::list< EpcTft::PacketFilter > packetFilters) const
void SerializeFteid(Buffer::Iterator &i, GtpcHeader::Fteid_t fteid) const
Serialize the Fteid_t.
uint32_t DeserializeBearerTft(Buffer::Iterator &i, Ptr< EpcTft > epcTft) const
Deserialize the Bearer TFT.
const uint32_t serializedSizePacketFilter
Packet filter serialized size.
uint64_t ReadNtohU40(Buffer::Iterator &i)
void SerializeUliEcgi(Buffer::Iterator &i, uint32_t uliEcgi) const
Serialize the UliEcgi.
const uint32_t serializedSizeImsi
IMSI serialized size.
const uint32_t serializedSizeBearerQos
Bearer QoS serialized size.
const uint32_t serializedSizeCause
Cause serialized size.
uint32_t DeserializeBearerContextHeader(Buffer::Iterator &i, uint16_t &length) const
Deserialize the Bearer Context Header.
void SerializeCause(Buffer::Iterator &i, Cause_t cause) const
Serialize the Cause.
uint32_t DeserializeBearerQos(Buffer::Iterator &i, EpsBearer &bearerQos)
Deserialize the eps Bearer QoS.
void SerializeBearerQos(Buffer::Iterator &i, EpsBearer bearerQos) const
Serialize the eps Bearer QoS.
const uint32_t serializedSizeUliEcgi
UliEcgi serialized size.
const uint32_t serializedSizeFteid
Fteid serialized size.
void SerializeBearerTft(Buffer::Iterator &i, std::list< EpcTft::PacketFilter > packetFilters) const
Serialize the Bearer TFT.
GTP-C Modify Bearer Request Message.
uint64_t GetImsi() const
Get the IMSI.
void Print(std::ostream &os) const override
void SetBearerContextsToBeModified(std::list< BearerContextToBeModified > bearerContexts)
Set the Bearer Contexts.
uint32_t GetUliEcgi() const
Get the UliEcgi.
void SetUliEcgi(uint32_t uliEcgi)
Set the UliEcgi.
uint32_t Deserialize(Buffer::Iterator start) override
std::list< BearerContextToBeModified > GetBearerContextsToBeModified() const
Get the Bearer Contexts.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint32_t GetMessageSize() const override
Get the message size.
static TypeId GetTypeId()
Get the type ID.
void SetImsi(uint64_t imsi)
Set the IMSI.
std::list< BearerContextToBeModified > m_bearerContextsToBeModified
Bearer Context list.
uint32_t GetSerializedSize() const override
void Serialize(Buffer::Iterator start) const override
GTP-C Modify Bearer Response Message.
uint32_t Deserialize(Buffer::Iterator start) override
uint32_t GetSerializedSize() const override
uint32_t GetMessageSize() const override
Get the message size.
void SetCause(Cause_t cause)
Set the Cause.
static TypeId GetTypeId()
Get the type ID.
void Print(std::ostream &os) const override
Cause_t GetCause() const
Get the Cause.
void Serialize(Buffer::Iterator start) const override
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Protocol header serialization and deserialization.
Definition header.h:33
Ipv4 addresses are stored in host order in this class.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t data[writeSize]
Ptr< EpcTft > tft
Bearer traffic flow template.
Ipv4Address addr
IPv4 address.
InterfaceType_t interfaceType
Interface type.