SCCS-vsn: sys/sys/mbuf.h 4.7
SCCS-vsn: sys/sys/protosw.h 4.7
SCCS-vsn: sys/sys/socket.h 4.9
SCCS-vsn: sys/sys/user.h 4.9
-/* mbuf.h 4.6 81/11/26 */
+/* mbuf.h 4.7 81/11/29 */
/*
* Constants related to memory allocator.
/*
* Constants related to memory allocator.
#define MTAIL 4
#define MMAXOFF (MSIZE-MTAIL) /* offset where data ends */
#define MLEN (MSIZE-MMINOFF-MTAIL) /* mbuf data length */
#define MTAIL 4
#define MMAXOFF (MSIZE-MTAIL) /* offset where data ends */
#define MLEN (MSIZE-MMINOFF-MTAIL) /* mbuf data length */
/*
* Macros for type conversion
/*
* Macros for type conversion
extern struct mbuf mbutl[]; /* virtual address of net free mem */
extern struct pte Mbmap[]; /* page tables to map Netutl */
struct mbstat mbstat;
extern struct mbuf mbutl[]; /* virtual address of net free mem */
extern struct pte Mbmap[]; /* page tables to map Netutl */
struct mbstat mbstat;
struct mbuf *mfree, *mclfree;
int nmclfree;
struct mbuf *mfree, *mclfree;
int nmclfree;
-char mclrefcnt[NMBPAGES];
+char mclrefcnt[NMBCLUSTERS];
struct mbuf *m_get(), *m_getclr(), *m_free(), *m_more(), *m_copy();
#endif
struct mbuf *m_get(), *m_getclr(), *m_free(), *m_more(), *m_copy();
#endif
-/* protosw.h 4.6 81/11/26 */
+/* protosw.h 4.7 81/11/29 */
/*
* Protocol switch table.
/*
* Protocol switch table.
*
* The userreq routine interfaces protocols to the system and is
* described below.
*
* The userreq routine interfaces protocols to the system and is
* described below.
- *
- * The sense routine returns protocol status into the argument buffer.
- * This is used by the system in providing session-level abstractions
- * out of network level protocols, and may also be returned by socket ioctl's.
- * The amount of data returned by a sense is limited to the maxsense
- * value. (The space for the sense is allocated by the caller, based on this.)
*/
struct protosw {
short pr_type; /* socket type used for */
*/
struct protosw {
short pr_type; /* socket type used for */
int (*pr_output)(); /* output to protocol (from above) */
int (*pr_ctlinput)(); /* control input (from below) */
int (*pr_ctloutput)(); /* control output (from above) */
int (*pr_output)(); /* output to protocol (from above) */
int (*pr_ctlinput)(); /* control input (from below) */
int (*pr_ctloutput)(); /* control output (from above) */
-/* user-protocol hooks */
+/* user-protocol hook */
int (*pr_usrreq)(); /* user request: see list below */
int (*pr_usrreq)(); /* user request: see list below */
- int (*pr_sense)(); /* sense state of protocol */
- int pr_maxsense; /* max size of sense value */
/* utility hooks */
int (*pr_init)(); /* initialization hook */
int (*pr_fasttimo)(); /* fast timeout (100ms) */
/* utility hooks */
int (*pr_init)(); /* initialization hook */
int (*pr_fasttimo)(); /* fast timeout (100ms) */
#define PRU_SEND 7 /* send this data */
#define PRU_ABORT 8 /* abort (fast DISCONNECT, DETATCH) */
#define PRU_CONTROL 9 /* control operations on protocol */
#define PRU_SEND 7 /* send this data */
#define PRU_ABORT 8 /* abort (fast DISCONNECT, DETATCH) */
#define PRU_CONTROL 9 /* control operations on protocol */
+#define PRU_SENSE 10 /* return status into m */
+#define PRU_RCVOOB 11 /* retrieve out of band data */
+#define PRU_SENDOOB 12 /* send out of band data */
/* begin for protocols internal use */
/* begin for protocols internal use */
-#define PRU_FASTTIMO 10 /* 100ms timeout */
-#define PRU_SLOWTIMO 11 /* 500ms timeout */
-#define PRU_PROTORCV 12 /* receive from below */
-#define PRU_PROTOSEND 13 /* send to below */
+#define PRU_FASTTIMO 13 /* 100ms timeout */
+#define PRU_SLOWTIMO 14 /* 500ms timeout */
+#define PRU_PROTORCV 15 /* receive from below */
+#define PRU_PROTOSEND 16 /* send to below */
/* need some stuff for splice */
/* need some stuff for splice */
#ifdef PRUREQUESTS
char *prurequests[] = {
"ATTACH", "DETACH", "CONNECT", "ACCEPT",
"DISCONNECT", "SHUTDOWN", "RCVD", "SEND",
#ifdef PRUREQUESTS
char *prurequests[] = {
"ATTACH", "DETACH", "CONNECT", "ACCEPT",
"DISCONNECT", "SHUTDOWN", "RCVD", "SEND",
- "ABORT", "CONTROL", "FASTTIMO", "SLOWTIMO",
+ "ABORT", "CONTROL", "SENSE", "RCVOOB",
+ "SENDOOB", "FASTTIMO", "SLOWTIMO",
"PROTORCV", "PROTOSEND",
};
#endif
"PROTORCV", "PROTOSEND",
};
#endif
-/* socket.h 4.8 81/11/26 */
+/* socket.h 4.9 81/11/29 */
/*
* Externally visible attributes of sockets.
/*
* Externally visible attributes of sockets.
*/
struct sockproto {
short sp_family; /* protocol family */
*/
struct sockproto {
short sp_family; /* protocol family */
- short sp_protocol; /* protocol within family */
+ u_short sp_protocol; /* protocol within family */
};
#define PF_UNSPEC 0 /* unspecified */
};
#define PF_UNSPEC 0 /* unspecified */
-#define PF_LOCAL 1 /* local to host (pipes, portals) */
+#define PF_UNIX 1 /* UNIX internal protocol */
#define PF_INET 2 /* internetwork: UDP, TCP, etc. */
#define PF_INET 2 /* internetwork: UDP, TCP, etc. */
-#define PF_PUP 3 /* pup protocols: e.g. BSP */
-#define PF_CHAOS 4 /* mit CHAOS protocols */
-#define PF_OISCP 5 /* ois communication protocols */
-#define PF_NBS 6 /* nbs protocols */
-#define PF_ECMA 7 /* european computer manufacturers */
-#define PF_DATAKIT 8 /* datakit protocols */
-#define PF_CCITT 9 /* CCITT protocols, X.25 etc */
+#define PF_IMPLINK 3 /* imp link protocols */
+#define PF_PUP 4 /* pup protocols: e.g. BSP */
+#define PF_CHAOS 5 /* mit CHAOS protocols */
+#define PF_OISCP 6 /* ois communication protocols */
+#define PF_NBS 7 /* nbs protocols */
+#define PF_ECMA 8 /* european computer manufacturers */
+#define PF_DATAKIT 9 /* datakit protocols */
+#define PF_CCITT 10 /* CCITT protocols, X.25 etc */
/*
* Generic socket address format.
/*
* Generic socket address format.
#define AF_UNSPEC 0 /* unspecified */
#define AF_LOCAL 1 /* local to host (pipes, portals) */
#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
#define AF_UNSPEC 0 /* unspecified */
#define AF_LOCAL 1 /* local to host (pipes, portals) */
#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
-#define AF_PUP 3 /* pup protocols: e.g. BSP */
-#define AF_CHAOS 4 /* mit CHAOS protocols */
-#define AF_OISCP 5 /* ois communication protocols */
-#define AF_NBS 6 /* nbs protocols */
-#define AF_ECMA 7 /* european computer manufacturers */
-#define AF_DATAKIT 8 /* datakit protocols */
-#define AF_CCITT 9 /* CCITT protocols, X.25 etc */
+#define AF_IMPLINK 3 /* arpanet imp addresses */
+#define AF_PUP 4 /* pup protocols: e.g. BSP */
+#define AF_CHAOS 5 /* mit CHAOS protocols */
+#define AF_OISCP 6 /* ois communication protocols */
+#define AF_NBS 7 /* nbs protocols */
+#define AF_ECMA 8 /* european computer manufacturers */
+#define AF_DATAKIT 9 /* datakit protocols */
+#define AF_CCITT 10 /* CCITT protocols, X.25 etc */
-/* user.h 4.8 81/04/28 */
+/* user.h 4.9 81/11/29 */
#ifdef KERNEL
#include "../h/pcb.h"
#ifdef KERNEL
#include "../h/pcb.h"
#define SIMULATERTI 2
/* u_error codes */
#define SIMULATERTI 2
/* u_error codes */
+#ifdef KERNEL
+#include "../errno.h"
+#else
#ifdef KERNEL
extern struct user u;
#ifdef KERNEL
extern struct user u;