out of band
authorBill Joy <wnj@ucbvax.Berkeley.EDU>
Sun, 17 Jan 1982 17:00:15 +0000 (09:00 -0800)
committerBill Joy <wnj@ucbvax.Berkeley.EDU>
Sun, 17 Jan 1982 17:00:15 +0000 (09:00 -0800)
SCCS-vsn: sys/netinet/tcp_usrreq.c 1.47
SCCS-vsn: sys/netinet/tcp_var.h 4.14

usr/src/sys/netinet/tcp_usrreq.c
usr/src/sys/netinet/tcp_var.h

index 38fe8e7..6c4b511 100644 (file)
@@ -1,4 +1,4 @@
-/* tcp_usrreq.c 1.46 82/01/13 */
+/* tcp_usrreq.c 1.47 82/01/17 */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -183,8 +183,6 @@ COUNT(TCP_USRREQ);
                if (tp->t_flags & TF_PUSH)
                        tp->snd_end = tp->snd_una + so->so_snd.sb_cc;
  */
                if (tp->t_flags & TF_PUSH)
                        tp->snd_end = tp->snd_una + so->so_snd.sb_cc;
  */
-               if (tp->t_flags & TF_URG)
-                       tp->snd_up = tp->snd_una + so->so_snd.sb_cc + 1;
                (void) tcp_output(tp);
                break;
 
                (void) tcp_output(tp);
                break;
 
@@ -203,15 +201,26 @@ COUNT(TCP_USRREQ);
        case PRU_SENSE:
                error = EOPNOTSUPP;
                break;
        case PRU_SENSE:
                error = EOPNOTSUPP;
                break;
+/* END UNIMPLEMENTED HOOKS */
 
        case PRU_RCVOOB:
 
        case PRU_RCVOOB:
-               error = EOPNOTSUPP;
+               if (tp->t_haveoob == 0) {
+                       error = EINVAL;
+                       break;
+               }
+               *mtod(m, caddr_t) = tp->t_oobc;
+               tp->t_haveoob = 0;
                break;
 
        case PRU_SENDOOB:
                break;
 
        case PRU_SENDOOB:
-               error = EOPNOTSUPP;
+               tp->snd_up = tp->snd_una + so->so_snd.sb_cc + 1;
+               sbappend(&so->so_snd, m);
+/*
+               if (tp->t_flags & TF_PUSH)
+                       tp->snd_end = tp->snd_una + so->so_snd.sb_cc;
+ */
+               (void) tcp_output(tp);
                break;
                break;
-/* END UNIMPLEMENTED HOOKS */
 
        /*
         * TCP slow timer went off; going through this
 
        /*
         * TCP slow timer went off; going through this
index 4627480..dc3cc10 100644 (file)
@@ -1,4 +1,4 @@
-/*     tcp_var.h       4.13    81/12/12        */
+/*     tcp_var.h       4.14    82/01/17        */
 
 /*
  * Kernel variables for tcp.
 
 /*
  * Kernel variables for tcp.
@@ -55,6 +55,9 @@ struct tcpcb {
        short   t_rtt;                  /* round trip time */
        tcp_seq t_rtseq;                /* sequence number being timed */
        float   t_srtt;                 /* smoothed round-trip time */
        short   t_rtt;                  /* round trip time */
        tcp_seq t_rtseq;                /* sequence number being timed */
        float   t_srtt;                 /* smoothed round-trip time */
+/* out-of-band data; treat char before urgent pointer as out-of-band */
+       char    t_haveoob;              /* have some */
+       char    t_oobc;                 /* the character */
 };
 
 #define        intotcpcb(ip)   ((struct tcpcb *)(ip)->inp_ppcb)
 };
 
 #define        intotcpcb(ip)   ((struct tcpcb *)(ip)->inp_ppcb)