If you are trying to use libtrace to understand a header which libtrace doesn't natively support then you can use getlink to get a pointer to the link layer (or some suitable other header), and then use trace_get_payload_from_header to skip past any extra headers you might need to (for example vlan headers), then take the result and cast it to a structure representing your prefered header.

Last modified 15 years ago Last modified on 09/05/06 17:25:05