Are mailslots implemented?

Jelmer Vernooij jelmer at samba.org
Mon Mar 14 12:42:16 CST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Kuba Ober wrote:
|>|>>Which application uses mailslots?  I only ever found one real
|>|>>application that used them, and that was "Declan's Korean Dictionary"
|>|>>from [1].
|>|>
|>|>The browse (Network Neighborhood) service uses them. Other then that,
|>|>I have not seen any uses of it.
|>|
|>| Protel 98 (likely higher versions too) uses them.
|>|
|>| MSDN says that the datagrams are limited to 424 bytes in length, so
|>
|>even if
|>
|>| they are not very useful otherwise, getting Protel running on wine
|>
|>seems a
|>
|>| worthy goal to me. I'll try hacking on it and seeing where I end up.
|>
|>See http://www.ubiqx.org/cifs/Browsing.html#BRO.3 for more information
|>libsmbclient from Samba 3 does not support it at the moment
| What do the "match_mailslot_name" and "cli_send_mailslot" functions
do, then?
Those are internal functions - the "official" functions are in
libsmbclient.h. Of course, it is very well possible to use these
functions (they haven't changed for ages). However, it might be hard to
use that function (given that it's internal).

Now that I've looked at the prototype, it looks ok:

int cli_send_mailslot(int dgram_sock, BOOL unique, const char *mailslot,
~              char *buf, int len,
~              const char *srcname, int src_type,
~              const char *dstname, int dest_type,
~              struct in_addr dest_ip, struct in_addr src_ip,
~              int dest_port, int src_port);

| Anyway, if the wire protocol is simple enough, and so it seems from
ubiqx.org
| article, then I can just synthesize all the relevant layers to send the
| multicast UDP. The only piece of info that I'll (hopefully) need from
wine is
| the netbios node name.
|
| For reception, I'll bind UDP port 138 (netbios-dgm) if it's not
already bound,
| to receive the mailslots coming in.
Samba (nmbd) binds to that port (for browsing among other things).

| Now, if a samba server is already running on given host, which is
reasonable
| if the person running wine wants to share something with other windows
hosts,
| is it possible to somehow poll the nmbd and/or smbd to get the mailslot
| datagrams that weren't "consumed" by the browsing protocols?
In Samba 3, no (all this stuff is handled inside of nmbd, not exported).

| Does that make sense? Any more hints?
Yes, makes sense to me. I still think it would make more sense to work
on Samba integration with Samba4 rather then 3 as it'll be troublesome
with Samba3.

Cheers,

Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCNdsIPa9Uoh7vUnYRAjGwAJoCFQbAE/GWfReVkfTpxIo+sX1bpACfRECB
oXcEa1LlORUDplId+g+8U8I=
=OLrO
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list