Add extra argument to VOP_BMAP.
[unix-history] / usr / src / sys / net / raw_usrreq.c
index e01a9de..45c6d0c 100644 (file)
@@ -2,19 +2,9 @@
  * Copyright (c) 1980, 1986 Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1980, 1986 Regents of the University of California.
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley.  The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * %sccs.include.redist.c%
  *
  *
- *     @(#)raw_usrreq.c        7.5 (Berkeley) %G%
+ *     @(#)raw_usrreq.c        7.11 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -30,8 +20,6 @@
 #include "netisr.h"
 #include "raw_cb.h"
 
 #include "netisr.h"
 #include "raw_cb.h"
 
-#include "../machine/mtpr.h"
-
 /*
  * Initialize raw connection block q.
  */
 /*
  * Initialize raw connection block q.
  */
@@ -39,7 +27,6 @@ raw_init()
 {
 
        rawcb.rcb_next = rawcb.rcb_prev = &rawcb;
 {
 
        rawcb.rcb_next = rawcb.rcb_prev = &rawcb;
-       rawintrq.ifq_maxlen = IFQ_MAXLEN;
 }
 
 
 }
 
 
@@ -53,11 +40,12 @@ raw_init()
  */
 raw_input(m0, proto, src, dst)
        struct mbuf *m0;
  */
 raw_input(m0, proto, src, dst)
        struct mbuf *m0;
-       struct sockproto *proto;
+       register struct sockproto *proto;
        struct sockaddr *src, *dst;
 {
        register struct rawcb *rp;
        register struct mbuf *m = m0;
        struct sockaddr *src, *dst;
 {
        register struct rawcb *rp;
        register struct mbuf *m = m0;
+       register int sockets = 0;
        struct socket *last;
 
        last = 0;
        struct socket *last;
 
        last = 0;
@@ -88,8 +76,10 @@ raw_input(m0, proto, src, dst)
                                    n, (struct mbuf *)0) == 0)
                                        /* should notify about lost packet */
                                        m_freem(n);
                                    n, (struct mbuf *)0) == 0)
                                        /* should notify about lost packet */
                                        m_freem(n);
-                               else
+                               else {
                                        sorwakeup(last);
                                        sorwakeup(last);
+                                       sockets++;
+                               }
                        }
                }
                last = rp->rcb_socket;
                        }
                }
                last = rp->rcb_socket;
@@ -98,10 +88,13 @@ raw_input(m0, proto, src, dst)
                if (sbappendaddr(&last->so_rcv, src,
                    m, (struct mbuf *)0) == 0)
                        m_freem(m);
                if (sbappendaddr(&last->so_rcv, src,
                    m, (struct mbuf *)0) == 0)
                        m_freem(m);
-               else
+               else {
                        sorwakeup(last);
                        sorwakeup(last);
+                       sockets++;
+               }
        } else
                m_freem(m);
        } else
                m_freem(m);
+       return (sockets);
 }
 
 /*ARGSUSED*/
 }
 
 /*ARGSUSED*/
@@ -116,10 +109,10 @@ raw_ctlinput(cmd, arg)
 }
 
 /*ARGSUSED*/
 }
 
 /*ARGSUSED*/
-raw_usrreq(so, req, m, nam, rights, control)
+raw_usrreq(so, req, m, nam, control)
        struct socket *so;
        int req;
        struct socket *so;
        int req;
-       struct mbuf *m, *nam, *rights, *control;
+       struct mbuf *m, *nam, *control;
 {
        register struct rawcb *rp = sotorawcb(so);
        register int error = 0;
 {
        register struct rawcb *rp = sotorawcb(so);
        register int error = 0;
@@ -127,7 +120,7 @@ raw_usrreq(so, req, m, nam, rights, control)
 
        if (req == PRU_CONTROL)
                return (EOPNOTSUPP);
 
        if (req == PRU_CONTROL)
                return (EOPNOTSUPP);
-       if (rights && rights->m_len) {
+       if (control && control->m_len) {
                error = EOPNOTSUPP;
                goto release;
        }
                error = EOPNOTSUPP;
                goto release;
        }
@@ -282,5 +275,3 @@ release:
                m_freem(m);
        return (error);
 }
                m_freem(m);
        return (error);
 }
-
-rawintr() {} /* XXX - referenced by locore.  will soon go away */