fcntl() and packing structs with unions.

tyler tyler.retzlaff at gmail.com
Mon Sep 4 04:29:40 EDT 2006


I'm having some trouble building a proper argument for an ioctl call.
The operation I'm working with is TUNSETIFF _IOW('T', 202, int) which
takes a struct ifreq as the arg.  Could someone familiar with the
struct (usually defined in net/if.h) tell me how the heck to encode it
using the struct/array module?  An example would be fantastic.



Thanks




More information about the Python-list mailing list