This commit is contained in:
crusader 2018-08-29 22:23:41 +09:00
parent 6eeec5d872
commit 51645626c7

View File

@ -7,6 +7,8 @@ import (
omd "git.loafle.net/overflow/model/discovery" omd "git.loafle.net/overflow/model/discovery"
omu "git.loafle.net/overflow/model/util" omu "git.loafle.net/overflow/model/util"
"git.loafle.net/overflow_scanner/probe/discovery/protocol/mdns"
"git.loafle.net/overflow_scanner/probe/discovery/protocol/upnp"
"git.loafle.net/overflow_scanner/probe/discovery/session" "git.loafle.net/overflow_scanner/probe/discovery/session"
"git.loafle.net/overflow_scanner/probe/discovery/types" "git.loafle.net/overflow_scanner/probe/discovery/types"
) )
@ -210,10 +212,21 @@ func (d *ofDiscoverer) discover(req types.DiscoveryRequest) {
} }
func (d *ofDiscoverer) preDiscovery(s session.DiscoverySession) { func (d *ofDiscoverer) preDiscovery(s session.DiscoverySession) {
var wg sync.WaitGroup
// SNMP wg.Add(1)
// mDNS go func() {
// UPnP defer wg.Done()
upnp.Scan(s)
}()
wg.Add(1)
go func() {
defer wg.Done()
mdns.Scan(s)
}()
wg.Wait()
} }
func (d *ofDiscoverer) layerDiscovery(s session.DiscoverySession) { func (d *ofDiscoverer) layerDiscovery(s session.DiscoverySession) {