python ioctl

Nitish Sharma sharmanitishdutt at gmail.com
Thu Apr 14 14:55:47 CEST 2011


Hi PyPpl,
For my current project I have a kernel device driver and a user-space
application. This user-space application is already provided to me, and
written in python. I have to extend this application with some addition
features, which involves communicating with kernel device driver through
ioctl() interface.
I am fairly new with Python and not able to grok how to provide "op" in
ioctl syntax - fcntl.ioctl (fd, op[, arg[, mutate_flag]]). Operations
supported by device driver, through ioctl, are of the form: IOCTL_SET_MSG
 _IOR(MAGIC_NUMBER, 0, char*).
It'd be great if some help can be provided about how to "encode" these
operations in python to implement the desired functionality.

Regards
Nitish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110414/95209018/attachment.html>


More information about the Python-list mailing list