Public Member Functions | Static Public Member Functions | Private Member Functions

ns3::Mac48Address Class Reference
[Address]

an EUI-48 address More...

#include <mac48-address.h>

List of all members.

Public Member Functions

 Mac48Address (const char *str)
void CopyFrom (const uint8_t buffer[6])
void CopyTo (uint8_t buffer[6]) const
 operator Address () const
bool IsBroadcast (void) const
bool IsMulticast (void) const
bool IsGroup (void) const

Static Public Member Functions

static Mac48Address ConvertFrom (const Address &address)
static bool IsMatchingType (const Address &address)
static Mac48Address Allocate (void)
static Mac48Address GetBroadcast (void)
static Mac48Address GetMulticast (Ipv4Address address)
static Mac48Address GetMulticastPrefix (void)

Private Member Functions

Address ConvertTo (void) const

Detailed Description

an EUI-48 address

This class can contain 48 bit IEEE addresses.


Constructor & Destructor Documentation

ns3::Mac48Address::Mac48Address ( const char *  str  ) 
Parameters:
str a string representing the new Mac48Address

The format of the string is "xx:xx:xx:xx:xx:xx"


Member Function Documentation

static Mac48Address ns3::Mac48Address::Allocate ( void   )  [static]

Allocate a new Mac48Address.

static Mac48Address ns3::Mac48Address::ConvertFrom ( const Address address  )  [static]
Parameters:
address a polymorphic address
Returns:
a new Mac48Address from the polymorphic address

This function performs a type check and asserts if the type of the input address is not compatible with an Mac48Address.

Address ns3::Mac48Address::ConvertTo ( void   )  const [private]
Returns:
a new Address instance

Convert an instance of this class to a polymorphic Address instance.

void ns3::Mac48Address::CopyFrom ( const uint8_t  buffer[6]  ) 
Parameters:
buffer address in network order

Copy the input address to our internal buffer.

void ns3::Mac48Address::CopyTo ( uint8_t  buffer[6]  )  const
Parameters:
buffer address in network order

Copy the internal address to the input buffer.

static Mac48Address ns3::Mac48Address::GetBroadcast ( void   )  [static]
Returns:
the broadcast address
static Mac48Address ns3::Mac48Address::GetMulticast ( Ipv4Address  address  )  [static]
Returns:
a multicast address
static Mac48Address ns3::Mac48Address::GetMulticastPrefix ( void   )  [static]
Returns:
the multicast prefix (01:00:5e:00:00:00).
bool ns3::Mac48Address::IsBroadcast ( void   )  const
Returns:
true if this is a broadcast address, false otherwise.
bool ns3::Mac48Address::IsGroup ( void   )  const
Returns:
true if the group bit is set, false otherwise.
static bool ns3::Mac48Address::IsMatchingType ( const Address address  )  [static]
Returns:
true if the address matches, false otherwise.
bool ns3::Mac48Address::IsMulticast ( void   )  const
Returns:
true if this is a multicast address, false otherwise.
ns3::Mac48Address::operator Address (  )  const
Returns:
a new Address instance

Convert an instance of this class to a polymorphic Address instance.


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