gPTP Documentation
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OSNetworkInterface Class Referenceabstract

#include <avbts_osnet.hpp>

Inheritance diagram for OSNetworkInterface:
Inheritance graph
Collaboration diagram for OSNetworkInterface:
Collaboration graph

Public Member Functions

virtual net_result send (LinkLayerAddress *addr, uint8_t *payload, size_t length, bool timestamp)=0
 Sends a packet to a remote address. More...
 
virtual net_result nrecv (LinkLayerAddress *addr, uint8_t *payload, size_t &length)=0
 Receives data. More...
 
virtual void getLinkLayerAddress (LinkLayerAddress *addr)=0
 Get Link Layer address (mac address) More...
 
virtual unsigned getPayloadOffset ()=0
 Provides generic method for getting the payload offset.
 
virtual ~OSNetworkInterface ()=0
 

Detailed Description

Provides a generic network interface

Constructor & Destructor Documentation

OSNetworkInterface::~OSNetworkInterface ( )
inlinepure virtual

Native support for polimorphic destruction

Member Function Documentation

virtual void OSNetworkInterface::getLinkLayerAddress ( LinkLayerAddress addr)
pure virtual

Get Link Layer address (mac address)

Parameters
addr[out] Link Layer address
Returns
void

Implemented in LinuxNetworkInterface, and WindowsPCAPNetworkInterface.

virtual net_result OSNetworkInterface::nrecv ( LinkLayerAddress addr,
uint8_t *  payload,
size_t &  length 
)
pure virtual

Receives data.

Parameters
addr[out] Destination Mac Address
payload[out] Payload received
length[out] Received length
Returns
net_result enumeration

Implemented in LinuxNetworkInterface, and WindowsPCAPNetworkInterface.

virtual net_result OSNetworkInterface::send ( LinkLayerAddress addr,
uint8_t *  payload,
size_t  length,
bool  timestamp 
)
pure virtual

Sends a packet to a remote address.

Parameters
addr[in] Remote link layer address
payload[in] Data buffer
lengthSize of data buffer
timestampTRUE if to use the event socket with the PTP multicast address. FALSE if to use a general socket.

Implemented in LinuxNetworkInterface, and WindowsPCAPNetworkInterface.


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