Wireshark-dev: [Wireshark-dev] Getting data out of 'address' struct
If I populate an address with the following syntax:
SET_ADDRESS(&pinfo->dl_dst, AT_EUI64, sizeof(guint64), jn_dst64);
and then later I need to get that address back out as a uint64, what is the proper way to do it?
I don't see any predefined macro for this operation, at least not in address.h.
The following works, but it makes the assumption that the data buffer is 8-byte aligned, which I assume is not guaranteed.
guint64 dst_eui64 = *(guint64*)(pinfo->dl_dst.data);
Is there a function or macro somewhere for this, or should I just create a little loop to copy the bytes?
Thanks,
b.