freelance-updates-20011031
[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 /* this struct is returned by NCBENUM command in Win32 but is not available
48    in DJGPP. */
49 typedef struct {
50   int length;
51   int lana[8];
52 } LANA_ENUM;
53
54
55 #define NCBCALL 0x10
56 #define NCBLISTEN 0x11
57 #define NCBHANGUP 0x12
58 #define NCBSEND 0x14
59 #define NCBRECV 0x15
60 #define NCBRECVANY 0x16
61 #define NCBCHAINSEND 0x17
62 #define NCBDGSEND 0x20
63 #define NCBDGRECV 0x21
64 #define NCBDGSENDBC 0x22
65 #define NCBDGRECVBC 0x23
66 #define NCBADDNAME 0x30
67 #define NCBDELNAME 0x31
68 #define NCBRESET 0x32
69 #define NCBASTAT 0x33
70 #define NCBSSTAT 0x34
71 #define NCBCANCEL 0x35
72 #define NCBADDGRNAME 0x36
73 #define NCBENUM 0x37
74 #define NCBUNLINK 0x70
75 #define NCBSENDNA 0x71
76 #define NCBCHAINSENDNA 0x72
77 #define NCBLANSTALERT 0x73
78 #define NCBACTION 0x77
79 #define NCBFINDNAME 0x78
80 #define NCBTRACE 0x79
81 #define ASYNCH 0x80
82
83
84 #define NRC_GOODRET 0x00
85 #define NRC_BUFLEN 0x01
86 #define NRC_ILLCMD 0x03
87 #define NRC_CMDTMO 0x05
88 #define NRC_INCOMP 0x06
89 #define NRC_BADDR 0x07
90 #define NRC_SNUMOUT 0x08
91 #define NRC_NORES 0x09
92 #define NRC_SCLOSED 0x0a
93 #define NRC_CMDCAN 0x0b
94 #define NRC_DUPNAME 0x0d
95 #define NRC_NAMTFUL 0x0e
96 #define NRC_ACTSES 0x0f
97 #define NRC_LOCTFUL 0x11
98 #define NRC_REMTFUL 0x12
99 #define NRC_ILLNN 0x13
100 #define NRC_NOCALL 0x14
101 #define NRC_NOWILD 0x15
102 #define NRC_INUSE 0x16
103 #define NRC_NAMERR 0x17
104 #define NRC_SABORT 0x18
105 #define NRC_NAMCONF 0x19
106 #define NRC_IFBUSY 0x21
107 #define NRC_TOOMANY 0x22
108 #define NRC_BRIDGE 0x23
109 #define NRC_CANOCCR 0x24
110 #define NRC_CANCEL 0x26
111 #define NRC_DUPENV 0x30
112 #define NRC_ENVNOTDEF 0x34
113 #define NRC_OSRESNOTAV 0x35
114 #define NRC_MAXAPPS 0x36
115 #define NRC_NOSAPS 0x37
116 #define NRC_NORESOURCES 0x38
117 #define NRC_INVADDRESS 0x39
118 #define NRC_INVDDID 0x3B
119 #define NRC_LOCKFAIL 0x3C
120 #define NRC_OPENERR 0x3f
121 #define NRC_SYSTEM 0x40
122 #define NRC_PENDING 0xff
123
124 #endif  /* NETBIOS_H */