blob: 0d7c4c0011f77352d1cc4c152bd636ceb500a73b (
plain)
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
|
#! stap -p4
// Tests if all probes in the tcpmib tapset are resolvable.
probe tcpmib.* {}
// This function is just for test, the real one is
// in tcpipstat.stp
function tcpmib_filter_key:long (sk:long, op:long) {
if (!sk) return 0
return op
}
// same as above one
// but it's better to move function definition from example
// to tapset
function ipmib_filter_key:long (skb:long, op:long, SourceIsLocal:long) {
if ( !skb ) return 0
return op
}
probe begin{
print(tcpmib_get_state(0) +
tcpmib_local_addr(0) +
tcpmib_remote_addr(0) +
tcpmib_local_port(0) +
tcpmib_remote_port(0) +
_rtn_local() +
_is_reset(0) +
_tcpmib_input_route_type(0))
}
|