add per-protocol options in rawcb (freed at detach)
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Mon, 3 Feb 1986 12:11:28 +0000 (04:11 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Mon, 3 Feb 1986 12:11:28 +0000 (04:11 -0800)
SCCS-vsn: sys/net/raw_cb.c 6.9
SCCS-vsn: sys/net/raw_cb.h 6.4

usr/src/sys/net/raw_cb.c
usr/src/sys/net/raw_cb.h

index e6af036..dfb4c4e 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)raw_cb.c    6.8 (Berkeley) %G%
+ *     @(#)raw_cb.c    6.9 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -81,6 +81,8 @@ raw_detach(rp)
        so->so_pcb = 0;
        sofree(so);
        remque(rp);
        so->so_pcb = 0;
        sofree(so);
        remque(rp);
+       if (rp->rcb_options)
+               m_freem(dtom(rp->rcb_options));
        m_freem(dtom(rp));
 }
 
        m_freem(dtom(rp));
 }
 
index 15256e8..c073fbc 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)raw_cb.h    6.3 (Berkeley) %G%
+ *     @(#)raw_cb.h    6.4 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -18,6 +18,7 @@ struct rawcb {
        struct  sockaddr rcb_laddr;     /* socket's address */
        struct  sockproto rcb_proto;    /* protocol family, protocol */
        caddr_t rcb_pcb;                /* protocol specific stuff */
        struct  sockaddr rcb_laddr;     /* socket's address */
        struct  sockproto rcb_proto;    /* protocol family, protocol */
        caddr_t rcb_pcb;                /* protocol specific stuff */
+       struct  mbuf *rcb_options;      /* protocol specific options */
        struct  route rcb_route;        /* routing information */
        short   rcb_flags;
 };
        struct  route rcb_route;        /* routing information */
        short   rcb_flags;
 };