Includenetneighbourh

struct neighbour {

struct net_device *dev;

unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))];

int (*output)(struct sk_buff *skb);

While dev holds the network device data structure and ha the hardware address of the device, output is a pointer to the appropriate kernel function that must be invoked to transmit a packet via the network adapter. neighbour instances are created by the ARP layer of the kernel that implements the address resolution protocol — a protocol that translates IP addresses into hardware addresses. Because the dst_entry structure has a pointer to neighbour instances, the code of the network access layer can invoke the output function when a packet leaves the system via the network adapter.

Continue reading here: Extending Network Functionality

Was this article helpful?

0 0