lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 12 Apr 2008 08:20:51 +0300
From:	"Andy Johnson" <johnsonzjo@...il.com>
To:	"YOSHIFUJI Hideaki / 吉藤英明" 
	<yoshfuji@...ux-ipv6.org>
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] [mcast-tools] Changing the type of pim_cksum.

Hello,

It could be that you are right; on the other hand, I had looked at
icmpv6.h, for example of __be16 usage.
It seems to me that the attitude there is different.

Under /usr/include we have two files named icmpv6.h:
	One is /usr/include/linux/icmpv6.h (which belongs to kernel-headers).
The other is  /usr/include/netinet/icmp6.h
which belongs to glibc-headers.

In /usr/include/linux/icmpv6.h (kernel-headers) we have:
struct icmp6hdr {

        union {
                __be32                  un_data32[1];
                __be16                  un_data16[2];
                __u8                    un_data8[4];



In /usr/include/netinet/icmp6.h (glibc-headers) we have:
struct icmp6_hdr
  {
    union
      {
        uint32_t  icmp6_un_data32[1]; /* type-specific field */
        uint16_t  icmp6_un_data16[2]; /* type-specific field */
        uint8_t   icmp6_un_data8[4];  /* type-specific field */
      } icmp6_dataun;
  };

	
Note that the __be16 was replaced by 	uint16_t, and that __be32 was
replaced by uint32_t. I don't think that in you will find typedef for __be* for
a user space part in any linux kernel headers. Ideas?

Regards,
AJ


On Fri, Apr 11, 2008 at 12:24 PM, YOSHIFUJI Hideaki / 吉藤英明
<yoshfuji@...ux-ipv6.org> wrote:
>
> In article <147a89290804110214nb1cc55fp4645ce1f913d74d6@...l.gmail.com> (at Fri, 11 Apr 2008 12:14:37 +0300), "Andy Johnson" <johnsonzjo@...il.com> says:
>
>  > Hello,
>  >
>  > >In glibc-2.3.x both defines were provided, but after that the old
>  > >ICMP6_* defines were completely removed.
>  >
>  > >Probably Yoshifuji-san tests the user tool builds on a glibc-2.3.x or
>  > >earlier system, which has the old deprecated defines.
>  >
>  >
>  > I could get access today (at last...) to a machine running glibc-2.3.4-2.13.
>  > I had done the following:
>  > git-clone git://git.linux-ipv6.org/gitroot/yoshfuji/mcast-tools.git
>  >
>  > cd mcast-tools
>  >
>  > aclocal; automake; autoconf
>  > ./configure
>  > cd pim6sd
>  > make
>  >
>  >
>  > I got the following error:
>  >
>  > In file included from debug.c:71:
>  > ../include/linux/pim.h:17: error: syntax error before "__be16"
>  > ../include/linux/pim.h:17: warning: no semicolon at end of struct or union
>  > make[1]: *** [debug.o] Error 1
>  > make[1]: Leaving directory ...
>  > make: *** [all-recursive] Error 1
>  >
>  > As far as I understand, the __be16 is good for kernel headers, but not
>  > for user space headers. I am not sure about it. However, in case I am
>  > right, I changed it to  "uint16_t pim_cksum" instead of  "__be16  pim_cksum"
>  > in /include/linux/pim.h;
>  > and then "make" finsihed ok.
>  > And attached here is the patch. What do you think ?
>
>  No, I think __be16 should be declared (typedef'ed) in user-space.
>  I'm not sure if we can solve by including right file.
>
>  Actually what I want to do is to specify kernel include files in
>  mcast-tools - something like:
>    ./configue --with-kernel-headers=/home/yoshfuji/linux-2.6-devi/include
>
>  Regards,
>
>  --yoshfuji
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ