RealtimeCompLab2

Dependencies:   mbed

Fork of PPP-Blinky by Nicolas Nackel

Revision:
160:bd701ad564cb
Parent:
159:4d1bf96a59cd
Child:
161:d59f778bc8ab
--- a/PPP-Blinky/ppp-blinky.h	Sat Sep 02 07:48:53 2017 +0000
+++ b/PPP-Blinky/ppp-blinky.h	Sat Sep 02 17:35:29 2017 +0000
@@ -24,15 +24,19 @@
     unsigned int ect            :  1;  // ecn capable transport
     unsigned int ce             :  1;  // ecn-ce
     unsigned int dscp           :  6;  // differentiated services
-    unsigned int lengthR        : 16; // ip packet length (byte-reversed)
-    unsigned int fragmentOffset : 13;
-    unsigned int reservedIP     :  1;
-    unsigned int dontFragment   :  1;
+    unsigned int lengthR        : 16;  // ip packet length (byte-reversed)
+    
+    unsigned int identR         : 16;  // ident, byte reversed
+    unsigned int fragmentOffsHi :  5;
     unsigned int lastFragment   :  1;
-    unsigned int identR         : 16;
-    unsigned int checksum       : 16;
+    unsigned int dontFragment   :  1;
+    unsigned int reservedIP     :  1;
+    unsigned int fragmentOffsLo :  8;
+    
+    unsigned int ttl            :  8;
     unsigned int protocol       :  8;  // next protocol
-    unsigned int ttl            :  8;
+    unsigned int checksumR      : 16;
+    
     unsigned int srcAdrR; // source IP address
     unsigned int dstAdrR; // destination IP address
 } ipHeaderType;
@@ -40,8 +44,8 @@
 /// IP pseudoheader
 typedef struct {
     union {
-    unsigned char start [0];        
-    unsigned int srcAdrR; // source IP address
+        unsigned char start [0];
+        unsigned int srcAdrR; // source IP address
     };
     unsigned int dstAdrR; // destination IP address
     unsigned int zero     :  8;