我将尝试使用 Raspberry Pi 制作的接入点来保证一些 QoS。
在开始之前,我先弄脏我的手:我阅读了有关 tcp、udp 和 ip 标头的信息。在IP 标头描述中我看到了DSCP
字段,最初定义为Type of Service
字段。
DSCP
字段会为我提供有关 Qos 的有趣信息,所以我寻找它......但我找不到它:我仍然有已弃用的tos
字段。
从我的/usr/include/netinet/ip.h
:
struct ip {
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int ip_hl:4; /* header length */
unsigned int ip_v:4; /* version */
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int ip_v:4; /* version */
unsigned int ip_hl:4; /* header length */
#endif
u_int8_t ip_tos; /* type of service */
u_short ip_len; /* total length */
u_short ip_id; /* identification */
u_short ip_off; /* fragment offset field */
#define IP_RF 0x8000 /* reserved fragment flag */
#define IP_DF 0x4000 /* dont fragment flag */
#define IP_MF 0x2000 /* more fragments flag */
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
u_int8_t ip_ttl; /* time to live */
u_int8_t ip_p; /* protocol */
u_short ip_sum; /* checksum */
struct in_addr ip_src, ip_dst; /* source and dest address */
};
关于我的系统的信息:
uname -r -> 3.13.0-49-generic
lsb_release -a -> Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty