On 2010-02-28 23:39:53 +0000, Enrico Zini wrote:
> On Mon, Sep 21, 2009 at 06:00:50PM +0200, Vincent Lefevre wrote:
> > Why does guessnet say "0 candidate profiles" while there's a test
> > for the home profile?
> 
> That is a good question. Can you please try with version 0.52 (just
> uploaded to sid)?  I've greatly reorganised and simplified the parsing
> code. Also, if you add --debug, in 0.52 it will print more information
> as input is parsed.

Same problem with guessnet 0.52-1.

Here's the output to stderr with:

echo 'home peer 192.168.0.1 00:00:c5:b4:98:74' | guessnet -v eth0 --debug 2> out

guessnet: parse peer line home 192.168.0.1 00:00:c5:b4:98:74 guessnet: Added 
startable with priority 100
guessnet: Added startable with priority 200
guessnet: Added startable with priority 4294967295
guessnet: 1 candidates found in input
guessnet: Guessnet 0.52 starting...
guessnet: Trying MII detection
guessnet: 0 candidate profiles
guessnet: Added "default" test none
guessnet: Trying MII detection
guessnet: Initialized test subsystems
guessnet: Starting all 3 startables
guessnet: Starting elements with priority 100
guessnet: Starting elements with priority 200
guessnet: Starting net sender
guessnet: Starting elements with priority 4294967295
guessnet: Sending 10 ARP probes, 1 every second...
guessnet: Started tests
guessnet: 2 candidates
guessnet: Got ARP reply from 192.168.0.1 00:00:c5:b4:98:74
guessnet: ARP reply from 192.168.0.1 00:00:c5:b4:98:74 matches
guessnet: Notified success of scan peer 192.168.0.1 00:00:c5:b4:98:74
guessnet: Keeping candidate home
guessnet: Got ARP reply from 192.168.0.1 00:00:c5:b4:98:74
guessnet: ARP reply from 192.168.0.1 00:00:c5:b4:98:74 matches
guessnet: Notified success of scan peer 192.168.0.1 00:00:c5:b4:98:74
guessnet: Keeping candidate home
guessnet: Got ARP reply from 192.168.0.1 00:00:c5:b4:98:74
guessnet: ARP reply from 192.168.0.1 00:00:c5:b4:98:74 matches
guessnet: Notified success of scan peer 192.168.0.1 00:00:c5:b4:98:74
guessnet: Keeping candidate home
guessnet: Got ARP reply from 192.168.0.1 00:00:c5:b4:98:74
guessnet: ARP reply from 192.168.0.1 00:00:c5:b4:98:74 matches
guessnet: Notified success of scan peer 192.168.0.1 00:00:c5:b4:98:74
guessnet: Keeping candidate home
guessnet: Got ARP reply from 192.168.0.1 00:00:c5:b4:98:74
guessnet: ARP reply from 192.168.0.1 00:00:c5:b4:98:74 matches
guessnet: Notified success of scan peer 192.168.0.1 00:00:c5:b4:98:74
guessnet: Keeping candidate home

In the source:

$ grep -R scans .
./runner/main.cc: * Run scans and arbitrate the results
./runner/runner.h: * Run scans and arbitrate the results
./runner/main.h: * Run scans and arbitrate the results
./runner/fake.cc: * Run scans and arbitrate the results
./runner/runner.cc: * Run scans and arbitrate the results
./runner/fake.h: * Run scans and arbitrate the results
./scanner/scanbag.cc:   scans.push_back(scan);
./scanner/scanbag.h: * A collection of scans, with the selection logic.
./scanner/scanbag.h: * for scans to time out before taking a decision.  
Therefore a result is
./scanner/scanbag.h:    // List of scans in order of parsing
./scanner/scanbag.h:    std::list<scanner::Scan*> scans;
./scanner/scanbag.h:    // TODO: deallocate scans
./scanner/scanbag.h:    // These functions are unsafe to call after the scans 
start
./scanner/scanbag.h:    const std::list<scanner::Scan*>& getScans() const { 
return scans; }
./scanner/scanbag.h:            scans.clear();
./scanner/scanbag.h:    // These functions are safe to call after the scans 
start
./scanner/scan.cc:struct guessnet_scans_shar {
./scanner/scan.cc:TESTGRP(guessnet_scans);
./scanner/linkbeat.h:   // Set the interface for the link beat scans
./scanner/scanbag-tut.cc:// Test the case with no scans besides the default
./options.h:    std::vector<const scanner::Scan*> scans;
./guessnet.cc:                  vector<const Scan*> scans = options.scans;
./guessnet.cc:                  verbose("%d candidate profiles\n", 
scans.size());
./IfaceParser.cc:                                                       
warning("No mac provided at line %d: scans will be less accurate\n", linenum);

I wonder whether the code in guessnet.cc about scans is out-of-date,
and possibly the following lines too (there's a FIXME for them). The
scans in options.h seems to be useless too.

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to