nidas v1.2.3
Public Member Functions | Private Attributes | List of all members
nidas::util::Inet4PacketInfo Class Reference

Ancillary information that can be determined about an incoming UDP packet. More...

#include <Inet4PacketInfo.h>

Inheritance diagram for nidas::util::Inet4PacketInfo:
Inheritance graph
[legend]

Public Member Functions

 Inet4PacketInfo ()
 
virtual ~Inet4PacketInfo ()
 
virtual Inet4Address getLocalAddress () const
 The local address of the packet.
 
virtual void setLocalAddress (const Inet4Address &val)
 
virtual const Inet4AddressgetDestinationAddress () const
 The destination address of the packet.
 
virtual void setDestinationAddress (const Inet4Address &val)
 
virtual const Inet4NetworkInterfacegetInterface () const
 The interface that the packet was received on.
 
virtual void setInterface (const Inet4NetworkInterface &val)
 
virtual int getFlags () const
 The flags on the received packet.
 
virtual void setFlags (int val)
 

Private Attributes

Inet4Address _localaddr
 
Inet4Address _destaddr
 
Inet4NetworkInterface _iface
 
int _flags
 

Detailed Description

Ancillary information that can be determined about an incoming UDP packet.

Do "man 7 ip" for information.

Constructor & Destructor Documentation

◆ Inet4PacketInfo()

nidas::util::Inet4PacketInfo::Inet4PacketInfo ( )
inline

◆ ~Inet4PacketInfo()

virtual nidas::util::Inet4PacketInfo::~Inet4PacketInfo ( )
inlinevirtual

Member Function Documentation

◆ getDestinationAddress()

virtual const Inet4Address & nidas::util::Inet4PacketInfo::getDestinationAddress ( ) const
inlinevirtual

The destination address of the packet.

For a received unicast packet it will be the address of the local interface. Or the destination address could be a multicast address or a broadcast address.

References _destaddr.

Referenced by nidas::util::SocketImpl::receive().

◆ getFlags()

virtual int nidas::util::Inet4PacketInfo::getFlags ( ) const
inlinevirtual

The flags on the received packet.

See "man 7 ip". It can contain several flags: MSG_EOR, MSG_TRUNC, MSG_CTRUNC, MSG_OOB, MSG_ERRQUEUE.

References _flags.

◆ getInterface()

virtual const Inet4NetworkInterface & nidas::util::Inet4PacketInfo::getInterface ( ) const
inlinevirtual

The interface that the packet was received on.

References _iface.

Referenced by nidas::util::SocketImpl::receive().

◆ getLocalAddress()

virtual Inet4Address nidas::util::Inet4PacketInfo::getLocalAddress ( ) const
inlinevirtual

The local address of the packet.

For a received packet, it is the address of the local interface that the packet was received on.

References _localaddr.

Referenced by nidas::util::SocketImpl::receive().

◆ setDestinationAddress()

virtual void nidas::util::Inet4PacketInfo::setDestinationAddress ( const Inet4Address & val)
inlinevirtual

References _destaddr.

Referenced by nidas::util::SocketImpl::receive().

◆ setFlags()

virtual void nidas::util::Inet4PacketInfo::setFlags ( int val)
inlinevirtual

References _flags.

◆ setInterface()

virtual void nidas::util::Inet4PacketInfo::setInterface ( const Inet4NetworkInterface & val)
inlinevirtual

References _iface.

Referenced by nidas::util::SocketImpl::receive().

◆ setLocalAddress()

virtual void nidas::util::Inet4PacketInfo::setLocalAddress ( const Inet4Address & val)
inlinevirtual

References _localaddr.

Referenced by nidas::util::SocketImpl::receive().

Member Data Documentation

◆ _destaddr

Inet4Address nidas::util::Inet4PacketInfo::_destaddr
private

◆ _flags

int nidas::util::Inet4PacketInfo::_flags
private

Referenced by getFlags(), and setFlags().

◆ _iface

Inet4NetworkInterface nidas::util::Inet4PacketInfo::_iface
private

Referenced by getInterface(), and setInterface().

◆ _localaddr

Inet4Address nidas::util::Inet4PacketInfo::_localaddr
private

Referenced by getLocalAddress(), and setLocalAddress().


The documentation for this class was generated from the following file: