提交 046d0331 编写于 作者: A Al Viro 提交者: David S. Miller

[IPV4]: headers endianness

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b4229934
...@@ -96,7 +96,7 @@ struct iphdr { ...@@ -96,7 +96,7 @@ struct iphdr {
__be16 frag_off; __be16 frag_off;
__u8 ttl; __u8 ttl;
__u8 protocol; __u8 protocol;
__u16 check; __be16 check;
__be32 saddr; __be32 saddr;
__be32 daddr; __be32 daddr;
/*The options start here. */ /*The options start here. */
...@@ -105,22 +105,22 @@ struct iphdr { ...@@ -105,22 +105,22 @@ struct iphdr {
struct ip_auth_hdr { struct ip_auth_hdr {
__u8 nexthdr; __u8 nexthdr;
__u8 hdrlen; /* This one is measured in 32 bit units! */ __u8 hdrlen; /* This one is measured in 32 bit units! */
__u16 reserved; __be16 reserved;
__u32 spi; __be32 spi;
__u32 seq_no; /* Sequence number */ __be32 seq_no; /* Sequence number */
__u8 auth_data[0]; /* Variable len but >=4. Mind the 64 bit alignment! */ __u8 auth_data[0]; /* Variable len but >=4. Mind the 64 bit alignment! */
}; };
struct ip_esp_hdr { struct ip_esp_hdr {
__u32 spi; __be32 spi;
__u32 seq_no; /* Sequence number */ __be32 seq_no; /* Sequence number */
__u8 enc_data[0]; /* Variable len but >=8. Mind the 64 bit alignment! */ __u8 enc_data[0]; /* Variable len but >=8. Mind the 64 bit alignment! */
}; };
struct ip_comp_hdr { struct ip_comp_hdr {
__u8 nexthdr; __u8 nexthdr;
__u8 flags; __u8 flags;
__u16 cpi; __be16 cpi;
}; };
#endif /* _LINUX_IP_H */ #endif /* _LINUX_IP_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册