google / google/gopacket

How to associate pcap.Interface with net.Interface?

Open
#456 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hi,

As mentioned in subject, I am trying to figure out which pcap.Interface represents which net.Interface

As I understand pcap.Interface is actually a hardware device, while net.Interface is a network connection (ie. a logical construct in Windows to control hardware device).

Is the only way to associate them together using IP Address? (suprisingly, pcap.Interface doesn't expose Hardware Address field)

I am looking for a better way to associate them together. Perhaps based on interface index? (couldn't find it in pcap.Interface)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.