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

#include <windows_hal.hpp>

Inheritance diagram for WindowsPCAPNetworkInterface:
Inheritance graph
Collaboration diagram for WindowsPCAPNetworkInterface:
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...
 
virtual void getLinkLayerAddress (LinkLayerAddress *addr)
 Gets the link layer address (MAC) of the network adapter. More...
 
virtual unsigned getPayloadOffset ()
 Gets the offset to the start of data in the Layer 2 Frame. More...
 
virtual ~WindowsPCAPNetworkInterface ()
 
- Public Member Functions inherited from OSNetworkInterface
virtual ~OSNetworkInterface ()=0
 

Protected Member Functions

 WindowsPCAPNetworkInterface ()
 

Friends

class WindowsPCAPNetworkInterfaceFactory
 

Detailed Description

WindowsPCAPNetworkInterface implements an interface to the network adapter through calls to the publicly available libraries known as PCap.

Constructor & Destructor Documentation

virtual WindowsPCAPNetworkInterface::~WindowsPCAPNetworkInterface ( )
inlinevirtual

Destroys the network interface

WindowsPCAPNetworkInterface::WindowsPCAPNetworkInterface ( )
inlineprotected

Default constructor

Member Function Documentation

virtual void WindowsPCAPNetworkInterface::getLinkLayerAddress ( LinkLayerAddress addr)
inlinevirtual

Gets the link layer address (MAC) of the network adapter.

Parameters
addr[out] Link layer address
Returns
void

Implements OSNetworkInterface.

virtual unsigned WindowsPCAPNetworkInterface::getPayloadOffset ( )
inlinevirtual

Gets the offset to the start of data in the Layer 2 Frame.

Returns
PACKET_HDR_LENGTH

Implements OSNetworkInterface.

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

Receives a packet from a remote address.

Parameters
addr[out] Remote link layer address
payload[out] Data buffer
length[out] Length of received data
Returns
net_result structure

Implements OSNetworkInterface.

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

Sends a packet to a remote address.

Parameters
addr[in] Destination link Layer address
payload[in] Data buffer
lengthSize of buffer
timestampTRUE: Use timestamp, FALSE otherwise
Returns
net_result structure

Implements OSNetworkInterface.


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