Difference between revisions of "Afd.sys"

From ReactOS Wiki
Jump to: navigation, search
m
Line 1: Line 1:
ReactOS Ancillary Function Driver
+
== ReactOS Ancillary Function Driver ==
 
 
http://mista.nu/blog/2012/02/17/cve-2012-0148-a-deep-dive-into-afd/
 
 
 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/?view=log
 
  
 
It was complicated before. Here's how it works now:
 
It was complicated before. Here's how it works now:
Line 9: Line 5:
 
Each AFD_FCB has a read and write buffer which currently holds up to one packet. For better performance, we can make this buffering scheme better. For the sake of simplicity, it's the way it is now.
 
Each AFD_FCB has a read and write buffer which currently holds up to one packet. For better performance, we can make this buffering scheme better. For the sake of simplicity, it's the way it is now.
  
Each socket can have at most one send IRP active at a time. Others either wait or do nothing depending on whether they're for stream or packet sockets. This too can be improved but again does no real harm.
+
Each socket can have at most one send IRP active at a time. Others either wait or do nothing depending on whether they're for stream or packet sockets. This too can be improved but again does no real harm.
  
 
Each socket has at most one receive IRP active at a time (or listen IRP for a listen socket). The TDI provider completes the irp when some data arrives, and we relaunch it when our buffer is empty.
 
Each socket has at most one receive IRP active at a time (or listen IRP for a listen socket). The TDI provider completes the irp when some data arrives, and we relaunch it when our buffer is empty.
Line 17: Line 13:
 
Apart from that the rest is bookkeeping.
 
Apart from that the rest is bookkeeping.
  
[[ChangeLog-0.2.0]]
+
{{Code history|drivers/network/afd}}
 
 
* AfdDispCompleteListen, AfdDispListen, AfdKillListenRequest, TdiAddressSizeFromType, TdiBuildNullConnectionInfo, TdiListen implementations ([[Casper Hornstrup]])
 
 
 
[[ChangeLog-0.2.2]]
 
*Correctly set Irp->IoStatus.Information in AfdDispatch ([[Filip Navara]])
 
*Started AfdDispGetName implementation ([[Filip Navara]])
 
*Signal ACCEPT network event ([[Casper Hornstrup]])
 
[[ChangeLog-0.2.2]]
 
*Build AFD, TCPIP and TDI with w32api headers ([[Filip Navara]])
 
 
 
[[ChangeLog-0.2.4]]
 
* AFD rewrite. ([[Art Yerkes]])
 
 
 
[[ChangeLog-0.3.3]]
 
* AFD: Fix a race condition resulting in a BSOD when running FireFox ([[Aleksey Bragin]])
 
* Add a first network adapter at index 0000, as real ones start at index 0001 ([[Hervé Poussineau]], bug #2034)
 
  
 +
== External links ==
 +
* http://mista.nu/blog/2012/02/17/cve-2012-0148-a-deep-dive-into-afd/
  
[[Category:BNWIP]]
+
[[Category:Development]]
 +
[[Category:Drivers]]

Revision as of 07:19, 15 May 2014

ReactOS Ancillary Function Driver

It was complicated before. Here's how it works now:

Each AFD_FCB has a read and write buffer which currently holds up to one packet. For better performance, we can make this buffering scheme better. For the sake of simplicity, it's the way it is now.

Each socket can have at most one send IRP active at a time. Others either wait or do nothing depending on whether they're for stream or packet sockets. This too can be improved but again does no real harm.

Each socket has at most one receive IRP active at a time (or listen IRP for a listen socket). The TDI provider completes the irp when some data arrives, and we relaunch it when our buffer is empty.

Select is accomplished by calls to PollReeval in ReceiveComplete, SendComplete, Afd*ReadData and Afd*WriteData. Each time PollReeval is called, a select IRP could get completed.

Apart from that the rest is bookkeeping.

Commit history (Source code can be found in: /reactos/drivers/network/afd)

External links