转:http://blog.csdn.net/nerdx/article/details/12586823
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1.1 static inline char rt_tos2priority(u8 tos)
-
{
-
return ip_tos2prio[IPTOS_TOS(tos)>>1];
-
}
-
-
-
1.2
-
#define IPTOS_TOS_MASK 0x1E
-
#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK)
-
-
-
1.3 __u8 ip_tos2prio[16] = {
-
TC_PRIO_BESTEFFORT,
-
ECN_OR_COST(FILLER),
-
TC_PRIO_BESTEFFORT,
-
ECN_OR_COST(BESTEFFORT),
-
TC_PRIO_BULK,
-
ECN_OR_COST(BULK),
-
TC_PRIO_BULK,
-
ECN_OR_COST(BULK),
-
TC_PRIO_INTERACTIVE,
-
ECN_OR_COST(INTERACTIVE),
-
TC_PRIO_INTERACTIVE,
-
ECN_OR_COST(INTERACTIVE),
-
TC_PRIO_INTERACTIVE_BULK,
-
ECN_OR_COST(INTERACTIVE_BULK),
-
TC_PRIO_INTERACTIVE_BULK,
-
ECN_OR_COST(INTERACTIVE_BULK)
-
};
-
阅读(986) | 评论(0) | 转发(0) |