dazuko-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dazuko-help] Perl


From: Lino Sanfilippo
Subject: Re: [Dazuko-help] Perl
Date: Mon, 03 Aug 2009 12:40:59 +0200
User-agent: Icedove 1.5.0.14eol (X11/20090105)

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
***************************************************




reply via email to

[Prev in Thread] Current Thread [Next in Thread]