the net monitor shouldn't tightly couple with the ethernet hardware
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
netinit_monitor(https://github.com/apache/incubator-nuttx-apps/blob/master/netutils/netinit/netinit.c#L571) interact with the kernel through the follow IOCTL:
```
/* MDIO/MCD *****************************************************************/
#define SIOCMIINOTIFY _SIOC(0x0023) /* Receive notificaion via signal on
* PHY state change */
#define SIOCGMIIPHY _SIOC(0x0024) /* Get address of MII PHY in use */
#define SIOCGMIIREG _SIOC(0x0025) /* Get a MII register via MDIO */
#define SIOCSMIIREG _SIOC(0x0026) /* Set a MII register via MDIO */
```
which expose MII/GMII register defintion directly to userspace and then can't work with:
1.Ethernet card which don't follow the MII/GMII defintion
2.Other wireless technology(e.g. WiFi and 802.15.4)
Since the netlink is now part of the network stack, it's better to redesign the notification mechanism to utilize netlink socket and generalize it to cover all possible MAC layer.
Contributor guide
Assessment
This issue has not been assessed yet.