named pipe access

Luke Kenneth Casson Leighton lkcl at switchboard.net
Mon Jan 25 16:08:58 GMT 1999


On Sat, 23 Jan 1999, Todd Pfaff wrote:

> On Fri, 22 Jan 1999, Luke Kenneth Casson Leighton wrote:
> 
> > clientutilARGH!  no, definitely not clientutil.c, although you're close:
> > clientgen.c instead.  you will need to specify \PIPE\WHATEVERNAME not
> > \PIPE\LANMAN.
> 
> ok, next question...
> 
> first of all, i'm working with the samba-2.0.0 source.

ok.
 
> for now, i'm adding code to client/client.c to implement the named pipe
> api commands so that i can test them quickly.

ok.

>  i then run smbclient to
> connect to the IPC$ share on the named pipe server to test these commands.
> am i on the right track here? 

yep!

> if this all works as i think it should,
> perhaps i can add some general purpose named pipe api facility to 
> smbclient for others to use, and document how it's done.

cool.
 
> to implement the api commands in client.c i create an appropriate
> command message string according to the published api and then i call 
> cli_api_pipe() with this message string as the params argument.
> i'm unsure about the arguments to cli_api_pipe() though.  should i be
> using the setup, setup_count, max_setup_count arguments?

depends on the API command, as per the named pipe specification you have.
i suspect not, though.

>  if so, why and
> how?  should i be passing my api command string in the params argument or
> the data argument?

there, i personally cannot tell you.  if you asked me about the rpc code i
could tell you straight off.

>  can anyone give me a quick tutorial on this, or do i
> just have to drill down through the source code and piece it all together.

take a look at an example: the client netserverenum for example.




More information about the samba-technical mailing list