date and time created 85/05/30 19:11:04 by sklower
authorKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Fri, 31 May 1985 10:11:04 +0000 (02:11 -0800)
committerKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Fri, 31 May 1985 10:11:04 +0000 (02:11 -0800)
SCCS-vsn: sys/netns/ns_pcb.h 6.1

usr/src/sys/netns/ns_pcb.h [new file with mode: 0644]

diff --git a/usr/src/sys/netns/ns_pcb.h b/usr/src/sys/netns/ns_pcb.h
new file mode 100644 (file)
index 0000000..4e8c179
--- /dev/null
@@ -0,0 +1,46 @@
+/*      ns_pcb.h     6.1     85/05/30     */
+
+/*
+ * Ns protocol interface control block.
+ */
+struct nspcb {
+       struct  nspcb *nsp_next;        /* doubly linked list */
+       struct  nspcb *nsp_prev;
+       struct  nspcb *nsp_head;
+       struct  socket *nsp_socket;     /* back pointer to socket */
+       struct  ns_addr nsp_faddr;      /* destination address */
+       struct  ns_addr nsp_laddr;      /* socket's address */
+       caddr_t nsp_pcb;                /* protocol specific stuff */
+       struct  route nsp_route;        /* routing information */
+       union   ns_net nsp_lastnet;     /* validate cached route for dg socks*/
+       long    nsp_notify_param;       /* extra info passed via ns_pcbnotify*/
+       short   nsp_flags;
+       u_char  nsp_dpt;                /* default packet type for idp_output*/
+       u_char  nsp_rpt;                /* last received packet type by
+                                                               idp_input() */
+};
+
+/* possible flags */
+
+#define NSP_IN_ABORT   0x1             /* calling abort through socket */
+#define NSP_RAWIN      0x2             /* show headers on input */
+#define NSP_RAWOUT     0x4             /* show header on output */
+
+#define        NS_WILDCARD     1
+
+#define nsp_lport nsp_laddr.x_port
+#define nsp_fport nsp_faddr.x_port
+
+#define        sotonspcb(so)           ((struct nspcb *)((so)->so_pcb))
+
+/*
+ * Nominal space allocated to a ns socket.
+ */
+#define        NSSNDQ          2048
+#define        NSRCVQ          2048
+
+
+#ifdef KERNEL
+extern struct nspcb nspcb;                     /* head of list */
+extern struct nspcb *ns_pcblookup();
+#endif