inetdiag libnl library?

Thomas Graf tgraf at suug.ch
Thu Jul 18 17:49:18 EDT 2013


On 07/06/13 at 05:38pm, Joe Damato wrote:
> Thanks for the reply and sorry for the spam; I wan't sure if you
> checked github so I pinged the mailing list as well.

Sorry, I missed this part of the reply earlier on. This was no
deliberate.

> 1.) Support the latest inetdiag attributes on the latest
> kernels/headers. Some users on older distros will have trouble
> building the library.
> 
> 2.) Add several configure.ac checks to determine which attributes and
> structures are part of the build machine. Include a series of ifdefs
> in the libnl-idiag code to enable/disable the attributes as necessary.
> 
> 3.) I am currently using linux/inet_diag.h which has structures for
> dealing with the raw message that comes off the fd. I could add a
> bunch of defines/enums to libnl to support all the attributes that the
> latest kernel supports, but then we'd end up using a struct definition
> from the system-provided inet_diag along with a set of enums/defines
> that are different from what is found in inet_diag.h This might be OK;
> not sure what the libnl policy is on this.

Typically we keep a local copy of the latest version of the header in
the libnl source tree to have the latest definition available
regardless of the system the library is built on.

The code would then check for the presence of the feature in the
message and use/enable it if it is there.

I personally found relying on system header files very challenging and
almost impossible to get right while support more recent features.



More information about the libnl mailing list