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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |