gPTP Documentation
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LinuxNetworkInterface Class Reference

#include <linux_hal_common.hpp>

Inheritance diagram for LinuxNetworkInterface:
Inheritance graph
Collaboration diagram for LinuxNetworkInterface:
Collaboration graph

Public Member Functions

virtual net_result send (LinkLayerAddress *addr, uint8_t *payload, size_t length, bool timestamp)
 Sends a packet to a remote address. More...
 
virtual net_result nrecv (LinkLayerAddress *addr, uint8_t *payload, size_t &length)
 Receives a packet from a remote address. More...
 
void disable_clear_rx_queue ()
 Disables rx socket descriptor and and clears the rx queue. More...
 
void reenable_rx_queue ()
 Enables the rx socket descriptor. More...
 
virtual void getLinkLayerAddress (LinkLayerAddress *addr)
 Gets the local link layer address. More...
 
virtual unsigned getPayloadOffset ()
 Gets the payload offset. More...
 
 ~LinuxNetworkInterface ()
 
- Public Member Functions inherited from OSNetworkInterface
virtual ~OSNetworkInterface ()=0
 

Protected Member Functions

 LinuxNetworkInterface ()
 

Friends

class LinuxNetworkInterfaceFactory
 

Detailed Description

Provides a Linux network generic interface

Constructor & Destructor Documentation

LinuxNetworkInterface::~LinuxNetworkInterface ( )

Destroys the network interface

LinuxNetworkInterface::LinuxNetworkInterface ( )
inlineprotected

Default constructor

Member Function Documentation

void LinuxNetworkInterface::disable_clear_rx_queue ( )

Disables rx socket descriptor and and clears the rx queue.

Returns
void
virtual void LinuxNetworkInterface::getLinkLayerAddress ( LinkLayerAddress addr)
inlinevirtual

Gets the local link layer address.

Parameters
addr[out] Pointer to the LinkLayerAddress object
Returns
void

Implements OSNetworkInterface.

virtual unsigned LinuxNetworkInterface::getPayloadOffset ( )
inlinevirtual

Gets the payload offset.

Returns
payload offset

Implements OSNetworkInterface.

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

Receives a packet from a remote address.

Parameters
addr[in] Remote link layer address
payload[out] Data buffer
length[out] Size of received data buffer
Returns
net_succeed in case of successful reception, net_trfail in case there is an error on the transmit side, net_fatal if error on reception

Implements OSNetworkInterface.

void LinuxNetworkInterface::reenable_rx_queue ( )

Enables the rx socket descriptor.

Returns
void
virtual net_result LinuxNetworkInterface::send ( LinkLayerAddress addr,
uint8_t *  payload,
size_t  length,
bool  timestamp 
)
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.
Returns
net_fatal if error, net_success if success

Implements OSNetworkInterface.


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