1 | /* $Id*/
|
---|
2 | /*
|
---|
3 | * Wrappers for NT/LAN Manager specific data structures
|
---|
4 | *
|
---|
5 | * Copyright 2000 Patrick Haller (patrick.haller@innotek.de)
|
---|
6 | *
|
---|
7 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
8 | *
|
---|
9 | */
|
---|
10 |
|
---|
11 | #ifndef __WNETAP32_H__
|
---|
12 | #define __WNETAP32_H__
|
---|
13 |
|
---|
14 |
|
---|
15 | /****************************************************************************
|
---|
16 | * OS/2 LAN Server structures *
|
---|
17 | ****************************************************************************/
|
---|
18 | #pragma pack(1)
|
---|
19 |
|
---|
20 | #define NCBNAMSZ_w 16
|
---|
21 | #define MAX_LANA_w 254
|
---|
22 |
|
---|
23 | typedef struct _NCB_w {
|
---|
24 | UCHAR ncb_command;
|
---|
25 | UCHAR ncb_retcode;
|
---|
26 | UCHAR ncb_lsn;
|
---|
27 | UCHAR ncb_num;
|
---|
28 | PUCHAR ncb_buffer;
|
---|
29 | WORD ncb_length;
|
---|
30 | UCHAR ncb_callname[NCBNAMSZ_w];
|
---|
31 | UCHAR ncb_name[NCBNAMSZ_w];
|
---|
32 | UCHAR ncb_rto;
|
---|
33 | UCHAR ncb_sto;
|
---|
34 | void (* CALLBACK ncb_post)( struct _NCB_w * );
|
---|
35 | UCHAR ncb_lana_num;
|
---|
36 | UCHAR ncb_cmd_cplt;
|
---|
37 | UCHAR ncb_reserve[10];
|
---|
38 | HANDLE ncb_event;
|
---|
39 | } NCB_w, *PNCB_w;
|
---|
40 |
|
---|
41 |
|
---|
42 | typedef struct _LANA_ENUM_w
|
---|
43 | {
|
---|
44 | UCHAR length;
|
---|
45 | UCHAR lana[ MAX_LANA_w ];
|
---|
46 | } LANA_ENUM_w, *PLANA_ENUM_w;
|
---|
47 |
|
---|
48 |
|
---|
49 | /* NCB command codes:
|
---|
50 | * "!" marked values have no direct OS/2 correspondance, all
|
---|
51 | * other values and return codes are identical as defined
|
---|
52 | * for NetBIOS 3.0
|
---|
53 | */
|
---|
54 |
|
---|
55 | #define NCBCALL_w 0x10 /* NCB CALL */
|
---|
56 | #define NCBLISTEN_w 0x11 /* NCB LISTEN */
|
---|
57 | #define NCBHANGUP_w 0x12 /* NCB HANG UP */
|
---|
58 | #define NCBSEND_w 0x14 /* NCB SEND */
|
---|
59 | #define NCBRECV_w 0x15 /* NCB RECEIVE */
|
---|
60 | #define NCBRECVANY_w 0x16 /* NCB RECEIVE ANY */
|
---|
61 | #define NCBCHAINSEND_w 0x17 /* NCB CHAIN SEND */
|
---|
62 | #define NCBDGSEND_w 0x20 /* NCB SEND DATAGRAM */
|
---|
63 | #define NCBDGRECV_w 0x21 /* NCB RECEIVE DATAGRAM */
|
---|
64 | #define NCBDGSENDBC_w 0x22 /* NCB SEND BROADCAST DATAGRAM */
|
---|
65 | #define NCBDGRECVBC_w 0x23 /* NCB RECEIVE BROADCAST DATAGRAM */
|
---|
66 | #define NCBADDNAME_w 0x30 /* NCB ADD NAME */
|
---|
67 | #define NCBDELNAME_w 0x31 /* NCB DELETE NAME */
|
---|
68 | #define NCBRESET_w 0x32 /* NCB RESET */
|
---|
69 | #define NCBASTAT_w 0x33 /* NCB ADAPTER STATUS */
|
---|
70 | #define NCBSSTAT_w 0x34 /* NCB SESSION STATUS */
|
---|
71 | #define NCBCANCEL_w 0x35 /* NCB CANCEL */
|
---|
72 | #define NCBADDGRNAME_w 0x36 /* NCB ADD GROUP NAME */
|
---|
73 | #define NCBENUM_w 0x37 /* NCB ENUMERATE LANA NUMBERS !*/
|
---|
74 | #define NCBUNLINK_w 0x70 /* NCB UNLINK */
|
---|
75 | #define NCBSENDNA_w 0x71 /* NCB SEND NO ACK */
|
---|
76 | #define NCBCHAINSENDNA_w 0x72 /* NCB CHAIN SEND NO ACK */
|
---|
77 | #define NCBLANSTALERT_w 0x73 /* NCB LAN STATUS ALERT !*/
|
---|
78 | #define NCBACTION_w 0x77 /* NCB ACTION !*/
|
---|
79 | #define NCBFINDNAME_w 0x78 /* NCB FIND NAME !*/
|
---|
80 | #define NCBTRACE_w 0x79 /* NCB TRACE !*/
|
---|
81 |
|
---|
82 | #define ASYNCH_w 0x80 /* high bit set == asynchronous */
|
---|
83 |
|
---|
84 |
|
---|
85 | /* NCB return codes
|
---|
86 | * // commented values do exist in OS/2 but not on Win32
|
---|
87 | * ! marked values do exist in Win32 but not on OS/2
|
---|
88 | */
|
---|
89 | #define NRC_GOODRET_w 0x00
|
---|
90 | #define NRC_BUFLEN_w 0x01
|
---|
91 | // NRC_BFULL
|
---|
92 | #define NRC_ILLCMD_w 0x03
|
---|
93 | #define NRC_CMDTMO_w 0x05
|
---|
94 | #define NRC_INCOMP_w 0x06
|
---|
95 | #define NRC_BADDR_w 0x07
|
---|
96 | #define NRC_SNUMOUT_w 0x08
|
---|
97 | #define NRC_NORES_w 0x09
|
---|
98 | #define NRC_SCLOSED_w 0x0a
|
---|
99 | #define NRC_CMDCAN_w 0x0b
|
---|
100 | // NRC_DMAFAIL
|
---|
101 | #define NRC_DUPNAME_w 0x0d
|
---|
102 | #define NRC_NAMTFUL_w 0x0e
|
---|
103 | #define NRC_ACTSES_w 0x0f
|
---|
104 | // NRC_INVALID
|
---|
105 | #define NRC_LOCTFUL_w 0x11
|
---|
106 | #define NRC_REMTFUL_w 0x12
|
---|
107 | #define NRC_ILLNN_w 0x13
|
---|
108 | #define NRC_NOCALL_w 0x14
|
---|
109 | #define NRC_NOWILD_w 0x15
|
---|
110 | #define NRC_INUSE_w 0x16
|
---|
111 | #define NRC_NAMERR_w 0x17
|
---|
112 | #define NRC_SABORT_w 0x18
|
---|
113 | #define NRC_NAMCONF_w 0x19
|
---|
114 | #define NRC_IFBUSY_w 0x21
|
---|
115 | #define NRC_TOOMANY_w 0x22
|
---|
116 | #define NRC_BRIDGE_w 0x23
|
---|
117 | #define NRC_CANOCCR_w 0x24
|
---|
118 | // NRC_RESNAME
|
---|
119 | #define NRC_CANCEL_w 0x26
|
---|
120 | #define NRC_DUPENV_w 0x30 /* ! */
|
---|
121 | // NRC_MULT
|
---|
122 | #define NRC_ENVNOTDEF_w 0x34 /* ! */
|
---|
123 | #define NRC_OSRESNOTAV_w 0x35 /* ! */
|
---|
124 | #define NRC_MAXAPPS_w 0x36
|
---|
125 | #define NRC_NOSAPS_w 0x37 /* ! */
|
---|
126 | #define NRC_NORESOURCES_w 0x38
|
---|
127 | #define NRC_INVADDRESS_w 0x39 /* ! */
|
---|
128 | #define NRC_INVDDID_w 0x3B /* ! */
|
---|
129 | #define NRC_LOCKFAIL_w 0x3C /* ! */
|
---|
130 | #define NRC_OPENERR_w 0x3f /* ! */
|
---|
131 | #define NRC_SYSTEM_w 0x40
|
---|
132 | // NRC_ROM
|
---|
133 | // NRC_RAM
|
---|
134 | // NRC_DLF
|
---|
135 | // NRC_ALF
|
---|
136 | // NRC_IFAIL
|
---|
137 | // NRC_NET_STAT
|
---|
138 | // NRC_ADPTMALFN
|
---|
139 |
|
---|
140 |
|
---|
141 | #define NRC_PENDING_w 0xff
|
---|
142 |
|
---|
143 |
|
---|
144 | UCHAR OSLibNetBIOS(PNCB_w pncb);
|
---|
145 | UCHAR OSLibNetBIOSEnum(PNCB_w pncb);
|
---|
146 |
|
---|
147 |
|
---|
148 | #endif
|
---|