Networking Forums

Networking Forums > Computer Networking > Linux Networking > glib and libpcap

Reply
Thread Tools Display Modes

glib and libpcap

 
 
Ryan
Guest
Posts: n/a

 
      08-21-2004, 07:42 AM
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
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
tc filters and libpcap Adam Linux Networking 0 06-02-2011 04:05 PM
libpcap on vserver Philipp Kraus Linux Networking 0 02-17-2008 01:40 PM
libpcap unable to link Abhishek Dike Linux Networking 0 07-29-2004 12:59 PM
libpcap for MIPS Tejas Kokje Linux Networking 0 07-16-2004 01:29 AM
libpcap problem (hdr.len vs tcpdump file size)? D Linux Networking 3 10-30-2003 03:35 AM



1 2 3 4 5 6 7 8 9 10 11