ns3::UdpSocket Class Reference
[Socket]
(abstract) base class of all UdpSockets
More...
#include <udp-socket.h>
List of all members.
Detailed Description
(abstract) base class of all UdpSockets
This class exists solely for hosting UdpSocket attributes that can be reused across different implementations, and for declaring UDP-specific multicast API.
Member Function Documentation
static TypeId ns3::UdpSocket::GetTypeId |
( |
void |
|
) |
[static] |
This method returns the TypeId associated to ns3::UdpSocket.
Attributes defined for this type:
-
RcvBufSize: UdpSocket maximum receive buffer size (bytes)
-
IpTtl: socket-specific TTL for unicast IP packets (if non-zero)
-
IpMulticastTtl: socket-specific TTL for multicast IP packets (if non-zero)
-
IpMulticastIf: interface index for outgoing multicast on this socket; -1 indicates to use default interface
-
Set with class: ns3::IntegerValue
-
Underlying type: int32_t -2147483648:2147483647
-
Initial value: -1
-
Flags: construct write read
-
IpMulticastLoop: whether outgoing multicast sent also to loopback interface
-
Set with class: BooleanValue
-
Underlying type: bool
-
Initial value: false
-
Flags: construct write read
-
MtuDiscover: If enabled, every outgoing ip packet will have the DF flag set.
-
Set with class: BooleanValue
-
Underlying type: bool
-
Initial value: false
-
Flags: construct write read
No TraceSources defined for this type.
Reimplemented from ns3::Object.
Reimplemented in ns3::UdpSocketImpl.
virtual int ns3::UdpSocket::MulticastJoinGroup |
( |
uint32_t |
interface, |
|
|
const Address & |
groupAddress | |
|
) |
| | [pure virtual] |
Corresponds to socket option MCAST_JOIN_GROUP.
- Parameters:
-
| interface | interface number, or 0 |
| groupAddress | multicast group address |
- Returns:
- on success, zero is returned. On error, -1 is returned, and errno is set appropriately
Enable reception of multicast datagrams for this socket on the interface number specified. If zero is specified as the interface, then a single local interface is chosen by system. In the future, this function will generate trigger IGMP joins as necessary when IGMP is implemented, but for now, this just enables multicast datagram reception in the system if not already enabled for this interface/groupAddress combination.
- Attention:
- IGMP is not yet implemented in ns-3
This function may be called repeatedly on a given socket but each join must be for a different multicast address, or for the same multicast address but on a different interface from previous joins. This enables host multihoming, and the ability to join the same group on different interfaces.
Implemented in ns3::UdpSocketImpl.
virtual int ns3::UdpSocket::MulticastLeaveGroup |
( |
uint32_t |
interface, |
|
|
const Address & |
groupAddress | |
|
) |
| | [pure virtual] |
Corresponds to socket option MCAST_LEAVE_GROUP.
- Parameters:
-
| interface | interface number, or 0 |
| groupAddress | multicast group address |
- Returns:
- on success, zero is returned. On error, -1 is returned, and errno is set appropriately
Disable reception of multicast datagrams for this socket on the interface number specified. If zero is specified as the interfaceIndex, then a single local interface is chosen by system. In the future, this function will generate trigger IGMP leaves as necessary when IGMP is implemented, but for now, this just disables multicast datagram reception in the system if this socket is the last for this interface/groupAddress combination.
- Attention:
- IGMP is not yet implemented in ns-3
Implemented in ns3::UdpSocketImpl.
The documentation for this class was generated from the following files:
- src/node/udp-socket.h
- doc/introspected-doxygen.h