Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

send_arp(8) [debian man page]

SEND_ARP(8)						      System Manager's Manual						       SEND_ARP(8)

NAME
send_arp - Send out one ARP packet with source/target IP and Ethernet hardware addresses suuplied by the user. SYNOPSIS
send_arp sndr_ip_addr sndr_hw_addr targ_ip_addr targ_hw_addr [src_int [src_hw_addr [dest_hw_addr]]] DESCRIPTION
send_arp This program sends out one ARP packet with source/target IP and Ethernet hardware addresses suuplied by the user. It compiles and works on Linux and will probably work on any Unix that has SOCK_PACKET. The idea behind this program is a proof of a concept, nothing more. It comes as is, no warranty. However, you're allowed to use it under one condition: you must use your brain simultaneously. If this condition is not met, you shall forget about this program and go RTFM imme- diately. OPTIONS
sndr_ip_addr Sender IP address for ARP packet. sndr_hw_addr Sender Hardware address for ARP packet. targ_ip_addr Target IP address for ARP packet. targ_hw_addr Target Hardware address for ARP packet. src_int Source Interface for ARP packet. src_hw_addr Source layer2 Hardware address for ARP packet. dest_hw_addr Destination layer2 Hardware address for ARP packet. AUTHORS
send_arp - Yuri Volobuev <volobuev@t1.chem.umn.edu> man page - Horms <horms@verge.net.au> layer2 patch - Patrick Koppen <patrick@koppen.de> 30th October 2003 SEND_ARP(8)

Check Out this Related Man Page

arp(4p) 																   arp(4p)

Name
       arp - Address Resolution Protocol

Syntax
       pseudo-device ether

Description
       The  ARP  protocol  is used to map dynamically between DARPA Internet and 10Mb/s Ethernet addresses.  It is used by all the 10Mb/s Ethernet
       interface drivers.

       The ARP protocol caches Internet-Ethernet address mappings.  When an interface requests a mapping for an address  not  in  the  cache,  ARP
       queues  the  message  which  requires  the mapping and broadcasts a message on the associated network requesting the address mapping.  If a
       response is provided, the new mapping is cached and any pending messages are transmitted.  The ARP protocol queues only the  most  recently
       ``transmitted'' packet while waiting for a mapping request to be responded to.

       To  enable  communications  with  systems which do not use ARP, ioctls are provided to enter and delete entries in the Internet-to-Ethernet
       tables.	The usage is:
       #include <sys/ioctl.h>
       #include <sys/socket.h>
       #include <net/if.h>
       struct arpreq arpreq;

       ioctl(s, SIOCSARP, (caddr_t)&arpreq);
       ioctl(s, SIOCGARP, (caddr_t)&arpreq);
       ioctl(s, SIOCDARP, (caddr_t)&arpreq);

       Each ioctl takes the same structure as an argument.  SIOCSARP sets an ARP entry, SIOCGARP gets an ARP entry, and SIOCDARP  deletes  an  ARP
       entry.  These ioctls may be applied to any socket descriptor s, but only by the superuser.  The arpreq structure contains:
       /*
	* ARP ioctl request
	*/
       struct arpreq {
	   struct sockaddr   arp_pa;	 /* protocol address */
	   struct sockaddr   arp_ha;	 /* hardware address */
	   int		     arp_flags;  /* flags */
       };
       /*  arp_flags field values */
       #define ATF_COM	2   /* completed entry (arp_ha valid) */
       #define	 ATF_PERM 4   /* permanent entry */
       #define	 ATF_PUBL 8   /* publish (respond for other host) */

       The  address family for the arp_pa sockaddr must be AF_INET; for the arp_ha sockaddr, it must be AF_UNSPEC.  The only flag bits that can be
       written are ATF_PERM and ATF_PUBL.  ATF_PERM causes the entry to be permanent if the ioctl call succeeds.  The ioctl may fail if more  than
       four  permanent Internet host addresses hash to the same slot.  ATF_PUBL specifies that the ARP code should respond to ARP requests for the
       indicated host coming from other machines.  This lets a SUN act as an ARP server, which can be used to make an ARP-only machine talk  to  a
       non-ARP machine.

       The ARP protocol watches passively for a host that responds to an ARP mapping request for the local host's address.

Restrictions
       ARP  packets  on the Ethernet use only 42 bytes of data.  The smallest legal Ethernet packet is 60 bytes, however, not including CRC.  Some
       systems may not enforce the minimum packet size.

Diagnostics
       duplicate IP address!! sent from Ethernet address: %x:%x:%x:%x:%x:%x
       ARP has discovered another host on the local network that responds to mapping requests for its own Internet address.

See Also
       inet(4f), arp(8c), ifconfig(8c)

																	   arp(4p)
Man Page