Source-Changes-HG archive

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

[src/pgoyette-compat]: src/sys Handle ifconf() compat vectors



details:   https://anonhg.NetBSD.org/src/rev/38a212717cfb
branches:  pgoyette-compat
changeset: 320971:38a212717cfb
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Thu Mar 08 00:25:30 2018 +0000

description:
Handle ifconf() compat vectors

diffstat:

 sys/compat/common/uipc_syscalls_40.c |   5 ++-
 sys/compat/sys/if.h                  |  46 ++++++++++++++++++++++++++++++++++++
 sys/net/if.c                         |   5 ++-
 sys/net/if.h                         |  10 +-------
 4 files changed, 53 insertions(+), 13 deletions(-)

diffs (122 lines):

diff -r 931e4893899d -r 38a212717cfb sys/compat/common/uipc_syscalls_40.c
--- a/sys/compat/common/uipc_syscalls_40.c      Thu Mar 08 00:23:47 2018 +0000
+++ b/sys/compat/common/uipc_syscalls_40.c      Thu Mar 08 00:25:30 2018 +0000
@@ -1,9 +1,9 @@
-/*     $NetBSD: uipc_syscalls_40.c,v 1.15.2.3 2018/03/06 23:17:42 pgoyette Exp $       */
+/*     $NetBSD: uipc_syscalls_40.c,v 1.15.2.4 2018/03/08 00:25:30 pgoyette Exp $       */
 
 /* written by Pavel Cahyna, 2006. Public domain. */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.3 2018/03/06 23:17:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.4 2018/03/08 00:25:30 pgoyette Exp $");
 
 /*
  * System call interface to the socket abstraction.
@@ -18,6 +18,7 @@
 
 #include <net/if.h>
 
+#include <compat/sys/if.h>
 #include <compat/sys/socket.h>
 #include <compat/sys/sockio.h>
 
diff -r 931e4893899d -r 38a212717cfb sys/compat/sys/if.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/compat/sys/if.h       Thu Mar 08 00:25:30 2018 +0000
@@ -0,0 +1,46 @@
+/*     $NetBSD: if.h,v 1.1.2.1 2018/03/08 00:25:30 pgoyette Exp $      */
+
+/*-
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by pgoyette
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _COMPAT_SYS_NET_IF_H_
+#define _COMPAT_SYS_NET_IF_H_
+
+#ifdef _NETBSD_SOURCE
+
+/* compat function vectors */
+
+#include <compat/sys/sockio.h>
+
+extern int (*vec_compat_ifdatareq)(struct lwp *, u_long, void *);
+extern void (*vec_compat_ifreqo2n)(struct oifreq *, struct ifreq *);
+extern int (*vec_compat_ifconf)(u_long, void *);
+
+#endif /* _NETBSD_SOURCE */
+#endif /* !_COMPAT_SYS_NET_IF_H_ */
diff -r 931e4893899d -r 38a212717cfb sys/net/if.c
--- a/sys/net/if.c      Thu Mar 08 00:23:47 2018 +0000
+++ b/sys/net/if.c      Thu Mar 08 00:25:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.419.2.3 2018/03/07 08:56:44 pgoyette Exp $    */
+/*     $NetBSD: if.c,v 1.419.2.4 2018/03/08 00:25:30 pgoyette Exp $    */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.419.2.3 2018/03/07 08:56:44 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.419.2.4 2018/03/08 00:25:30 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -157,6 +157,7 @@
 
 #include <compat/sys/sockio.h>
 #include <compat/sys/socket.h>
+#include <compat/sys/if.h>
 
 MALLOC_DEFINE(M_IFADDR, "ifaddr", "interface address");
 MALLOC_DEFINE(M_IFMADDR, "ether_multi", "link-level multicast address");
diff -r 931e4893899d -r 38a212717cfb sys/net/if.h
--- a/sys/net/if.h      Thu Mar 08 00:23:47 2018 +0000
+++ b/sys/net/if.h      Thu Mar 08 00:25:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.h,v 1.258.2.7 2018/03/06 23:49:45 pgoyette Exp $    */
+/*     $NetBSD: if.h,v 1.258.2.8 2018/03/08 00:25:30 pgoyette Exp $    */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -1333,13 +1333,5 @@
        { "drops", CTLTYPE_INT }, \
 }
 
-/* compat function vectors */
-
-#include <compat/sys/sockio.h>
-
-extern int (*vec_compat_ifdatareq)(struct lwp *, u_long, void *);
-extern void (*vec_compat_ifreqo2n)(struct oifreq *, struct ifreq *);
-extern int (*vec_compat_ifconf)(u_long, void *);
-
 #endif /* _NETBSD_SOURCE */
 #endif /* !_NET_IF_H_ */



Home | Main Index | Thread Index | Old Index