![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
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.
Diff: net/arp.h
- Revision:
- 2:e8e09adc41fc
- Parent:
- 1:63d4ff534d65
- Child:
- 3:c32d9660b888
diff -r 63d4ff534d65 -r e8e09adc41fc net/arp.h --- a/net/arp.h Tue Oct 12 05:54:52 2010 +0000 +++ b/net/arp.h Tue Oct 12 06:10:41 2010 +0000 @@ -5,7 +5,6 @@ /// \file ARP packet -/// Ethertype Constant for ARP #define ETHERTYPE_ARP 0x0806 /// ARP Packet @@ -22,6 +21,7 @@ u8 target_protocol_address[4]; ///< Announce - Same as TPA } ARP_Packet; +/// Convert from wire to host or host to wire endianness inline void fix_endian_arp(ARP_Packet *packet) { fix_endian_u16(&packet->hardware_type); @@ -29,6 +29,7 @@ fix_endian_u16(&packet->operation); } +/// Print the ARP packet inline void print_arp(ARP_Packet *packet) { main_log.printf("ARP Packet:");