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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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
*);
73 UCHAR ncb_reserved
[10];
77 typedef struct _ADAPTER_STATUS
79 UCHAR adapter_address
[6];
87 WORD iframe_recv_error
;
91 WORD iframe_xmit_error
;
92 WORD recv_buffer_unavail
;
99 WORD xmit_buf_unavail
;
104 WORD max_sess_pktsize
;
106 } ADAPTER_STATUS
, *PADAPTER_STATUS
;
108 typedef struct _NAME_BUFFER
110 UCHAR name
[NCBNAMSZ
];
113 } NAME_BUFFER
, *PNAME_BUFFER
;
115 #define NAME_FLAGS_MASK 0x87
116 #define GROUP_NAME 0x80
117 #define UNIQUE_NAME 0x00
118 #define REGISTERING 0x00
119 #define REGISTERED 0x04
120 #define DEREGISTERED 0x05
121 #define DUPLICATE 0x06
122 #define DUPLICATE_DEREG 0x07
124 typedef struct _LANA_ENUM
127 UCHAR lana
[MAX_LANA
+1];
128 } LANA_ENUM
, *PLANA_ENUM
;
130 typedef struct _FIND_NAME_HEADER
135 } FIND_NAME_HEADER
, *PFIND_NAME_HEADER
;
137 typedef struct _FIND_NAME_BUFFER
140 UCHAR access_control
;
142 UCHAR destination_addr
[6];
143 UCHAR source_addr
[6];
144 UCHAR routing_info
[6];
145 } FIND_NAME_BUFFER
, *PFIND_NAME_BUFFER
;
147 typedef struct _SESSION_HEADER
{
150 UCHAR rcv_dg_outstanding
;
151 UCHAR rcv_any_outstanding
;
152 } SESSION_HEADER
, *PSESSION_HEADER
;
154 typedef struct _SESSION_BUFFER
{
157 UCHAR local_name
[NCBNAMSZ
];
158 UCHAR remote_name
[NCBNAMSZ
];
159 UCHAR rcvs_outstanding
;
160 UCHAR sends_outstanding
;
161 } SESSION_BUFFER
, *PSESSION_BUFFER
;
163 #define LISTEN_OUTSTANDING 0x01
164 #define CALL_PENDING 0x02
165 #define SESSION_ESTABLISHED 0x03
166 #define HANGUP_PENDING 0x04
167 #define HANGUP_COMPLETE 0x05
168 #define SESSION_ABORTED 0x06
170 #define ALL_TRANSPORTS "M\0\0\0"
172 #define NRC_GOODRET 0x00
173 #define NRC_BUFLEN 0x01
174 #define NRC_ILLCMD 0x03
175 #define NRC_CMDTMO 0x05
176 #define NRC_INCOMP 0x06
177 #define NRC_BADDR 0x07
178 #define NRC_SNUMOUT 0x08
179 #define NRC_NORES 0x09
180 #define NRC_SCLOSED 0x0a
181 #define NRC_CMDCAN 0x0b
182 #define NRC_DUPNAME 0x0d
183 #define NRC_NAMTFUL 0x0e
184 #define NRC_ACTSES 0x0f
185 #define NRC_LOCTFUL 0x11
186 #define NRC_REMTFUL 0x12
187 #define NRC_ILLNN 0x13
188 #define NRC_NOCALL 0x14
189 #define NRC_NOWILD 0x15
190 #define NRC_INUSE 0x16
191 #define NRC_NAMERR 0x17
192 #define NRC_SABORT 0x18
193 #define NRC_NAMCONF 0x19
194 #define NRC_IFBUSY 0x21
195 #define NRC_TOOMANY 0x22
196 #define NRC_BRIDGE 0x23
197 #define NRC_CANOCCR 0x24
198 #define NRC_CANCEL 0x26
199 #define NRC_DUPENV 0x30
200 #define NRC_ENVNOTDEF 0x34
201 #define NRC_OSRESNOTAV 0x35
202 #define NRC_MAXAPPS 0x36
203 #define NRC_NOSAPS 0x37
204 #define NRC_NORESOURCES 0x38
205 #define NRC_INVADDRESS 0x39
206 #define NRC_INVDDID 0x3b
207 #define NRC_LOCKFAIL 0x3c
208 #define NRC_OPENERROR 0x3f
209 #define NRC_SYSTEM 0x40
210 #define NRC_PENDING 0xff
212 UCHAR WINAPI
Netbios(PNCB pncb
);
218 #endif /* NCB_INCLUDED */