Removed all structure packing directives. Protocol header fields are naturally aligned by design.

(Earlier, the 14-byte ethernet header screwed this up, this had already been fixed by adding two pad bytes.)
Assumption is that compilers do not align with larger-than-sizeof(type) boundaries.
Pre-tag PRE_PACK_REMOVE. Post-tag POST_TAG_REMOVE.
This commit is contained in:
likewise
2004-05-05 19:16:51 +00:00
parent 9dd10e46ab
commit 79110ba469
10 changed files with 78 additions and 173 deletions

View File

@@ -11,7 +11,6 @@
* pragmatically since otherwise unsigned comparisons can result
* against negative integers quite easily, and fail in subtle ways.
*/
PACK_STRUCT_BEGIN
struct ip
{
#if defined(NO_CHAR_BITFIELDS)
@@ -39,7 +38,6 @@ struct ip
u_short ip_sum; /* checksum */
struct in_addr ip_src,ip_dst; /* source and dest address */
};
PACK_STRUCT_END
typedef u32_t tcp_seq;
@@ -47,7 +45,6 @@ typedef u32_t tcp_seq;
* TCP header.
* Per RFC 793, September, 1981.
*/
PACK_STRUCT_BEGIN
struct tcphdr
{
u_short th_sport; /* source port */
@@ -71,6 +68,5 @@ struct tcphdr
u_short th_sum; /* checksum */
u_short th_urp; /* urgent pointer */
};
PACK_STRUCT_END
#endif /* VJBSDHDR_H */