Release 4.7 include/net/dsfield.h
/* include/net/dsfield.h - Manipulation of the Differentiated Services field */
/* Written 1998-2000 by Werner Almesberger, EPFL ICA */
#ifndef __NET_DSFIELD_H
#define __NET_DSFIELD_H
#include <linux/types.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <asm/byteorder.h>
static inline __u8 ipv4_get_dsfield(const struct iphdr *iph)
{
return iph->tos;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
pre-git | pre-git | 17 | 94.44% | 2 | 66.67% |
jan engelhardt | jan engelhardt | 1 | 5.56% | 1 | 33.33% |
| Total | 18 | 100.00% | 3 | 100.00% |
static inline __u8 ipv6_get_dsfield(const struct ipv6hdr *ipv6h)
{
return ntohs(*(const __be16 *)ipv6h) >> 4;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
pre-git | pre-git | 24 | 88.89% | 2 | 50.00% |
jan engelhardt | jan engelhardt | 2 | 7.41% | 1 | 25.00% |
al viro | al viro | 1 | 3.70% | 1 | 25.00% |
| Total | 27 | 100.00% | 4 | 100.00% |
static inline void ipv4_change_dsfield(struct iphdr *iph,__u8 mask,
__u8 value)
{
__u32 check = ntohs((__force __be16)iph->check);
__u8 dsfield;
dsfield = (iph->tos & mask) | value;
check += iph->tos;
if ((check+1) >> 16) check = (check+1) & 0xffff;
check -= dsfield;
check += check >> 16; /* adjust carry */
iph->check = (__force __sum16)htons(check);
iph->tos = dsfield;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
pre-git | pre-git | 95 | 92.23% | 2 | 66.67% |
al viro | al viro | 8 | 7.77% | 1 | 33.33% |
| Total | 103 | 100.00% | 3 | 100.00% |
static inline void ipv6_change_dsfield(struct ipv6hdr *ipv6h,__u8 mask,
__u8 value)
{
__be16 *p = (__force __be16 *)ipv6h;
*p = (*p & htons((((u16)mask << 4) | 0xf00f))) | htons((u16)value << 4);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
pre-git | pre-git | 42 | 66.67% | 3 | 60.00% |
hideaki yoshifuji | hideaki yoshifuji | 20 | 31.75% | 1 | 20.00% |
al viro | al viro | 1 | 1.59% | 1 | 20.00% |
| Total | 63 | 100.00% | 5 | 100.00% |
#endif
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
pre-git | pre-git | 200 | 85.84% | 3 | 42.86% |
hideaki yoshifuji | hideaki yoshifuji | 20 | 8.58% | 1 | 14.29% |
al viro | al viro | 10 | 4.29% | 2 | 28.57% |
jan engelhardt | jan engelhardt | 3 | 1.29% | 1 | 14.29% |
| Total | 233 | 100.00% | 7 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.