arp_create arguments

I am writing a Linux 2.6.10 device driver running on an MPC8248 processor and am having difficulty sending an ARP response to the kernel.

#1 sent an ARP request to #2. #2 responded back to #1 with it's hardware address. So, I have #1's IP & hardware address and #2's IP and hardware address. I am on #1 and am calling arp_create to get an sk_buff to send to the kernel using netif_rx.

The declaration for arp_create is:

struct sk_buff *arp_create(int type, int ptype, u32 dest_ip, struct net_device *dev, u32 src_ip, unsigned char *dest_hw, unsigned char *src_hw, unsigned char *target_hw)

I think I have the 1st (type), 2nd (ptype) , and 4th (dev) arguments correct:

arp_create(ARPOP_REPLY, ETH_P_ARP, dest, dev, src_ip, dest_hw, src_hw, target_hw)

Specifically:

Is "dest" #1's or #2's IP address? Is "src_ip" #1's or #2's IP address? Is "dest_hw" #1's or #2's hardware address? Is "src_hw" #1's or #2's hardware address? Is "target_hw" #1's or #2's hardware address?

Thank you.

Reply to
Bill
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.