blob: b04a11b853db155d81e3a1dbd2e468d70c1bf51c [file] [log] [blame]
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00001/*
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
Mike McCormack2e40b962001-11-06 17:52:36 +000019#ifndef NCB_INCLUDED
20#define NCB_INCLUDED
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#define NCBNAMSZ 16
27#define MAX_LANA 0xfe
28
29#define NCBRESET 0x32
30#define NCBADDNAME 0x30
31#define NCBADDGRNAME 0x36
32#define NCBDELNAME 0x31
33#define NCBSEND 0x14
34#define NCBRECV 0x15
35#define NCBHANGUP 0x12
36#define NCBCANCEL 0x35
37#define NCBLISTEN 0x11
38#define NCBCALL 0x10
39#define NCBASTAT 0x33
40#define NCBENUM 0x37
41
Mike McCormack2e40b962001-11-06 17:52:36 +000042typedef struct _NCB
43{
44 UCHAR ncb_command;
45 UCHAR ncb_retcode;
46 UCHAR ncb_lsn;
47 UCHAR ncb_num;
48 PUCHAR ncb_buffer;
49 WORD ncb_length;
50 UCHAR ncb_callname[NCBNAMSZ];
51 UCHAR ncb_name[NCBNAMSZ];
52 UCHAR ncb_rto;
53 UCHAR ncb_sto;
54 VOID (*ncb_post)(struct _NCB *);
55 UCHAR ncb_lana_num;
56 UCHAR ncb_cmd_cplt;
57 UCHAR ncb_reserved[10];
58 HANDLE ncb_event;
59} NCB, *PNCB;
60
61typedef struct _ADAPTER_STATUS
62{
63 UCHAR adapter_address[6];
64 UCHAR rev_major;
65 UCHAR reserved0;
66 UCHAR adapter_type;
67 UCHAR rev_minor;
68 WORD duration;
69 WORD frmr_recv;
70 WORD frmr_xmit;
71 WORD iframe_recv_error;
72 WORD xmit_aborts;
Dmitry Timoshkov6b6596a2001-11-23 18:44:43 +000073 DWORD xmit_success;
74 DWORD recv_success;
Mike McCormack2e40b962001-11-06 17:52:36 +000075 WORD iframe_xmit_error;
76 WORD recv_buffer_unavail;
77 WORD t1_timeouts;
78 WORD ti_timeouts;
79 DWORD reserved1;
80 WORD free_ncbs;
81 WORD max_cfg_ncbs;
82 WORD max_ncbs;
83 WORD xmit_buf_unavail;
84 WORD max_dgram_size;
85 WORD pending_sess;
86 WORD max_cfg_sess;
87 WORD max_sess;
88 WORD max_sess_pktsize;
89 WORD name_count;
90} ADAPTER_STATUS, *PADAPTER_STATUS;
91
92typedef struct _LANA_ENUM
93{
94 UCHAR length;
95 UCHAR lana[MAX_LANA+1];
96} LANA_ENUM, *PLANA_ENUM;
97
98#define NRC_GOODRET 0x00
99#define NRC_BUFLEN 0x01
100#define NRC_ILLCMD 0x03
101#define NRC_CMDTMO 0x05
102#define NRC_INCOMP 0x06
103#define NRC_INVADDRESS 0x39
104#define NRC_PENDING 0xff
105#define NRC_OPENERROR 0x3f
106
107#ifdef __cplusplus
108}
109#endif
110
111#endif /* NCB_INCLUDED */