Error in including IEEE802154.h
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
Alexander Aring
maintainerHi,
Quoted 4 lines · Matteo Petracca
Dear all,
I gave a program in kernel 3.8.17 in which I successfully includeieee802154.hby simply witing:
Quoted 9 lines
#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 directoryAny 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
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
Quoted 31 lines · Alexander Aring
Hi,
Quoted 4 lines · Matteo Petracca
Dear all,
I gave a program in kernel 3.8.17 in which I successfully includeieee802154.hby simply witing:Quoted 9 lines
#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 directoryAny 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
Alexander Aring
maintainerHi,
Quoted 13 lines · Matteo Petracca
Hi,
the program that I am trying to compile is thetest1.cin 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>
Quoted 2 lines
#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