All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matteo Petracca <matteo.petracca@sssup.it>
To: Alexander Aring <alex.aring@gmail.com>
Cc: linux-wpan@vger.kernel.org
Subject: Re: Error in including IEEE802154.h
Date: Fri, 08 May 2015 14:27:54 +0200	[thread overview]
Message-ID: <554CABCA.7080909@sssup.it> (raw)
In-Reply-To: <20150508115030.GA15416@omega>

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


  reply	other threads:[~2015-05-08 12:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-05-08 16:53     ` Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=554CABCA.7080909@sssup.it \
    --to=matteo.petracca@sssup.it \
    --cc=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.