netdev
[Top] [All Lists]

how do I get link layer addresses from user-space?

To: netdev@xxxxxxxxxxx
Subject: how do I get link layer addresses from user-space?
From: Fernando Anton <fernando.anton@xxxxxxxx>
Date: Sun, 03 Mar 2002 14:34:31 +0100
Sender: owner-netdev@xxxxxxxxxxx
Hi all,

I want to ask you a simple question that I don't get answered by myself: how can I get a network address resolver to a link-layer address by the kernel ?

In other words...

I have an user-space application which receives IPv4 and IPv6 packets to be routed, and I must tell what will be the next hop.
Once I have the next hop (its IPv4 or IPv6 address) I will send it over a raw link-layer socket to the destination.. but I need to know its link-layer address to do it and.. I do not know how to get it.
I've seen iproute2 sources and walked a little through ipneigh.c sources, but I have only found ways to set an ARP entry inside the kernel and to get the current ARP cache, but..


how do I trigger an ARP resolution in the kernel from userspace ?

Thanks in advance



Un saludo:
Fernando Anton Alonso aka Mitra / Spanish Lords


<Prev in Thread] Current Thread [Next in Thread>