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

Revision:
2:e8e09adc41fc
Parent:
0:d494b853ce97
Child:
4:88fc7fa58931
diff -r 63d4ff534d65 -r e8e09adc41fc net/udp.h
--- a/net/udp.h	Tue Oct 12 05:54:52 2010 +0000
+++ b/net/udp.h	Tue Oct 12 06:10:41 2010 +0000
@@ -3,7 +3,11 @@
 
 #include "net.h"
 
+/// \file UDP packet
+
 #define IPPROTO_UDP 0x11
+
+/// UDP Packet memory map
 typedef struct {
   u16 source_port;
   u16 destination_port;
@@ -12,6 +16,7 @@
   u8 data[];
 } UDP_Packet;
 
+/// Convert from wire to host or host to wire endianness
 inline void fix_endian_udp(UDP_Packet *segment)
 {
   fix_endian_u16(&segment->source_port);
@@ -19,6 +24,7 @@
   fix_endian_u16(&segment->length);
 }
 
+/// Print the UDP packet
 inline void print_udp(UDP_Packet *segment)
 {
   main_log.printf("UDP Packet:");