wangchen61698 commented on code in PR #11578:
URL: https://github.com/apache/nuttx/pull/11578#discussion_r1462679072


##########
net/procfs/netdev_statistics.c:
##########
@@ -293,6 +293,13 @@ static int netprocfs_inet4addresses(FAR struct 
netprocfs_file_s *netfile)
   len += snprintf(&netfile->line[len], NET_LINELEN - len,
                   "\tinet addr:%s ", inet_ntoa_r(addr, inetaddr,
                                                  sizeof(inetaddr)));
+#ifdef CONFIG_NET_ARP_ACD
+  if (dev->d_acd.conflict_flag == ARP_ACD_ADDRESS_CONFLICT)
+    {
+      len += snprintf(&netfile->line[len], NET_LINELEN - len,
+                      "(conflict!)");

Review Comment:
   done



##########
net/arp/arp_acd.c:
##########
@@ -0,0 +1,281 @@
+/****************************************************************************
+ * net/arp/arp_acd.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+#include <nuttx/config.h>
+
+#include <debug.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <nuttx/net/ethernet.h>
+#include <nuttx/net/ip.h>
+#include <nuttx/net/net.h>
+#include <nuttx/net/netconfig.h>
+#include <nuttx/semaphore.h>
+
+#include "arp/arp.h"
+#include "netlink/netlink.h"
+#include "utils/utils.h"
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Function Prototypes
+ ****************************************************************************/
+
+static void arp_acd_try_announce(FAR void *net_dev);
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: arp_acd_arrange_announce
+ *
+ * Description:
+ *   creat work_queue to send ARP announce
+ *
+ * Input Parameters:
+ *   dev - The device driver structure to use in the send operation
+ *
+ * Returned Value:
+ *   none
+ *
+ ****************************************************************************/
+
+static void arp_acd_arrange_announce(FAR struct net_driver_s *dev)
+{
+  if (dev->d_acd.need_announce == true)
+    {
+      return;
+    }
+
+  if (!work_available(&dev->d_acd.work))
+    {
+      nerr("ERROR work unavailable \n");
+      return;
+    }
+
+  int ret = work_queue(LPWORK, &dev->d_acd.work, arp_acd_try_announce,
+                      (FAR void *)dev, DSEC2TICK(dev->d_acd.ttw));

Review Comment:
   done



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

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

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

Reply via email to