-adding a few more packed statments
authorChristian Grothoff <christian@grothoff.org>
Mon, 30 Jan 2012 12:31:32 +0000 (12:31 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 30 Jan 2012 12:31:32 +0000 (12:31 +0000)
src/include/gnunet_tun_lib.h

index 2a66b67e79126f01d2aff534a263aa77d6d7aa14..61eb8638919c5ce7dc6bcd76c3add9e09807126b 100644 (file)
@@ -56,12 +56,12 @@ struct GNUNET_TUN_Layer2PacketHeader
   /**
    * Some flags (unused).
    */ 
-  uint16_t flags;
+  uint16_t flags GNUNET_PACKED;
 
   /**
    * Here we get an ETH_P_-number.
    */
-  uint16_t proto;
+  uint16_t proto GNUNET_PACKED;
 };
 
 
@@ -179,35 +179,35 @@ struct GNUNET_TUN_DnsHeader
 struct GNUNET_TUN_IcmpHeader {
   uint8_t type;                
   uint8_t code;                 
-  uint16_t crc;
+  uint16_t crc GNUNET_PACKED;
 
   union {
     /**
      * ICMP Echo (request/reply) 
      */
     struct {
-      uint16_t identifier;
-      uint16_t sequence_number;
+      uint16_t identifier GNUNET_PACKED;
+      uint16_t sequence_number GNUNET_PACKED;
     } echo;
 
     /**
      * ICMP Destination Unreachable (RFC 1191) 
      */
     struct ih_pmtu {
-      uint16_t empty;
-      uint16_t next_hop_mtu;
+      uint16_t empty GNUNET_PACKED;
+      uint16_t next_hop_mtu GNUNET_PACKED;
       /* followed by original IP header + first 8 bytes of original IP datagram */
     } destination_unreachable;
 
     /**
      * ICMP Redirect 
      */        
-    struct in_addr redirect_gateway_address;   
+    struct in_addr redirect_gateway_address GNUNET_PACKED;     
 
     /**
      * MTU for packets that are too big (IPv6).
      */
-    uint32_t packet_too_big_mtu;
+    uint32_t packet_too_big_mtu GNUNET_PACKED;
 
   } quench;