A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
flame-header.h
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 IITP RAS
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: Kirill Andreev <andreev@iitp.ru>
19
*/
20
21
#ifndef FLAME_HEADER_H
22
#define FLAME_HEADER_H
23
24
#include "ns3/header.h"
25
#include "ns3/mac48-address.h"
26
27
namespace
ns3 {
28
namespace
flame {
37
class
FlameHeader
:
public
Header
38
{
39
public
:
40
41
FlameHeader
();
42
~
FlameHeader
();
47
static
TypeId
GetTypeId (
void
);
48
virtual
TypeId
GetInstanceTypeId
(
void
)
const
;
49
virtual
void
Print
(std::ostream &os)
const
;
50
virtual
uint32_t
GetSerializedSize
(
void
)
const
;
51
virtual
void
Serialize
(
Buffer::Iterator
start)
const
;
52
virtual
uint32_t
Deserialize
(
Buffer::Iterator
start);
54
58
void
AddCost (uint8_t cost);
59
uint8_t GetCost ()
const
;
60
void
SetSeqno (uint16_t seqno);
61
uint16_t GetSeqno ()
const
;
62
void
SetOrigDst (
Mac48Address
dst);
63
Mac48Address
GetOrigDst ()
const
;
64
void
SetOrigSrc (
Mac48Address
OrigSrc);
65
Mac48Address
GetOrigSrc ()
const
;
66
void
SetProtocol (uint16_t protocol);
67
uint16_t GetProtocol ()
const
;
69
private
:
70
uint8_t m_cost;
71
uint16_t m_seqno;
72
Mac48Address
m_origDst;
73
Mac48Address
m_origSrc;
74
uint16_t m_protocol;
75
friend
bool
operator== (
const
FlameHeader
& a,
const
FlameHeader
& b);
76
};
77
bool
operator== (
const
FlameHeader
& a,
const
FlameHeader
& b);
78
}
// namespace flame
79
}
// namespace ns3
80
#endif
/* FLAME_HEADER_H */
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:42
ns3::flame::FlameHeader::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
flame-header.cc:58
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::flame::FlameHeader::Print
virtual void Print(std::ostream &os) const
Definition:
flame-header.cc:52
ns3::flame::FlameHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Definition:
flame-header.cc:47
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:41
ns3::flame::FlameHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
flame-header.cc:69
ns3::flame::FlameHeader::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition:
flame-header.cc:80
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:44
ns3::flame::FlameHeader
Flame header.
Definition:
flame-header.h:37
src
mesh
model
flame
flame-header.h
Generated on Sun Mar 16 2014 11:25:08 for ns-3 by
1.8.6