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 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Manuel Requena <manuel.requena@cttc.es>
18 */
19
20#ifndef EPC_GTPC_HEADER_H
21#define EPC_GTPC_HEADER_H
22
23#include "epc-tft.h"
24#include "eps-bearer.h"
25
26#include "ns3/header.h"
27
28namespace ns3
29{
30
31/**
32 * \ingroup lte
33 *
34 * \brief Header of the GTPv2-C protocol
35 *
36 * Implementation of the GPRS Tunnelling Protocol for Control Plane (GTPv2-C) header
37 * according to the 3GPP TS 29.274 document
38 */
39class GtpcHeader : public Header
40{
41 public:
42 GtpcHeader();
43 ~GtpcHeader() override;
44 /**
45 * \brief Get the type ID.
46 * \return the object TypeId
47 */
48 static TypeId GetTypeId();
49 TypeId GetInstanceTypeId() const override;
50 uint32_t GetSerializedSize() const override;
51 void Serialize(Buffer::Iterator start) const override;
53 void Print(std::ostream& os) const override;
54
55 /**
56 * Get the message size.
57 *
58 * Subclasses are supposed to have a message size greater than zero.
59 *
60 * \returns the message size
61 */
62 virtual uint32_t GetMessageSize() const;
63
64 /**
65 * Get message type
66 * \returns the message type
67 */
68 uint8_t GetMessageType() const;
69 /**
70 * Get message length
71 * \returns the message length
72 */
73 uint16_t GetMessageLength() const;
74 /**
75 * Get TEID
76 * \returns the TEID
77 */
78 uint32_t GetTeid() const;
79 /**
80 * Get sequence number
81 * \returns the sequence number
82 */
84
85 /**
86 * Set message type
87 * \param messageType the message type
88 */
89 void SetMessageType(uint8_t messageType);
90 /**
91 * Set message length
92 * \param messageLength the message length
93 */
94 void SetMessageLength(uint16_t messageLength);
95 /**
96 * Set TEID
97 * \param teid the TEID
98 */
99 void SetTeid(uint32_t teid);
100 /**
101 * Set sequence number
102 * \param sequenceNumber the sequence number
103 */
104 void SetSequenceNumber(uint32_t sequenceNumber);
105 /**
106 * Set IEs length. It is used to compute the message length
107 * \param iesLength the IEs length
108 */
109 void SetIesLength(uint16_t iesLength);
110
111 /**
112 * Compute the message length according to the message type
113 */
115
116 /// Interface Type enumeration
118 {
125 };
126
127 /// FTEID structure
128 struct Fteid_t
129 {
130 InterfaceType_t interfaceType; //!< Interface type
131 Ipv4Address addr; //!< IPv4 address
132 uint32_t teid; //!< TEID
133 };
134
135 /// Message Type enumeration
137 {
148 };
149
150 private:
151 /**
152 * TEID flag.
153 * This flag indicates if TEID field is present or not
154 */
156 /**
157 * Message type field.
158 * It can be one of the values of MessageType_t
159 */
161 /**
162 * Message length field.
163 * This field indicates the length of the message in octets excluding
164 * the mandatory part of the GTP-C header (the first 4 octets)
165 */
167 /**
168 * Tunnel Endpoint Identifier (TEID) field
169 */
171 /**
172 * GTP Sequence number field
173 */
175
176 protected:
177 /**
178 * Serialize the GTP-C header in the GTP-C messages
179 * \param i the buffer iterator
180 */
181 void PreSerialize(Buffer::Iterator& i) const;
182 /**
183 * Deserialize the GTP-C header in the GTP-C messages
184 * \param i the buffer iterator
185 * \return number of bytes deserialized
186 */
188};
189
190/**
191 * \ingroup lte
192 * GTP-C Information Elements
193 */
195{
196 public:
197 /**
198 * Cause
199 */
201 {
204 };
205
206 const uint32_t serializedSizeImsi = 12; //!< IMSI serialized size
207 const uint32_t serializedSizeCause = 6; //!< Cause serialized size
208 const uint32_t serializedSizeEbi = 5; //!< EBI serialized size
209 const uint32_t serializedSizeBearerQos = 26; //!< Bearer QoS serialized size
211 3 + 9 + 9 + 5 + 5 + 3; //!< Packet filter serialized size
212 /**
213 * \return the BearerTft serialized size
214 * \param packetFilters The packet filter
215 */
216 uint32_t GetSerializedSizeBearerTft(std::list<EpcTft::PacketFilter> packetFilters) const;
217 const uint32_t serializedSizeUliEcgi = 12; //!< UliEcgi serialized size
218 const uint32_t serializedSizeFteid = 13; //!< Fteid serialized size
219 const uint32_t serializedSizeBearerContextHeader = 4; //!< Fteid serialized size
220
221 /**
222 * Serialize the IMSI
223 * \param i Buffer iterator
224 * \param imsi The IMSI
225 */
226 void SerializeImsi(Buffer::Iterator& i, uint64_t imsi) const;
227 /**
228 * Deserialize the IMSI
229 * \param i Buffer iterator
230 * \param [out] imsi The IMSI
231 * \return the number of deserialized bytes
232 */
233 uint32_t DeserializeImsi(Buffer::Iterator& i, uint64_t& imsi) const;
234
235 /**
236 * Serialize the Cause
237 * \param i Buffer iterator
238 * \param cause The Cause
239 */
240 void SerializeCause(Buffer::Iterator& i, Cause_t cause) const;
241 /**
242 * Deserialize the Cause
243 * \param i Buffer iterator
244 * \param [out] cause The cause
245 * \return the number of deserialized bytes
246 */
248
249 /**
250 * Serialize the eps Bearer Id
251 * \param i Buffer iterator
252 * \param epsBearerId The eps Bearer Id
253 */
254 void SerializeEbi(Buffer::Iterator& i, uint8_t epsBearerId) const;
255 /**
256 * Deserialize the eps Bearer Id
257 * \param i Buffer iterator
258 * \param [out] epsBearerId The eps Bearer Id
259 * \return the number of deserialized bytes
260 */
261 uint32_t DeserializeEbi(Buffer::Iterator& i, uint8_t& epsBearerId) const;
262
263 /**
264 * \param i Buffer iterator
265 * \param data data to write in buffer
266 *
267 * Write the data in buffer and advance the iterator position
268 * by five bytes. The data is written in network order and the
269 * input data is expected to be in host order.
270 */
271 void WriteHtonU40(Buffer::Iterator& i, uint64_t data) const;
272 /**
273 * \param i Buffer iterator
274 * \return the five bytes read in the buffer.
275 *
276 * Read data and advance the Iterator by the number of bytes
277 * read.
278 * The data is read in network format and returned in host format.
279 */
280 uint64_t ReadNtohU40(Buffer::Iterator& i);
281
282 /**
283 * Serialize the eps Bearer QoS
284 * \param i Buffer iterator
285 * \param bearerQos The Bearer QoS
286 */
287 void SerializeBearerQos(Buffer::Iterator& i, EpsBearer bearerQos) const;
288 /**
289 * Deserialize the eps Bearer QoS
290 * \param i Buffer iterator
291 * \param [out] bearerQos The Bearer QoS
292 * \return the number of deserialized bytes
293 */
295
296 /**
297 * Serialize the Bearer TFT
298 * \param i Buffer iterator
299 * \param packetFilters The Packet filters
300 */
302 std::list<EpcTft::PacketFilter> packetFilters) const;
303 /**
304 * Deserialize the Bearer TFT
305 * \param i Buffer iterator
306 * \param [out] epcTft The Bearer TFT
307 * \return the number of deserialized bytes
308 */
310
311 /**
312 * Serialize the UliEcgi
313 * \param i Buffer iterator
314 * \param uliEcgi The UliEcgi
315 */
316 void SerializeUliEcgi(Buffer::Iterator& i, uint32_t uliEcgi) const;
317 /**
318 * Deserialize the UliEcgi
319 * \param i Buffer iterator
320 * \param [out] uliEcgi UliEcgi
321 * \return the number of deserialized bytes
322 */
324
325 /**
326 * Serialize the Fteid_t
327 * \param i Buffer iterator
328 * \param fteid The Fteid_t
329 */
331 /**
332 * Deserialize the Fteid
333 * \param i Buffer iterator
334 * \param [out] fteid Fteid
335 * \return the number of deserialized bytes
336 */
338
339 /**
340 * Serialize the Bearer Context Header
341 * \param i Buffer iterator
342 * \param length The length
343 */
344 void SerializeBearerContextHeader(Buffer::Iterator& i, uint16_t length) const;
345 /**
346 * Deserialize the Bearer Context Header
347 * \param i Buffer iterator
348 * \param [out] length length
349 * \return the number of deserialized bytes
350 */
351 uint32_t DeserializeBearerContextHeader(Buffer::Iterator& i, uint16_t& length) const;
352};
353
354/**
355 * \ingroup lte
356 * GTP-C Create Session Request Message
357 */
359{
360 public:
363 /**
364 * \brief Get the type ID.
365 * \return the object TypeId
366 */
367 static TypeId GetTypeId();
368 TypeId GetInstanceTypeId() const override;
369 uint32_t GetSerializedSize() const override;
370 void Serialize(Buffer::Iterator start) const override;
371 uint32_t Deserialize(Buffer::Iterator start) override;
372 void Print(std::ostream& os) const override;
373 uint32_t GetMessageSize() const override;
374
375 /**
376 * Get the IMSI
377 * \return IMSI
378 */
379 uint64_t GetImsi() const;
380 /**
381 * Set the IMSI
382 * \param imsi IMSI
383 */
384 void SetImsi(uint64_t imsi);
385
386 /**
387 * Get the UliEcgi
388 * \return UliEcgi
389 */
390 uint32_t GetUliEcgi() const;
391 /**
392 * Set the UliEcgi
393 * \param uliEcgi UliEcgi
394 */
395 void SetUliEcgi(uint32_t uliEcgi);
396
397 /**
398 * Get the Sender CpFteid
399 * \return Sender CpFteid
400 */
402 /**
403 * Set the Sender CpFteid
404 * \param fteid Sender CpFteid
405 */
407
408 /**
409 * Bearer Context structure
410 */
412 {
414 uint8_t epsBearerId; ///< EPS bearer ID
415 Ptr<EpcTft> tft; ///< traffic flow template
416 EpsBearer bearerLevelQos; ///< bearer QOS level
417 };
418
419 /**
420 * Get the Bearer Contexts
421 * \return the Bearer Context list
422 */
423 std::list<BearerContextToBeCreated> GetBearerContextsToBeCreated() const;
424 /**
425 * Set the Bearer Contexts
426 * \param bearerContexts the Bearer Context list
427 */
428 void SetBearerContextsToBeCreated(std::list<BearerContextToBeCreated> bearerContexts);
429
430 private:
431 uint64_t m_imsi; //!< IMSI
432 uint32_t m_uliEcgi; //!< UliEcgi
434
435 /// Bearer Context list
436 std::list<BearerContextToBeCreated> m_bearerContextsToBeCreated;
437};
438
439/**
440 * \ingroup lte
441 * GTP-C Create Session Response Message
442 */
444{
445 public:
448 /**
449 * \brief Get the type ID.
450 * \return the object TypeId
451 */
452 static TypeId GetTypeId();
453 TypeId GetInstanceTypeId() const override;
454 uint32_t GetSerializedSize() const override;
455 void Serialize(Buffer::Iterator start) const override;
456 uint32_t Deserialize(Buffer::Iterator start) override;
457 void Print(std::ostream& os) const override;
458 uint32_t GetMessageSize() const override;
459
460 /**
461 * Get the Cause
462 * \return the Cause
463 */
464 Cause_t GetCause() const;
465 /**
466 * Set the Cause
467 * \param cause The cause
468 */
469 void SetCause(Cause_t cause);
470
471 /**
472 * Get the Sender CpFteid
473 * \return the Sender CpFteid
474 */
476 /**
477 * Set the Sender CpFteid
478 * \param fteid the Sender CpFteid
479 */
481
482 /**
483 * Bearer Context structure
484 */
486 {
487 uint8_t epsBearerId; ///< EPS bearer ID
488 uint8_t cause; ///< Cause
489 Ptr<EpcTft> tft; ///< Bearer traffic flow template
491 EpsBearer bearerLevelQos; ///< Bearer QOS level
492 };
493
494 /**
495 * Get the Container of Bearer Contexts
496 * \return a list of Bearer Contexts
497 */
498 std::list<BearerContextCreated> GetBearerContextsCreated() const;
499 /**
500 * Set the Bearer Contexts
501 * \param bearerContexts a list of Bearer Contexts
502 */
503 void SetBearerContextsCreated(std::list<BearerContextCreated> bearerContexts);
504
505 private:
506 Cause_t m_cause; //!< Cause
508 /// Container of Bearer Contexts
509 std::list<BearerContextCreated> m_bearerContextsCreated;
510};
511
512/**
513 * \ingroup lte
514 * GTP-C Modify Bearer Request Message
515 */
517{
518 public:
521 /**
522 * \brief Get the type ID.
523 * \return the object TypeId
524 */
525 static TypeId GetTypeId();
526 TypeId GetInstanceTypeId() const override;
527 uint32_t GetSerializedSize() const override;
528 void Serialize(Buffer::Iterator start) const override;
529 uint32_t Deserialize(Buffer::Iterator start) override;
530 void Print(std::ostream& os) const override;
531 uint32_t GetMessageSize() const override;
532
533 /**
534 * Get the IMSI
535 * \return IMSI
536 */
537 uint64_t GetImsi() const;
538 /**
539 * Set the IMSI
540 * \param imsi IMSI
541 */
542 void SetImsi(uint64_t imsi);
543
544 /**
545 * Get the UliEcgi
546 * \return UliEcgi
547 */
548 uint32_t GetUliEcgi() const;
549 /**
550 * Set the UliEcgi
551 * \param uliEcgi UliEcgi
552 */
553 void SetUliEcgi(uint32_t uliEcgi);
554
555 /**
556 * Bearer Context structure
557 */
559 {
560 uint8_t epsBearerId; ///< EPS bearer ID
562 };
563
564 /**
565 * Get the Bearer Contexts
566 * \return the Bearer Context list
567 */
568 std::list<BearerContextToBeModified> GetBearerContextsToBeModified() const;
569 /**
570 * Set the Bearer Contexts
571 * \param bearerContexts the Bearer Context list
572 */
573 void SetBearerContextsToBeModified(std::list<BearerContextToBeModified> bearerContexts);
574
575 private:
576 uint64_t m_imsi; //!< IMSI
577 uint32_t m_uliEcgi; //!< UliEcgi
578
579 /// Bearer Context list
580 std::list<BearerContextToBeModified> m_bearerContextsToBeModified;
581};
582
583/**
584 * \ingroup lte
585 * GTP-C Modify Bearer Response Message
586 */
588{
589 public:
592 /**
593 * \brief Get the type ID.
594 * \return the object TypeId
595 */
596 static TypeId GetTypeId();
597 TypeId GetInstanceTypeId() const override;
598 uint32_t GetSerializedSize() const override;
599 void Serialize(Buffer::Iterator start) const override;
600 uint32_t Deserialize(Buffer::Iterator start) override;
601 void Print(std::ostream& os) const override;
602 uint32_t GetMessageSize() const override;
603
604 /**
605 * Get the Cause
606 * \return the Cause
607 */
608 Cause_t GetCause() const;
609 /**
610 * Set the Cause
611 * \param cause The cause
612 */
613 void SetCause(Cause_t cause);
614
615 private:
616 Cause_t m_cause; //!< Cause
617};
618
619/**
620 * \ingroup lte
621 * GTP-C Delete Bearer Command Message
622 */
624{
625 public:
628 /**
629 * \brief Get the type ID.
630 * \return the object TypeId
631 */
632 static TypeId GetTypeId();
633 TypeId GetInstanceTypeId() const override;
634 uint32_t GetSerializedSize() const override;
635 void Serialize(Buffer::Iterator start) const override;
636 uint32_t Deserialize(Buffer::Iterator start) override;
637 void Print(std::ostream& os) const override;
638 uint32_t GetMessageSize() const override;
639
640 /// Bearer context
642 {
643 uint8_t m_epsBearerId; ///< EPS bearer ID
644 };
645
646 /**
647 * Get the Bearer contexts
648 * \return container of beraer contexts
649 */
650 std::list<BearerContext> GetBearerContexts() const;
651 /**
652 * Set the Bearer contexts
653 * \param bearerContexts container of beraer contexts
654 */
655 void SetBearerContexts(std::list<BearerContext> bearerContexts);
656
657 private:
658 std::list<BearerContext> m_bearerContexts; //!< Container of Bearer Contexts
659};
660
661/**
662 * \ingroup lte
663 * GTP-C Delete Bearer Request Message
664 */
666{
667 public:
670 /**
671 * \brief Get the type ID.
672 * \return the object TypeId
673 */
674 static TypeId GetTypeId();
675 TypeId GetInstanceTypeId() const override;
676 uint32_t GetSerializedSize() const override;
677 void Serialize(Buffer::Iterator start) const override;
678 uint32_t Deserialize(Buffer::Iterator start) override;
679 void Print(std::ostream& os) const override;
680 uint32_t GetMessageSize() const override;
681
682 /**
683 * Get the Bearers IDs
684 * \return a container of Bearers IDs
685 */
686 std::list<uint8_t> GetEpsBearerIds() const;
687 /**
688 * Set the Bearers IDs
689 * \param epsBearerIds The container of Bearers IDs
690 */
691 void SetEpsBearerIds(std::list<uint8_t> epsBearerIds);
692
693 private:
694 std::list<uint8_t> m_epsBearerIds; //!< Container of Bearers IDs
695};
696
697/**
698 * \ingroup lte
699 * GTP-C Delete Bearer Response Message
700 */
702{
703 public:
706 /**
707 * \brief Get the type ID.
708 * \return the object TypeId
709 */
710 static TypeId GetTypeId();
711 TypeId GetInstanceTypeId() const override;
712 uint32_t GetSerializedSize() const override;
713 void Serialize(Buffer::Iterator start) const override;
714 uint32_t Deserialize(Buffer::Iterator start) override;
715 void Print(std::ostream& os) const override;
716 uint32_t GetMessageSize() const override;
717
718 /**
719 * Get the Cause
720 * \return the Cause
721 */
722 Cause_t GetCause() const;
723 /**
724 * Set the Cause
725 * \param cause The cause
726 */
727 void SetCause(Cause_t cause);
728
729 /**
730 * Get the Bearers IDs
731 * \return a container of Bearers IDs
732 */
733 std::list<uint8_t> GetEpsBearerIds() const;
734 /**
735 * Set the Bearers IDs
736 * \param epsBearerIds The container of Bearers IDs
737 */
738 void SetEpsBearerIds(std::list<uint8_t> epsBearerIds);
739
740 private:
741 Cause_t m_cause; //!< Cause
742 std::list<uint8_t> m_epsBearerIds; //!< Container of Bearers IDs
743};
744
745} // namespace ns3
746
747#endif // EPC_GTPC_HEADER_H
iterator in a Buffer instance
Definition: buffer.h:100
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
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:44
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:42
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
a unique identifier for an interface.
Definition: type-id.h:59
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.