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'...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |