On Sat, May 14, 2016 at 11:47:22AM -0700, Guy Harris wrote: > So if you have a GUI application for packet capture, with a combo box to > select the type of time stamping, should it: > > 1) regardless of whether ETHTOOL_GET_TS_INFO is available, open the > adapter, try each of the time stamp types to see whether it works, and show a > combo box based on that; > > 2) use ETHTOOL_GET_TS_INFO if available; > > 3) offer all possibilities regardless of whether they work with the > adapter or not, and just report an error for possibilities that don't work? > > My preference is 2) - which is the main reason why libpcap offers "what > possibilities are available?" APIs, not just "request this possibility" APIs.
You are going to have to implement #1 in any case, if you want your program to work on all kernels. IIRC get_ts_info appeared in 3.5. Thanks, Richard
