A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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
29namespace ns3
30{
31
38{
39 public:
45 Inet6SocketAddress(Ipv6Address ipv6, uint16_t port);
46
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
133
137 uint16_t m_port;
138};
139
140} /* namespace ns3 */
141
142#endif /* INET6_SOCKET_ADDRESS_H */
a polymophic address class
Definition: address.h:100
An Inet6 address class.
static uint8_t GetType()
Get the type.
void SetPort(uint16_t port)
Set the port.
static Inet6SocketAddress ConvertFrom(const Address &addr)
Convert the address to a InetSocketAddress.
uint16_t GetPort() const
Get the port.
void SetIpv6(Ipv6Address ipv6)
Set the IPv6 address.
static bool IsMatchingType(const Address &addr)
If the address match.
Ipv6Address GetIpv6() const
Get the IPv6 address.
Address ConvertTo() const
Convert to Address.
Ipv6Address m_ipv6
The IPv6 address.
Describes an IPv6 address.
Definition: ipv6-address.h:49
uint16_t port
Definition: dsdv-manet.cc:44
Every class exported by the ns3 library is enclosed in the ns3 namespace.