2 * Copyright (C) 2001 Mike McCormack
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
30 #define NCBLISTEN 0x11
31 #define NCBHANGUP 0x12
34 #define NCBRECVANY 0x16
35 #define NCBCHAINSEND 0x17
36 #define NCBDGSEND 0x20
37 #define NCBDGRECV 0x21
38 #define NCBDGSENDBC 0x22
39 #define NCBDGRECVBC 0x23
40 #define NCBADDNAME 0x30
41 #define NCBDELNAME 0x31
45 #define NCBCANCEL 0x35
46 #define NCBADDGRNAME 0x36
48 #define NCBUNLINK 0x70
49 #define NCBSENDNA 0x71
50 #define NCBCHAINSENDNA 0x72
51 #define NCBLANSTALERT 0x73
52 #define NCBACTION 0x77
53 #define NCBFINDNAME 0x78
66 UCHAR ncb_callname[NCBNAMSZ];
67 UCHAR ncb_name[NCBNAMSZ];
70 VOID (CALLBACK *ncb_post)(struct _NCB *);
74 UCHAR ncb_reserve[18];
76 UCHAR ncb_reserve[10];
81 typedef struct _ADAPTER_STATUS
83 UCHAR adapter_address[6];
91 WORD iframe_recv_error;
95 WORD iframe_xmit_error;
96 WORD recv_buffer_unavail;
103 WORD xmit_buf_unavail;
108 WORD max_sess_pkt_size;
110 } ADAPTER_STATUS, *PADAPTER_STATUS;
112 typedef struct _NAME_BUFFER
114 UCHAR name[NCBNAMSZ];
117 } NAME_BUFFER, *PNAME_BUFFER;
119 #define NAME_FLAGS_MASK 0x87
120 #define GROUP_NAME 0x80
121 #define UNIQUE_NAME 0x00
122 #define REGISTERING 0x00
123 #define REGISTERED 0x04
124 #define DEREGISTERED 0x05
125 #define DUPLICATE 0x06
126 #define DUPLICATE_DEREG 0x07
128 typedef struct _LANA_ENUM
131 UCHAR lana[MAX_LANA+1];
132 } LANA_ENUM, *PLANA_ENUM;
134 typedef struct _FIND_NAME_HEADER
139 } FIND_NAME_HEADER, *PFIND_NAME_HEADER;
141 typedef struct _FIND_NAME_BUFFER
144 UCHAR access_control;
146 UCHAR destination_addr[6];
147 UCHAR source_addr[6];
148 UCHAR routing_info[6];
149 } FIND_NAME_BUFFER, *PFIND_NAME_BUFFER;
151 typedef struct _SESSION_HEADER {
154 UCHAR rcv_dg_outstanding;
155 UCHAR rcv_any_outstanding;
156 } SESSION_HEADER, *PSESSION_HEADER;
158 typedef struct _SESSION_BUFFER {
161 UCHAR local_name[NCBNAMSZ];
162 UCHAR remote_name[NCBNAMSZ];
163 UCHAR rcvs_outstanding;
164 UCHAR sends_outstanding;
165 } SESSION_BUFFER, *PSESSION_BUFFER;
167 #define LISTEN_OUTSTANDING 0x01
168 #define CALL_PENDING 0x02
169 #define SESSION_ESTABLISHED 0x03
170 #define HANGUP_PENDING 0x04
171 #define HANGUP_COMPLETE 0x05
172 #define SESSION_ABORTED 0x06
174 #define ALL_TRANSPORTS "M\0\0\0"
176 #define NRC_GOODRET 0x00
177 #define NRC_BUFLEN 0x01
178 #define NRC_ILLCMD 0x03
179 #define NRC_CMDTMO 0x05
180 #define NRC_INCOMP 0x06
181 #define NRC_BADDR 0x07
182 #define NRC_SNUMOUT 0x08
183 #define NRC_NORES 0x09
184 #define NRC_SCLOSED 0x0a
185 #define NRC_CMDCAN 0x0b
186 #define NRC_DUPNAME 0x0d
187 #define NRC_NAMTFUL 0x0e
188 #define NRC_ACTSES 0x0f
189 #define NRC_LOCTFUL 0x11
190 #define NRC_REMTFUL 0x12
191 #define NRC_ILLNN 0x13
192 #define NRC_NOCALL 0x14
193 #define NRC_NOWILD 0x15
194 #define NRC_INUSE 0x16
195 #define NRC_NAMERR 0x17
196 #define NRC_SABORT 0x18
197 #define NRC_NAMCONF 0x19
198 #define NRC_IFBUSY 0x21
199 #define NRC_TOOMANY 0x22
200 #define NRC_BRIDGE 0x23
201 #define NRC_CANOCCR 0x24
202 #define NRC_CANCEL 0x26
203 #define NRC_DUPENV 0x30
204 #define NRC_ENVNOTDEF 0x34
205 #define NRC_OSRESNOTAV 0x35
206 #define NRC_MAXAPPS 0x36
207 #define NRC_NOSAPS 0x37
208 #define NRC_NORESOURCES 0x38
209 #define NRC_INVADDRESS 0x39
210 #define NRC_INVDDID 0x3b
211 #define NRC_LOCKFAIL 0x3c
212 #define NRC_OPENERROR 0x3f
213 #define NRC_SYSTEM 0x40
214 #define NRC_PENDING 0xff
216 UCHAR WINAPI Netbios(PNCB pncb);
222 #endif /* NCB_INCLUDED */