This is a low-level network debugging utility that utilizes raw packet i/o to construct and deconstruct tcp, udp, ipv4, arp, and icmp packets over ethernet.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
etherealflaim
Date:
Tue Oct 12 05:54:52 2010 +0000
Parent:
0:d494b853ce97
Child:
2:e8e09adc41fc
Commit message:
Added some documentation

Changed in this revision

net/arp.h Show annotated file Show diff for this revision Revisions of this file
--- a/net/arp.h	Tue Oct 12 05:32:59 2010 +0000
+++ b/net/arp.h	Tue Oct 12 05:54:52 2010 +0000
@@ -3,18 +3,23 @@
 
 #include "net.h"
 
+/// \file ARP packet
+
+/// Ethertype Constant for ARP
 #define ETHERTYPE_ARP 0x0806
+
+/// ARP Packet
 typedef struct {
-  u16 hardware_type; // 0x0001 for ethernet
-  u16 protocol_type; // 0x0800 for IPv4
-  u8  hardware_length; // Bytes.  Ethernet is 6
-  u8  protocol_length; // Bytes.  IPv4 is 4
-  u16 operation; // Operation.  1 for request, 2 for reply or announce
+  u16 hardware_type; ///< 0x0001 for ethernet
+  u16 protocol_type; ///< 0x0800 for IPv4
+  u8  hardware_length; ///< Bytes.  Ethernet is 6
+  u8  protocol_length; ///< Bytes.  IPv4 is 4
+  u16 operation; ///< Operation.  1 for request, 2 for reply or announce
   // The following are only valid for IPv4 over Ethernet
-  u8  sender_hardware_address[6]; // Generator of the request or reply
-  u8  sender_protocol_address[4]; // All zeroes for an ARP probe
-  u8  target_hardware_address[6]; // Announce - same as SHA
-  u8  target_protocol_address[4]; // Announce - Same as TPA
+  u8  sender_hardware_address[6]; ///< Generator of the request or reply
+  u8  sender_protocol_address[4]; ///< All zeroes for an ARP probe
+  u8  target_hardware_address[6]; ///< Announce - same as SHA
+  u8  target_protocol_address[4]; ///< Announce - Same as TPA
 } ARP_Packet;
 
 inline void fix_endian_arp(ARP_Packet *packet)