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
packet-socket-address.h
Go to the documentation of this file.
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::GetProtocol
uint16_t GetProtocol(void) const
Definition:
packet-socket-address.cc:60
ns3::PacketSocketAddress
an address for a packet socket
Definition:
packet-socket-address.h:38
mac64-address.h
ns3::PacketSocketAddress::IsMatchingType
static bool IsMatchingType(const Address &address)
Definition:
packet-socket-address.cc:138
ns3::PacketSocketAddress::SetAllDevices
void SetAllDevices(void)
Definition:
packet-socket-address.cc:39
ns3::PacketSocketAddress::GetSingleDevice
uint32_t GetSingleDevice(void) const
Definition:
packet-socket-address.cc:72
ns3::PacketSocketAddress::SetSingleDevice
void SetSingleDevice(uint32_t device)
Definition:
packet-socket-address.cc:46
ns3::Address
a polymophic address class
Definition:
address.h:86
ns3::PacketSocketAddress::PacketSocketAddress
PacketSocketAddress()
Definition:
packet-socket-address.cc:28
ns3::PacketSocketAddress::m_device
uint32_t m_device
Definition:
packet-socket-address.h:76
ns3::PacketSocketAddress::GetType
static uint8_t GetType(void)
Definition:
packet-socket-address.cc:144
ns3::PacketSocketAddress::SetPhysicalAddress
void SetPhysicalAddress(const Address address)
Definition:
packet-socket-address.cc:53
ns3::PacketSocketAddress::GetPhysicalAddress
Address GetPhysicalAddress(void) const
Definition:
packet-socket-address.cc:78
ns3::PacketSocketAddress::m_protocol
uint16_t m_protocol
Definition:
packet-socket-address.h:74
ns3::PacketSocketAddress::m_address
Address m_address
Definition:
packet-socket-address.h:77
mac48-address.h
ns3::PacketSocketAddress::IsSingleDevice
bool IsSingleDevice(void) const
Definition:
packet-socket-address.cc:66
ns3::PacketSocketAddress::SetProtocol
void SetProtocol(uint16_t protocol)
Definition:
packet-socket-address.cc:33
ns3::PacketSocketAddress::ConvertFrom
static PacketSocketAddress ConvertFrom(const Address &address)
Definition:
packet-socket-address.cc:106
ns3::PacketSocketAddress::ConvertTo
Address ConvertTo(void) const
Definition:
packet-socket-address.cc:90
first.address
tuple address
Definition:
first.py:37
ns3::PacketSocketAddress::m_isSingleDevice
bool m_isSingleDevice
Definition:
packet-socket-address.h:75
src
network
utils
packet-socket-address.h
Generated on Sat Apr 19 2014 14:07:06 for ns-3 by
1.8.6