A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
udp-socket.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2006 Georgia Tech Research Corporation
3
* 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
* Authors: George F. Riley<riley@ece.gatech.edu>
19
* Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20
*/
21
22
#ifndef UDP_SOCKET_H
23
#define UDP_SOCKET_H
24
25
#include "ns3/callback.h"
26
#include "ns3/object.h"
27
#include "ns3/ptr.h"
28
#include "ns3/socket.h"
29
#include "ns3/traced-callback.h"
30
31
namespace
ns3
32
{
33
34
class
Node;
35
class
Packet;
36
47
class
UdpSocket
:
public
Socket
48
{
49
public
:
55
static
TypeId
GetTypeId
();
56
57
UdpSocket
();
58
~UdpSocket
()
override
;
59
84
virtual
int
MulticastJoinGroup
(uint32_t interface,
const
Address
& groupAddress) = 0;
85
104
virtual
int
MulticastLeaveGroup
(uint32_t interface,
const
Address
& groupAddress) = 0;
105
106
private
:
107
// Indirect the attribute setting and getting through private virtual methods
112
virtual
void
SetRcvBufSize
(uint32_t size) = 0;
117
virtual
uint32_t
GetRcvBufSize
()
const
= 0;
122
virtual
void
SetIpMulticastTtl
(uint8_t ipTtl) = 0;
127
virtual
uint8_t
GetIpMulticastTtl
()
const
= 0;
132
virtual
void
SetIpMulticastIf
(int32_t ipIf) = 0;
137
virtual
int32_t
GetIpMulticastIf
()
const
= 0;
147
virtual
void
SetIpMulticastLoop
(
bool
loop) = 0;
157
virtual
bool
GetIpMulticastLoop
()
const
= 0;
163
virtual
void
SetMtuDiscover
(
bool
discover) = 0;
169
virtual
bool
GetMtuDiscover
()
const
= 0;
170
};
171
172
}
// namespace ns3
173
174
#endif
/* UDP_SOCKET_H */
ns3::Address
a polymophic address class
Definition:
address.h:101
ns3::Socket
A low-level Socket API based loosely on the BSD Socket API.
Definition:
socket.h:68
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::UdpSocket
(abstract) base class of all UdpSockets
Definition:
udp-socket.h:48
ns3::UdpSocket::UdpSocket
UdpSocket()
Definition:
udp-socket.cc:82
ns3::UdpSocket::~UdpSocket
~UdpSocket() override
Definition:
udp-socket.cc:87
ns3::UdpSocket::SetIpMulticastIf
virtual void SetIpMulticastIf(int32_t ipIf)=0
Set the IP multicast interface.
ns3::UdpSocket::MulticastLeaveGroup
virtual int MulticastLeaveGroup(uint32_t interface, const Address &groupAddress)=0
Corresponds to socket option MCAST_LEAVE_GROUP.
ns3::UdpSocket::MulticastJoinGroup
virtual int MulticastJoinGroup(uint32_t interface, const Address &groupAddress)=0
Corresponds to socket option MCAST_JOIN_GROUP.
ns3::UdpSocket::SetRcvBufSize
virtual void SetRcvBufSize(uint32_t size)=0
Set the receiving buffer size.
ns3::UdpSocket::GetMtuDiscover
virtual bool GetMtuDiscover() const =0
Get the MTU discover capability.
ns3::UdpSocket::GetIpMulticastIf
virtual int32_t GetIpMulticastIf() const =0
Get the IP multicast interface.
ns3::UdpSocket::GetIpMulticastTtl
virtual uint8_t GetIpMulticastTtl() const =0
Get the IP multicast TTL.
ns3::UdpSocket::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
udp-socket.cc:37
ns3::UdpSocket::SetIpMulticastLoop
virtual void SetIpMulticastLoop(bool loop)=0
Set the IP multicast loop capability.
ns3::UdpSocket::GetIpMulticastLoop
virtual bool GetIpMulticastLoop() const =0
Get the IP multicast loop capability.
ns3::UdpSocket::SetMtuDiscover
virtual void SetMtuDiscover(bool discover)=0
Set the MTU discover capability.
ns3::UdpSocket::SetIpMulticastTtl
virtual void SetIpMulticastTtl(uint8_t ipTtl)=0
Set the IP multicast TTL.
ns3::UdpSocket::GetRcvBufSize
virtual uint32_t GetRcvBufSize() const =0
Get the receiving buffer size.
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
model
udp-socket.h
Generated on Sun Mar 3 2024 17:10:59 for ns-3 by
1.9.1