date and time created 82/02/01 12:59:36 by root
authorBill Joy <root@ucbvax.Berkeley.EDU>
Tue, 2 Feb 1982 04:59:36 +0000 (20:59 -0800)
committerBill Joy <root@ucbvax.Berkeley.EDU>
Tue, 2 Feb 1982 04:59:36 +0000 (20:59 -0800)
SCCS-vsn: sys/net/raw_cb.h 4.1

usr/src/sys/net/raw_cb.h [new file with mode: 0644]

diff --git a/usr/src/sys/net/raw_cb.h b/usr/src/sys/net/raw_cb.h
new file mode 100644 (file)
index 0000000..a0e0e76
--- /dev/null
@@ -0,0 +1,41 @@
+/*     raw_cb.h        4.1     82/02/01        */
+
+/*
+ * Raw protocol interface control block.  Used
+ * to tie a socket to the generic raw interface.
+ */
+struct rawcb {
+       struct  rawcb *rcb_next;        /* doubly linked list */
+       struct  rawcb *rcb_prev;
+       struct  socket *rcb_socket;     /* back pointer to socket */
+       struct  sockaddr rcb_addr;      /* destination address */
+       caddr_t rcb_pcb;                /* protocol specific stuff */
+       short   rcb_flags;
+};
+
+/*
+ * Since we can't interpret canonical addresses,
+ * we mark an address present in the flags field.
+ */
+#define        RAW_ADDR        01              /* got an address */
+
+#define        sotorawcb(so)           ((struct rawcb *)(so)->so_pcb)
+
+/*
+ * Nominal space allocated to a raw socket.
+ */
+#define        RAWSNDQ         2048
+#define        RAWRCVQ         2048
+
+/*
+ * Format of raw interface header appended by
+ * raw_input after call from protocol specific input routine.
+ */
+struct raw_header {
+       struct  sockproto raw_protocol;
+       struct  sockaddr raw_address;
+};
+
+#ifdef KERNEL
+struct rawcb rawcb;                    /* head of list */
+#endif