A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
network
utils
inet6-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-2008 Louis Pasteur University
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: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
19
*/
20
21
#ifndef INET6_SOCKET_ADDRESS_H
22
#define INET6_SOCKET_ADDRESS_H
23
24
#include <stdint.h>
25
26
#include "ns3/address.h"
27
#include "
ipv6-address.h
"
28
29
namespace
ns3
{
30
36
class
Inet6SocketAddress
37
{
38
public
:
44
Inet6SocketAddress
(
Ipv6Address
ipv6, uint16_t
port
);
45
50
Inet6SocketAddress
(
Ipv6Address
ipv6);
51
56
Inet6SocketAddress
(uint16_t
port
);
57
63
Inet6SocketAddress
(
const
char
* ipv6, uint16_t
port
);
64
69
Inet6SocketAddress
(
const
char
* ipv6);
70
75
uint16_t
GetPort
(
void
)
const
;
76
81
void
SetPort
(uint16_t
port
);
82
87
Ipv6Address
GetIpv6
(
void
)
const
;
88
93
void
SetIpv6
(
Ipv6Address
ipv6);
94
100
static
bool
IsMatchingType
(
const
Address
&addr);
101
106
operator
Address
(
void
)
const
;
107
113
static
Inet6SocketAddress
ConvertFrom
(
const
Address
&addr);
114
115
private
:
120
Address
ConvertTo
(
void
)
const
;
121
126
static
uint8_t
GetType
(
void
);
127
131
Ipv6Address
m_ipv6
;
132
136
uint16_t
m_port
;
137
};
138
139
}
/* namespace ns3 */
140
141
#endif
/* INET6_SOCKET_ADDRESS_H */
ns3::Inet6SocketAddress::GetIpv6
Ipv6Address GetIpv6(void) const
Get the IPv6 address.
Definition:
inet6-socket-address.cc:77
ns3::Inet6SocketAddress::SetIpv6
void SetIpv6(Ipv6Address ipv6)
Set the IPv6 address.
Definition:
inet6-socket-address.cc:83
port
uint16_t port
Definition:
dsdv-manet.cc:45
ns3::Address
a polymophic address class
Definition:
address.h:90
ns3::Inet6SocketAddress::m_ipv6
Ipv6Address m_ipv6
The IPv6 address.
Definition:
inet6-socket-address.h:131
ns3::Inet6SocketAddress::Inet6SocketAddress
Inet6SocketAddress(Ipv6Address ipv6, uint16_t port)
Constructor.
Definition:
inet6-socket-address.cc:30
ns3::Inet6SocketAddress::m_port
uint16_t m_port
The port.
Definition:
inet6-socket-address.h:136
ns3::Inet6SocketAddress::GetType
static uint8_t GetType(void)
Get the type.
Definition:
inet6-socket-address.cc:121
ns3::Inet6SocketAddress
An Inet6 address class.
Definition:
inet6-socket-address.h:36
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:49
ns3::Inet6SocketAddress::ConvertFrom
static Inet6SocketAddress ConvertFrom(const Address &addr)
Convert the address to a InetSocketAddress.
Definition:
inet6-socket-address.cc:110
ns3::Inet6SocketAddress::IsMatchingType
static bool IsMatchingType(const Address &addr)
If the address match.
Definition:
inet6-socket-address.cc:89
ns3::Inet6SocketAddress::SetPort
void SetPort(uint16_t port)
Set the port.
Definition:
inet6-socket-address.cc:71
ipv6-address.h
ns3::Inet6SocketAddress::GetPort
uint16_t GetPort(void) const
Get the port.
Definition:
inet6-socket-address.cc:65
ns3::Inet6SocketAddress::ConvertTo
Address ConvertTo(void) const
Convert to Address.
Definition:
inet6-socket-address.cc:100
Generated on Wed Nov 7 2018 10:02:07 for ns-3 by
1.8.14