Laurent Guignard <[EMAIL PROTECTED]> writes: > Hello developers, > > I would like to know how to discover the library for the structure > "udphdr" because the DHCP_PROBE program (in wanted package of the WNPP) > use this structure and configure is OK but when i compile I have this > error : > dhcp_probe.c:798: error: ‘struct udphdr’ has no member named ‘uh_ulen’ > > I understand that the structure udphdr hasn't the member used in > dhcp_probe.c file but i would like to discover where to find the good > header file to include so the library which is contain it...
windlord:/usr/include> grep -r udphdr * linux/udp.h:struct udphdr { netinet/udp.h:struct udphdr netinet/udp.h:struct udphdr So /usr/include/netinet/udp.h is the right include file for that structure. (Structure definitions are not something that exist in a library, really, although they may be part of the ABI for a library.) That structure does indeed have a uh_ulen member iff _BSD_SOURCE is defined by the application before including the header file (and various other feature test macros are not defined). See /usr/include/features.h and search for __FAVOR_BSD. -- Russ Allbery ([EMAIL PROTECTED]) <http://www.eyrie.org/~eagle/> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]