convert trailer format; fix backoff to back off more slowly
[unix-history] / usr / src / sys / netinet / raw_ip.c
index a8aee7c..46fedad 100644 (file)
@@ -1,4 +1,4 @@
-/*     raw_ip.c        4.6     82/03/12        */
+/*     raw_ip.c        4.9     82/03/28        */
 
 #include "../h/param.h"
 #include "../h/mbuf.h"
 
 #include "../h/param.h"
 #include "../h/mbuf.h"
@@ -16,9 +16,9 @@
  * Raw interface to IP protocol.
  */
 
  * Raw interface to IP protocol.
  */
 
-static struct sockaddr_in ripdst = { PF_INET };
-static struct sockaddr_in ripsrc = { PF_INET };
-static struct sockproto ripproto = { AF_INET };
+static struct sockaddr_in ripdst = { AF_INET };
+static struct sockaddr_in ripsrc = { AF_INET };
+static struct sockproto ripproto = { PF_INET };
 
 /*
  * Setup generic address and protocol structures
 
 /*
  * Setup generic address and protocol structures
@@ -34,14 +34,8 @@ COUNT(RIP_INPUT);
        ripproto.sp_protocol = ip->ip_p;
        ripdst.sin_addr = ip->ip_dst;
        ripsrc.sin_addr = ip->ip_src;
        ripproto.sp_protocol = ip->ip_p;
        ripdst.sin_addr = ip->ip_dst;
        ripsrc.sin_addr = ip->ip_src;
-       raw_input(m, &ripproto, &ripdst, &ripsrc);
-}
-
-/*ARGSUSED*/
-rip_ctlinput(m)
-       struct mbuf *m;
-{
-COUNT(RIP_CTLINPUT);
+       raw_input(m, &ripproto, (struct sockaddr *)&ripdst,
+         (struct sockaddr *)&ripsrc);
 }
 
 /*
 }
 
 /*
@@ -84,35 +78,5 @@ COUNT(RIP_OUTPUT);
        ip->ip_src =
                ((struct sockaddr_in *)&so->so_addr)->sin_addr;
        ip->ip_ttl = MAXTTL;
        ip->ip_src =
                ((struct sockaddr_in *)&so->so_addr)->sin_addr;
        ip->ip_ttl = MAXTTL;
-       return (ip_output(m, 0));
-}
-
-/*
- * Intercept control operations related to
- * handling of IP options.  Otherwise,
- * just pass things on to the raw_usrreq
- * routine for setup and tear down of
- * raw control block data structures.
- */
-rip_usrreq(so, req, m, addr)
-       struct socket *so;
-       int req;
-       struct mbuf *m;
-       caddr_t addr;
-{
-       register struct rawcb *rp = sotorawcb(so);
-
-COUNT(RAW_USRREQ);
-       if (rp == 0 && req != PRU_ATTACH)
-               return (EINVAL);
-
-       switch (req) {
-       
-       /*
-        * SHOULD HAVE CONTROL TO SET PROTOCOL NUMBER (e.g. GGP)
-        */
-       case PRU_CONTROL:
-               return (EOPNOTSUPP);
-       }
-       return (raw_usrreq(so, req, m, addr));
+       return (ip_output(m, (struct mbuf *)0, 0, 1));
 }
 }