File: bitfield

package info (click to toggle)
tcng 10b-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,636 kB
  • ctags: 2,515
  • sloc: ansic: 19,040; pascal: 4,640; yacc: 2,619; sh: 1,914; perl: 1,546; lex: 772; makefile: 756
file content (83 lines) | stat: -rw-r--r-- 2,073 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# bit field: ip_RF == 0 -------------------------------------------------------
tcc -xif:err -Wexppostopt 2>&1 | grep 'match 0'
#include "fields.tc"

prio {
    class if ip_RF == 0;
}
EOF
match 0:48:1=0x0 action 1
# bit field: ip_DF == 1 -------------------------------------------------------
tcc -xif:err -Wexppostopt 2>&1 | grep 'match 0'
#include "fields.tc"

prio {
    class if ip_DF == 1;
}
EOF
match 0:49:1=0x1 action 1
# bit field: !ip_MF -----------------------------------------------------------
tcc -xif:err -Wexppostopt 2>&1 | grep 'match 0'
#include "fields.tc"

prio {
    class if !ip_MF;
}
EOF
match 0:50:1=0x0 action 1
# bit field: tcp_URG ----------------------------------------------------------
tcc -xif:err -Wexppostopt  2>&1 | grep 'match 0'
#include "fields.tc"

prio {
    class if tcp_URG;
}
EOF
match 0:72:8=0x06 100:106:1=0x1 action 1
# bit field: tcp_ACK == 0 -----------------------------------------------------
tcc -xif:err -Wexppostopt  2>&1 | grep 'match 0'
#include "fields.tc"

prio {
    class if tcp_ACK == 0;
}
EOF
match 0:72:8=0x06 100:107:1=0x0 action 1
# bit field: tcp_PSH == 1 -----------------------------------------------------
tcc -xif:err -Wexppostopt  2>&1 | grep 'match 0'
#include "fields.tc"

prio {
    class if tcp_PSH == 1;
}
EOF
match 0:72:8=0x06 100:108:1=0x1 action 1
# bit field: tcp_RST != 0 -----------------------------------------------------
tcc -xif:err -Wexppostopt  2>&1 | grep 'match 0'
#include "fields.tc"

prio {
    class if tcp_RST != 0;
}
EOF
match 0:72:8=0x06 100:109:1=0x1 action 1
# bit field: tcp_SYN != 1 -----------------------------------------------------
tcc -xif:err -Wexppostopt  2>&1 | grep 'match 0'
#include "fields.tc"

prio {
    class if tcp_SYN != 1;
}
EOF
match 0:72:8=0x06 100:110:1=0x0 action 1
# bit field: !tcp_FIN ---------------------------------------------------------
tcc -xif:err -Wexppostopt  2>&1 | grep 'match 0'
#include "fields.tc"

field tcp_hdr = raw[20]; /* can't negate test for IPPROTO_TCP */

prio {
    class if !tcp_FIN;
}
EOF
match 0:271:1=0x0 action 1