Bluehost.com Web Hosting $6.95

[Samba] How to do a simple directory listing

This is a discussion on [Samba] How to do a simple directory listing within the Samba forums, part of the Networking and Network Related category; I'm working on an embedded system that will communicate with a Samba server, and I'm wondering if there'...


Go Back   Usenet Forums > Networking and Network Related > Samba

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-25-2008
Jeremy M
 
Posts: n/a
Default [Samba] How to do a simple directory listing


I'm working on an embedded system that will communicate with a Samba server, and I'm wondering if there's a way to do a simple directory listing. Iused Wireshark to see what my Win2K computer does, and I see it's using FIND_FIRST2. This is fine, probably acceptable, but Samba returns a lot of information I do not need, such as file creation/access times. I just need filenames, and will only be reading from Samba. It ends up beingmore data to store in limited RAM and parse.

Can NT_CREATE_ANDX be used to obtain a directory listing? The CIFS Technical Reference states "This command is used to create or open a file or directory". I thought I could specify a directory then use READ_ANDX, but I'mnot surprised that didn't do what I had hoped.

__________________________________________________ _______________
Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®.
http://clk.atdmt.com/MRT/go/108588797/direct/01/--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
  #2 (permalink)  
Old 08-25-2008
Jeremy Allison
 
Posts: n/a
Default Re: [Samba] How to do a simple directory listing

On Mon, Aug 25, 2008 at 07:47:10AM -0400, Jeremy M wrote:
>
> I'm working on an embedded system that will communicate with a Samba server, and I'm wondering if there's a way to do a simple directory listing. I used Wireshark to see what my Win2K computer does, and I see it's using FIND_FIRST2. This is fine, probably acceptable, but Samba returns a lot of information I do not need, such as file creation/access times. I just need filenames, and will only be reading from Samba. It ends up being more data to store in limited RAM and parse.


Chose the right info level to ask for. To get just the name ask for
SMB_FIND_FILE_NAMES_INFO (0x103).

> Can NT_CREATE_ANDX be used to obtain a directory listing? The CIFS Technical Reference states "This command is used to create or open a file or directory". I thought I could specify a directory then use READ_ANDX, but I'm not surprised that didn't do what I had hoped.


No, for the same reason you can't do this (open() then read() on a UNIX
directory).

Jeremy.
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 01:27 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0