Squashed commit of the following:

Networking:  Add implementation of logic for SIOCGIFCONF and SIOCGLIFCOF IOCTL commnds.
    Networking:  Add definitions and stuctures to support SIOCGIFCONF and SIOCGLIFCONF IOCTL commands.
This commit is contained in:
Gregory Nutt
2017-09-19 14:17:05 -06:00
parent d47917e019
commit 7af976c00a
6 changed files with 402 additions and 19 deletions
+30
View File
@@ -177,6 +177,21 @@ struct lifreq
#define lifr_mii_val_in lifr_ifru.lifru_mii_data.val_in /* PHY input data */
#define lifr_mii_val_out lifr_ifru.lifru_mii_data.val_out /* PHY output data */
/* Used only with the SIOCGLIFCONF IOCTL commnd*/
struct lifconf
{
size_t lifc_len; /* Size of buffer */
union
{
FAR char *lifcu_buf; /* Buffer address */
FAR struct lifreq *lifcu_req; /* Array of ifreq structures */
} lifc_ifcu;
};
#define lifc_buf lifc_ifcu.lifcu_buf /* Buffer address */
#define lifc_req lifc_ifcu.lifcu_req /* Array of ifreq structures */
/* This is the I/F request that should be used with IPv4. */
struct ifreq
@@ -213,6 +228,21 @@ struct ifreq
#define ifr_mii_val_in ifr_ifru.ifru_mii_data.val_in /* PHY input data */
#define ifr_mii_val_out ifr_ifru.ifru_mii_data.val_out /* PHY output data */
/* Used only with the SIOCGIFCONF IOCTL commnd*/
struct ifconf
{
size_t ifc_len; /* Size of buffer */
union
{
FAR char *ifcu_buf; /* Buffer address */
FAR struct ifreq *ifcu_req; /* Array of ifreq structures */
} ifc_ifcu;
};
#define ifc_buf ifc_ifcu.ifcu_buf /* Buffer address */
#define ifc_req ifc_ifcu.ifcu_req /* Array of ifreq structures */
/*******************************************************************************************
* Public Function Prototypes
*******************************************************************************************/