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
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
flame-header.h
Go to the documentation of this file.
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 */
src
mesh
model
flame
flame-header.h
Generated on Tue May 14 2013 11:08:28 for ns-3 by
1.8.1.2