You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/09/25 16:32:06 UTC

[GitHub] [incubator-nuttx] patacongo commented on pull request #1886: Allows network monitoring (apps repo) using polling and allows the board to provide the IP config at runtime.

patacongo commented on pull request #1886:
URL: https://github.com/apache/incubator-nuttx/pull/1886#issuecomment-699028203


   
   > Here are my take aways.
   > 
   >     1. The configuration must follow Linux file location and naming of files and variables.
   
   The configuration _should_ follow Linux file location and naming of files and variables _unless there is some credible reason to deviate from that._  
   
   NuttX has morphed, due primarily to the contributions from Xiaomi.  Originally is was a POSIX/Unix compliant OS based on the requirements of OpenGroup.org.  But Xiaomi has been pushing harder for Linux compatibility.  I have mixed feelings about that.  Linux is non-standard, so I am not fully comfortable with using a non-standard OS as our standard (despite the LFS).  But it seems that Linux compatible is something that users want more than purely academic POSIX/Unix compliance.
   
   >     2. Boardctl API shall not be used.
   
   Boardctl API shall not be used _unless the functionality is clearly board-related and cannot be realized using standard mechanisms_.  Boardctl() is not meant to be a dumping ground for quick and dirty implementation when the proper interfaces are available or should be implemented.  We want to do things right, not necessarily quickly.  That is one of the enemies called out in the INVIOLABLES.
   
   >     3. The netinit (net monitor) will read the information from files.
   >        It will use IOCTL/net helpers to set the values.
   
   Certainly, boardctl() commands should not be used to duplicate existing functionality.  And certainly nothing related to DHCP should exist at any OS interface.
   
   If there is some other solution for DHCP settings that can be implemented purely in user-space, such as an environment variable, then that might be reasonable too.  The file solution should be supported in any event since it is the Linux way and buys us that much more compatibility.
   
   >     4. ifconfig needs to be updated to support the thing nuttx can
   
   I don't follow.  I am not aware of any pressing changes needed to ifconfig.
   
   >     1. It would be nice to have a writeable proc fs so that echo "192.168.96.1" > /procfs/eth0/ipaddr
   
   procfs is not writable.  You can use the IOCTL command to do that (see apps/netutils/netlib).  That IOCTL is the standard compatible way to set the IP address on all Linux and BSD systems.
   
   There is no reason why procfs is read-only, but that is the way it is implemented currently.  The Linux procfs is writable in some cases, provided that you have privileges.
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org