A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
inet6-socket-address.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007-2008 Louis Pasteur University
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
18
*/
19
20
#ifndef INET6_SOCKET_ADDRESS_H
21
#define INET6_SOCKET_ADDRESS_H
22
23
#include "
ipv6-address.h
"
24
25
#include "ns3/address.h"
26
27
#include <stdint.h>
28
29
namespace
ns3
30
{
31
37
class
Inet6SocketAddress
38
{
39
public
:
45
Inet6SocketAddress
(
Ipv6Address
ipv6, uint16_t
port
);
46
51
Inet6SocketAddress
(
Ipv6Address
ipv6);
52
57
Inet6SocketAddress
(uint16_t
port
);
58
64
Inet6SocketAddress
(
const
char
* ipv6, uint16_t
port
);
65
70
Inet6SocketAddress
(
const
char
* ipv6);
71
76
uint16_t
GetPort
()
const
;
77
82
void
SetPort
(uint16_t
port
);
83
88
Ipv6Address
GetIpv6
()
const
;
89
94
void
SetIpv6
(
Ipv6Address
ipv6);
95
101
static
bool
IsMatchingType
(
const
Address
& addr);
102
107
operator
Address
()
const
;
108
114
static
Inet6SocketAddress
ConvertFrom
(
const
Address
& addr);
115
120
Address
ConvertTo
()
const
;
121
122
private
:
127
static
uint8_t
GetType
();
128
132
Ipv6Address
m_ipv6
;
133
137
uint16_t
m_port
;
138
};
139
140
}
/* namespace ns3 */
141
142
#endif
/* INET6_SOCKET_ADDRESS_H */
ns3::Address
a polymophic address class
Definition:
address.h:101
ns3::Inet6SocketAddress
An Inet6 address class.
Definition:
inet6-socket-address.h:38
ns3::Inet6SocketAddress::GetType
static uint8_t GetType()
Get the type.
Definition:
inet6-socket-address.cc:129
ns3::Inet6SocketAddress::SetPort
void SetPort(uint16_t port)
Set the port.
Definition:
inet6-socket-address.cc:73
ns3::Inet6SocketAddress::ConvertFrom
static Inet6SocketAddress ConvertFrom(const Address &addr)
Convert the address to a InetSocketAddress.
Definition:
inet6-socket-address.cc:117
ns3::Inet6SocketAddress::GetPort
uint16_t GetPort() const
Get the port.
Definition:
inet6-socket-address.cc:66
ns3::Inet6SocketAddress::Inet6SocketAddress
Inet6SocketAddress(Ipv6Address ipv6, uint16_t port)
Constructor.
Definition:
inet6-socket-address.cc:30
ns3::Inet6SocketAddress::SetIpv6
void SetIpv6(Ipv6Address ipv6)
Set the IPv6 address.
Definition:
inet6-socket-address.cc:87
ns3::Inet6SocketAddress::IsMatchingType
static bool IsMatchingType(const Address &addr)
If the address match.
Definition:
inet6-socket-address.cc:94
ns3::Inet6SocketAddress::m_port
uint16_t m_port
The port.
Definition:
inet6-socket-address.h:137
ns3::Inet6SocketAddress::GetIpv6
Ipv6Address GetIpv6() const
Get the IPv6 address.
Definition:
inet6-socket-address.cc:80
ns3::Inet6SocketAddress::ConvertTo
Address ConvertTo() const
Convert to Address.
Definition:
inet6-socket-address.cc:106
ns3::Inet6SocketAddress::m_ipv6
Ipv6Address m_ipv6
The IPv6 address.
Definition:
inet6-socket-address.h:132
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:49
port
uint16_t port
Definition:
dsdv-manet.cc:44
ipv6-address.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
network
utils
inet6-socket-address.h
Generated on Sun Mar 3 2024 17:11:06 for ns-3 by
1.9.1