| 1 |
#! stap -p4 |
| 2 |
|
| 3 |
function ipmib_filter_key:long (skb:long, op:long, SourceIsLocal:long) { |
| 4 |
// Insure all these functions will build |
| 5 |
if ( ipmib_remote_addr(skb, SourceIsLocal) ) return 0 |
| 6 |
if ( ipmib_local_addr(skb, SourceIsLocal) ) return 0 |
| 7 |
if ( ipmib_tcp_remote_port(skb, SourceIsLocal) ) return 0 |
| 8 |
if ( ipmib_tcp_local_port(skb, SourceIsLocal) ) return 0 |
| 9 |
if ( ipmib_get_proto(skb) ) return 0 |
| 10 |
return op |
| 11 |
} |
| 12 |
|
| 13 |
probe ipmib.InReceives, ipmib.InNoRoutes, ipmib.InAddrErrors, |
| 14 |
ipmib.InUnknownProtos, ipmib.InDiscards, |
| 15 |
%( kernel_v >= "2.6.24" %? |
| 16 |
ipmib.ForwDatagrams, |
| 17 |
%) |
| 18 |
ipmib.OutRequests, ipmib.ReasmTimeout, ipmib.ReasmReqds, |
| 19 |
ipmib.FragOKs, ipmib.FragFails |
| 20 |
{ |
| 21 |
printf("%p %d\n", skb, op) |
| 22 |
} |