mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 02:17:37 +08:00
netlib: Get and/or set PAN ID of IEEE 802.15.4 radio.
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "wireless/ieee802154.h"
|
||||
#include "netutils/netlib.h"
|
||||
|
||||
#if defined(CONFIG_NET_6LOWPAN) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
@@ -80,13 +81,10 @@ int netlib_getpanid(FAR const char *ifname, FAR uint16_t *panid)
|
||||
int sockfd = socket(PF_INET6, NETLIB_SOCK_IOCTL, 0);
|
||||
if (sockfd >= 0)
|
||||
{
|
||||
/* Put the driver name into the request */
|
||||
#warning Missing logic
|
||||
/* Perform the ioctl to get the current PAN ID */
|
||||
/* Use the helper provided in libradio */
|
||||
|
||||
ret = ieee802154_getpanid(sockfd, ifname, panid);
|
||||
close(sockfd);
|
||||
|
||||
/* Reuturn the current PAN ID */
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user