mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-18 08:52:01 +08:00
netutils/nshlib: Add wrapper to get the wireless ESSID.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user