]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/blobdiff - src/include/ipv4/lwip/ip.h
Removed all structure packing directives. Protocol header fields are naturally aligne...
[pes-rpp/rpp-lwip.git] / src / include / ipv4 / lwip / ip.h
index c8b9c22248ef74bd48f06ceba661e9b776cbe15b..58eab8abeb6fd77bb5d0897e7fa500e2ae838305 100644 (file)
@@ -94,37 +94,27 @@ err_t ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
 #define        SOF_OOBINLINE   (u16_t)0x0100U          /* leave received OOB data in line */
 #define        SOF_REUSEPORT   (u16_t)0x0200U          /* allow local address & port reuse */
 
-
-
-#ifdef PACK_STRUCT_USE_INCLUDES
-#  include "arch/bpstruct.h"
-#endif
-PACK_STRUCT_BEGIN
 struct ip_hdr {
   /* version / header length / type of service */
-  PACK_STRUCT_FIELD(u16_t _v_hl_tos);
+  u16_t _v_hl_tos;
   /* total length */
-  PACK_STRUCT_FIELD(u16_t _len);
+  u16_t _len;
   /* identification */
-  PACK_STRUCT_FIELD(u16_t _id);
+  u16_t _id;
   /* fragment offset field */
-  PACK_STRUCT_FIELD(u16_t _offset);
+  u16_t _offset;
 #define IP_RF 0x8000        /* reserved fragment flag */
 #define IP_DF 0x4000        /* dont fragment flag */
 #define IP_MF 0x2000        /* more fragments flag */
 #define IP_OFFMASK 0x1fff   /* mask for fragmenting bits */
   /* time to live / protocol*/
-  PACK_STRUCT_FIELD(u16_t _ttl_proto);
+  u16_t _ttl_proto;
   /* checksum */
-  PACK_STRUCT_FIELD(u16_t _chksum);
+  u16_t _chksum;
   /* source and destination IP addresses */
-  PACK_STRUCT_FIELD(struct ip_addr src);
-  PACK_STRUCT_FIELD(struct ip_addr dest); 
-} PACK_STRUCT_STRUCT;
-PACK_STRUCT_END
-#ifdef PACK_STRUCT_USE_INCLUDES
-#  include "arch/epstruct.h"
-#endif
+  struct ip_addr src;
+  struct ip_addr dest; 
+};
 
 #define IPH_V(hdr)  (ntohs((hdr)->_v_hl_tos) >> 12)
 #define IPH_HL(hdr) ((ntohs((hdr)->_v_hl_tos) >> 8) & 0x0f)