summaryrefslogtreecommitdiffstats
path: root/private/ntos/ndis/madge/driver/head_mod/drv_rxtx.h
blob: 38576fb7bc0d022a545c8beb07b616391bbc24b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
/****************************************************************************/
/****************************************************************************/
/*                                                                          */
/*      DRIVER/USER INTERFACE PROCEDURE DEFINITIONS                         */
/*      ===========================================                         */
/*                                                                          */
/*      DRV_RXTX.H : Part of the FASTMAC TOOL-KIT (FTK)                     */
/*                                                                          */
/*      Copyright (c) Madge Networks Ltd. 1991-1994                         */
/*      CONFIDENTIAL                                                        */
/*                                                                          */
/*                                                                          */
/****************************************************************************/
/*                                                                          */
/* The first section contains all the function definitions of routines that */
/* must  be  supplied  by  the  user  to receive frames plus information on */
/* completed SRBs.                                                          */
/*                                                                          */
/* The next sections contain function prototypes for the transmit and       */
/* receive functions the user must provide. Eaxmples of these functions can */
/* be found in the TRANSMIT.C and RECEIVE.C modules of the DOS demonstration*/
/* programs.                                                                */
/*                                                                          */
/****************************************************************************/

/****************************************************************************/
/*                                                                          */
/* VERSION_NUMBER of FTK to which this DRV_RXTX.H belongs :                 */
/*                                                                          */

#define FTK_VERSION_NUMBER_DRV_RXTX_H 221

/****************************************************************************/
/*                                                                          */
/* FUNCTION PROTOTYPES                                                      */
/*                                                                          */
/****************************************************************************/

/****************************************************************************/
/*                                                                          */
/* WARNING: Depending on the implementation, the receive side processing may*/
/*          require a USER_RECEIVE_FRAME routine, but this is implementation*/
/*          dependent. A fixed interface does not fit well with FastmacPlus.*/
/*                                                                          */

extern void     user_schedule_receive_process(

                        ADAPTER_HANDLE adapter_handle
                        );

extern void     user_handle_adapter_check(

                        ADAPTER_HANDLE adapter_handle
                        );

extern void     user_completed_srb(

                        ADAPTER_HANDLE adapter_handle,
                        WBOOLEAN       srb_completed_successfully
                        );

extern void     user_transmit_completion(

                        ADAPTER_HANDLE adapter_handle,
                        DWORD          identifier
                        );

extern WORD    user_receive_frame(

                        ADAPTER_HANDLE adapter_handle,
			BYTE FAR *     rx_frame_addr,
			WORD           rx_frame_len
			);

extern void    user_adapter_removed(

                        ADAPTER_HANDLE adapter_handle
                        );


/****************************************************************************/
/*                                                                          */
/* These are the function prototypes that the FastMAC Plus user must        */
/* provide to handle transmission. Note that rxtx_irq_completion_check      */
/* is only needed for the FTK_TX_WITH_COMPLETION transmit method.           */
/*                                                                          */

#ifdef FMPLUS

extern WBOOLEAN rxtx_transmit_frame(

                    ADAPTER_HANDLE adapter_handle,
                    DWORD          tx_frame_identifier,
                    WORD           tx_frame_length,
                    WORD           tx_flags
                    );

extern void    rxtx_irq_tx_completion_check(

                    ADAPTER_HANDLE adapter_handle,
                    ADAPTER *      adapter
                    );

extern WBOOLEAN rxtx_allocate_tx_buffers(

                    ADAPTER *   adapter,
                    WORD        max_frame_size,
                    WORD        number_of_slots
                    );

extern void     rxtx_setup_tx_buffers(

                    ADAPTER *   adapter,
                    WBOOLEAN    use_physical_addresses,
                    WORD        number_of_slots
                    );

extern void    rxtx_free_tx_buffers(

                    ADAPTER * adapter,
                    WORD      max_frame_size,
                    WORD      number_of_slots
                    );
#endif


/****************************************************************************/
/*                                                                          */
/* These are the function prototypes that the FastMAC Plus user must        */
/* provide to handle receiving.                                             */
/*                                                                          */

#ifdef FMPLUS

extern void    rxtx_irq_rx_frame_handler(

                    ADAPTER_HANDLE adapter_handle,
		    ADAPTER *      adapter
                    );

extern WBOOLEAN rxtx_allocate_rx_buffers(

                    ADAPTER *   adapter,
                    WORD        max_frame_size,
                    WORD        number_of_slots
                    );

extern void     rxtx_setup_rx_buffers(

                    ADAPTER *   adapter,
                    WBOOLEAN    use_physical_addresses,
                    WORD        number_of_slots
                    );

extern void     rxtx_free_rx_buffers(

                    ADAPTER * adapter,
                    WORD      max_frame_size,
                    WORD      number_of_slots
                    );

#endif


/****************************************************************************/
/*                                                                          */
/* These are the function prototypes that the FastMAC user must             */
/* provide to handle transmission.                                          */
/*                                                                          */

#ifndef FMPLUS

extern WBOOLEAN rxtx_transmit_frame(

                    ADAPTER_HANDLE adapter_handle,
                    DWORD          tx_frame_identifier,
                    WORD           tx_frame_length,
                    WORD           tx_flags
                    );

#endif


/****************************************************************************/
/*                                                                          */
/* These are the function prototypes that the FastMAC user must             */
/* provide to handle receiving.                                             */
/*                                                                          */

#ifndef FMPLUS

extern void     rxtx_irq_rx_frame_handler(

                    ADAPTER_HANDLE adapter_handle,
		    ADAPTER *      adapter
		    );


#endif

/************** End of DRV_RXTX.H file **************************************/