A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
three-gpp-http-header.h
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2015 Magister Solutions
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Budiarto Herman <budiarto.herman@magister.fi>
19
*
20
*/
21
22
#ifndef THREE_GPP_HTTP_HEADER_H
23
#define THREE_GPP_HTTP_HEADER_H
24
25
#include <ns3/header.h>
26
#include <ns3/nstime.h>
27
28
29
namespace
ns3
{
30
31
class
Packet;
32
55
class
ThreeGppHttpHeader
:
public
Header
56
{
57
public
:
59
ThreeGppHttpHeader
();
60
65
static
TypeId
GetTypeId
();
66
67
// Inherited from ObjectBase base class.
68
virtual
TypeId
GetInstanceTypeId
()
const
;
69
70
// Inherited from Header base class.
71
virtual
uint32_t
GetSerializedSize
()
const
;
72
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
73
virtual
uint32_t
Deserialize
(
Buffer::Iterator
start
);
74
virtual
void
Print
(std::ostream &os)
const
;
75
79
std::string
ToString
()
const
;
80
82
enum
ContentType_t
83
{
84
NOT_SET
,
85
MAIN_OBJECT
,
86
EMBEDDED_OBJECT
87
};
88
92
void
SetContentType
(
ContentType_t
contentType);
93
97
ContentType_t
GetContentType
()
const
;
98
102
void
SetContentLength
(uint32_t contentLength);
103
107
uint32_t
GetContentLength
()
const
;
108
112
void
SetClientTs
(
Time
clientTs);
113
117
Time
GetClientTs
()
const
;
118
122
void
SetServerTs
(
Time
serverTs);
123
127
Time
GetServerTs
()
const
;
128
129
private
:
130
uint16_t
m_contentType
;
131
uint32_t
m_contentLength
;
132
uint64_t
m_clientTs
;
133
uint64_t
m_serverTs
;
134
135
};
// end of `class ThreeGppHttpHeader`
136
137
138
}
// end of `namespace ns3`
139
140
141
#endif
/* THREE_GPP_HTTP_HEADER_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:99
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:43
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::ThreeGppHttpHeader
Header used by web browsing applications to transmit information about content type,...
Definition:
three-gpp-http-header.h:56
ns3::ThreeGppHttpHeader::SetClientTs
void SetClientTs(Time clientTs)
Definition:
three-gpp-http-header.cc:189
ns3::ThreeGppHttpHeader::ToString
std::string ToString() const
Definition:
three-gpp-http-header.cc:119
ns3::ThreeGppHttpHeader::SetServerTs
void SetServerTs(Time serverTs)
Definition:
three-gpp-http-header.cc:204
ns3::ThreeGppHttpHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
three-gpp-http-header.cc:71
ns3::ThreeGppHttpHeader::GetClientTs
Time GetClientTs() const
Definition:
three-gpp-http-header.cc:197
ns3::ThreeGppHttpHeader::SetContentLength
void SetContentLength(uint32_t contentLength)
Definition:
three-gpp-http-header.cc:174
ns3::ThreeGppHttpHeader::SetContentType
void SetContentType(ContentType_t contentType)
Definition:
three-gpp-http-header.cc:129
ns3::ThreeGppHttpHeader::ContentType_t
ContentType_t
The possible types of content (default = NOT_SET).
Definition:
three-gpp-http-header.h:83
ns3::ThreeGppHttpHeader::NOT_SET
@ NOT_SET
Integer equivalent = 0.
Definition:
three-gpp-http-header.h:84
ns3::ThreeGppHttpHeader::EMBEDDED_OBJECT
@ EMBEDDED_OBJECT
Integer equivalent = 2.
Definition:
three-gpp-http-header.h:86
ns3::ThreeGppHttpHeader::MAIN_OBJECT
@ MAIN_OBJECT
Integer equivalent = 1.
Definition:
three-gpp-http-header.h:85
ns3::ThreeGppHttpHeader::ThreeGppHttpHeader
ThreeGppHttpHeader()
Creates an empty instance .
Definition:
three-gpp-http-header.cc:33
ns3::ThreeGppHttpHeader::GetSerializedSize
virtual uint32_t GetSerializedSize() const
Definition:
three-gpp-http-header.cc:64
ns3::ThreeGppHttpHeader::m_clientTs
uint64_t m_clientTs
" Client time stamp field (in time step unit).
Definition:
three-gpp-http-header.h:132
ns3::ThreeGppHttpHeader::m_contentLength
uint32_t m_contentLength
" Content length field (in bytes unit).
Definition:
three-gpp-http-header.h:131
ns3::ThreeGppHttpHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
Definition:
three-gpp-http-header.cc:57
ns3::ThreeGppHttpHeader::Print
virtual void Print(std::ostream &os) const
Definition:
three-gpp-http-header.cc:108
ns3::ThreeGppHttpHeader::m_serverTs
uint64_t m_serverTs
" Server time stamp field (in time step unit).
Definition:
three-gpp-http-header.h:133
ns3::ThreeGppHttpHeader::GetContentType
ContentType_t GetContentType() const
Definition:
three-gpp-http-header.cc:151
ns3::ThreeGppHttpHeader::GetServerTs
Time GetServerTs() const
Definition:
three-gpp-http-header.cc:212
ns3::ThreeGppHttpHeader::GetContentLength
uint32_t GetContentLength() const
Definition:
three-gpp-http-header.cc:182
ns3::ThreeGppHttpHeader::m_contentType
uint16_t m_contentType
" Content type field in integer format.
Definition:
three-gpp-http-header.h:130
ns3::ThreeGppHttpHeader::GetTypeId
static TypeId GetTypeId()
Returns the object TypeId.
Definition:
three-gpp-http-header.cc:46
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:103
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
visualizer.core.start
def start()
Definition:
core.py:1853
src
applications
model
three-gpp-http-header.h
Generated on Tue Feb 6 2024 19:21:15 for ns-3 by
1.9.1