Skip to content

Commit

Permalink
[NET]: annotate dsfield.h
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 5d36b18 commit 8a9ae21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/net/dsfield.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static inline __u8 ipv4_get_dsfield(struct iphdr *iph)

static inline __u8 ipv6_get_dsfield(struct ipv6hdr *ipv6h)
{
return ntohs(*(__u16 *) ipv6h) >> 4;
return ntohs(*(__be16 *) ipv6h) >> 4;
}


Expand All @@ -45,9 +45,9 @@ static inline void ipv6_change_dsfield(struct ipv6hdr *ipv6h,__u8 mask,
{
__u16 tmp;

tmp = ntohs(*(__u16 *) ipv6h);
tmp = ntohs(*(__be16 *) ipv6h);
tmp = (tmp & ((mask << 4) | 0xf00f)) | (value << 4);
*(__u16 *) ipv6h = htons(tmp);
*(__be16 *) ipv6h = htons(tmp);
}


Expand Down

0 comments on commit 8a9ae21

Please sign in to comment.