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