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
uan-address.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 University of Washington
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: Leonard Tracy <lentracy@gmail.com>
19
*/
20
21
#ifndef UAN_ADDRESS_H
22
#define UAN_ADDRESS_H
23
24
#include "ns3/address.h"
25
#include <iostream>
26
27
namespace
ns3 {
28
37
class
UanAddress
38
{
39
public
:
40
UanAddress
();
45
UanAddress
(uint8_t addr);
46
virtual
~UanAddress
();
47
52
static
UanAddress
ConvertFrom
(
const
Address
&address);
53
58
static
bool
IsMatchingType
(
const
Address
&address);
59
63
operator
Address
()
const
;
64
69
void
CopyFrom
(
const
uint8_t *pBuffer);
70
75
void
CopyTo
(uint8_t *pBuffer);
76
80
uint8_t
GetAsInt
(
void
)
const
;
81
85
static
UanAddress
GetBroadcast
(
void
);
86
90
static
UanAddress
Allocate
();
91
92
93
private
:
94
uint8_t
m_address
;
95
96
static
uint8_t
GetType
(
void
);
97
Address
ConvertTo
(
void
)
const
;
98
99
friend
bool
operator ==
(
const
UanAddress
&a,
const
UanAddress
&b);
100
friend
bool
operator !=
(
const
UanAddress
&a,
const
UanAddress
&b);
101
friend
std::ostream&
operator<<
(std::ostream& os,
const
UanAddress
& address);
102
friend
std::istream&
operator>>
(std::istream& is,
UanAddress
& address);
103
104
};
105
106
110
bool
operator ==
(
const
UanAddress
&a,
const
UanAddress
&b);
111
115
bool
operator !=
(
const
UanAddress
&a,
const
UanAddress
&b);
116
120
std::ostream&
operator<<
(std::ostream& os,
const
UanAddress
& address);
121
125
std::istream&
operator>>
(std::istream& is,
UanAddress
& address);
126
127
}
// namespace ns3
128
129
#endif
/* UAN_ADDRESS_H */
src
uan
model
uan-address.h
Generated on Tue May 14 2013 11:08:33 for ns-3 by
1.8.1.2