class TLinkAddr : public TSockAddr |
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.
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 |
IMPORT_C TPtrC8 | Address | ( | ) | const |
Returns the current stored address as a pointer to string of octets.
IMPORT_C static const TLinkAddr & | Cast | ( | const TSockAddr & | aAddr | ) | [static] |
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.
const TSockAddr & aAddr |
IMPORT_C TLinkAddr & | Cast | ( | TSockAddr & | aAddr | ) | [static] |
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.
TSockAddr & aAddr |
IMPORT_C static const TLinkAddr * | Cast | ( | const TSockAddr * | aAddr | ) | [static] |
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.
const TSockAddr * aAddr |
IMPORT_C TLinkAddr * | Cast | ( | TSockAddr * | aAddr | ) | [static] |
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.
TSockAddr * aAddr |
IMPORT_C void | SetAddress | ( | const TDesC8 & | aAddr | ) |
Assigns a string of octets as the address.
const TDesC8 & aAddr | The link layer address. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.