Mike Cardwell wrote:
Hi,
I've just been reading this:
http://dazuko.dnsalias.org/wiki/index.php/Writing_Apps_HOWTO
I would like to write an application to interact with Dazuko, but I'm
not a C programmer. I am however a Perl programmer. I have an idea how
you could open up the applications to many other languages which will
probably help the uptake of the app.
I'll describe a C app which could do this:
The app waits for the existance of a unix socket to appear, at eg:
/var/run/dazuko/dazuko.sock
When that happens it registers with DazukoFS. When the socket
disappears it unregisters with DazukoFS.
Whilst the socket exists, the app writes the access information to the
socket and waits for an allow/deny response from it to forward back to
DazukoFS.
That way, any language that can read/write to a unix socket can be
used to interact with DazukoFS.
If such an app where to be created, I would be happy to create and
maintain a CPAN module for Perl applications to interact with DazukoFS.
I understand that the most efficient method would be to just write the
whole app in C, but for many users, my method would be "good enough"
The C app that sits in the middle could be configurable to reduce the
amount of requests that are forwarded onto the socket. Eg, to only
forward write requests and allow all read. Or to deny all write
requests and forward all read requests.
Does that sound reasonable?
Hi Mike,
There is already an interface that can be used by any programming
language to communicate with dazukofs:
The dazukofs.* device files that are created in /dev when you insmod
dazukofs.
You can write commands to these files and read event data, even from
shellscripts if you like.
(The dazukofs userspace library - see dazukofs.c, dazukofs.h - only
consists of
some wrapper functions that do nothing more than sending commands to the
dazukofs device files.
Please check these files for details of the dazukofs communication
protocol).
Regards,
Lino Sanfilippo
Geschäftsführender Gesellschafter: Tjark Auerbach
Sitz der Gesellschaft: Tettnang
Handelsregister: Amtsgericht Ulm, HRB 630992
ALLGEMEINE GESCHÄFTSBEDINGUNGEN
Es gelten unsere Allgemeinen Geschäftsbedingungen
(AGB). Sie finden sie in der jeweils gültigen Fassung
im Internet unter http://www.avira.de/agb
***************************************************
_______________________________________________
Dazuko-help mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/dazuko-help