netutils/nshlib: Add wrapper to get the wireless ESSID.

This commit is contained in:
Gregory Nutt
2017-03-13 14:16:26 -06:00
parent 0cb844e790
commit 84444e4dcc
4 changed files with 135 additions and 8 deletions

View File

@@ -57,10 +57,8 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* The address family that we used to create the socket and in the IOCTL
/* The address family that we used to create the socket and in the IOCTL
* data really does not matter. It should, however, be valid in the current
* configuration.
*/
@@ -85,10 +83,11 @@
*
* Parameters:
* ifname The name of the interface to use
* essid MAC address to set, size must be IFHWADDRLEN
* essid Wireless ESSD address to set, size must be less then or equal
* to IW_ESSID_MAX_SIZE + 1 (including the NUL string terminator).
*
* Return:
* 0 on success; -1 on failure
* 0 on success; -1 on failure (errno may not be set)
*
****************************************************************************/
@@ -115,7 +114,7 @@ int netlib_setessid(FAR const char *ifname, FAR const char *essid)
req.u.essid.length = strlen(essid) + 1;
req.u.essid.flags = 1;
/* Perform the ioctl to set the MAC address */
/* Perform the ioctl to set the ESSID */
ret = ioctl(sockfd, SIOCSIWESSID, (unsigned long)&req);
close(sockfd);