* Error in including IEEE802154.h
@ 2015-05-07 16:49 Matteo Petracca
2015-05-08 11:50 ` Alexander Aring
0 siblings, 1 reply; 4+ messages in thread
From: Matteo Petracca @ 2015-05-07 16:49 UTC (permalink / raw)
To: linux-wpan
Dear all,
I gave a program in kernel 3.8.17 in which I successfully include
ieee802154.h by simply witing:
#include <ieee802154.h>
In my BeagleBone now I have just upgraded the kernel to 4.0.1,
and compiling the same code I get:
fatal error: ieee802154.h: No such file or directory
Any hint?
Best,
Matteo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Error in including IEEE802154.h
2015-05-07 16:49 Error in including IEEE802154.h Matteo Petracca
@ 2015-05-08 11:50 ` Alexander Aring
2015-05-08 12:27 ` Matteo Petracca
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Aring @ 2015-05-08 11:50 UTC (permalink / raw)
To: Matteo Petracca; +Cc: linux-wpan
Hi,
On Thu, May 07, 2015 at 06:49:44PM +0200, Matteo Petracca wrote:
> Dear all,
> I gave a program in kernel 3.8.17 in which I successfully include
> ieee802154.h by simply witing:
>
> #include <ieee802154.h>
>
> In my BeagleBone now I have just upgraded the kernel to 4.0.1,
> and compiling the same code I get:
>
> fatal error: ieee802154.h: No such file or directory
>
> Any hint?
>
no, I suppose that this header is some of the old netlink interface, but
I can't be sure here. I can't be sure because I don't know what was the
functionality/why you need that in your application.
In short:
We don't deliever any headers to uapi for userspace. If you need headers
for userspace<->kernelspace communication you need to grab them on your
own out of your current kernel source tree. What I mean is that we
didn't change any in our uapi headers which are deliviered by
kernel-headers because we don't have any headers which laying inside
"include/uapi" tree right now.
- Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Error in including IEEE802154.h
2015-05-08 11:50 ` Alexander Aring
@ 2015-05-08 12:27 ` Matteo Petracca
2015-05-08 16:53 ` Alexander Aring
0 siblings, 1 reply; 4+ messages in thread
From: Matteo Petracca @ 2015-05-08 12:27 UTC (permalink / raw)
To: Alexander Aring; +Cc: linux-wpan
Hi,
the program that I am trying to compile is the test1.c
in the lowpan-tools.
#include <linux/sockios.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include "ieee802154.h"
int main(int argc, char **argv) {
int ret;
char *iface = argv[1] ?: "wpan0";
char buf[] = {0x40, 0x00, 0x56};
int sd = socket(PF_IEEE802154, SOCK_RAW, 0);
if (sd < 0) {
perror("socket");
return 1;
}
ret = setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, iface,
strlen(iface) + 1);
if (ret < 0)
perror("setsockopt: BINDTODEVICE");
ret = send(sd, buf, sizeof(buf), 0);
if (ret < 0)
perror("send");
ret = recv(sd, buf, sizeof(buf), 0);
if (ret < 0)
perror("recv");
ret = shutdown(sd, SHUT_RDWR);
if (ret < 0)
perror("shutdown");
ret = close(sd);
if (ret < 0)
perror("close");
return 0;
}
It worked in kernel 3.8.13 on BBB, now I get the error
test1.c:35:24: fatal error: ieee802154.h: No such file or directory
in kernel 4.0.1.
Matteo
On 08/05/2015 13:50, Alexander Aring wrote:
> Hi,
>
> On Thu, May 07, 2015 at 06:49:44PM +0200, Matteo Petracca wrote:
>> Dear all,
>> I gave a program in kernel 3.8.17 in which I successfully include
>> ieee802154.h by simply witing:
>>
>> #include <ieee802154.h>
>>
>> In my BeagleBone now I have just upgraded the kernel to 4.0.1,
>> and compiling the same code I get:
>>
>> fatal error: ieee802154.h: No such file or directory
>>
>> Any hint?
>>
> no, I suppose that this header is some of the old netlink interface, but
> I can't be sure here. I can't be sure because I don't know what was the
> functionality/why you need that in your application.
>
>
> In short:
>
> We don't deliever any headers to uapi for userspace. If you need headers
> for userspace<->kernelspace communication you need to grab them on your
> own out of your current kernel source tree. What I mean is that we
> didn't change any in our uapi headers which are deliviered by
> kernel-headers because we don't have any headers which laying inside
> "include/uapi" tree right now.
>
> - Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Error in including IEEE802154.h
2015-05-08 12:27 ` Matteo Petracca
@ 2015-05-08 16:53 ` Alexander Aring
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Aring @ 2015-05-08 16:53 UTC (permalink / raw)
To: Matteo Petracca; +Cc: linux-wpan
Hi,
On Fri, May 08, 2015 at 02:27:54PM +0200, Matteo Petracca wrote:
> Hi,
> the program that I am trying to compile is the test1.c
> in the lowpan-tools.
>
> #include <linux/sockios.h>
> #include <net/if.h>
> #include <sys/ioctl.h>
> #include <sys/socket.h>
> #include <stdio.h>
> #include <stdint.h>
> #include <string.h>
> #include <unistd.h>
>
> #include "ieee802154.h"
>
you know what this code does?
It search at first in the local dir where "test1.c" is stored for the
"ieee802154.h" header. Which means it's a local header.
A fallback behaviour of gcc will search this header in your given
include path which are given by -I and -stdinc gcc arguments.
What I can told you now that we don't deliver any headers into userspace
side with the kernel-headers. So this header comes from the lowpan-tools
package. Maybe tyoe a `find -name "ieee802154.h" $LOWPAN_TOOLS_DIR` in
your shell, to find it or whereever your include paths belongs to which
are given over "-I" of gcc call.
- Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-08 16:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-07 16:49 Error in including IEEE802154.h Matteo Petracca
2015-05-08 11:50 ` Alexander Aring
2015-05-08 12:27 ` Matteo Petracca
2015-05-08 16:53 ` Alexander Aring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.