package udp

import (
	"fmt"
	"git.loafle.net/overflow/overflow_probe/discovery/discovery/types"
	"git.loafle.net/overflow/overflow_probe/discovery/discovery/types/timestamp"
	"github.com/google/gopacket"
	"testing"
)

func TestUDPPortScan(t *testing.T) {

	zone := types.NewZones()[0]

	hh := &types.DiscoveryHost{
		Ip_:            "192.168.1.215",
		Ports_:         make(map[string]*types.DiscoveryPort, 100),
		Ip:             111,
		Mac:            222,
		CreateDate:     timestamp.Now(),
		UpdateDate:     timestamp.Now(),
		Zone:           zone,
		FirstScanRange: 1,
		LastScanRange:  100,
	}

	Scan(hh, func(packet gopacket.Packet) {
		fmt.Println(packet)
	})

}
