What would be nice, is a way to define ioctl methods in Pike. Perhaps something like
object i = Stdio.IOCTL(4242 /* request_id */ ); i->add_int_parameter(); i->add_string_parameter(); i->set_return_type(STRING);
string ret = i(fd, 1, "somestring");
That ought to be possible, or..?
/ Marcus Agehall (PacketFront)
Previous text:
2004-08-17 13:17: Subject: managing comport settings in linux
Not easily. Also, you need all the IOCTL constants somewhere, and those are highly system specific.
It's probably easier to simply implement interfaces as they are needed. As an example, adding a soundcard interface that handles several different output methods (ALSA (spdif and not), Solaris /dev/audio, esd etc) directly.
/ Per Hedbor ()