summaryrefslogtreecommitdiff
path: root/networking/udhcp/arpping.h
diff options
context:
space:
mode:
authorMike Frysinger2006-05-08 03:20:50 +0000
committerMike Frysinger2006-05-08 03:20:50 +0000
commit7031f62d9b750568b5e98bdb8c59c3c1a72e073d (patch)
treeb8d037a539281e7f7592e3045fa59e445495f603 /networking/udhcp/arpping.h
parent15fe2e11d7886d04450cabc8b40f0d396b6b6d85 (diff)
downloadbusybox-7031f62d9b750568b5e98bdb8c59c3c1a72e073d.zip
busybox-7031f62d9b750568b5e98bdb8c59c3c1a72e073d.tar.gz
add back in udhcp support
Diffstat (limited to 'networking/udhcp/arpping.h')
-rw-r--r--networking/udhcp/arpping.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/networking/udhcp/arpping.h b/networking/udhcp/arpping.h
new file mode 100644
index 0000000..30959ca
--- /dev/null
+++ b/networking/udhcp/arpping.h
@@ -0,0 +1,35 @@
+/*
+ * arpping .h
+ */
+
+#ifndef ARPPING_H
+#define ARPPING_H
+
+#include <netinet/if_ether.h>
+#include <net/if_arp.h>
+#include <net/if.h>
+#include <netinet/in.h>
+
+struct arpMsg {
+ /* Ethernet header */
+ u_char h_dest[6]; /* destination ether addr */
+ u_char h_source[6]; /* source ether addr */
+ u_short h_proto; /* packet type ID field */
+
+ /* ARP packet */
+ uint16_t htype; /* hardware type (must be ARPHRD_ETHER) */
+ uint16_t ptype; /* protocol type (must be ETH_P_IP) */
+ uint8_t hlen; /* hardware address length (must be 6) */
+ uint8_t plen; /* protocol address length (must be 4) */
+ uint16_t operation; /* ARP opcode */
+ uint8_t sHaddr[6]; /* sender's hardware address */
+ uint8_t sInaddr[4]; /* sender's IP address */
+ uint8_t tHaddr[6]; /* target's hardware address */
+ uint8_t tInaddr[4]; /* target's IP address */
+ uint8_t pad[18]; /* pad for min. Ethernet payload (60 bytes) */
+} ATTRIBUTE_PACKED;
+
+/* function prototypes */
+int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *arp, char *interface);
+
+#endif