Преглед на файлове

[NET]: Annotate checksums in on-the-wire packets.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro преди 18 години
родител
ревизия
9981a0e36a
променени са 7 файла, в които са добавени 7 реда и са изтрити 7 реда
  1. 1 1
      include/linux/dccp.h
  2. 1 1
      include/linux/icmp.h
  3. 1 1
      include/linux/icmpv6.h
  4. 1 1
      include/linux/igmp.h
  5. 1 1
      include/linux/ip.h
  6. 1 1
      include/linux/tcp.h
  7. 1 1
      include/linux/udp.h

+ 1 - 1
include/linux/dccp.h

@@ -30,7 +30,7 @@ struct dccp_hdr {
 #else
 #else
 #error  "Adjust your <asm/byteorder.h> defines"
 #error  "Adjust your <asm/byteorder.h> defines"
 #endif
 #endif
-	__u16	dccph_checksum;
+	__sum16	dccph_checksum;
 #if defined(__LITTLE_ENDIAN_BITFIELD)
 #if defined(__LITTLE_ENDIAN_BITFIELD)
 	__u8	dccph_x:1,
 	__u8	dccph_x:1,
 		dccph_type:4,
 		dccph_type:4,

+ 1 - 1
include/linux/icmp.h

@@ -68,7 +68,7 @@
 struct icmphdr {
 struct icmphdr {
   __u8		type;
   __u8		type;
   __u8		code;
   __u8		code;
-  __be16	checksum;
+  __sum16	checksum;
   union {
   union {
 	struct {
 	struct {
 		__be16	id;
 		__be16	id;

+ 1 - 1
include/linux/icmpv6.h

@@ -7,7 +7,7 @@ struct icmp6hdr {
 
 
 	__u8		icmp6_type;
 	__u8		icmp6_type;
 	__u8		icmp6_code;
 	__u8		icmp6_code;
-	__be16		icmp6_cksum;
+	__sum16		icmp6_cksum;
 
 
 
 
 	union {
 	union {

+ 1 - 1
include/linux/igmp.h

@@ -30,7 +30,7 @@ struct igmphdr
 {
 {
 	__u8 type;
 	__u8 type;
 	__u8 code;		/* For newer IGMP */
 	__u8 code;		/* For newer IGMP */
-	__be16 csum;
+	__sum16 csum;
 	__be32 group;
 	__be32 group;
 };
 };
 
 

+ 1 - 1
include/linux/ip.h

@@ -98,7 +98,7 @@ struct iphdr {
 	__be16	frag_off;
 	__be16	frag_off;
 	__u8	ttl;
 	__u8	ttl;
 	__u8	protocol;
 	__u8	protocol;
-	__be16	check;
+	__sum16	check;
 	__be32	saddr;
 	__be32	saddr;
 	__be32	daddr;
 	__be32	daddr;
 	/*The options start here. */
 	/*The options start here. */

+ 1 - 1
include/linux/tcp.h

@@ -52,7 +52,7 @@ struct tcphdr {
 #error	"Adjust your <asm/byteorder.h> defines"
 #error	"Adjust your <asm/byteorder.h> defines"
 #endif	
 #endif	
 	__be16	window;
 	__be16	window;
-	__be16	check;
+	__sum16	check;
 	__be16	urg_ptr;
 	__be16	urg_ptr;
 };
 };
 
 

+ 1 - 1
include/linux/udp.h

@@ -23,7 +23,7 @@ struct udphdr {
 	__be16	source;
 	__be16	source;
 	__be16	dest;
 	__be16	dest;
 	__be16	len;
 	__be16	len;
-	__be16	check;
+	__sum16	check;
 };
 };
 
 
 /* UDP socket options */
 /* UDP socket options */