-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrequest.c
795 lines (610 loc) · 18.8 KB
/
request.c
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
#include <exec/types.h>
#include <exec/nodes.h>
#include <exec/libraries.h>
#include <exec/devices.h>
#include <exec/initializers.h>
#include <exec/resident.h>
#include <exec/interrupts.h>
#include <exec/semaphores.h>
#include <exec/memory.h>
#include <exec/io.h>
#include <dos/dos.h>
#include <libraries/dos.h>
#include <devices/timer.h>
//#include <devices/newstyle.h>
#include "devices/sana2.h"
#include "devices/sana2specialstats.h"
#include "device.h"
#define KNOWN_EVENTS (S2EVENT_ERROR | S2EVENT_TX | S2EVENT_RX | S2EVENT_ONLINE | \
S2EVENT_OFFLINE | S2EVENT_BUFF | S2EVENT_HARDWARE | S2EVENT_SOFTWARE)
static BOOL CmdInvalid(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdRead(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdWrite(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdFlush(struct IORequest *request,struct MyBase *base);
static BOOL CmdS2DeviceQuery(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdGetStationAddress(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdConfigInterface(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdBroadcast(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdTrackType(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdUntrackType(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdGetTypeStats(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdGetSpecialStats(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdGetGlobalStats(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdOnEvent(struct IOSana2Req *request,struct MyBase *base);
static BOOL CmdReadOrphan(struct IOSana2Req *request, struct MyBase *base);
static BOOL CmdOnline(struct IOSana2Req *request,struct MyBase *base);
static BOOL CmdOffline(struct IOSana2Req *request,struct MyBase *base);
static BOOL CmdDeviceQuery(struct IOStdReq *request, struct MyBase *base);
//static BOOL CmdAddMulticastAddresses(struct IOSana2Req *request, struct MyBase *base);
//static BOOL CmdDelMulticastAddresses(struct IOSana2Req *request, struct MyBase *base);
VOID PutRequest (struct MsgPort *port, struct IORequest *request, struct MyBase *base);
static const UWORD supported_commands [] = {
CMD_READ,
CMD_WRITE,
CMD_FLUSH,
S2_DEVICEQUERY,
S2_GETSTATIONADDRESS,
S2_CONFIGINTERFACE,
S2_ADDMULTICASTADDRESS,
S2_DELMULTICASTADDRESS,
S2_MULTICAST,
S2_BROADCAST,
S2_TRACKTYPE,
S2_UNTRACKTYPE,
S2_GETTYPESTATS,
S2_GETSPECIALSTATS,
S2_GETGLOBALSTATS,
S2_ONEVENT,
S2_READORPHAN,
S2_ONLINE,
S2_OFFLINE,
// NSCMD_DEVICEQUERY,
// S2_ADDMULTICASTADDRESSES,
// S2_DELMULTICASTADDRESSES,
0
};
struct Sana2DeviceQuery sana2_info = {
0,
0,
0,
0,
ADDRESS_SIZE * 8,
MTU,
10000000,
S2WireType_Ethernet
};
/*****************************************************************************
*
* ServiceRequest
*
*****************************************************************************/
VOID ServiceRequest (struct IOSana2Req *request, struct MyBase *base) {
BOOL complete;
switch (request->ios2_Req.io_Command) {
case CMD_READ:
complete = CmdRead (request, base);
break;
case CMD_WRITE:
complete = CmdWrite (request, base);
break;
case CMD_FLUSH:
complete = CmdFlush ((APTR)request, base);
break;
case S2_DEVICEQUERY:
complete = CmdS2DeviceQuery ((APTR)request, base);
break;
case S2_GETSTATIONADDRESS:
complete = CmdGetStationAddress ((APTR)request, base);
break;
case S2_CONFIGINTERFACE:
complete = CmdConfigInterface ((APTR)request, base);
break;
/*
case S2_ADDMULTICASTADDRESS:
complete=CmdAddMulticastAddresses((APTR)request,base);
break;
case S2_DELMULTICASTADDRESS:
complete=CmdDelMulticastAddresses((APTR)request,base);
break;
*/
case S2_MULTICAST:
complete = CmdWrite ((APTR)request, base);
break;
case S2_BROADCAST:
complete = CmdBroadcast ((APTR)request, base);
break;
case S2_TRACKTYPE:
complete = CmdTrackType ((APTR)request, base);
break;
case S2_UNTRACKTYPE:
complete = CmdUntrackType ((APTR)request, base);
break;
case S2_GETTYPESTATS:
complete = CmdGetTypeStats ((APTR)request, base);
break;
case S2_GETSPECIALSTATS:
complete = CmdGetSpecialStats ((APTR)request, base);
break;
case S2_GETGLOBALSTATS:
complete = CmdGetGlobalStats ((APTR)request, base);
break;
case S2_ONEVENT:
complete = CmdOnEvent ((APTR)request, base);
break;
case S2_READORPHAN:
complete = CmdReadOrphan ((APTR)request, base);
break;
case S2_ONLINE:
complete = CmdOnline ((APTR)request, base);
break;
case S2_OFFLINE:
complete = CmdOffline ((APTR)request, base);
break;
/*
case NSCMD_DEVICEQUERY:
complete=CmdDeviceQuery((APTR)request,base);
break;
case S2_ADDMULTICASTADDRESSES:
complete=CmdAddMulticastAddresses((APTR)request,base);
break;
case S2_DELMULTICASTADDRESSES:
complete=CmdDelMulticastAddresses((APTR)request,base);
break;
*/
default:
complete = CmdInvalid ((APTR)request, base);
}
if (complete && ((request->ios2_Req.io_Flags & IOF_QUICK) == 0))
ReplyMsg ((APTR)request);
ReleaseSemaphore (&((struct DevUnit *)request->ios2_Req.io_Unit)->access_lock);
return;
}
static BOOL CmdInvalid (struct IOSana2Req *request, struct MyBase *base) {
request->ios2_Req.io_Error = IOERR_NOCMD;
request->ios2_WireError = S2WERR_GENERIC_ERROR;
return TRUE;
}
static BOOL CmdRead (struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
struct Opener *opener;
BOOL complete = FALSE;
unit = (APTR)request->ios2_Req.io_Unit;
if ((unit->flags & UNITF_ONLINE) != 0) {
opener = request->ios2_BufferManagement;
PutRequest (&opener->read_port, (APTR)request, base);
}
else {
request->ios2_Req.io_Error = S2ERR_OUTOFSERVICE;
request->ios2_WireError = S2WERR_UNIT_OFFLINE;
complete = TRUE;
}
/* Return */
return complete;
}
static BOOL CmdWrite (struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
BYTE error = 0;
ULONG wire_error;
BOOL complete = FALSE;
/* Check request is valid */
unit = (APTR)request->ios2_Req.io_Unit;
if ((unit->flags & UNITF_ONLINE) == 0) {
error = S2ERR_OUTOFSERVICE;
wire_error = S2WERR_UNIT_OFFLINE;
}
else if ((request->ios2_Req.io_Command == S2_MULTICAST) &&
((request->ios2_DstAddr [0] & 0x1) == 0)) {
error = S2ERR_BAD_ADDRESS;
wire_error = S2WERR_BAD_MULTICAST;
}
/* Queue request for sending */
if (error == 0)
PutRequest (unit->request_ports [WRITE_QUEUE], (APTR)request, base);
else {
request->ios2_Req.io_Error = error;
request->ios2_WireError = wire_error;
complete = TRUE;
}
/* Return */
return complete;
}
static BOOL CmdFlush (struct IORequest *request,struct MyBase *base) {
FlushUnit ((APTR)request->io_Unit, EVENT_QUEUE, IOERR_ABORTED, base);
return TRUE;
}
static BOOL CmdS2DeviceQuery (struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
struct Sana2DeviceQuery *info;
ULONG size_available, size;
/* Copy device info */
unit = (APTR)request->ios2_Req.io_Unit;
info = request->ios2_StatData;
size = size_available = info->SizeAvailable;
if (size > sizeof (struct Sana2DeviceQuery))
size = sizeof (struct Sana2DeviceQuery);
CopyMem (&sana2_info, info, size);
info->SizeAvailable = size_available;
info->SizeSupplied = size;
/* Return */
return TRUE;
}
static BOOL CmdGetStationAddress (struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
unit = (APTR)request->ios2_Req.io_Unit;
CopyMem (unit->address, request->ios2_SrcAddr, ADDRESS_SIZE);
CopyMem (unit->default_address, request->ios2_DstAddr, ADDRESS_SIZE);
return TRUE;
}
static BOOL CmdConfigInterface(struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
/* Configure adapter */
unit = (APTR)request->ios2_Req.io_Unit;
if ((unit->flags & UNITF_CONFIGURED) == 0) {
CopyMem (request->ios2_SrcAddr, unit->address, ADDRESS_SIZE);
// ConfigureAdapter(unit,base);
unit->flags |= UNITF_CONFIGURED;
}
else {
request->ios2_Req.io_Error = S2ERR_BAD_STATE;
request->ios2_WireError = S2WERR_IS_CONFIGURED;
}
/* Return */
return TRUE;
}
static BOOL CmdBroadcast (struct IOSana2Req *request, struct MyBase *base) {
/* Fill in the broadcast address as destination */
*((ULONG *)request->ios2_DstAddr) = 0xffffffff;
*((UWORD *)(request->ios2_DstAddr + 4)) = 0xffff;
/* Queue the write as normal */
return CmdWrite (request, base);
}
static BOOL CmdTrackType (struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
struct Opener *opener;
ULONG packet_type, wire_error;
struct TypeTracker *tracker;
struct TypeStats *initial_stats;
BYTE error = 0;
unit = (APTR)request->ios2_Req.io_Unit;
packet_type = request->ios2_PacketType;
/* Get global tracker */
tracker = (struct TypeTracker *)
FindTypeStats (unit, &unit->type_trackers, packet_type, base);
if (tracker != NULL)
tracker->user_count ++;
else {
tracker = (APTR)AllocMem (sizeof (struct TypeTracker), MEMF_PUBLIC | MEMF_CLEAR);
if (tracker != NULL) {
tracker->packet_type = packet_type;
tracker->user_count = 1;
Disable ();
AddTail ((APTR)&unit->type_trackers, (APTR)tracker);
Enable ();
}
}
/* Store initial figures for this opener */
opener = request->ios2_BufferManagement;
initial_stats = FindTypeStats (unit, &opener->initial_stats, packet_type,
base);
if (initial_stats != NULL) {
error = S2ERR_BAD_STATE;
wire_error = S2WERR_ALREADY_TRACKED;
}
if (error == 0) {
initial_stats = (APTR)AllocMem (sizeof (struct TypeStats), MEMF_PUBLIC);
if (initial_stats == NULL) {
error = S2ERR_NO_RESOURCES;
wire_error = S2WERR_GENERIC_ERROR;
}
}
if (error == 0) {
CopyMem (tracker, initial_stats, sizeof (struct TypeStats));
AddTail ((APTR)&opener->initial_stats, (APTR)initial_stats);
}
/* Return */
request->ios2_Req.io_Error=error;
request->ios2_WireError=wire_error;
return TRUE;
}
static BOOL CmdUntrackType (struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
struct Opener *opener;
ULONG packet_type;
struct TypeTracker *tracker;
struct TypeStats *initial_stats;
unit = (APTR)request->ios2_Req.io_Unit;
packet_type = request->ios2_PacketType;
/* Get global tracker and initial figures */
tracker = (struct TypeTracker *)
FindTypeStats (unit, &unit->type_trackers, packet_type, base);
opener = request->ios2_BufferManagement;
initial_stats = FindTypeStats (unit, &opener->initial_stats, packet_type, base);
/* Decrement tracker usage and free unused structures */
if (initial_stats != NULL) {
if ((--tracker->user_count) == 0) {
Disable ();
Remove ((APTR)tracker);
Enable ();
FreeMem (tracker, sizeof (struct TypeTracker));
}
Remove ((APTR)initial_stats);
FreeMem (initial_stats, sizeof(struct TypeStats));
}
else {
request->ios2_Req.io_Error = S2ERR_BAD_STATE;
request->ios2_WireError = S2WERR_NOT_TRACKED;
}
/* Return */
return TRUE;
}
static BOOL CmdGetTypeStats (struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
struct Opener *opener;
ULONG packet_type;
struct TypeStats *initial_stats, *tracker;
struct Sana2PacketTypeStats *stats;
unit = (APTR)request->ios2_Req.io_Unit;
packet_type = request->ios2_PacketType;
/* Get global tracker and initial figures */
tracker = FindTypeStats (unit, &unit->type_trackers, packet_type, base);
opener = request->ios2_BufferManagement;
initial_stats = FindTypeStats (unit, &opener->initial_stats, packet_type, base);
/* Copy and adjust figures */
if (initial_stats != NULL) {
stats = request->ios2_StatData;
CopyMem (&tracker->stats, stats, sizeof (struct Sana2PacketTypeStats));
stats->PacketsSent -= initial_stats->stats.PacketsSent;
stats->PacketsReceived -= initial_stats->stats.PacketsReceived;
stats->BytesSent -= initial_stats->stats.BytesSent;
stats->BytesReceived -= initial_stats->stats.BytesReceived;
stats->PacketsDropped -= initial_stats->stats.PacketsDropped;
}
else {
request->ios2_Req.io_Error = S2ERR_BAD_STATE;
request->ios2_WireError = S2WERR_NOT_TRACKED;
}
/* Return */
return TRUE;
}
/****** 3c589.device/S2_GETSPECIALSTATS ************************************
*
* NAME
* S2_GETSPECIALSTATS --
*
* FUNCTION
*
* INPUTS
* ios2_StatData - Pointer to Sana2SpecialStatHeader structure.
*
* RESULTS
* io_Error
* ios2_WireError
*
* EXAMPLE
*
* NOTES
*
* BUGS
*
* SEE ALSO
*
****************************************************************************
*
*/
static BOOL CmdGetSpecialStats(struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
UWORD i, stat_count;
struct Sana2SpecialStatHeader *header;
struct Sana2SpecialStatRecord *record;
/* Fill in stats */
unit = (APTR)request->ios2_Req.io_Unit;
header = request->ios2_StatData;
record = (APTR)(header + 1);
stat_count = header->RecordCountMax;
if (stat_count > STAT_COUNT)
stat_count = STAT_COUNT;
for (i = 0; i < stat_count; i ++) {
record->Type = (S2WireType_Ethernet << 16) + i;
record->Count = unit->special_stats [i];
record->String = (TEXT *)&unit->openers.mlh_Tail;
record++;
}
header->RecordCountSupplied = stat_count;
/* Return */
return TRUE;
}
/****** 3c589.device/S2_GETGLOBALSTATS *************************************
*
* NAME
* S2_GETGLOBALSTATS --
*
* FUNCTION
*
* INPUTS
* ios2_StatData - Pointer to Sana2DeviceStats structure.
*
* RESULTS
* io_Error
* ios2_WireError
*
* EXAMPLE
*
* NOTES
*
* BUGS
*
* SEE ALSO
*
****************************************************************************
*
*/
static BOOL CmdGetGlobalStats(struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
/* Copy stats */
unit = (APTR)request->ios2_Req.io_Unit;
CopyMem (&unit->stats, request->ios2_StatData, sizeof (struct Sana2DeviceStats));
/* Return */
return TRUE;
}
/****** 3c589.device/S2_ONEVENT ********************************************
*
* NAME
* S2_ONEVENT --
*
* FUNCTION
*
* INPUTS
* ios2_WireError
*
* RESULTS
* io_Error
* ios2_WireError
*
* EXAMPLE
*
* NOTES
*
* BUGS
*
* SEE ALSO
*
****************************************************************************
*
*/
static BOOL CmdOnEvent (struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
ULONG events, wanted_events;
BOOL complete = FALSE;
/* Check if we understand the event types */
unit = (APTR)request->ios2_Req.io_Unit;
wanted_events = request->ios2_WireError;
if ((wanted_events & ~KNOWN_EVENTS) != 0) {
request->ios2_Req.io_Error = S2ERR_NOT_SUPPORTED;
events = S2WERR_BAD_EVENT;
}
else {
if ((unit->flags & UNITF_ONLINE) != 0)
events = S2EVENT_ONLINE;
else
events = S2EVENT_OFFLINE;
events &= wanted_events;
}
/* Reply request if a wanted event has already occurred */
if (events != 0) {
request->ios2_WireError = events;
complete = TRUE;
}
else
PutRequest (unit->request_ports [EVENT_QUEUE], (APTR)request, base);
/* Return */
return complete;
}
/*****************************************************************************
*
* CmdReadOrphan
*
*****************************************************************************/
static BOOL CmdReadOrphan (struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
BYTE error = 0;
ULONG wire_error;
BOOL complete = FALSE;
/* Check request is valid */
unit = (APTR)request->ios2_Req.io_Unit;
if ((unit->flags & UNITF_ONLINE) == 0) {
error = S2ERR_OUTOFSERVICE;
wire_error = S2WERR_UNIT_OFFLINE;
}
/* Queue request */
if (error == 0)
PutRequest (unit->request_ports [ADOPT_QUEUE], (APTR)request, base);
else {
request->ios2_Req.io_Error = error;
request->ios2_WireError = wire_error;
complete = TRUE;
}
/* Return */
return complete;
}
static BOOL CmdOnline (struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
BYTE error = 0;
ULONG wire_error;
UWORD i;
/* Check request is valid */
unit = (APTR)request->ios2_Req.io_Unit;
if ((unit->flags & UNITF_CONFIGURED) == 0) {
error = S2ERR_BAD_STATE;
wire_error = S2WERR_NOT_CONFIGURED;
}
/* Clear global and special stats and put adapter back online */
if ((error == 0) && ((unit->flags & UNITF_ONLINE) == 0)) {
unit->stats.PacketsReceived = 0;
unit->stats.PacketsSent = 0;
unit->stats.BadData = 0;
unit->stats.Overruns = 0;
unit->stats.UnknownTypesReceived = 0;
unit->stats.Reconfigurations = 0;
for (i = 0; i < STAT_COUNT; i ++)
unit->special_stats [i] = 0;
GoOnline (unit, base);
}
/* Return */
request->ios2_Req.io_Error = error;
request->ios2_WireError = wire_error;
return TRUE;
}
static BOOL CmdOffline (struct IOSana2Req *request, struct MyBase *base) {
struct DevUnit *unit;
/* Put adapter offline */
unit = (APTR)request->ios2_Req.io_Unit;
if ((unit->flags & UNITF_ONLINE) != 0)
GoOffline (unit, base);
/* Return */
return TRUE;
}
/****** 3c589.device/NSCMD_DEVICEQUERY *************************************
*
* NAME
* NSCMD_DEVICEQUERY -- Query device capabilities.
*
* FUNCTION
*
* INPUTS
* io_Length - ???.
* io_Data - pointer to NSDeviceQueryResult structure.
*
* RESULTS
* io_Error
* io_Actual - size of structure device can handle.
*
* EXAMPLE
*
* NOTES
*
* BUGS
*
* SEE ALSO
*
****************************************************************************
*
* Note that we have to pretend the request structure is an IOStdReq.
*
*/
static BOOL CmdDeviceQuery (struct IOStdReq *request, struct MyBase *base) {
/*
struct NSDeviceQueryResult *info;
info = request->io_Data;
request->io_Actual = info->SizeAvailable =
(ULONG)OFFSET(NSDeviceQueryResult,SupportedCommands) + sizeof(APTR);
info->DeviceType = NSDEVTYPE_SANA2;
info->DeviceSubType = 0;
info->SupportedCommands = (APTR)supported_commands;
*/
return TRUE;
}
VOID PutRequest (struct MsgPort *port, struct IORequest *request, struct MyBase *base) {
request->io_Flags &= ~IOF_QUICK;
PutMsg (port, (APTR)request);
return;
}