ing
This commit is contained in:
parent
6eeec5d872
commit
51645626c7
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user