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