A Discrete-Event Network Simulator
API
three-gpp-http-header.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 Magister Solutions
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: Budiarto Herman <budiarto.herman@magister.fi>
18 *
19 */
20
21#ifndef THREE_GPP_HTTP_HEADER_H
22#define THREE_GPP_HTTP_HEADER_H
23
24#include <ns3/header.h>
25#include <ns3/nstime.h>
26
27namespace ns3
28{
29
30class Packet;
31
55{
56 public:
59
64 static TypeId GetTypeId();
65
66 // Inherited from ObjectBase base class.
67 TypeId GetInstanceTypeId() const override;
68
69 // Inherited from Header base class.
70 uint32_t GetSerializedSize() const override;
71 void Serialize(Buffer::Iterator start) const override;
73 void Print(std::ostream& os) const override;
74
78 std::string ToString() const;
79
82 {
86 };
87
91 void SetContentType(ContentType_t contentType);
92
97
101 void SetContentLength(uint32_t contentLength);
102
107
111 void SetClientTs(Time clientTs);
112
116 Time GetClientTs() const;
117
121 void SetServerTs(Time serverTs);
122
126 Time GetServerTs() const;
127
128 private:
129 uint16_t m_contentType;
131 uint64_t m_clientTs;
132 uint64_t m_serverTs;
133
134}; // end of `class ThreeGppHttpHeader`
135
136} // namespace ns3
137
138#endif /* THREE_GPP_HTTP_HEADER_H */
iterator in a Buffer instance
Definition: buffer.h:100
Protocol header serialization and deserialization.
Definition: header.h:44
Header used by web browsing applications to transmit information about content type,...
void SetClientTs(Time clientTs)
void SetServerTs(Time serverTs)
uint32_t GetSerializedSize() const override
uint32_t Deserialize(Buffer::Iterator start) override
void SetContentLength(uint32_t contentLength)
void Serialize(Buffer::Iterator start) const override
void SetContentType(ContentType_t contentType)
ContentType_t
The possible types of content (default = NOT_SET).
@ NOT_SET
Integer equivalent = 0.
@ EMBEDDED_OBJECT
Integer equivalent = 2.
@ MAIN_OBJECT
Integer equivalent = 1.
ThreeGppHttpHeader()
Creates an empty instance.
uint64_t m_clientTs
" Client time stamp field (in time step unit).
uint32_t m_contentLength
" Content length field (in bytes unit).
void Print(std::ostream &os) const override
uint64_t m_serverTs
" Server time stamp field (in time step unit).
ContentType_t GetContentType() const
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint16_t m_contentType
" Content type field in integer format.
static TypeId GetTypeId()
Returns the object TypeId.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:60
Every class exported by the ns3 library is enclosed in the ns3 namespace.
def start()
Definition: core.py:1864