Analysis and Modelling of the Windows mLAN Driver A thesis submitted in partial fulfilment of the requirements forthe degree ofBACHELOR OF SCIENCE I!H HONO"RS IN CO#$"!ER SCIENCE Rhodes "ni%ersit& '(() B& Shaun #iles Super%ised b& $rofessor Ri*hard Foss
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
!he purpose of this thesis is to e+pose the inner,-or.ings of the indo-s musi*Lo*al Area Net-or. /mLAN0 dri%er to aid in further resear*h of the mLAN s&stem1
mLAN represents an inno%ati%e en%ironment for net-or.ed high,speed transmission
of real,time audio and #I2I streams1 mLAN e+tends the IEEE 3456 ar*hite*ture7
-hi*h en*apsulates the essential features of a net-or.ed real,time multimedia s&stem1
An e+ploration of the mLAN ar*hite*ture and the indo-s 2ri%er #odel gi%es us
insight into the *ore *on*epts *entral to the *reation of the mLAN dri%er1 !he
indo-s 2ri%er #odel is the required form a dri%er must follo-1 2ri%erStudio is a
dri%er de%elopment tool that en*apsulates the indo-s 2ri%er #odel in a C88 librar&
frame-or.1 A d&nami* and stati* anal&sis of the mLAN dri%er is performed using the
indo-s 2ri%er #odel and the 2ri%erStudio frame-or. as referen*e1 !his
understanding -ill be e+pressed b& de%eloping an ob9e*t model of the mLAN dri%er7
I -ould li.e to than. m& super%isor7 $rof1 Ri*hard Foss for his limitless help1 Alsothan.s to #ele.am !sega&e -ho spent man& hours helping me7 and gi%ing insights
2.2.1 The IE% 61$$3 S&eci!icatin..................................................................................................92.2.2 Data Transmissin................................................................................................................1'
413 I N!RO2"C!ION11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111133
41' O$ERA!IN@ S?S!E# CO#$ONEN!S11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111343.2.1 Plu( and Play )ana(er........................................................................................................13
414 I:O R E"ES! $ACE!S11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111133.3.1 I-P Data Structure................................................................................................................16
41) E N!R? R O"!INES11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111''3.,.1 DriverEntry...........................................................................................................................22
)13 #E!HO2OLO@? OF ANAL?SIS11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111114)1' O<ER<IE OF !HE CLASS S!R"C!"RE111111111111111111111111111111111111111111111111111111111111111111111111111111111111111114D)1'13 E N!R? $OIN!S11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111114>
!he musi* Lo*al Area Net-or. /mLAN0 is a proprietar& te*hnolog& that ?amaha
began de%eloping in 3554 KAE Notes7 '(()1 IEEE 3456 /Fire-ire0 -as *hosen as the
net-or.ing te*hnolog& for mLAN1 !he ob9e*ti%e of mLAN is to repla*e the m&riad of
*ables7 plugs and MinM7 MoutM and MthroughM so*.ets on s&nthesiers7 mi+ers and other
A:< equipment -ith a single *onne*tor1 !he mLAN s&stem represents a solid ad%an*e
in terms of net-or.ed real,time multimedia s&stems1 It is *hara*terised b& t-o
important features in real,time multimedia s&stems high band-idth and lo- laten*&1
Importan*e is atta*hed to resear*h -ithin the indo-s *onte+t7 as indo-s
represents a more *ommer*iall& %iable mar.eting option1 !he dri%er is responsible for
the $C intera*ting -ith the self,managed Fire-ire bus7 -hi*h has mLAN e+tended
nodes interfa*ing to audio studio equipment1 !he $C7 through the dri%er7 be*omes a
po-erful tool as it *an engage in *onne*tion management7 and audio re*ording and
pla&ba*.7 a%ailable as an appli*ation suit that *omes -ith the s&stem1 In%estigation
into the full potential or the pursuing of other ideas -ithin the mLAN s&stem *an be
done through the use of appli*ations1
1.2 Project Motivation
!he aim of the pro9e*t is to *riti*all& anal&se the indo-s mLAN dri%er -ith regardsto an ob9e*t oriented approa*h1 In an effort to streamline the de%elopment of
appli*ations for resear*h purposes7 or the possible modifi*ation of the mLAN dri%er7
an understanding of the dri%er is required1 !his understanding -ill be represented
?amaha began de%eloping a s&stem to pro%ide single *able *onne*tions bet-een the
arra&s of standard audio studio equipment in an attempt to standardise digital audio
data transmission1 IEEE 3456 /Fire-ire0 -as *hosen as the foundation on top of
-hi*h to build the mLAN s&stem7 for it addressed the man& aspe*ts required of the
proposed s&stem1 !he mLAN s&stem *an operate independentl& of a *entral ser%er or
a host *ontroller7 not requiring the use or the po-er of a *omputer1 Responsibilit& of
management and *ontrol of the bus is automati* and falls to sele*ted nodes on the bus1
"sing the *omputer as a tool to %isuall& model the bus and to manage the *onne*tion
of nodes7 it e+tends the fun*tionalit& of the mLAN s&stem1 !his *hapter briefl&
introdu*es the mLAN s&stem b& firstl& *o%ering the underl&ing te*hnolog&1 !his
deals -ith rele%ant IEEE 3456 and IEC 3>>4 *on*epts1 Finall&7 the mLAN
e+tensions to those te*hnologies are presented1
2.1 IEEE 1394
2.1.1 The I 1!"# Architecture
IEEE 3456 is a spe*ifi*ation that defines a serial bus ar*hite*ture -ith a *ommon set
of *ore features that is an e+tension to the Control and Status Registers /CSR0
ar*hite*ture KAnderson7 35551 !he CSR is a standard definition to permit easier
implementation of soft-are7 and allo-s interoperabilit& bet-een Fire-ire on different
platforms1 It is based on the ISO:IEC 34'34 spe*ifi*ation that standardises the offsetlo*ations -ithin the initial register address spa*e1 !he CSR spe*ifies the arrangement
of an addressable spa*e range *ontaining data stru*tures that identif& the *omponents
of the bus7 be it a bus7 a bridge or a node7 the *omponents state and other information1
A node is *ontained -ithin the module and this represents a logi*al entit&1 A unit is a
fun*tional sub*omponent of a node7 for e+ample7 a 3456 node *ould ha%e a <ideo and
an Audio unit7 ea*h operated and *ontrolled independentl& b& its o-n soft-are1 Ea*h
node has its o-n Control and Status Registers /CSRs07 as -ell as spa*e for bus
these standards1 Firstl&7 mLAN uses IEC 3>>4,3 for the general pa*.et format7
dataflo- and *onne*tion management7 and general transmission rules for *ommand
*ontrols1 Spe*ifi*all&7 these are en*apsulated in the definitions of the Fun*tion Control$roto*ol /FC$07 the Common Iso*hronous $a*.et /CI$0 format and the Conne*tion
#anagement $ro*edures /C#$0 KHaig7 '(('1
Se*ondl&7 there is IEC 3>>4,7 a standard based on a set of do*uments presented to
the IEEE 3456 !rade Asso*iation /3456 !A0 b& ?amaha1 ?amaha introdu*ed the
*on*ept and spe*ifi*ations for mLAN7 -hi*h des*ribed a spe*ifi*ation for the
transmission of audio and musi* data KAE Notes7 '(()1 !hus began a 3456 !A
do*ument des*ribing the Audio and #usi* 2ata !ransmission $roto*ol /A:#
$roto*ol01 !his do*ument -as adopted as an IEC /International Ele*trote*hni*al
Commission0 standards spe*ifi*ation1
!he spe*ifi*ation *ontrols the transfer bit,rate7 the en*apsulation and e+tra*tion of
audio and #I2I data into sequen*es7 and the *onstru*tion of the Common
Iso*hronous $roto*ol /CI$0 pa*.ets1 !hese CI$ pa*.ets /*omprising a CI$ header and
se%eral CI$ data blo*.s0 ma.e up the pa&load data of the iso*hronous pa*.ets that in
turn form the iso*hronous streams1 !he CI$ formatting is based on the IEC 3>>4,3
sta*. through I:O Request $a*.ets /IR$s01 !hese are reusable ob9e*ts that ha%e a
predefined and unique *ode identif&ing them and their fun*tion1 !his -ill be *o%ered
in more depth later in this *hapter1
3.2 '$eratin( S%"tem #om$onent"
!he operating s&stem has *ertain *omponents that monitor and allo*ate s&stem
resour*es as the& are required1 !here are three *ore *omponents that are rele%ant to
dri%ers fun*tioning -ithin the .ernel mode spa*e1 !hese are the $n$ manager7 the I:O
manager and the $o-er manager1 Another *omponent rele%ant to the fun*tioning of
the .ernel but spe*ifi*all& for .ernel,mode dri%ers is the ob9e*t manager1 !he Ob9e*t#anager stores and manages all s&stem ob9e*ts7 in*luding de%i*e and dri%er ob9e*ts1
!he I:O #anager ma.es use of the Ob9e*t #anager to a**ess and store the ob9e*ts it
uses K#S2N7 '(()1
!.2.1 %lug and %la& Manager
!he $n$ manager is firstl& responsible for identif&ing the de%i*e that has been added
to the s&stems en%ironment1 Ea*h de%i*e is registered -ith a @"I27 ma.ing it
identifiable to the OS1 As part of the indo-s OS7 a registr& .eeps tra*. of %endor
spe*ifi* de%i*e hard-are7 identifiable through a unique identifier *alled a @"I2
/@lobal "nique I201 !he @"I2 is a 3'>bit de%i*e identifier that is published for use
in the I! industr&7 *reating a unique asso*iation identif&ing the de%i*e -ith a @"I2
KOne&7 35551 !hat means ea*h de%i*e is registered -ith a @"I27 ma.ing it
identifiable to the OS7 allo-ing the OS to load the *orre*t dri%er1 A dri%er is released
implement the required po-er fun*tionalit& in terms of handling the IR$s that are
sent to it K#S2N7 '(()1
!.2.!. I/ Manager
!he I:O #anager forms part of the I:O #odel for the indo-s operating s&stem1 !he
I:O #anagers fun*tion is to fa*ilitate I:O *ommuni*ation bet-een an appli*ation and
a de%i*e %ia a dri%er sta*.1 !his *ommuni*ation stream *entres on the usage of IR$s
to formulate a request to the dri%er sta*. that indire*tl& *ontrols the de%i*e1 !hese
IR$s are routed to the dri%er sta*. -here ea*h dri%er has the *han*e to respond to the
IR$ until the request is satisfied1 Higher le%el dri%ers brea. the IR$ into smaller
requests and route them to lo-er le%el dri%ers appropriatel& KCant7 35551
!he I:O #anager also defines a set of required and optional routines that dri%ers
should implement1 Further7 ea*h dri%er should ha%e a handler routine for ea*h IR$ of
that set7 -hi*h are basi*all& entr& points into the dri%er *ode and thus allo-s the
dri%er to rea*t to a request1 In the table belo-7 an e+ample of a small set of IR$ ma9or
fun*tion *odes that ha%e to be implemented7 -ith their IN4' fun*tion that -illresult in the rele%ant IR$ being dispat*hed KCant7 35551
in4' Fun*tion IR$ #a9or Code Base 2ri%er Routine
CreateFile IR$#;CREA!E Create
CloseHandle IR$#;CLOSE Close
ReadFile IR$#;REA2 Read
riteFile IR$#;RI!E rite
2e%i*eIoControl IR$#;2E<ICECON!ROL 2e%i*eControl
!he I:O #anager .no-s impli*itl& -hat entr& routines there are for ea*h dri%er7 andthis is a*hie%ed b& the I:O #anager .eeping a list of 2ri%er Ob9e*ts1 A dri%er ob9e*t is
equated -ith a $h&si*al 2e%i*e Ob9e*t /$2O01 A dri%er ob9e*t is *reated b& the I:O
#anager -hen a dri%er is first loaded and installed1 2uring the dri%er initialisation7
the dri%er ob9e*t is passed to the first dri%er entr& routine *alled DriverEntry7 -hi*h
then asso*iates its other entr& routines -ith the dri%er ob9e*t K#S2N7 '(()1
!he IN4' A$I *ommuni*ates -ith the I:O manager7 -hi*h builds the appropriate
request to be sent to the *orre*t dri%er1 !he dri%er is represented b& a dri%er ob9e*t7
!he $2O represents and is *reated b& a bus dri%er7 -ith *ertain responsibilities and
fun*tions1 !hese in*lude enumerating and administrating the de%i*es on the bus7
responding to $n$ and $o-er IR$s1
!he F2O is the fun*tional dri%ers de%i*e ob9e*t7 -hi*h is the main dri%er for the
de%i*e1 Its purpose is to pro%ide an interfa*e to the operation of the de%i*e1
A Filter 2O is an optional dri%er that *an modif& the beha%iour of the dri%er
depending on -hat is required1 For instan*e7 if &ou -anted to monitor the fun*tioning
of the de%i*e7 or &ou -anted the de%i*e to *onform to e+pe*ted spe*ifi*ations7 this
-ould be done using a filter dri%er K#S2N7 '(()1
3.- Entr% *outine"
As established abo%e7 IR$s are the *ommuni*ation streams from an appli*ation to a
de%i*e in order a**ess its resour*es KOne&7 35551 Entr& routines are the entr& points
into the dri%er *ode1 !he& represent the different fun*tionalit& of the dri%er b&
implementing standard routines1 !hese standard routines are *alled under different
*ir*umstan*es7 and are required to pro%ide the fun*tionalit& for -hi*h the& are named1!he amount of required routines in*reases as the amount of fun*tionalit& and support
the dri%er is designed to implement1 Lo-er,end dri%ers7 those that dire*tl& *ontrol
a**ess to the de%i*es resour*es -ill ha%e more required routines than the higher,end
dri%ers1
!.3.1 'ri(erntr&
As dis*ussed earlier7 the DriverEntry routine is *alled b& the I:O #anager the first
time a dri%er is loaded and installed b& the s&stem K#S2N7 '(()1 An& initialisation
is ta.en *are of here7 setting up an& required parameters1 !he main purpose of the
DriverEntry routine is to fill in %arious pointers to fun*tions in the dri%er ob9e*t1
!hese are pointers to the other subroutines of the dri%er1 !he I:O #anager ma.es use
of these pointers -hen it builds an IR$1 !he subroutines represent the other entr&
points to the dri%er7 in*luding the dispat*h routines7 -hi*h re*ei%e and dispat*h IR$s1
resour*es to allo- for the integration of the dri%er into the frame-or.1 !he ob9e*ts
pro%ide fun*tionalit& to allo- for the ease of -or.ing -ith data stru*tures -ithin the
dri%er *onte+t1 !he purpose of the frame-or. is to pro%ide a model for the
*ommuni*ation bet-een the different *omponents7 -hi*h en*apsulates the flo- of
data required to fa*ilitate the fun*tioning of the dri%er1 !here are *ertain *lasses that
require sub*lasses to be deri%ed from them7 in order for the dri%er to pro%ide spe*ifi*
fun*tionalit&1
4.1 /Driver
!he dri%er ob9e*t is implemented b& the *lass 2ri%er7 -hi*h *ontains the entr&
points into a dri%er1 It is the *lass responsible for initialiing the dri%er7 and for
dire*ting I:O requests to the de%i*e ob9e*ts to -hi*h the& are targeted1 It is an abstra*t
*lass that requires that a *lass be deri%ed from it and *ertain member fun*tions be
o%erridden1 Ea*h dri%er built using the frame-or. distinguishes one *lass as the
dri%er *lass7 su*h that onl& one instan*e of 2ri%er *an e+ist for a dri%er1 2ri%er has
a ma*ro member fun*tion *alled DE%A-E8D-IVE-8%ASS -hi*h must appear
e+a*tl& on*e7 outside of an& fun*tion1 !his sets up the frame-or. for the *lass deri%edfrom 2ri%er1 !he ma*ro d&nami*all& allo*ates an instan*e of the spe*ified *lass
from the non,paged pool1 B& default the *lass librar& frame-or. routes and handles
the IR$s for pro*essing1 !his *an be *hanged b& o%erriding the Dis&atch"ilter
member fun*tion7 and informing the frame-or. that it should use this method1
#.1.1 'ri(erntr&
All *lasses deri%ed from 2ri%er must implement this member fun*tion1 2ri%ers
DriverEntry differs slightl& from that spe*ified b& #S2N1 In the #S2N
do*umentation there are t-o parameters7 a pointer to the 2RI<EROB;EC! stru*ture
*reated b& the I:O #anager and a pointer to a string *ontaining the path to the dri%ers
registr& .e&1 2ri%ers DriverEntry 9ust ta.es the registr& path parameter7 loads and
%alidates the path1 "sing the registr& path7 member %ariables *an be updated -ith
%alues stored in that .e&1 An& initialiation of the dri%er ob9e*t -ill ta.e pla*e here1
For e+ample7 e+pli*it use of the Dis&atch"ilter routine *an be set up here1
*onstru*tor that is used to initialise the instan*e of $npLo-er2e%i*e1 !he F2O
pointer is that of the 2e%i*e sub*lass instan*e1 2uring the lo-er de%i*e *reation and
initialisation the $2O is atta*hed to the F2O7 returning the pointer to the de%i*e
ob9e*t that -as atta*hed1 It is then the responsibilit& of the $np2e%i*e sub*lass
*onstru*tor to *all a member fun*tion Set#erDevice1
4.4 onDriver rame0or, cla""e"
!hese groups of *lasses represent the *ontainer and utilit& *lasses that pro%ide
stru*tured support for de%eloping .ernel,mode dri%ers1 !o program .ernel,mode or
s&stem *omponents7 the *orre*t usage of ob9e*ts and data t&pes is required1 !hese
*lasses model s&stem data t&pes and ob9e*ts7 and required generi* dri%er fun*tionalit&
and e+pose a high le%el abstra*tion for use b& the dri%er1 !hese *lasses are de%eloped
spe*ifi*all& for use b& dri%ers of the 2ri%erStudio frame-or.7 in*orporating tedious
but ne*essar& fun*tionalit&1 !he InterLo*.edList *lass7 for instan*e7 pro%ides an
implementation of doubl& lin.ed lists that *an be serialised and uses a built in spin
lo*. to enable safe a**ess to the list1 Another e+ample of useful fun*tionalit& is the
Ioor.Item -hi*h en*apsulates a s&stem request to e+e*ute a *allba*.7 allo-ing thequeuing of a -or. item that -ill get e+e*uted b& the s&stems -or.er thread1
#.#.1 4Ir,
!he Irp *lass abstra*ts the IR$ sent b& I:O manager and simplifies its use1 An IR$ is
a *omple+ data stru*ture that leads to *ode for intera*ting -ith an IR$ to be as
*omple+1 !he differen*e in use is illustrated b& the *ode snippet belo-7 sho-ing the
easil& readable usage of the Irp ob9e*t %ersus the relati%el& *omple+ C equi%alent1
// Straight C versionPIRP pIrp;IO_STACK_LOCATION pStack;
!he port *lass dri%er pro%ides an implementation of a S filter dri%er7 en*apsulating
the model of .ernel,mode nodes pro*essing a stream bet-een a start and end point1
!he Stream *lass dri%er is pro%ided for ba*.-ard *ompatibilit& -ith S 31( %ersion
%ideo dri%ers1
2ri%erStudio pro%ides a frame-or. of *lasses for en*apsulating the fun*tionalit& of
the S Ar*hite*ture7 sho-n belo- in the ob9e*t model of the frame-or.1 !hese
*lasses are Stream#inidri%er7 StreamAdapter and Stream1
$ig6re ).7 DriverSt6dio ernel Streaming $ramewor@
As a benefit of using the 2ri%erStudio frame-or.7 dri%er -riters do not ha%e to -orr&
about the spe*ifi*s of the underl&ing S ar*hite*ture1 It is required that there is a
deri%ation of the three *lasses that ma.e up the ar*hite*ture1 !he #inidri%er *lass is
responsible for the *ontrol of the stream adapter *lass1 In essen*e the #inidri%er *an
be %ie-ed as a filter dri%er7 be*ause it a*ts on behalf of the mLAN dri%er to pro*essdata streams1 An adapter is in turn responsible for *ontrol of a stream resour*e1 !he
adapter *lass *ontrols an indi%idual ph&si*al hard-are de%i*e or la&ered soft-are
*omponents abo%e a hard-are dri%er1 !he minidri%er and adapter ob9e*ts pro%ide
*ontrol o%er the de%i*e dri%er and hard-are -hile the stream ob9e*t pro%ides *ontrol
and data handling for an indi%idual media stream1 Spe*ifi*all&7 the stream *lass is
-here stream *ontrol7 stream properties7 and stream data buffers are managed
K2ri%erStudio7 '((61
4. #om$ilin( a &river
Although 2ri%erStudio is a dri%er de%elopment tool7 it still requires the indo-s
22 build utilit& to *ompile dri%ers1 !he 22 is required to be used b& all .ernel,
mode dri%ers as it builds the dri%er sour*e *ode -ith .ernel,spe*ifi* headers7 libraries7
*ompilers and lin.ers1 !he build utilit& *an be run from the <isual Studio I2E or a
*ommand prompt1 !he frame-or. generates the SO+RC,S and -AK,.IL, files that
are used b& the build utilit& -hen a ne- dri%er pro9e*t is *reated7 lea%ing
*ustomisation up to the de%elopers1 !hese files *ontain the lo*ation of the %arious
sour*e files7 the libraries to be lin.ed and the intended output used in the *ompilation1
Building a dri%er is a *riti*al e%ent7 as it has to be optimised to the platform /for e+ample7 +> 4',bit or IA6 6,bit builds0 it is intended for1 !hus the usage of the
*orre*t build options /of the *orre*t 22 %ersion0 for the target platform is ne*essar&
for the dri%er to *ompile and fun*tion *orre*tl&1
4. 5er"ionin( I""ue"
It is important to note that the 2ri%erStudio frame-or. is a de%elopment tool that
en*apsulates the 2# ar*hite*ture1 It ma.es s&stem *alls and uses s&stem ob9e*ts7
though the frame-or. e+poses a high le%el of abstra*tion1 !he *lasses of the
frame-or. are based on the 2# and are de%eloped to use the re*ommended
te*hniques1 #i*rosoft allo-s de%elopers to *reate dri%ers for their operating s&stems
b& pro%iding the indo-s 2ri%er 2e%elopment it /2207 and it is the 22 that is
responsible for the building of the dri%er1 !he 22 is %ersioned b& release and
operating s&stem7 and do*uments the 2#7 pro%iding a design guide for de%eloping
dri%ers1 !hrough ea*h subsequent update to the operating s&stem /for e+ample7 the
!he *lass that is *on*eptuall& seen b& the s&stem as the dri%er is the CmLanBus2ri%er
*lass7 -hi*h inherits from the 2ri%er *lass of the frame-or.1 !his is the *lass that*ontains the entr& points into the dri%er *ode1 !hese -ill be *o%ered in a later se*tion
-ith the aid of sequen*e diagrams1 E%er& time the s&stem dete*ts a ne- de%i*e under
the *ontrol of the dri%er7 it *alls the AddDevice routine of the dri%er *ode1 !he dri%er
then instantiates a ne- de%i*e ob9e*t of t&pe CmLanBus7 passing it the pointer to the
s&stem,*reated de%i*e ob9e*t obtained from the AddDevice routine1 "pon the *reation
of the de%i*e *lass ob9e*t7 it needs to initialise its lo-er de%i*e ob9e*t of t&pe
$npLo-er2e%i*e1 !his represents the dri%er te*hnolog& on -hi*h the mLAN dri%er
sits1 !he a*tual me*hani*s of this is handled b& the frame-or. and the I:O manager1
$ig6re .7 The mLAN ernel Streaming Minidriver Class Diagram
!he CmLanStrm2ri%er *lass is the inherited Stream#inidri%er *lass used to pro%ide
the entr& points of the dri%er1 !he frame-or. responds to the I:O managers *all to
*reate a ne- de%i*e b& *alling +n%reateAda&ter 7 -hi*h *reates the
CmLanStrmAdapter ob9e*t and initialises it1 !he CmLanStrmAdapter ob9e*t *ontains
ob9e*ts representing all possible t&pes of streams that it *an handle7 and -ill
instantiate the required stream *lass1 !he stream *hild *lasses are all inherited from
the same parent *lass7 requiring upon *reation to *all Initialie;ase%lass to set up the
stream parameters1 !hese stream *lasses represent the #I2I and audio data streams
that e+ist in mLANs iso*hronous streaming1 "nfortunatel& #i*rosofts IEEE 3456
dri%er does not support the bridging of multiple busses due to limitations in the
representation of the bus number of the dri%er1 As a result7 the bridge streams are notfull& implemented7 merel& pro%iding a s.eleton for future -or. -hen support for
!he first parameter spe*ifies the t&pe of de%i*e the IOC!L is targeted at1 #i*rosoft
has a list of de%i*e t&pes predefined b& the operating s&stem7 of -hi*h ea*h de%i*e
t&pe has its o-n asso*iated set of fun*tion *odes1 !he usage of .IL,_%,1IC,_+NKO2N
in this *ase is be*ause a mLAN de%i*e must ma.e use of *ustom IOC!L fun*tion
*odes and no de%i*e similar to the mLAN de%i*e e+ists1 !he se*ond parameter is the
fun*tion *ode of the IOC!L7 -hi*h gi%es the a*tion of the IOC!L1 !his is important7as it is used in differentiating bet-een different IOC!L *odes for the same de%i*e
IOCTL_-LAN_AS9NC_R,A%$erforms an as&n*hronous read
operation from the sour*e address
IOCTL_-LAN_AS9NC_2RIT,
$erforms an as&n*hronous -rite
operation on the indi*ated
destination address
IOCTL_-LAN_8+S_R,S,T_NOTI.9 aits for a bus reset to o**ur IOCTL_-LAN_8+S_R,S,T Initiates a bus resetIOCTL_-LAN_G,T_A%%R_.RO-_%,1IC,_O8<,CT Not implementedIOCTL_-LAN_G,T_LOCAL_7OST_IN.O Returns lo*al host informationIOCTL_-LAN_G,T_SP,,%_TOPOLOG9_-APS Obsolete
IOCTL_-LAN_S,N%_P79_CON.IG_PACK,TSends $H? *onfig pa*.et request to
the 3456 bus dri%er IOCTL_-LAN_G,T_LOCAL_NO%,_A%%R,SS Returns the lo*al node address
IOCTL_-LAN_G,T_C7ANN,LS_A1AILA8L,Returns the band-idth and *hannels
*urrentl& a%ailableIOCTL_-LAN_ALLOCAT,_C7ANN,L
Allo*ates the spe*ified *hannelIOCTL_-LAN_R,L,AS,_C7ANN,L Releases the allo*ated *hannel
IOCTL_-LAN_G,T_8AN%2I%T7_A1AILA8L,Returns the band-idth and *hannels
*urrentl& a%ailableIOCTL_-LAN_ALLOCAT,_8AN%2I%T7 Allo*ates the spe*ified band-idthIOCTL_-LAN_R,L,AS,_8AN%2I%T7 Releases the allo*ated band-idth
!he mLAN dri%er must do additional pro*essing in the IOC!L handler routine7 rather
than submit the request straight to the underl&ing IEEE 3456 bus dri%er1 !here are
some IOC!L *alls that do not *ommuni*ate -ith the Fire-ire dri%er7 but instead a*t
on or use IEEE 3456 related data stru*tures1 It is through this additional pro*essing
that the inherent fun*tionalit& of the mLAN dri%er be*omes apparent7 as -ell as the
la&ered nature of the 2# ar*hite*ture1 In order to *ommuni*ate -ith the Fire-ire
dri%er7 an IRB has to be *onstru*ted -ith a fun*tion *ode spe*ified7 the IRB pa*.aged
into an IR$7 and submitted to the Fire-ire dri%er1 !he a*tual me*hanism uses a pointer
to an IRB that is passed to the IR$7 allo-ing /upon *ompletion of the IR$0 the
response data to be e+tra*ted from the IRB1 !he fun*tion *ode di*tates the data
stru*ture to be used7 as it is forms a union -ith the IRB1 @enerall& the pa*.ets sent to
the bus tend to be transmitted as&n*hronousl&7 as the& are *ontrol pa*.ets1
!he usage of this group of IOC!LS *an be further *ategorised into sub groups that
either allo*ate or de,allo*ate IEEE 3456 resour*es7 modif& or return dri%er state
information7 initiate an as&n*hronous request7 or setup a notifi*ation of some e%ent1 In
order to effe*ti%el& use the Fire-ire bus7 *ertain *onfiguration and dri%er state
information has to be .no-n b& the appli*ation1 !his -ill be used in subsequent
and output in the IOC!L *all1 Note that the data stru*tures are do*umented in a
separate se*tion of the appendi+1
Input Buffer
A $ointer to an ALLOCAT,_A%%R,SS_RANG, stru*t1
Output Buffer
A pointer to the same ALLOCAT,_A%%R,SS_RANG, stru*t1
!e+tual 2es*ription
!he stru*t spe*ifies the address range that -ill be allo*ated in Host Controller address
spa*e b& the IEEE 3456 bus dri%er1 An address range has to be allo*ated before the
host *ontroller *an respond to an& *ommuni*ation from that node1 !he mLAN dri%er
sends an IRB *ontaining the address range to the 3456 dri%er1 !he IRB fun*tion *ode
is that of R,+,ST_ALLOCAT,_A%%R,SS_RANG, 1 A handle to the address range is
returned1
t>pee0 struct _ALLOCAT,_A%%R,SS_RANG, IN +LONG 0u'A''ocate.'a?s; IN +LONG 0u'.'a?s; IN +LONG nLen?t; IN +LONG -a5Se?#entSi@e; IN +LONG 0u'AccessT>pe; IN +LONG 0u'Noti0icationOptions; O+T A%%R,SS_O..S,T ReuireB:DO00set; O+T 7AN%L, AressRan?e; IN +C7AR %ataEBF;* ALLOCAT,_A%%R,SS_RANG,3 PALLOCAT,_A%%R,SS_RANG,;
In this parti*ular IOC!L *all7 the "CHAR 2ataK3 field of the data stru*ture spe*ifies
the beginning of the address range to be used1 !he "LON@ nLength field spe*ifies
ho- long the address range -ill be1 In the IOC!L handler routine a buffer in s&stem
memor& is *reated to hold the address range1 !his is used in the IRB union stru*t1 !he
rest of the input fields are there to spe*if& parameters to be used in the IRB1 !hese
relate to memor& management7 *ompletion notifi*ation and broad*ast features of the
as&n*hronous request1 !he Fire-ire dri%er returns a handle to the allo*ated address
range and an A22RESSOFFSE! stru*t that *ontains the IEEE 3456 node address1
!he information is a%ailable from the stru*t that -as used as input to the IOC!L1
*.1.2 )tream based mLAN I/CTL codes
!he onl& differen*e bet-een this group of IOC!Ls and the pre%ious is that these
IOC!Ls deal -ith the iso*hronous nature of the mLAN s&stem1 As before7 some of
these IOC!L handler routines do not *ommuni*ate -ith the IEEE 3456 dri%er7 the&
are grouped here b& the manner in -hi*h the& intera*t -ith stream related stru*ts used
b& the mLAN dri%er1 !he main fo*us of this group is the management of stream data
stru*tures used to represent a stream7 and the sequen*es that ma.e up a stream1 Astream is %ie-ed as another IEEE 3456 resour*e1 Li.e an& other resour*e7 it has to be
allo*ated before it *an be used7 and de,allo*ated -hen it is not in use1 An allo*ated
stream e+ists in t-o states7 started and stopped1 !here are IOC!Ls that handle these
a*tions7 as -ell as return stream spe*ifi* information1 !he table belo- *ontains the
brief des*ription of the IOC!Ls *ontained in this group1
I!CTL 8ode Des8ritionIOCTL_-LAN_START_STR,A- Starts the allo*ated streamIOCTL_-LAN_STOP_STR,A- Stops the allo*ated streamIOCTL_-LAN_G,T_STR,A-_IN.O Returns information of the streamIOCTL_-LAN_.R,,_STR,A- Frees the allo*ated streamIOCTL_-LAN_G,T_%RI1,R_1,RSION Returns the dri%er %ersion
IOCTL_-LAN_CONN,CT_S,+,NC,S_TO_%,1IC,SCreates the *onne*tion map of
sequen*esIOCTL_-LAN_S,T_S9T_SO+RC, Sets the bus master field
!his groups IOC!L sho-*ase is the IOC!L#LANALLOCA!ES!REA#
handler routine1 Follo-ing the same format as abo%e7 the IOC!L ma.es use of the
!he last sub,group has to do -ith plug,related requests su*h as *reating and deleting a
plug7 *onne*ting and dis*onne*ting plugs7 and setting and getting plug state
information1 !he IOC!Ls are briefl& des*ribed belo-1
I!CTL 8odes Des8ritionIOCTL_-LAN_B66_G,T_PL+G_7AN%L, Returns a handle to the spe*ified plugIOCTL_-LAN_B66_CR,AT,_PL+G Returns a handle to a ne-l& *reated plug
IOCTL_-LAN_B66_PL+G_NOTI.9
Returns an e%ent handle that indi*ates
-hen an operation is performed on the
plugIOCTL_-LAN_B66_%,L,T,_PL+G 2eletes a plugIOCTL_-LAN_B66_%ISCONN,CT_PL+G 2is*onne*ts the spe*ified *onne*tion
IOCTL_-LAN_B66_G,T_.CP_R,+,STReturns the ne+t FC$ request pa*.et from
the queue
IOCTL_-LAN_B66_G,T_.CP_R,SPONS,Returns the ne+t FC$ response pa*.et
from the queueIOCTL_-LAN_B66_G,T_PL+G_STAT, Returns the state of the spe*ified plugIOCTL_-LAN_B66_S,N%_.CP_R,+,ST Sends FC$ request to the de%i*e
IOCTL_-LAN_B66_S,T_.CP_NOTI.9Registers a *lient dri%er notifi*ation of
FC$ requests or responsesIOCTL_-LAN_B66_S,N%_.CP_R,SPONS, Sends FC$ response to the de%i*eIOCTL_-LAN_B66_S,T_PL+G Changes transmission settings for a plug
An e+ample from this group is the IOC!L#LAN3>>4CONNEC!$L"@
handler routine1 !he input buffer re*ei%es a pointer to a C-P_CONN,CT stru*t7 -ith the
same stru*t being returned1 Of the input stru*ts used for the %arious IOC!L *alls7
those that ma.e use of the 3>>4 proto*ol dri%er mirror e+isting 3>>4 data
stru*tures1 !he C-P_CONN,CT stru*t is no e+*eption and pro%ides handles to the input
and output plugs that are intended to be *onne*ted1 !-o other 3>>4 stru*ts are used
to spe*if& the *onne*tion t&pe and data format to be used in the streams1 !hese are the
C-P_CONN,CT_T9P, and the CIP_%ATA_.OR-AT stru*ts1 !he output of the IOC!L *all
!he request is for-arded to the underl&ing 3>>4 proto*ol dri%er7 using the handles of
plugs *ontained in the input stru*t to spe*if& -hi*h plugs to *onne*t1 A fun*tion *ode
ofA&B66_Connect
is used1 A handle to the *onne*tion is returned1
t>pee0 struct _C-P_CONN,CT
IN 7AN%L, OutputP'u?;IN 7AN%L, InputP'u?;IN C-P_CONN,CT_T9P, T>pe; IN CIP_%ATA_.OR-AT .or#at;
O+T 7AN%L, Connect; * C-P_CONN,CT3 PC-P_CONN,CT;
*.1.# A)I/ based mLAN I/CTL codes
!he ne+t group of IOC!Ls7 sho-n belo-7 is the ASIO based *alls7 -hi*h is a mLAN
implementation of ASIO fun*tionalit&1
I!CTL 8odes Des8rition
IOCTL_-LAN_ASIO_INIT
Returns the *urrent state information of
the ASIO dri%er and ASIO streams7 and
initialises the dri%er IOCTL_-LAN_ASIO_.R,, Frees up ASIO allo*ated buffersIOCTL_-LAN_ASIO_ALLOC Allo*ates ASIO buffers and resour*esIOCTL_-LAN_ASIO_STOP Stops the ASIO dri%er IOCTL_-LAN_ASIO_CL,AN+P Remo%es ASIO related ob9e*ts
IOCTL_-LAN_ASIO_IN.OReturns the *urrent state information of
the ASIO dri%er and ASIO streamsIOCTL_-LAN_ASIO_R,S,T Resets the ASIO dri%er
ernel Streaming Ar*hite*ture /See Chapter 4 for an e+planation of the S Streaming
Ar*hite*ture01 In terms of this implementation7 the mLAN bus dri%er forms the
frame-or.s lo-er de%i*e ob9e*t *lass for the adapter1 !his is to establish *lear lines
of *ommuni*ation -ithin the dri%er sta*.1 !he diagram belo- des*ribes the
intera*tion of the three ernel Streaming *lasses -ith the mLAN dri%er1
$ig6re -.)7 ernel Streaming Ar8hite8t6re
!he lo-er le%el dri%ers and hard-are represents those dri%ers at the bottom of thesta*. *losest to the HAL7 responsible for re*ei%ing from and transmitting data onto
the IEEE 3456 bus1 Although the mLAN dri%er is the lo-er de%i*e for the 2#
Streaming minidri%er in the 2ri%erStudio frame-or.7 *on*eptuall& the mLAN dri%er
o-ns and is responsible for the Streaming minidri%er1
.2 Im$lementation I""ue"
As dis*ussed in the 2ri%erStudio *hapter7 %ersioning issues *an halt progress in
building a dri%er through in*ompatibilit& issues1 !he sour*e *ode of the mLAN dri%er
-as released and built using %ersion '1D of 2ri%erStudio1 Current anal&sis of the
dri%er is done using the latest %ersion 41'7 follo-ing se%eral *hanges to the 2#1 As
a result7 a fundamental *hange in the underl&ing fun*tioning of at least one *lass
/rele%ant to its usage0 is found7 lea%ing the *lass obsolete1 !o build the dri%er -ith the
*urrent %ersion of 2ri%erStudio requires that the depre*ated *lasses in the *ode be
repla*ed -ith the ne- *lasses1 !his requires the modifi*ation of the dri%er sour*e
!he ob9e*t model of the mLAN dri%er relates to the 2# through the use of the
2ri%erStudio frame-or.1 In *hapter fi%e7 the stru*ture of the dri%er is presented1 From
this7 it is possible to understand ho- the *lasses *onform to the 2#1 It is
unfortunate that the ideal methodolog& of anal&sis *ould not ha%e been pursued1 !his
limits the anal&sis7 -here *larit& is sa*rifi*ed through the manual approa*h of
anal&sis7 -hi*h *an be resol%ed a**uratel& through the use of a po-er debugger1 It
-ould be more *on*lusi%e if that form of anal&sis -as *arried out7 unfortunatel& due
to the in*ompatibilit& issues e+perien*ed and the limitations of time and the s*ope of
the pro9e*t7 it -as not1
.2 uture E!ten"ion"
As a possible e+tension7 modif&ing the dri%er su*h that it builds should &ield
interesting results through further anal&sis1 !he dri%er -ould then be read& to be
modified to further in%estigate the potentialit& of the mLAN s&stem in audio
streaming1 Further e+tensions -ould be to in%estigate the possibilit& of e+tending the
dri%er to be *ompatible -ith the ne+t %ersion of the indo-s operating s&stem7 or to
in%estigate the usage of %ideo streaming should and A< *apable de%i*e be de%eloped1A further e+tension is to port the dri%er to the ne- dri%er ar*hite*ture that -ill be seen
in the ne+t %ersion of the indo-s operating s&stem1
Ea*h IOC!L has a spe*ifi*ation of the input and output requirement for the IR$s
buffer1 !he a*tual des*ription of ea*h stru*t is detailed in $art B of the Appendi+1
!here is a brief te+tual des*ription of -hat the IOC!L handler routine does1
Belo- the des*ription is a diagram representing a h&brid bet-een a ard and #ellor
Stru*tured 2ata 2iagram7 and Larr& Constantines 2ata Flo- 2iagram1 It is
h&bridised be*ause neither method neatl& en*apsulates the IOC!L handler7 but rather
ta.ing elements from both methods and *ombining them &ields a *learer pi*ture1 !he
entire diagram *an be %ie-ed as pro*ess instead of ea*h full *ir*le7 as in the ard and
#ellor approa*h1 !he dotted *ir*le still represents a trigger for the pro*ess7responding to the IR$ dispat*h routine1 !he parallel lines represent a data store7
*ommon to both methods of modelling1 Ea*h full *ir*le represents a sub,pro*ess that
a*ts on a data store1 !he dotted lines represent the flo- of the trigger7 -hile the solid
lines represent the flo- of data and *ontrol1
I 1!"# based mlan I/CTL codes
I!CTLMLANALL!CAT"ADDR"SSRAN#"
Input BufferA $ointer to an ALLOCAT,_A%%R,SS_RANG, stru*t1
Output Buffer
A pointer to the same ALLOCAT,_A%%R,SS_RANG, stru*t1
!e+tual 2es*ription
!he stru*t spe*ifies the address range that -ill be allo*ated in Host Controller address
spa*e b& the IEEE 3456 bus dri%er1 An address range has to be allo*ated before the
host *ontroller *an respond to an& *ommuni*ation from that node1 !he mLAN dri%er
sends an IRB *ontaining the address range to the 3456 dri%er1 !he IRB fun*tion *ode
is that of R,+,ST_ALLOCAT,_A%%R,SS_RANG, 1 A handle to the address range is
A pointer to the same G,T_A%%R,SS_%ATA stru*t is returned1
!e+tual 2es*ription
!he request returns the node address and the data *ontained -ithin that address
spe*ified b& the allo*ated address range handle1
I!CTLMLAN$R""ADDR"SSRAN#"
Input Buffer
A 7AN%L, to the intended address range1
Output Buffer
Nothing is returned1
!e+tual 2es*ription
!he IOC!L handler routine -ill tr& to free the address range b& sending an IRB*ontaining the address range to the 3456 dri%er1 !he IRB fun*tion *ode is that of
!he IOC!L *ode is used to perform an as&n*hronous -rite operation on the indi*ated
destination address1 !his is a*hie%ed b& summiting an IRB to the 3456 dri%er -ith a
fun*tion *ode of R,+,ST_AS9NC_2RIT, 1
I!CTLMLANB%SR"S"TN!TI$1
Input Buffer
A pointer to a -LAN_8+S_R,S,T_NOTI.9 stru*t1
Output Buffer
A pointer to the same -LAN_8+S_R,S,T_NOTI.9 stru*t is returned1
!e+tual 2es*ription
!he request sends the IR$ to a bus reset notifi*ation queue7 -hi*h -ill be signalled b&the dri%er -hen a bus reset o**urs1 !he stru*t is returned -ith the node address of the
!he input t&pe is to spe*if& the reset flags of the IRB that -ill be sent to the 3456
dri%er1 !he IRB has a fun*tion *ode of R,+,ST_8+S_R,S,T1 !his initiates a bus reset1
I!CTLMLAN#"TL!CAL+!STIN$!
Input Buffer
A pointer to a G,T_LOCAL_7OST_IN.OR-ATION stru*t1
Output Buffer
A pointer to the same G,T_LOCAL_7OST_IN.OR-ATION stru*t is returned1
!e+tual 2es*ription
!his re*ei%es a request for the lo*al host information7 -hi*h is attained b&
*onstru*ting an IRB -ith a fun*tion *ode of R,+,ST_G,T_LOCAL_7OST_IN.O 1 !hestru*t stores the input data as -ell as the host information -hen it is re*ei%ed1
!his returns a LARG,_INT,G,R stru*t /refer to #S2N for spe*ifi*ation01
!e+tual 2es*ription
It ma.es a request that returns the band-idth and *hannels *urrentl& a%ailable on theIEEE 3456 bus1 !he returning information spe*ifies a 6,bit number -ith a high and
lo- part of 4',bits ea*h1 !he IRB has a fun*tion *ode ofR,+,ST_ISOC7_+,R9_R,SO+RC,S$
I!CTLMLANALL!CAT"C+ANN"L
Input Buffer
A "LON@ t&pe1
Output Buffer
!his it returns the same t&pe1
!e+tual 2es*ription
!his is to spe*if& the requested *hannel number1 !he request is for-arded to the 3456
bus dri%er7 -hi*h allo*ates an iso*hronous *hannel to be used in subsequent
operations1 !he IRB fun*tion *ode is R,+,ST_ISOC7_ALLOCAT,_C7ANN,L$
!his is to spe*if& the *hannel number to release1 !he request is for-arded to the 3456
bus dri%er7 -hi*h releases an iso*hronous *hannel that -as pre%iousl& allo*ated1 !he
IRB fun*tion *ode is R,+,ST_ISOC7_.R,,_C7ANN,L$
I!CTLMLAN#"TBANDWIDT+A&AILABL"
Input Buffer
!here is no required input for this IO!CL *ode1
Output Buffer
A "LON@ t&pe1
!e+tual 2es*ription
!he request returns the band-idth and *hannels *urrentl& a%ailable on the IEEE 3456
bus1 It returns to the appli*ation the a%ailable band-idth as e+pressed in b&tes periso*hronous frame1 !he IRB fun*tion *ode is R,+,ST_ISOC7_+,R9_R,SO+RC,S$
Contains a handle that spe*ifies the IEEE 3456 addresses -here the data to
retrie%e is stored1
nLength
Indi*ates the length in b&tes of the data in the buffer spe*ified b& the Data member1
6l!ffset
Indi*ates the offset into the buffer at Data -here the retrie%ed data is lo*ated1
Data
Contains a data buffer -here the @etAddress2ata routine stores the data
retrie%ed from the IEEE 3456 address range spe*ified in member
hAddressRange1
K#S2N7 '(()
AS1NCL!C
t>pee0 struct _AS9NC_LOCK IN +LONG MRaw-oe; IN +LONG MGetGeneration; IN IO_A%%R,SS %estinationAress; IN +LONG nNu#MerO0Ar?8>tes; IN +LONG nNu#MerO0%ata8>tes; IN +LONG 0u'TransactionT>pe; IN +LONG 0u'.'a?s; IN +LONG Ar?u#entsEF; IN +LONG %ata1a'uesEF; IN +LONG u'Generation;
IN +LONG 8u00erEF;* AS9NC_LOCK3 PAS9NC_LOCK;
RawMode
Indi*ates7 if !R"E7 that bus and node number spe*ified in the
DestinationAddress -ill be used1 If FALSE7 the %alues in
DestinationAddress are ignored1 !his flag must be set to !R"E -hen the
*aller sends an as&n*hronous read request to a %irtual diagnosti* dri%er
/3456%de%1s&s01
#et#eneration
Indi*ates7 -hen !R"E7 that the generation *ount -ill automati*all& be set to
the *urrent generation *ount1 If FALSE7 the 6l#eneration member holds thegeneration *ount1
DestinationAddress
Contains a stru*ture of t&pe I!ADDR"SS that spe*ifies the 3456 6,bit
destination address for this read operation1 Caller must fill in the
IADestination!ffset member of stru*ture1 !he bus dri%er fills in the
IADestinationID member1
nN6mer!fArgBytes
Spe*ifies the number of argument b&tes used in performing this lo*.
operation1 #a& be ero7 6 or >1 See the f6lTransa8tionTye member for
Spe*ifies the number of data b&tes used in performing this lo*. operation1
#a& be 6 or >1 See the f6lTransa8tionTye member for details1
f6lTransa8tionTye
Spe*ifies -hi*h atomi* transa*tion to e+e*ute on the 3456 node1
nBlo8@Si<e Spe*ifies the sie of ea*h indi%idual blo*. -ithin the data stream1 If the %alue
assigned to this parameter is ero7 the bus dri%er brea.s up the stream into
pa*.ets that are the ma+imum pa*.et sie1
f6l$lags
Spe*ifies the settings for this operation that are different from the default
settings1
Arg6ments
Contains a bitmap that indi*ates -hi*h bits to *hange in DestinationAddress 1
Data&al6es
Contains the bit %alues to be assigned to DestinationAddress in the bit
positions spe*ified b& the bitmas. in Arg6ments16l#eneration
Spe*ifies the bus reset generation *ount1 If the generation *ount spe*ified does
not mat*h the a*tual generation of the bus7 this request is returned -ith a status
of S!A!"SIN<ALI2@ENERA!ION1
B6ffer
Contains a buffer to store the results of the operation1 Caller must ensure that
the buffer *ontains at least nN6mer!fDataBytes b&tes of data1
K#S2N7 '(()
AS1NCR"AD
t>pee0 struct _AS9NC_R,A% IN +LONG MRaw-oe; IN +LONG MGetGeneration; IN IO_A%%R,SS %estinationAress; IN +LONG nNu#MerO08>tesToRea; IN +LONG n8'ockSi@e; IN +LONG 0u'.'a?s; IN +LONG u'Generation; O+T +C7AR %ataEBF;* AS9NC_R,A%3 PAS9NC_R,A%;
RawMode
Indi*ates7 if !R"E7 that bus and node number spe*ified in the
DestinationAddress -ill be used1 If FALSE7 the %alues in
DestinationAddress are ignored1 !his flag must be set to !R"E -hen the
*aller sends an as&n*hronous read request to a %irtual diagnosti* dri%er
/3456%de%1s&s01
#et#eneration
Indi*ates7 -hen !R"E7 that the generation *ount -ill automati*all& be set to
the *urrent generation *ount1 If FALSE7 the generation *ount -ill be ta.en
Contains a stru*ture of t&pe I!ADDR"SS that spe*ifies the 3456 6,bit
destination address for this read operation1 Caller must fill in the
IADestination!ffset member of stru*ture1 !he bus dri%er fills in the
IADestinationID member1
nN6mer!fBytesToRead
Spe*ifies the number of b&tes to read1nBlo8@Si<e
Spe*ifies the sie of ea*h indi%idual blo*. -ithin the data stream1 If the %alue
assigned to this parameter is ero7 the bus dri%er brea.s up the stream into
pa*.ets that are the ma+imum pa*.et sie1
f6l$lags
Spe*ifies the settings for this operation that are different from the default
settings1
6l#eneration
Spe*ifies the bus reset generation *ount1 If the generation *ount spe*ified does
not mat*h the a*tual generation of the bus7 this request is returned -ith a status
of S!A!"SIN<ALI2@ENERA!ION1Data
Contains a buffer to store the results of the as&n*hronous read operation1
Caller must ensure that the buffer *ontains at least nN6mer!fBytesToRead
b&tes of data1
K#S2N7 '(()
AS1NCWRIT"
t>pee0 struct _AS9NC_2RIT,
IN +LONG MRaw-oe; IN +LONG MGetGeneration; IN IO_A%%R,SS %estinationAress; IN +LONG nNu#MerO08>tesTo2rite; IN +LONG n8'ockSi@e; IN +LONG 0u'.'a?s; IN +LONG u'Generation; IN +C7AR %ataEBF;* AS9NC_2RIT,3 PAS9NC_2RIT,;
RawMode
Indi*ates7 if !R"E7 that bus and node number spe*ified in the
DestinationAddress -ill be used1 If FALSE7 the %alues inDestinationAddress are ignored1
#et#eneration
Indi*ates7 -hen !R"E7 that the generation *ount -ill automati*all& be set to
the *urrent generation *ount1 If FALSE7 the generation *ount -ill be ta.en
from the 6l#eneration %ariable1
DestinationAddress
Contains a stru*ture of t&pe I!ADDR"SS that spe*ifies the 3456 6,bit
destination address for this -rite operation1 Caller must fill in the
IADestination!ffset member of stru*ture1 !he bus dri%er fills in the
IADestinationID member1
nN6mer!fBytesToWrite Spe*ifies the number of b&tes to -rite1