| 1 |
/* |
| 2 |
* Copyright (C) 2009 IBM Corp. |
| 3 |
* Copyright (C) 2010 Red Hat Inc. |
| 4 |
* |
| 5 |
* This file is part of systemtap, and is free software. You can |
| 6 |
* redistribute it and/or modify it under the terms of the GNU General |
| 7 |
* Public License (GPL); either version 2, or (at your option) any |
| 8 |
* later version. |
| 9 |
*/ |
| 10 |
|
| 11 |
/** |
| 12 |
* sfunction linuxmib_filter_key - Default filter function for linuxmib.* probes |
| 13 |
* |
| 14 |
* @sk: pointer to the struct sock |
| 15 |
* @op: value to be counted if @sk passes the filter |
| 16 |
* |
| 17 |
* This function is a default filter function. |
| 18 |
* The user can replace this function with their own. |
| 19 |
* The user-supplied filter function returns an index key based on the values |
| 20 |
* in @sk. |
| 21 |
* A return value of 0 means this particular @sk should be not be counted. |
| 22 |
*/ |
| 23 |
function linuxmib_filter_key:long (sk:long, op:long) |
| 24 |
{ |
| 25 |
if (!sk) return 0 |
| 26 |
return 1 |
| 27 |
} |