arpping.h

Go to the documentation of this file.
00001 /*
00002  * arpping .h
00003  */
00004 
00005 #ifndef ARPPING_H
00006 #define ARPPING_H
00007 
00008 #include <netinet/if_ether.h>
00009 #include <net/if_arp.h>
00010 #include <net/if.h>
00011 #include <netinet/in.h>
00012 
00013 struct arpMsg {
00014         struct ethhdr ethhdr;                   /* Ethernet header */
00015         u_short htype;                          /* hardware type (must be ARPHRD_ETHER) */
00016         u_short ptype;                          /* protocol type (must be ETH_P_IP) */
00017         u_char  hlen;                           /* hardware address length (must be 6) */
00018         u_char  plen;                           /* protocol address length (must be 4) */
00019         u_short operation;                      /* ARP opcode */
00020         u_char  sHaddr[6];                      /* sender's hardware address */
00021         u_char  sInaddr[4];                     /* sender's IP address */
00022         u_char  tHaddr[6];                      /* target's hardware address */
00023         u_char  tInaddr[4];                     /* target's IP address */
00024         u_char  pad[18];                        /* pad for min. Ethernet payload (60 bytes) */
00025 };
00026 
00027 /* function prototypes */
00028 int arpping(u_int32_t yiaddr, u_int32_t ip, unsigned char *arp, char *interface);
00029 
00030 #endif

Generated on Tue Jan 15 12:24:45 2008 for Dynamics 0.8.1.Dynamo.1 by  doxygen 1.5.1