diff options
author | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-03-06 00:35:35 +0000 |
---|---|---|
committer | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-03-06 00:35:35 +0000 |
commit | f7c20f2a73a4377ab8c38a5df6a530a42bedd1f3 (patch) | |
tree | 120b2992d0d0086b980f7d322e7134e7173f3915 /epan/tap.c | |
parent | 0603b7b54af4805b5617b1ea55d1e38993717c61 (diff) |
Introduce a new function called have_tap_listener(int tap_id) to
tell if a specific tap id is currently listening for data.
This complements the function have_tap_listeners(), which checks
to see if any tap is currently listening.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20979 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/tap.c')
-rw-r--r-- | epan/tap.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/epan/tap.c b/epan/tap.c index ada6275a2d..c57196b33b 100644 --- a/epan/tap.c +++ b/epan/tap.c @@ -460,3 +460,19 @@ have_tap_listeners(void) { return tap_listener_queue != NULL; } + +/* Returns TRUE there is an active tap listener for the specified tap id. */ +gboolean +have_tap_listener(int tap_id) +{ + volatile tap_listener_t *tap_queue = tap_listener_queue; + + while(tap_queue) { + if(tap_queue->tap_id == tap_id) + return TRUE; + + tap_queue = tap_queue->next; + } + + return FALSE; +} |