Fixed compatibility of output.
[AROS.git] / rom / usb / classes / rndis / dev.h
bloba1f1d3b6d8b31f1fd019c4a4492980c1748b2780
1 /*
2 * $Id$
3 */
5 /* DEVICE STUFF */
7 #define DEVNAME "usbrndis.device"
9 #define DEVBASETYPEPTR struct NepEthDevBase *
11 /* local protos */
13 AROS_UFP3(DEVBASETYPEPTR, devInit,
14 AROS_UFPA(DEVBASETYPEPTR, base, D0),
15 AROS_UFPA(BPTR, seglist, A0),
16 AROS_UFPA(struct ExecBase *, SysBase, A6));
18 AROS_LD3(DEVBASETYPEPTR, devOpen,
19 AROS_LDA(struct IOSana2Req *, ioreq, A1),
20 AROS_LDA(ULONG, unitnum, D0),
21 AROS_LDA(ULONG, flags, D1),
22 DEVBASETYPEPTR, base, 1, dev);
24 AROS_LD1(BPTR, devClose,
25 AROS_LDA(struct IOSana2Req *, ioreq, A1),
26 DEVBASETYPEPTR, base, 2, dev);
28 AROS_LD1(BPTR, devExpunge,
29 AROS_LDA(DEVBASETYPEPTR, extralh, D0),
30 DEVBASETYPEPTR, base, 3, dev);
32 AROS_LD0(DEVBASETYPEPTR, devReserved,
33 DEVBASETYPEPTR, base, 4, dev);
35 AROS_LD1(void, devBeginIO,
36 AROS_LDA(struct IOSana2Req *, ioreq, A1),
37 DEVBASETYPEPTR, base, 5, dev);
39 AROS_LD1(LONG, devAbortIO,
40 AROS_LDA(struct IOSana2Req *, ioreq, A1),
41 DEVBASETYPEPTR, base, 6, dev);
43 /* Device stuff */
45 #define deverror(ioerr,wireerr) (((wireerr) << 8) | ((ioerr) & 0xff))
47 /* Reply the iorequest with success
49 #define RC_OK 0
51 /* Magic cookie, don't set error fields & don't reply the ioreq
53 #define RC_DONTREPLY -1
55 struct Unit *Open_Unit(struct IOSana2Req *ioreq,
56 LONG unitnr,
57 struct NepEthDevBase *base);
58 void Close_Unit(struct NepEthDevBase *base, struct NepClassEth *ncp,
59 struct IOSana2Req *ioreq);
61 WORD cmdNSDeviceQuery(struct NepClassEth *ncp, struct IOStdReq *ioreq);
63 LONG AbortReq(struct NepClassEth *ncp, struct List *list, struct IOSana2Req *ioreq);
64 void TermIO(struct NepClassEth *ncp, struct IOSana2Req *ioreq);
65 void AbortList(struct NepClassEth *ncp, struct List *list, struct BufMan *bufman, WORD error);
66 void AbortRW(struct NepClassEth *ncp, struct BufMan *bufman, WORD error);struct Sana2PacketTypeStats * FindPacketTypeStats(struct NepClassEth *ncp, ULONG packettype);
67 WORD AddMCastRange(struct NepClassEth *ncp, struct IOSana2Req *ioreq, UBYTE *lower, UBYTE *upper);
68 WORD DelMCastRange(struct NepClassEth *ncp, struct IOSana2Req *ioreq, UBYTE *lower, UBYTE *upper);
69 void UpdateMulticastHash(struct NepClassEth *ncp);
71 struct my_NSDeviceQueryResult
73 ULONG DevQueryFormat; /* this is type 0 */
74 ULONG SizeAvailable; /* bytes available */
75 UWORD DeviceType; /* what the device does */
76 UWORD DeviceSubType; /* depends on the main type */
77 const UWORD *SupportedCommands; /* 0 terminated list of cmd's */