|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
24 #ifndef NDN_NET_NETWORK_INTERFACE_HPP
25 #define NDN_NET_NETWORK_INTERFACE_HPP
142 return m_etherAddress;
150 return m_etherBrdAddress;
155 const std::set<NetworkAddress>&
158 return m_netAddresses;
166 return (m_flags & IFF_LOOPBACK) != 0;
174 return (m_flags & IFF_POINTOPOINT) != 0;
182 return (m_flags & IFF_BROADCAST) != 0;
190 return (m_flags & IFF_MULTICAST) != 0;
198 return (m_flags & IFF_UP) != 0;
244 std::set<NetworkAddress> m_netAddresses;
255 #endif // NDN_NET_NETWORK_INTERFACE_HPP
void setState(InterfaceState state)
int getIndex() const
Returns an opaque ID that uniquely identifies the interface on the system.
Represents one network interface attached to the host.
bool addNetworkAddress(const NetworkAddress &address)
void setEthernetAddress(const ethernet::Address &address)
bool removeNetworkAddress(const NetworkAddress &address)
InterfaceType getType() const
Returns the hardware type of the interface.
represents an Ethernet hardware address
@ UNKNOWN
interface is in an unknown state
@ NO_CARRIER
interface is administratively up but has no carrier
void setFlags(uint32_t flags)
Stores one IP address supported by a network interface.
provides a lightweight signal / event system
bool canMulticast() const
Returns true if the interface supports multicast communication.
void setMtu(uint32_t mtu)
util::Signal< NetworkInterface, InterfaceState, InterfaceState > onStateChanged
Fires when interface state changes.
uint32_t getFlags() const
Returns a bitset of platform-specific flags enabled on the interface.
bool canBroadcast() const
Returns true if the interface supports broadcast communication.
std::ostream & operator<<(std::ostream &os, AddressScope scope)
bool isUp() const
Returns true if the interface is administratively up.
InterfaceType
Indicates the hardware type of a network interface.
const std::set< NetworkAddress > & getNetworkAddresses() const
Returns a list of all network-layer addresses present on the interface.
util::Signal< NetworkInterface, NetworkAddress > onAddressRemoved
Fires when a network-layer address is removed from the interface.
ethernet::Address getEthernetAddress() const
Returns the link-layer (Ethernet) address of the interface.
bool isLoopback() const
Returns true if the interface is a loopback interface.
InterfaceState
Indicates the state of a network interface.
InterfaceState getState() const
Returns the current state of the interface.
uint32_t getMtu() const
Returns the MTU (maximum transmission unit) of the interface.
util::Signal< NetworkInterface, NetworkAddress > onAddressAdded
Fires when a network-layer address is added to the interface.
bool isPointToPoint() const
Returns true if the interface is a point-to-point interface.
void setType(InterfaceType type)
util::Signal< NetworkInterface, uint32_t, uint32_t > onMtuChanged
Fires when interface mtu changes.
std::string getName() const
Returns the name of the interface, unique on the system.
@ DORMANT
interface has a carrier but it cannot send or receive normal user traffic yet
@ DOWN
interface is administratively down
ethernet::Address getEthernetBroadcastAddress() const
Returns the link-layer (Ethernet) broadcast address of the interface.
void setEthernetBroadcastAddress(const ethernet::Address &address)
@ RUNNING
interface can be used to send and receive packets
Copyright (c) 2011-2015 Regents of the University of California.
void setName(const std::string &name)