install correct aliases file
[unix-history] / usr / src / sys / net / raw_usrreq.c
index 377cf18..c6a94e9 100644 (file)
@@ -1,9 +1,20 @@
 /*
 /*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * Copyright (c) 1980, 1986 Regents of the University of California.
+ * All rights reserved.
  *
  *
- *     @(#)raw_usrreq.c        6.11 (Berkeley) %G%
+ * 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.
+ *
+ *     @(#)raw_usrreq.c        7.4 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -19,7 +30,7 @@
 #include "netisr.h"
 #include "raw_cb.h"
 
 #include "netisr.h"
 #include "raw_cb.h"
 
-#include "../vax/mtpr.h"
+#include "../machine/mtpr.h"
 
 /*
  * Initialize raw connection block q.
 
 /*
  * Initialize raw connection block q.
@@ -142,7 +153,7 @@ next:
 /*ARGSUSED*/
 raw_ctlinput(cmd, arg)
        int cmd;
 /*ARGSUSED*/
 raw_ctlinput(cmd, arg)
        int cmd;
-       caddr_t arg;
+       struct sockaddr *arg;
 {
 
        if (cmd < 0 || cmd > PRC_NCMDS)
 {
 
        if (cmd < 0 || cmd > PRC_NCMDS)
@@ -232,8 +243,6 @@ raw_usrreq(so, req, m, nam, rights)
                        error = ENOTCONN;
                        break;
                }
                        error = ENOTCONN;
                        break;
                }
-               if (rp->rcb_route.ro_rt)
-                       rtfree(rp->rcb_route.ro_rt);
                raw_disconnect(rp);
                soisdisconnected(so);
                break;
                raw_disconnect(rp);
                soisdisconnected(so);
                break;
@@ -260,22 +269,6 @@ raw_usrreq(so, req, m, nam, rights)
                        error = ENOTCONN;
                        break;
                }
                        error = ENOTCONN;
                        break;
                }
-               /*
-                * Check for routing.  If new foreign address, or
-                * no route presently in use, try to allocate new
-                * route.  On failure, just hand packet to output
-                * routine anyway in case it can handle it.
-                */
-               if ((!equal(rp->rcb_faddr, rp->rcb_route.ro_dst) ||
-                   (so->so_options & SO_DONTROUTE)) && rp->rcb_route.ro_rt) {
-                       RTFREE(rp->rcb_route.ro_rt);
-                       rp->rcb_route.ro_rt = NULL;
-               }
-               if ((so->so_options & SO_DONTROUTE) == 0 &&
-                   rp->rcb_route.ro_rt == 0) {
-                       rp->rcb_route.ro_dst = rp->rcb_faddr;
-                       rtalloc(&rp->rcb_route);
-               }
                error = (*so->so_proto->pr_output)(m, so);
                m = NULL;
                if (nam)
                error = (*so->so_proto->pr_output)(m, so);
                m = NULL;
                if (nam)