win95-initial-port-20010430
[openafs.git] / src / WINNT / afsd / netbios95.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #ifndef NETBIOS_H
11 #define NETBIOS_H
12
13 #define BYTE char
14 #define WORD short
15
16 #define NCBNAMSZ        16    /* absolute length of a net name           */
17 #define MAX_LANA       254    /* lana's in range 0 to MAX_LANA inclusive */
18
19 #define MAX_COMPUTERNAME_LENGTH 15
20
21
22 #define UCHAR unsigned char
23 #define PUCHAR unsigned char *
24 #define WORD short
25
26 #include "osithrd95.h"
27
28 typedef struct _NCB {
29     UCHAR ncb_command;
30     UCHAR ncb_retcode;
31     UCHAR ncb_lsn;
32     UCHAR ncb_num;
33     unsigned int ncb_buffer;
34     WORD ncb_length;
35     UCHAR ncb_callname[NCBNAMSZ];
36     UCHAR ncb_name[NCBNAMSZ];
37     UCHAR ncb_rto;
38     UCHAR ncb_sto;
39     int (*ncb_post)();
40     UCHAR ncb_lana_num;
41     UCHAR ncb_cmd_cplt;
42     UCHAR ncb_reserve[10];
43     UCHAR ncb_reserve2[4];
44     EVENT_HANDLE ncb_event;
45 } NCB, *PNCB;
46
47
48 #define NCBCALL 0x10
49 #define NCBLISTEN 0x11
50 #define NCBHANGUP 0x12
51 #define NCBSEND 0x14
52 #define NCBRECV 0x15
53 #define NCBRECVANY 0x16
54 #define NCBCHAINSEND 0x17
55 #define NCBDGSEND 0x20
56 #define NCBDGRECV 0x21
57 #define NCBDGSENDBC 0x22
58 #define NCBDGRECVBC 0x23
59 #define NCBADDNAME 0x30
60 #define NCBDELNAME 0x31
61 #define NCBRESET 0x32
62 #define NCBASTAT 0x33
63 #define NCBSSTAT 0x34
64 #define NCBCANCEL 0x35
65 #define NCBADDGRNAME 0x36
66 #define NCBENUM 0x37
67 #define NCBUNLINK 0x70
68 #define NCBSENDNA 0x71
69 #define NCBCHAINSENDNA 0x72
70 #define NCBLANSTALERT 0x73
71 #define NCBACTION 0x77
72 #define NCBFINDNAME 0x78
73 #define NCBTRACE 0x79
74 #define ASYNCH 0x80
75
76
77 #define NRC_GOODRET 0x00
78 #define NRC_BUFLEN 0x01
79 #define NRC_ILLCMD 0x03
80 #define NRC_CMDTMO 0x05
81 #define NRC_INCOMP 0x06
82 #define NRC_BADDR 0x07
83 #define NRC_SNUMOUT 0x08
84 #define NRC_NORES 0x09
85 #define NRC_SCLOSED 0x0a
86 #define NRC_CMDCAN 0x0b
87 #define NRC_DUPNAME 0x0d
88 #define NRC_NAMTFUL 0x0e
89 #define NRC_ACTSES 0x0f
90 #define NRC_LOCTFUL 0x11
91 #define NRC_REMTFUL 0x12
92 #define NRC_ILLNN 0x13
93 #define NRC_NOCALL 0x14
94 #define NRC_NOWILD 0x15
95 #define NRC_INUSE 0x16
96 #define NRC_NAMERR 0x17
97 #define NRC_SABORT 0x18
98 #define NRC_NAMCONF 0x19
99 #define NRC_IFBUSY 0x21
100 #define NRC_TOOMANY 0x22
101 #define NRC_BRIDGE 0x23
102 #define NRC_CANOCCR 0x24
103 #define NRC_CANCEL 0x26
104 #define NRC_DUPENV 0x30
105 #define NRC_ENVNOTDEF 0x34
106 #define NRC_OSRESNOTAV 0x35
107 #define NRC_MAXAPPS 0x36
108 #define NRC_NOSAPS 0x37
109 #define NRC_NORESOURCES 0x38
110 #define NRC_INVADDRESS 0x39
111 #define NRC_INVDDID 0x3B
112 #define NRC_LOCKFAIL 0x3C
113 #define NRC_OPENERR 0x3f
114 #define NRC_SYSTEM 0x40
115 #define NRC_PENDING 0xff
116
117 #endif  /* NETBIOS_H */