wined3d: Move max_ffp_textures to wined3d_d3d_info.
[wine] / include / nb30.h
1 /*
2  * Copyright (C) 2001 Mike McCormack
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #ifndef NCB_INCLUDED
20 #define NCB_INCLUDED
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 #define NCBNAMSZ 16
27 #define MAX_LANA 0xfe
28
29 #define NCBCALL        0x10
30 #define NCBLISTEN      0x11
31 #define NCBHANGUP      0x12
32 #define NCBSEND        0x14
33 #define NCBRECV        0x15
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
42 #define NCBRESET       0x32
43 #define NCBASTAT       0x33
44 #define NCBSSTAT       0x34
45 #define NCBCANCEL      0x35
46 #define NCBADDGRNAME   0x36
47 #define NCBENUM        0x37
48 #define NCBUNLINK      0x70
49 #define NCBSENDNA      0x71
50 #define NCBCHAINSENDNA 0x72
51 #define NCBLANSTALERT  0x73
52 #define NCBACTION      0x77
53 #define NCBFINDNAME    0x78
54 #define NCBTRACE       0x79
55
56 #define ASYNCH         0x80
57
58 typedef struct _NCB
59 {
60         UCHAR   ncb_command;
61         UCHAR   ncb_retcode;
62         UCHAR   ncb_lsn;
63         UCHAR   ncb_num;
64         PUCHAR  ncb_buffer;
65         WORD    ncb_length;
66         UCHAR   ncb_callname[NCBNAMSZ];
67         UCHAR   ncb_name[NCBNAMSZ];
68         UCHAR   ncb_rto;
69         UCHAR   ncb_sto;
70         VOID    (CALLBACK *ncb_post)(struct _NCB *);
71         UCHAR   ncb_lana_num;
72         UCHAR   ncb_cmd_cplt;
73 #ifdef _WIN64
74         UCHAR   ncb_reserve[18];
75 #else
76         UCHAR   ncb_reserve[10];
77 #endif
78         HANDLE  ncb_event;
79 } NCB, *PNCB;
80
81 typedef struct _ADAPTER_STATUS
82 {
83         UCHAR   adapter_address[6];
84         UCHAR   rev_major;
85         UCHAR   reserved0;
86         UCHAR   adapter_type;
87         UCHAR   rev_minor;
88         WORD    duration;
89         WORD    frmr_recv;
90         WORD    frmr_xmit;
91         WORD    iframe_recv_error;
92         WORD    xmit_aborts;
93         DWORD   xmit_success;
94         DWORD   recv_success;
95         WORD    iframe_xmit_error;
96         WORD    recv_buffer_unavail;
97         WORD    t1_timeouts;
98         WORD    ti_timeouts;
99         DWORD   reserved1;
100         WORD    free_ncbs;
101         WORD    max_cfg_ncbs;
102         WORD    max_ncbs;
103         WORD    xmit_buf_unavail;
104         WORD    max_dgram_size;
105         WORD    pending_sess;
106         WORD    max_cfg_sess;
107         WORD    max_sess;
108         WORD    max_sess_pkt_size;
109         WORD    name_count;
110 } ADAPTER_STATUS, *PADAPTER_STATUS;
111
112 typedef struct _NAME_BUFFER
113 {
114   UCHAR name[NCBNAMSZ];
115   UCHAR name_num;
116   UCHAR name_flags;
117 } NAME_BUFFER, *PNAME_BUFFER;
118
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
127
128 typedef struct _LANA_ENUM
129 {
130         UCHAR length;
131         UCHAR lana[MAX_LANA+1];
132 } LANA_ENUM, *PLANA_ENUM;
133
134 typedef struct _FIND_NAME_HEADER
135 {
136   WORD  node_count;
137   UCHAR reserved;
138   UCHAR unique_group;
139 } FIND_NAME_HEADER, *PFIND_NAME_HEADER;
140
141 typedef struct _FIND_NAME_BUFFER
142 {
143   UCHAR length;
144   UCHAR access_control;
145   UCHAR frame_control;
146   UCHAR destination_addr[6];
147   UCHAR source_addr[6];
148   UCHAR routing_info[6];
149 } FIND_NAME_BUFFER, *PFIND_NAME_BUFFER;
150
151 typedef struct _SESSION_HEADER {
152   UCHAR sess_name;
153   UCHAR num_sess;
154   UCHAR rcv_dg_outstanding;
155   UCHAR rcv_any_outstanding;
156 } SESSION_HEADER, *PSESSION_HEADER;
157
158 typedef struct _SESSION_BUFFER {
159   UCHAR lsn;
160   UCHAR state;
161   UCHAR local_name[NCBNAMSZ];
162   UCHAR remote_name[NCBNAMSZ];
163   UCHAR rcvs_outstanding;
164   UCHAR sends_outstanding;
165 } SESSION_BUFFER, *PSESSION_BUFFER;
166
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
173
174 #define ALL_TRANSPORTS "M\0\0\0"
175
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
215
216 UCHAR WINAPI Netbios(PNCB pncb);
217
218 #ifdef __cplusplus
219 }
220 #endif
221
222 #endif  /* NCB_INCLUDED */