new: centralized pcap capture configuration management

This commit is contained in:
Simone Margaritelli 2021-08-21 14:21:36 +02:00
parent d0ecfd499f
commit 59dce4ced6
8 changed files with 118 additions and 62 deletions

View file

@ -69,7 +69,7 @@ func NewQueue(iface *network.Endpoint) (q *Queue, err error) {
}
if q.active {
if q.handle, err = pcap.OpenLive(iface.Name(), 1024, true, pcap.BlockForever); err != nil {
if q.handle, err = network.Capture(iface.Name()); err != nil {
return
}