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/10/02 16:53:04 UTC

[GitHub] [incubator-nuttx-apps] davids5 commented on a change in pull request #416: ipcfg: Add hooks for future IPv6 support.

davids5 commented on a change in pull request #416:
URL: https://github.com/apache/incubator-nuttx-apps/pull/416#discussion_r498933535



##########
File path: include/fsutils/ipcfg.h
##########
@@ -31,23 +31,35 @@
  * Public Types
  ****************************************************************************/
 
-/* Values for the BOOTPROTO setting */
+/* Values for the record type field */
 
-enum ipcfg_bootproto_e
+enum ipcfg_iptype_e
 {
-  BOOTPROTO_NONE     = 0, /* No protocol assigned */
-  BOOTPROTO_STATIC   = 1, /* Use static IP */
-  BOOTPROTO_DHCP     = 2, /* Use DHCP */
-  BOOTPROTO_FALLBACK = 3  /* Use DHCP with fall back static IP */
+  IPTYPE_IPv4        = 0, /* IPv4 configuration */
+  IPTYPE_IPv6        = 1  /* IPv6 configuration */
+};
+
+/* Generic IP Configuration record header.  Must be cast compatible with
+ * both struct ipv4cfg_s and struct ipv6cfg_s
+ */
+
+struct ipcfg_s
+{
+  uint8_t next;                 /* Offset to the next IP configuration record */
+  enum ipcfg_iptype_e type;     /* Must be IPTYPE_IPv4 */

Review comment:
       @patacongo did you consider using the AF_INET/AF_INET6 here or did you want the extra abstraction>?

##########
File path: fsutils/ipcfg/ipcfg.c
##########
@@ -498,14 +504,16 @@ int ipcfg_read(FAR const char *netdev, FAR struct ipcfg_s *ipcfg)
  ****************************************************************************/
 
 #ifdef CONFIG_IPCFG_WRITABLE
-int ipcfg_write(FAR const char *netdev, FAR const struct ipcfg_s *ipcfg)

Review comment:
       After Line 498 needs the af param doc added




----------------------------------------------------------------
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