Difference between revisions of "Lan.sys"

From ReactOS Wiki
Jump to: navigation, search
(Import from old Wiki)
 
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
A simple adapter neutral driver for sending and receiving packets from ndis adapters, querying adapters, and assigning and querying protocol addresses.
+
{{DISPLAYTITLE:lan.sys}}
 +
A simple adapter neutral driver for sending and receiving packets from NDIS adapters, querying adapters, and assigning and querying protocol addresses.
  
 
It supports these operations:
 
It supports these operations:
  
Read -- Get the next packet that matches our target type
+
* Read Get the next packet that matches our target type
Write -- Put a packet on the indicated adapter, building a link layer header as appropriate
+
* Write Put a packet on the indicated adapter, building a link layer header as appropriate
 +
* LookupAddress – Match a partial address (either the protocol address or the link layer address) on the indicated adapter and return the full address.
 +
* PushAddress – Set an address mapping, deleting previous matching protocol addresses.
 +
* EraseAddress – Remove matching address mappings.
 +
* EnumAdapters – Return an array of adapter indices.
 +
* Bufferedmode – Set buffered mode to allow userland use of NtReadFile in lan.sys (mostly testing).
 +
* AddAddress – Set an address association for the indicated adapter. This will be considered to be a local address and will be associated with the adapter's link layer address.
 +
* RemAddress – Remove a local address from the indicated adapter.
 +
* AdapterInfo – Return a struct containing information about the indicated adapter, including its ndis registry key, speed, link layer address, etc.
 +
* Sending a packet from LAN.SYS: fill out a LAN_PACKET_HEADER and do WriteFile on it. The specified link layer address will be used as the target address. A zero-length address means broadcast.
 +
* Receiving a packet from LAN.SYS: just do ReadFile on a buffer and wait for a LAN_PACKET_HEADER to appear.
  
LookupAddress -- Match a partial address on the indicated adapter and return the full address.  Match can be against either the protocol address or the link layer address.
+
{{Code history|drivers/network/lan}}
  
PushAddress  -- Set an address mapping, deleting previous matching protocol addresses.
+
[[Category:Development]]
 
+
[[Category:Drivers]]
EraseAddress  -- Remove matching address mappings.
 
 
 
EnumAdapters  -- Return an array of adapter indices.
 
 
 
Bufferedmode  -- Set buffered mode to allow userland use of NtReadFile in lan.sys (mostly testing).
 
 
 
AddAddress    -- Set an address association for the indicated adapter.  This will be considered to be a local address and will be associated with the adapter's link layer address.
 
 
 
RemAddress    -- Remove a local address from the indicated adapter.
 
 
 
AdapterInfo  -- Return a struct containing information about the indicated adapter, including its ndis registry key, speed, link layer address, etc.
 
 
 
Sending a packet from LAN.SYS: fill out a LAN_PACKET_HEADER and do WriteFile on it.  The specified link layer address will be used as the target address.  A zero-length address means broadcast.
 
 
 
Receiving a packet from LAN.SYS: just do ReadFile on a buffer and wait for a LAN_PACKET_HEADER to appear.
 

Latest revision as of 07:33, 15 May 2014

A simple adapter neutral driver for sending and receiving packets from NDIS adapters, querying adapters, and assigning and querying protocol addresses.

It supports these operations:

  • Read – Get the next packet that matches our target type
  • Write – Put a packet on the indicated adapter, building a link layer header as appropriate
  • LookupAddress – Match a partial address (either the protocol address or the link layer address) on the indicated adapter and return the full address.
  • PushAddress – Set an address mapping, deleting previous matching protocol addresses.
  • EraseAddress – Remove matching address mappings.
  • EnumAdapters – Return an array of adapter indices.
  • Bufferedmode – Set buffered mode to allow userland use of NtReadFile in lan.sys (mostly testing).
  • AddAddress – Set an address association for the indicated adapter. This will be considered to be a local address and will be associated with the adapter's link layer address.
  • RemAddress – Remove a local address from the indicated adapter.
  • AdapterInfo – Return a struct containing information about the indicated adapter, including its ndis registry key, speed, link layer address, etc.
  • Sending a packet from LAN.SYS: fill out a LAN_PACKET_HEADER and do WriteFile on it. The specified link layer address will be used as the target address. A zero-length address means broadcast.
  • Receiving a packet from LAN.SYS: just do ReadFile on a buffer and wait for a LAN_PACKET_HEADER to appear.

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