Ioctl! Need some help to make set

Zomba zomba at dtmf.com.ar
Wed Feb 6 00:05:50 EST 2002


I made a
s=socket(AF_INET, SOCK_DGRAM)
res= fcntl.ioctl(s.fileno(), 0xc020690d, 'le1' + '\0' *29)

the 0xc020690d call, work pretty well, i can take from res (with
struct.unpack) the ip addr of my device, but the problem is:

fcntl.ioctl(s.fileno(), 0xc020690c, res)
and it said: "Errno 22 - Invalid Argument"

(I try this, because i make my own 'res' with other information, but it had
the same error)

Im working on OpenBSD 3.0, the 0xc020690d is OSIOCGIFADDR and 0xc020690c is
SIOCSIFADDR

Ideas??!

Thanks in advance ppls
Zomba







More information about the Python-list mailing list