Module Name: src
Committed By: pgoyette
Date: Thu Mar 8 00:25:30 UTC 2018
Modified Files:
src/sys/compat/common [pgoyette-compat]: uipc_syscalls_40.c
src/sys/net [pgoyette-compat]: if.c if.h
Added Files:
src/sys/compat/sys [pgoyette-compat]: if.h
Log Message:
Handle ifconf() compat vectors
To generate a diff of this commit:
cvs rdiff -u -r1.15.2.3 -r1.15.2.4 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/sys/if.h
cvs rdiff -u -r1.419.2.3 -r1.419.2.4 src/sys/net/if.c
cvs rdiff -u -r1.258.2.7 -r1.258.2.8 src/sys/net/if.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/compat/common/uipc_syscalls_40.c
diff -u src/sys/compat/common/uipc_syscalls_40.c:1.15.2.3 src/sys/compat/common/uipc_syscalls_40.c:1.15.2.4
--- src/sys/compat/common/uipc_syscalls_40.c:1.15.2.3 Tue Mar 6 23:17:42 2018
+++ src/sys/compat/common/uipc_syscalls_40.c Thu Mar 8 00:25:30 2018
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall
#include <net/if.h>
+#include <compat/sys/if.h>
#include <compat/sys/socket.h>
#include <compat/sys/sockio.h>
Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.419.2.3 src/sys/net/if.c:1.419.2.4
--- src/sys/net/if.c:1.419.2.3 Wed Mar 7 08:56:44 2018
+++ src/sys/net/if.c Thu Mar 8 00:25:30 2018
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: if.c,v 1.419
#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");
Index: src/sys/net/if.h
diff -u src/sys/net/if.h:1.258.2.7 src/sys/net/if.h:1.258.2.8
--- src/sys/net/if.h:1.258.2.7 Tue Mar 6 23:49:45 2018
+++ src/sys/net/if.h Thu Mar 8 00:25:30 2018
@@ -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 @@ int sysctl_ifq(int *name, u_int namelen,
{ "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_ */
Added files:
Index: src/sys/compat/sys/if.h
diff -u /dev/null src/sys/compat/sys/if.h:1.1.2.1
--- /dev/null Thu Mar 8 00:25:30 2018
+++ src/sys/compat/sys/if.h Thu Mar 8 00:25:30 2018
@@ -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_ */