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
packet-socket-address.h
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007 INRIA
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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
#ifndef PACKET_SOCKET_ADDRESS_H
21
#define PACKET_SOCKET_ADDRESS_H
22
23
#include "ns3/ptr.h"
24
#include "ns3/address.h"
25
#include "mac48-address.h"
26
#include "mac64-address.h"
27
#include "ns3/net-device.h"
28
29
namespace
ns3 {
30
31
class
NetDevice;
32
38
class
PacketSocketAddress
39
{
40
public
:
41
PacketSocketAddress
();
42
void
SetProtocol (uint16_t protocol);
43
44
void
SetAllDevices (
void
);
45
void
SetSingleDevice (uint32_t device);
46
void
SetPhysicalAddress (
const
Address
address);
47
48
uint16_t GetProtocol (
void
)
const
;
49
uint32_t GetSingleDevice (
void
)
const
;
50
bool
IsSingleDevice (
void
)
const
;
51
Address
GetPhysicalAddress (
void
)
const
;
52
58
operator
Address
()
const
;
65
static
PacketSocketAddress
ConvertFrom
(
const
Address
&address);
70
static
bool
IsMatchingType
(
const
Address
&address);
71
private
:
72
static
uint8_t GetType (
void
);
73
Address
ConvertTo (
void
)
const
;
74
uint16_t m_protocol;
75
bool
m_isSingleDevice;
76
uint32_t m_device;
77
Address
m_address;
78
};
79
80
81
}
// namespace ns3
82
83
#endif
/* PACKET_SOCKET_ADDRESS_H */
ns3::PacketSocketAddress
an address for a packet socket
Definition:
packet-socket-address.h:38
ns3::PacketSocketAddress::IsMatchingType
static bool IsMatchingType(const Address &address)
Definition:
packet-socket-address.cc:138
ns3::Address
a polymophic address class
Definition:
address.h:86
ns3::PacketSocketAddress::ConvertFrom
static PacketSocketAddress ConvertFrom(const Address &address)
Definition:
packet-socket-address.cc:106
src
network
utils
packet-socket-address.h
Generated on Sun Mar 16 2014 11:25:09 for ns-3 by
1.8.6