Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net * split PRU_SENSE functionality out of link_usrreq()...
details: https://anonhg.NetBSD.org/src/rev/d36a0a1d85a9
branches: trunk
changeset: 330371:d36a0a1d85a9
user: rtr <rtr%NetBSD.org@localhost>
date: Sun Jul 06 16:06:19 2014 +0000
description:
* split PRU_SENSE functionality out of link_usrreq() and place into
separate link_stat(struct socket *, struct stat *) function
diffstat:
sys/net/link_proto.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (54 lines):
diff -r 8ee5fedc9403 -r d36a0a1d85a9 sys/net/link_proto.c
--- a/sys/net/link_proto.c Sun Jul 06 15:49:14 2014 +0000
+++ b/sys/net/link_proto.c Sun Jul 06 16:06:19 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: link_proto.c,v 1.12 2014/07/01 05:49:18 rtr Exp $ */
+/* $NetBSD: link_proto.c,v 1.13 2014/07/06 16:06:19 rtr Exp $ */
/*-
* Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.12 2014/07/01 05:49:18 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.13 2014/07/06 16:06:19 rtr Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -51,6 +51,7 @@
static int link_attach(struct socket *, int);
static void link_detach(struct socket *);
static int link_ioctl(struct socket *, u_long, void *, struct ifnet *);
+static int link_stat(struct socket *, struct stat *);
static int link_usrreq(struct socket *, int, struct mbuf *, struct mbuf *,
struct mbuf *, struct lwp *);
static void link_init(void);
@@ -65,6 +66,7 @@
.pr_attach = link_attach,
.pr_detach = link_detach,
.pr_ioctl = link_ioctl,
+ .pr_stat = link_stat,
.pr_generic = link_usrreq,
};
@@ -238,12 +240,19 @@
}
static int
+link_stat(struct socket *so, struct stat *ub)
+{
+ return EOPNOTSUPP;
+}
+
+static int
link_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
struct mbuf *control, struct lwp *l)
{
KASSERT(req != PRU_ATTACH);
KASSERT(req != PRU_DETACH);
KASSERT(req != PRU_CONTROL);
+ KASSERT(req != PRU_SENSE);
return EOPNOTSUPP;
}
Home |
Main Index |
Thread Index |
Old Index