im trying to create an application that it will get the MAC timestamp from a packet, like in wireshark. Unfortunately i haven't found anything yet that it will allow me to acquire the MAC Timestamp using an Ansi C or C++ application.
Any suggestions or recommendations?
Thank you :)
You aren't likely going to be able to do this without a tool similar to what "Wireshark" does already in place.
It is essentially a matter of privileges. A "userland" tool does not have such privileges. A driver may have such privileges and can export an interface for "userland" code.
I strongly suggest you just use "Wireshark". It is a pretty awesome tool.
Wireshark uses the pcap driver - perhaps you can as well.
There's plenty of information on the web how to do this.
Depending on what OS you're using, this may be possible without any external APIs.
For Linux, you'll want to create a PF_PACKET socket and bind it to an ethernet interface. There's many tutorials on how to do this online.
Mac OS uses the Berkeley Packet Filter ("/dev/bpf0") that will (like Linux) provide a raw socket that intercepts all levels of transmission on the interface.
Windows....no idea. You could google it though.