glib and libpcap

This is a discussion on glib and libpcap within the Linux Networking forums, part of the Linux Forums category; I'm writing a network sniffer basically. It uses libpcap and calls pcap_loop() which has a callback that actually tallies ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-21-2004
Ryan
 
Posts: n/a
Default glib and libpcap

I'm writing a network sniffer basically. It uses libpcap and calls pcap_loop() which has a callback that actually tallies my bytes. My daemon is running on linux based system that is functioning as an access point. I am running a daemon called nocat which basically disallows all traffic by a connected client until they enter the appropriate user/pass via webbrowser. Nocat uses glib and I can't figure it out, but after a while my daemon and nocat start to both not work. I'm wondering if they are both competing for sockets or something.

Nocat uses functions like g_io_add_watch() and g_io_channel_unix_new() etc extensively. I am using pcap_loop in my program, which is blocking in its own thread, but I wouldn't think that this would affect nocat.

Using fnctl() or a similar unix system call, could it be possible that nocat is locking a file descriptor to a port that my daemon is trying to sniff or vice versa?

I'm very confused by what's going on. Let me know how much code you'd like me to post.

-ryan
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:21 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0