PcapPlusPlus icon indicating copy to clipboard operation
PcapPlusPlus copied to clipboard

Is it possible to get IPv6 address for a PcapLiveDevice

Open HIGGSSAM opened this issue 2 years ago • 3 comments

Currently you have a function, PcapLiveDevice::getIPv4Address(). Is it possible to have an equivalent to return the IPv6 addresses from a live device? Thanks

HIGGSSAM avatar Sep 06 '22 15:09 HIGGSSAM

PcapPlusPlus currently doesn't have this functionality but it should be fairly simple to implement. The implementation would be very similar to this: https://github.com/seladb/PcapPlusPlus/blob/master/Pcap%2B%2B/src/PcapLiveDeviceList.cpp#L264

The difference is that instead of searching for a specific IPv6 address, PcapLiveDevice::getIPv6Address() would simply return the first address available.

@HIGGSSAM would you consider adding this to PcapLiveDevice?

seladb avatar Sep 07 '22 00:09 seladb

@seladb If it helps, I will try to add this feature.

jafar75 avatar Sep 15 '22 20:09 jafar75

Sure @jafar75 , that'd be great, thank you!

seladb avatar Sep 15 '22 21:09 seladb

#965

jafar75 avatar Sep 16 '22 11:09 jafar75

Applogies I have been abit busy this week writing my disseration. @jafar75 I started doing this but haven't quite finsihed it yet, so if you have done it then great!

HIGGSSAM avatar Sep 16 '22 12:09 HIGGSSAM

Added in #965

Thank you @jafar75 for working on this, much appreciated! 🙏 ❤️

seladb avatar Sep 26 '22 05:09 seladb