Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Development (http://www.linux-archive.org/debian-development/)
-   -   Needed information about a structure (http://www.linux-archive.org/debian-development/149893-needed-information-about-structure.html)

Laurent Guignard 08-27-2008 08:08 PM

Needed information about a structure
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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...

Thanks in advance.


- --
Laurent Guignard, Registered as user #301590 with the Linux Counter<br>
Site : http://www.famille-guignard.org<br>
Blog : http://blog.famille-guignard.org<br>
Projet : http://sicontact.sourceforge.net<br>
GULL de Villefranche sur Saône : http://www.cagull.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFItbQmjcKpXFc/7oYRAmGPAKCTya1jd5iiM7sdkvSKII/UsopciQCcD8qE
WCHmv2j/qk7P5ggVC5Yh0l0=
=0g0O
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Russ Allbery 08-27-2008 08:14 PM

Needed information about a structure
 
Laurent Guignard <lguignard2000@yahoo.fr> 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 (rra@debian.org) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Laurent Guignard 08-28-2008 08:00 PM

Needed information about a structure
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Russ Allbery a écrit :
> Laurent Guignard <lguignard2000@yahoo.fr> 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.
>

Thanks for your answer.

This software has been first developped on Solaris OS. If i want to
build a package on i386, i'll be forced to adapt upstream code...

It isn't good as explain in maintainer guide, but how to do to package
this software as asked in Debian Bug report - #495959 ?

Am i forced to contact upstream developer to ask him to adapt his software ?

Best regards

- --
Laurent Guignard, Registered as user #301590 with the Linux Counter<br>
Site : http://www.famille-guignard.org<br>
Blog : http://blog.famille-guignard.org<br>
Projet : http://sicontact.sourceforge.net<br>
GULL de Villefranche sur Saône : http://www.cagull.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFItwPPjcKpXFc/7oYRAsCkAJ9grnxpCANH35rteThVdJO5mSgQAwCgoVhm
MPBp4mdqQGEWWkrCWZGqHEI=
=XHHM
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


All times are GMT. The time now is 10:09 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.