Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Matteo Petracca <matteo.petracca@sssup.it>
Cc: linux-wpan@vger.kernel.org
Subject: Re: Ieee802154 socket problem with SIOCGIFADDR
Date: Mon, 11 May 2015 19:29:47 +0200	[thread overview]
Message-ID: <20150511172944.GA23185@omega> (raw)
In-Reply-To: <5550DFA3.5020806@sssup.it>

On Mon, May 11, 2015 at 06:58:11PM +0200, Matteo Petracca wrote:
> This is basically what I have in my program:
> 
>   int socketfd = 0;
>   struct ifreq ifr;
>   static const char *wpandevs[] = {
>        "wpan0"
>   };
> 
> 
>  socket_config_wpan = wpandevs[0];
>  socketfd = socket(PF_IEEE802154, SOCK_RAW, 0);
> 
> strncpy(ifr.ifr_name, socket_config_wpan, IF_NAMESIZE);
>   ret = ioctl(socketfd, SIOCGIFADDR, &ifr);
>   if (ret < 0) {
>       fprintf(stderr,"ioctl: SIOCGIFADDR error\n");
>       return;
>    }
> 
>  In can say that in kernel 3.8.13 it works with no problems.
> 

I wrote a dirty hack [0]. Run it on my side and detected no issue.

The output is:

pan_id 0xabcd
short_addr 0x2

and that's my current pan_id and short_addr setting.

- Alex

[0] http://pastebin.com/EE5wGZ5Q

  reply	other threads:[~2015-05-11 17:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-09 14:41 Ieee802154 socket problem with SIOCGIFADDR Matteo Petracca
2015-05-09 16:42 ` Alexander Aring
2015-05-11 16:43   ` Matteo Petracca
2015-05-11 16:51     ` Alexander Aring
2015-05-11 16:58       ` Matteo Petracca
2015-05-11 17:29         ` Alexander Aring [this message]
2015-05-11 17:37       ` Alexander Aring
2015-05-11 17:51     ` Alexander Aring
2015-05-12  8:32       ` Matteo Petracca
2015-05-12  8:39         ` Alexander Aring
2015-05-12  9:48           ` Matteo Petracca
2015-05-12 10:33             ` 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=20150511172944.GA23185@omega \
    --to=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    --cc=matteo.petracca@sssup.it \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox