OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Need to send SMB request from driver

From: Mario Jauvin (marioMFJASSOCIATES.HOMEIP.NET)
Date: Sun Jan 25 2004 - 10:59:45 CST


Greetings, this is a newbie sort of question. I have a device driver (a
file system filter driver to be exact) which needs to send requests via
SMB to read or write files using SMB. I am not familiar with the SMB
protocol and I do not know what to do to issue SMB client request from a
device driver.

The questions I have is which alternative is appropriate or better amongst
these scenarios (lets call MYDRV my driver):

1. MYDRV uses normal open/read/write/close file system calls (same as a
what a WIN32 user program would use) to do the network file processing

2. MYDRV talks to the client SMB driver (the Microsoft Workstation
driver/service) to do the network file processing

3. MYDRV builds the SMB requests and sends them to the remote server to do
the network file processing.

Or is there a better alternative?

A few questions on these scenarios are:

Is scenario 1 possible (used CreatFile and WriteFile WIN32 API from the
driver (I kinda doubt it))

In scenario 2, how do I know how to communicate with the Microsoft
WORKSTATION service? If this scenario is the better approach, could
people give me examples of such calls for writing a BLOCK.

In scenario 3, are there Windows libary calls which can be used to do this?

Your help is much appreciated.

----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.html
contains important info including how to unsubscribe. Save time, search
the archives at http://discuss.microsoft.com/archives/index.html