Ioctl() is no simple to handle in a generic way: the parameters are often pointers to structs. But Perl, Python, and Python do it, so.....
It's not difficult to write functions in C, and to make a Lua module with it. I did that with liberdm once, to play with the screen refresh functions. We could make a Lua module with handy Iliad functions. After that you could use them in a Lua script. Of course this is not very handy for experimenting. Directly scripting in Lua would be much cooler.
Edit: There is a Lua module to pack / unpack C-structs exists:
http://www.inf.puc-rio.br/~roberto/struct/
Edit: I asked on the Lua list... Alien (
http://alien.luaforge.net/) might be a way to implement things like ioctl(). It requires libffi (which is not present on the Iliad, but is a cool thing to have). I'll have a look at this when I have some more spare time...