yes this can be done with a PF_PACKET socket. You have a choice of
SOCK_RAW (with datalink headers) or SOCK_DGRAM (a slightly more cooked
mode of operation). Probably you would do something like:
s = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ARP));
You can restrict this to a single device with bind() too if you want to.
man 4 packet has more information,
Steve.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/