Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get MAC address of PcapNetworkInterface on windows #49

Closed
maffoo opened this issue Dec 4, 2015 · 5 comments
Closed

Unable to get MAC address of PcapNetworkInterface on windows #49

maffoo opened this issue Dec 4, 2015 · 5 comments
Labels

Comments

@maffoo
Copy link

maffoo commented Dec 4, 2015

I'd like to be able to find the MAC address of a PcapNetworkInterface on windows, but getLinkLayerAddresses returns an empty array. Is there any way to make this work, maybe by configuring something in the os, or winpcap, or pcap4j?

I am able to find MAC addresses using the java.net.NetworkInterface class, however the list of network interfaces enumerated by that class does not line up with what is given by Pcaps.findAllDevs(), so there's no reliable way I can see to get the right MAC address with the right pcap network interface (both the name and description fields are different in the two classes).

Any thoughts about how to reliably get MAC addresses for pcap devices on windows?

@kaitoy
Copy link
Owner

kaitoy commented Dec 5, 2015

I will try to enhance Pcap4J to retrieve MAC addresses on Windows.

@kaitoy kaitoy added the enhance label Dec 5, 2015
@kaitoy
Copy link
Owner

kaitoy commented Dec 6, 2015

I implemented it.
Please download the snapshot build if you want to try it.

@kaitoy kaitoy closed this as completed Dec 6, 2015
@maffoo
Copy link
Author

maffoo commented Dec 8, 2015

Confirmed that this works for us on windows. Thanks for the quick fix! When do you plan to release 1.6.2?

@kaitoy
Copy link
Owner

kaitoy commented Dec 9, 2015

I will release it soon, this weekend or next week.

@kaitoy kaitoy reopened this Dec 9, 2015
@kaitoy
Copy link
Owner

kaitoy commented Dec 15, 2015

It's been released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants