# PIPSocket::InterfaceEntry Class Reference

Describe an interface table entry. More...

`#include <ipsock.h>`

Inheritance diagram for PIPSocket::InterfaceEntry:

List of all members.

## Public Member Functions

| InterfaceEntry ()
| Create an interface entry from a name, IP addr and MAC addr.
| InterfaceEntry (const PString &name, const Address &addr, const Address &mask, const PString &macAddr)
virtual void | PrintOn (ostream &strm) const
| Print to specified stream.
const PString & | GetName () const
| Get the name of the interface.
Address | GetAddress () const
| Get the address associated with the interface.
Address | GetNetMask () const
| Get the net mask associated with the interface.
const PString & | GetMACAddress () const
| Get the MAC address associate with the interface.

## Static Public Member Functions

static void | SanitiseName (PString &name)
| Sanitise a device name for use in PTLib.

## Protected Attributes

PString | m_name
Address | m_ipAddress
Address | m_netMask
PString | m_macAddress

## Detailed Description

Describe an interface table entry.

## Constructor & Destructor Documentation

PIPSocket::InterfaceEntry::InterfaceEntry | ( |  | ) |

Create an interface entry from a name, IP addr and MAC addr.

PIPSocket::InterfaceEntry::InterfaceEntry | ( | const PString & | name,
|  | const Address & | addr,
|  | const Address & | mask,
|  | const PString & | macAddr |
| ) |  |  |

## Member Function Documentation

Address PIPSocket::InterfaceEntry::GetAddress | ( |  | ) | const`[inline]`

Get the address associated with the interface.

const PString& PIPSocket::InterfaceEntry::GetMACAddress | ( |  | ) | const`[inline]`

Get the MAC address associate with the interface.

const PString& PIPSocket::InterfaceEntry::GetName | ( |  | ) | const`[inline]`

Get the name of the interface.

Note the name will havebeen sanitised of certain possible characters that can cause issues elsewhere in the system. Therefore, make sure that if you get a device name from some other source than the InterfaceEntry, the name is sanitised via PIPSocket::InterfaceEntry::SanitiseName() before comparing against the name returned here.

Address PIPSocket::InterfaceEntry::GetNetMask | ( |  | ) | const`[inline]`

Get the net mask associated with the interface.

virtual void PIPSocket::InterfaceEntry::PrintOn | ( | ostream & | strm | ) | const`[virtual]`

Print to specified stream.

Reimplemented from PObject.

static void PIPSocket::InterfaceEntry::SanitiseName | ( | PString & | name | ) | `[static]`

Sanitise a device name for use in PTLib.

## Member Data Documentation

Address PIPSocket::InterfaceEntry::m_ipAddress `[protected]`

PString PIPSocket::InterfaceEntry::m_macAddress `[protected]`

PString PIPSocket::InterfaceEntry::m_name `[protected]`

Address PIPSocket::InterfaceEntry::m_netMask `[protected]`

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

- ipsock.h