]> diplodocus.org Git - nmh/blob - docs/historical/mh-jun-1982/Extras/imp.h
Updated documentation and comments about sendmail/pipe.
[nmh] / docs / historical / mh-jun-1982 / Extras / imp.h
1 #ifdef COMMENT
2 Proprietary Rand Corporation, 1981.
3 Further distribution of this software
4 subject to the terms of the Rand
5 license agreement.
6 #endif
7
8
9 #ifdef OLDNCP
10 struct netopen /* Format of open request */
11 {
12 long no_lskt; /* Local socket */
13 long no_fskt; /* Foreign socket */
14 short no_flags; /* Flag bits */
15 short no_rel; /* Local socket relative to this file */
16 short no_imp; /* Imp number */
17 char no_host; /* Host within Imp */
18 char no_net; /* Network number (!) */
19 char no_bsize; /* Byte size */
20 };
21 #else
22 struct netopen /* Format of open request */
23 {
24 long no_lskt; /* Local socket */
25 long no_fskt; /* Foreign socket */
26 short no_flags; /* Flag bits */
27 short no_rel; /* Local socket relative to this file */
28 short no_imp; /* Imp number */
29 char no_host; /* Host within Imp */
30 char no_net; /* Network number (!) */
31 char no_bsize; /* Byte size */
32 };
33 #endif
34
35 #define NO_ABS 01 /* Absolute local socket number for a connect */
36 #define NO_REL 02 /* Relative to another file */
37
38 #define NIMPS 20 /* number of imp devices */
39 #define MAX_IMPS 10 /* number of imp devices, starting from imp1 */
40
41 #define HOSTTBL "/etc/nethosts"
42
43 /* Op codes */
44 #define NET_CNCT 0
45 #define NET_RD 1
46 #define NET_WRT 2
47 #define NET_CLS 3
48 #define NET_LSN 4
49 #define NET_SICP 5
50 #define NET_UICP 6
51 #define NET_RST 7
52 #define NET_STRT 8
53 #define NET_LOG 9
54 #define NET_RSTAT 10
55 #define NET_WSTAT 11
56 #define NET_SRVR 12
57 #define NET_DUMP 13
58 #define NET_FLOW 255
59
60 /* ioctl commands for imp device*/
61 #define IMPCONCT (('I'<<8)|NET_CNCT) /* Connect */
62 #define IMPLISTN (('I'<<8)|NET_LSN ) /* Listen */
63 #define IMPSICP (('I'<<8)|NET_SICP) /* Server ICP */
64 #define IMPUICP (('I'<<8)|NET_UICP) /* User ICP */
65 #define IMPRST (('I'<<8)|NET_RST ) /* Reset */
66 #define IMPSTRT (('I'<<8)|NET_STRT) /* Start NCP */
67 #define IMPLOG (('I'<<8)|NET_LOG ) /* Set log flags */
68 #define IMPRSTAT (('I'<<8)|NET_RSTAT) /* Read socket status */
69 #define IMPWSTAT (('I'<<8)|NET_WSTAT) /* Write socket status */
70 #define IMPRDST (('I'<<8)|100 ) /* Get read status */
71 #define IMPWRTST (('I'<<8)|101 ) /* Get write status */
72
73 /* Structure for IMPSTAT ioctl */
74 struct sockstat {
75 long sck_lskt;
76 long sck_fskt;
77 short sck_imp;
78 char sck_host;
79 char sck_net;
80 };
81
82 long hostnum();
83 char *hos