Skip to content

Commit

Permalink
[NET]: Annotate checksums in on-the-wire packets.
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Al Viro authored and David S. Miller committed Dec 3, 2006
1 parent 56649d5 commit 9981a0e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/linux/dccp.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct dccp_hdr {
#else
#error "Adjust your <asm/byteorder.h> defines"
#endif
__u16 dccph_checksum;
__sum16 dccph_checksum;
#if defined(__LITTLE_ENDIAN_BITFIELD)
__u8 dccph_x:1,
dccph_type:4,
Expand Down
2 changes: 1 addition & 1 deletion include/linux/icmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
struct icmphdr {
__u8 type;
__u8 code;
__be16 checksum;
__sum16 checksum;
union {
struct {
__be16 id;
Expand Down
2 changes: 1 addition & 1 deletion include/linux/icmpv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ struct icmp6hdr {

__u8 icmp6_type;
__u8 icmp6_code;
__be16 icmp6_cksum;
__sum16 icmp6_cksum;


union {
Expand Down
2 changes: 1 addition & 1 deletion include/linux/igmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct igmphdr
{
__u8 type;
__u8 code; /* For newer IGMP */
__be16 csum;
__sum16 csum;
__be32 group;
};

Expand Down
2 changes: 1 addition & 1 deletion include/linux/ip.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct iphdr {
__be16 frag_off;
__u8 ttl;
__u8 protocol;
__be16 check;
__sum16 check;
__be32 saddr;
__be32 daddr;
/*The options start here. */
Expand Down
2 changes: 1 addition & 1 deletion include/linux/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct tcphdr {
#error "Adjust your <asm/byteorder.h> defines"
#endif
__be16 window;
__be16 check;
__sum16 check;
__be16 urg_ptr;
};

Expand Down
2 changes: 1 addition & 1 deletion include/linux/udp.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct udphdr {
__be16 source;
__be16 dest;
__be16 len;
__be16 check;
__sum16 check;
};

/* UDP socket options */
Expand Down

0 comments on commit 9981a0e

Please sign in to comment.