Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Tweak lltable_sysctl_dumparp



details:   https://anonhg.NetBSD.org/src/rev/d59454266992
branches:  trunk
changeset: 354640:d59454266992
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Jun 23 05:46:10 2017 +0000

description:
Tweak lltable_sysctl_dumparp

- Rename lltable_sysctl_dumparp to lltable_sysctl_dump
  because it's not only for ARP
- Enable it not only for INET but also for INET6

diffstat:

 sys/net/if_llatbl.c |   4 ++--
 sys/net/if_llatbl.h |   4 ++--
 sys/net/rtsock.c    |  10 +++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)

diffs (78 lines):

diff -r e383e1ed77e7 -r d59454266992 sys/net/if_llatbl.c
--- a/sys/net/if_llatbl.c       Fri Jun 23 04:36:48 2017 +0000
+++ b/sys/net/if_llatbl.c       Fri Jun 23 05:46:10 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_llatbl.c,v 1.19 2017/06/22 09:56:48 ozaki-r Exp $   */
+/*     $NetBSD: if_llatbl.c,v 1.20 2017/06/23 05:46:10 ozaki-r Exp $   */
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -149,7 +149,7 @@
  * Dump arp state for a specific address family.
  */
 int
-lltable_sysctl_dumparp(int af, struct rt_walkarg *w)
+lltable_sysctl_dump(int af, struct rt_walkarg *w)
 {
        struct lltable *llt;
        int error = 0;
diff -r e383e1ed77e7 -r d59454266992 sys/net/if_llatbl.h
--- a/sys/net/if_llatbl.h       Fri Jun 23 04:36:48 2017 +0000
+++ b/sys/net/if_llatbl.h       Fri Jun 23 05:46:10 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_llatbl.h,v 1.11 2017/06/22 09:56:48 ozaki-r Exp $   */
+/*     $NetBSD: if_llatbl.h,v 1.12 2017/06/23 05:46:10 ozaki-r Exp $   */
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -258,7 +258,7 @@
                    const struct sockaddr *, const u_int);
 void           lltable_drain(int);
 void           lltable_purge_entries(struct lltable *);
-int            lltable_sysctl_dumparp(int, struct rt_walkarg *);
+int            lltable_sysctl_dump(int, struct rt_walkarg *);
 int            lltable_dump_entry(struct lltable *, struct llentry *,
                    struct rt_walkarg *, struct sockaddr *);
 
diff -r e383e1ed77e7 -r d59454266992 sys/net/rtsock.c
--- a/sys/net/rtsock.c  Fri Jun 23 04:36:48 2017 +0000
+++ b/sys/net/rtsock.c  Fri Jun 23 05:46:10 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtsock.c,v 1.218 2017/06/23 04:27:55 ozaki-r Exp $     */
+/*     $NetBSD: rtsock.c,v 1.219 2017/06/23 05:46:10 ozaki-r Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.218 2017/06/23 04:27:55 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.219 2017/06/23 05:46:10 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1916,7 +1916,7 @@
 
        case NET_RT_DUMP:
        case NET_RT_FLAGS:
-#ifdef INET
+#if defined(INET) || defined(INET6)
                /*
                 * take care of llinfo entries, the caller must
                 * specify an AF
@@ -1924,12 +1924,12 @@
                if (w.w_op == NET_RT_FLAGS &&
                    (w.w_arg == 0 || w.w_arg & RTF_LLDATA)) {
                        if (af != 0)
-                               error = lltable_sysctl_dumparp(af, &w);
+                               error = lltable_sysctl_dump(af, &w);
                        else
                                error = EINVAL;
                        break;
                }
-#endif /* INET */
+#endif
 
                for (i = 1; i <= AF_MAX; i++)
                        if ((af == 0 || af == i) &&



Home | Main Index | Thread Index | Old Index