1 /*
2 
3    p0f - ToS database
4    ------------------
5 
6    A list of known and used ToS / priority combinations. Rare settings
7    actually describe the originating network (since specific ISPs tend
8    to set those values for all outgoing traffic). More popular settings
9    are just described per their RFC meaning.
10 
11    The field we examine is actually 8 bits in the following format:
12 
13    PPP TTTT Z
14    |   |    `- "must be zero" (yeah, sure)
15    |   `------ Type of Service
16    `---------- Precedence bits (now used to denote priority)
17 
18    But all this is usually just called "ToS". The "must be zero"
19    value is often, well, not zero, of course.
20 
21    Copyright (C) 2003 by Michal Zalewski <lcamtuf@coredump.cx>
22 
23 */
24 
25 #ifndef _HAVE_TOS_H
26 #define _HAVE_TOS_H
27 
28 struct tos_def {
29   uint8_t tos;
30   const uint8_t* desc;
31 };
32 
33 
34 /* THIS LIST MUST BE SORTED FROM LOWEST TO HIGHEST ToS */
35 
36 /* Candidates:
37 
38     1 Tiscali Denmark (must-be-zero!)
39     3 InfoAve (must-be-zero!)
40     5 AOL (must-be-zero!)
41   200 Borlange Sweden
42    96 Nextra
43    28 Menta
44   192 techtelnet.net
45 
46  */
47 
48 static struct tos_def tos[] = {
49   {   2, "low cost" },				/* LC */
50   {   4, "high reliability" },			/* HR */
51   {   8, "low delay" },				/* LD */
52   {  12, "DNA.FI / CTINETS" },			/* LD, HR */
53   {  16, "high throughput" },			/* HT */
54   {  32, "priority1" },				/* PRI1 */
55   {  40, "UTFORS Sweden" },			/* PRI1, LD */
56   {  64, "Tiscali Denmark" },			/* PRI2 */
57   {  80, "Bredband Scandinavia" },		/* PRI2, HT */
58   { 112, "Bonet Sweden" },			/* PRI3, HT */
59   { 128, "Cable.BG / Teleca.SE" },		/* PRI4 */
60   { 144, "IPTelecom / Alkar" },			/* PRI4, HT */
61   { 244, "top priority" },			/* PRI7 */
62   { 255, "Arcor IP" },				/* (bad) */
63 };
64 
65 #define TOS_CNT (sizeof(tos) / sizeof(struct tos_def))
66 
67 #endif /* ! _HAVE_TOS_H */
68