Igor: I believe I have seen the sniffer work, yes. I start Kaboodle up, with a new registry, with one of my usual network devices off. After Kaboodle finishes network discovery, I turn the device on. Kaboodle detects the arrival...so it must be sniffing for the arrival.
The most relevant documentation is here: http://winpcap.polito.it/docs/pcapman.htm According to it...pcap_lookupdev() returns a pointer to a network device suitable for use with pcap_open_live(). If there is an error, NULL is returned. But...pcap_open_live(), which is used to obtain a packet capture descriptor to look at packets on the network, can take a device argument of "any" or NULL to capture packets from all interfaces. VK: could you take a quick look into the bug that Igor is identifying? Thanks. -Scott On Thu, 19 Sep 2002, Igor Kotelevsky wrote: > Hello, Scott > > >Igor: > >So just to confirm...the LAN detection process checks > >all interfaces now, and it now keeps track of which class-C ranges > >are the "active ranges"? Please let me know if/when these changes > >are in the CVS server. > > Yes, LAN detection process checks all interfaces now. > It pings it's own class-C ranges on start-up. And it is supposed to ping > all newly sniffed class-C ranges on StartPing(PING_ON_NEW_DEVICE_DISCOVERY). > The problem is that the sniffer would work at all. I wonder if anybody has > ever seen it work? > > I found some info on the pcap lib used in the CSnifferThread class: > http://www.vspu.ac.ru/en/man2html?pcap?3 > It says: > pcap_lookupdev() returns a pointer to a network device suitable for use with > pcap_open_live() and pcap_lookupnet(). > > Which should be understood only as returns a pointer to only ONE (active) > network device, not array. > > In file snifferthread.cpp there is a function CreateAdapterNameList which > treats it as a null-separated chain of names. > > temp = (WCHAR *)device; > while (*temp != 0 ) > { > wcscpy((WCHAR *)adapterName, temp); > temp += wcslen(temp); > temp++; > m_iAdapterNum++; > } > > Is that right? I would not mind this if it had worked. But > I tested it on two machines (2000 and W98) and in both cases I had > m_iAdapterNum == 0. Later on, if I force the SnifferThreadFunction > to be called, it makes a call to > pcap_t* devHandle = p_pcap_open_live(device,BUFSIZ,1,0,errbuf); > and errbuf contains the following error text: > "Error opening adapter. The system cannot find the file specified". > > -Igor > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Kaboodle-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kaboodle-devel