9 #define NAME_FLAGS_MASK 0x87
10 #define GROUP_NAME 0x80
11 #define UNIQUE_NAME 0x00
12 #define REGISTERING 0x00
13 #define REGISTERED 0x04
14 #define DEREGISTERED 0x05
15 #define DUPLICATE 0x06
16 #define DUPLICATE_DEREG 0x07
17 #define LISTEN_OUTSTANDING 0x01
18 #define CALL_PENDING 0x02
19 #define SESSION_ESTABLISHED 0x03
20 #define HANGUP_PENDING 0x04
21 #define HANGUP_COMPLETE 0x05
22 #define SESSION_ABORTED 0x06
23 #define ALL_TRANSPORTS "M\0\0\0"
26 #define NCBLISTEN 0x11
27 #define NCBHANGUP 0x12
30 #define NCBRECVANY 0x16
31 #define NCBCHAINSEND 0x17
32 #define NCBDGSEND 0x20
33 #define NCBDGRECV 0x21
34 #define NCBDGSENDBC 0x22
35 #define NCBDGRECVBC 0x23
36 #define NCBADDNAME 0x30
37 #define NCBDELNAME 0x31
41 #define NCBCANCEL 0x35
42 #define NCBADDGRNAME 0x36
44 #define NCBUNLINK 0x70
45 #define NCBSENDNA 0x71
46 #define NCBCHAINSENDNA 0x72
47 #define NCBLANSTALERT 0x73
48 #define NCBACTION 0x77
49 #define NCBFINDNAME 0x78
52 #define NRC_GOODRET 0x00
53 #define NRC_BUFLEN 0x01
54 #define NRC_ILLCMD 0x03
55 #define NRC_CMDTMO 0x05
56 #define NRC_INCOMP 0x06
57 #define NRC_BADDR 0x07
58 #define NRC_SNUMOUT 0x08
59 #define NRC_NORES 0x09
60 #define NRC_SCLOSED 0x0a
61 #define NRC_CMDCAN 0x0b
62 #define NRC_DUPNAME 0x0d
63 #define NRC_NAMTFUL 0x0e
64 #define NRC_ACTSES 0x0f
65 #define NRC_LOCTFUL 0x11
66 #define NRC_REMTFUL 0x12
67 #define NRC_ILLNN 0x13
68 #define NRC_NOCALL 0x14
69 #define NRC_NOWILD 0x15
70 #define NRC_INUSE 0x16
71 #define NRC_NAMERR 0x17
72 #define NRC_SABORT 0x18
73 #define NRC_NAMCONF 0x19
74 #define NRC_IFBUSY 0x21
75 #define NRC_TOOMANY 0x22
76 #define NRC_BRIDGE 0x23
77 #define NRC_CANOCCR 0x24
78 #define NRC_CANCEL 0x26
79 #define NRC_DUPENV 0x30
80 #define NRC_ENVNOTDEF 0x34
81 #define NRC_OSRESNOTAV 0x35
82 #define NRC_MAXAPPS 0x36
83 #define NRC_NOSAPS 0x37
84 #define NRC_NORESOURCES 0x38
85 #define NRC_INVADDRESS 0x39
86 #define NRC_INVDDID 0x3B
87 #define NRC_LOCKFAIL 0x3C
88 #define NRC_OPENERR 0x3f
89 #define NRC_SYSTEM 0x40
90 #define NRC_PENDING 0xff
91 #define NCB_POST void CALLBACK
92 typedef struct _ACTION_HEADER
{
96 } ACTION_HEADER
,*PACTION_HEADER
;
97 typedef struct _ADAPTER_STATUS
{
98 UCHAR adapter_address
[6];
106 WORD iframe_recv_err
;
110 WORD iframe_xmit_err
;
111 WORD recv_buff_unavail
;
118 WORD xmit_buf_unavail
;
123 WORD max_sess_pkt_size
;
125 } ADAPTER_STATUS
,*PADAPTER_STATUS
;
126 typedef struct _FIND_NAME_BUFFER
{
128 UCHAR access_control
;
130 UCHAR destination_addr
[6];
131 UCHAR source_addr
[6];
132 UCHAR routing_info
[18];
133 } FIND_NAME_BUFFER
,*PFIND_NAME_BUFFER
;
134 typedef struct _FIND_NAME_HEADER
{
138 } FIND_NAME_HEADER
,*PFIND_NAME_HEADER
;
139 typedef struct _LANA_ENUM
{
141 UCHAR lana
[MAX_LANA
+1];
142 } LANA_ENUM
,*PLANA_ENUM
;
143 typedef struct _NAME_BUFFER
{
144 UCHAR name
[NCBNAMSZ
];
147 } NAME_BUFFER
,*PNAME_BUFFER
;
148 typedef struct _NCB
{
155 UCHAR ncb_callname
[NCBNAMSZ
];
156 UCHAR ncb_name
[NCBNAMSZ
];
159 void (CALLBACK
*ncb_post
)(struct _NCB
*);
163 UCHAR ncb_reserve
[18];
165 UCHAR ncb_reserve
[10];
169 typedef struct _SESSION_BUFFER
{
172 UCHAR local_name
[NCBNAMSZ
];
173 UCHAR remote_name
[NCBNAMSZ
];
174 UCHAR rcvs_outstanding
;
175 UCHAR sends_outstanding
;
176 } SESSION_BUFFER
,*PSESSION_BUFFER
;
177 typedef struct _SESSION_HEADER
{
180 UCHAR rcv_dg_outstanding
;
181 UCHAR rcv_any_outstanding
;
182 } SESSION_HEADER
,*PSESSION_HEADER
;
183 UCHAR WINAPI
Netbios(PNCB
);