#include <in_sock.h>
class TLinkAddr : public TSockAddr |
Public Member Functions | |
---|---|
TLinkAddr() | |
IMPORT_C TPtrC8 | Address() |
IMPORT_C static const TLinkAddr & | Cast(const TSockAddr &) |
IMPORT_C TLinkAddr & | Cast(TSockAddr &) |
IMPORT_C static const TLinkAddr * | Cast(const TSockAddr *) |
IMPORT_C TLinkAddr * | Cast(TSockAddr *) |
IMPORT_C void | SetAddress(const TDesC8 &) |
Inherited Attributes | |
---|---|
TBuf8< KMaxSockAddrSize >::iBuf | |
TDes8::__DECLARE_TEST | |
TDes8::iMaxLength |
Link layer address utility.
Lightweight helper class for handling link layer addresses.
This class is mainly used to obtain direct access to the raw address bytes which are inacessible from the TSockAddr interface.
A link layer address is a binary string of octets.
The address family of the TLinkAddr is determined by the interface. If the interface uses link layer addresses, it must support the KSoIfHardwareAddr control option, and the returned address family of the harware address is supposed to represent the family of all link layer addresses of peers on the interface.
Link layer addresses can be obtained from e.g. TSoInetRouteInfo structures using the TSoInetRouteInfo::GetLinkAddr function. Note: this may fail if the link layer address of the peer corresponding to the route is not known.
IMPORT_C TPtrC8 | Address | ( | ) | const |
Returns the current stored address as a pointer to string of octets.
Returns: The link layer address.
This function will cast the address to a TLinkAddr. This function has no way of verifying that the source address is actually a link layer address and should not be passed an IP address.
Returns: link layer cast of passed parameter
IMPORT_C void | SetAddress | ( | const TDesC8 & | aAddr | ) |
Assigns a string of octets as the address.
Parameter | Description |
---|---|
aAddr | The link layer address. |