Logo Search packages:      
Sourcecode: libnetfilter-queue version File versions  Download package

struct nfqnl_msg_packet_hw* nfq_get_packet_hw ( struct nfq_data nfad ) [read]

nfq_get_packet_hw

get hardware address

Parameters:
nfadNetlink packet data handle passed to callback function

Retrieves the hardware address associated with the given queued packet. For ethernet packets, the hardware address returned (if any) will be the MAC address of the packet source host. The destination MAC address is not known until after POSTROUTING and a successful ARP request, so cannot currently be retrieved.

The nfqnl_msg_packet_hw structure is defined in libnetfilter_queue.h as:

	struct nfqnl_msg_packet_hw {
		u_int16_t	hw_addrlen;
		u_int16_t	_pad;
		u_int8_t	hw_addr[8];
	} __attribute__ ((packed));

Definition at line 989 of file libnetfilter_queue.c.

{
      return nfnl_get_pointer_to_data(nfad->data, NFQA_HWADDR,
                              struct nfqnl_msg_packet_hw);
}

Generated by  Doxygen 1.6.0   Back to index