Logo Search packages:      
Sourcecode: dcbd version File versions  Download package

< Ethernet > Protocol Reference


Detailed Description

l2_packet_init - Initialize l2_packet interface : Interface name : Optional own MAC address if available from driver interface or NULL if not available in host byte order : Callback function that will be called for each received packet : Callback data (ctx) for calls to rx_callback() : 1 = include layer 2 header, 0 = do not include header Returns: Pointer to internal data or NULL on failure

rx_callback function will be called with ifindex pointing to the ifindex of the receive interface. If l2_hdr is set to 0, buf points to len bytes of the payload after the layer 2 header and similarly, TX buffers start with payload. This behavior can be changed by setting l2_hdr=1 to include the layer 2 header in the data buffer.


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

Generated by  Doxygen 1.6.0   Back to index