ioctl and stuff

Zomba zomba at dtmf.com.ar
Mon Feb 4 12:47:49 EST 2002


I make 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, the 0xc020690d is OSIOCGIFADDR and 0xc020690c is SIOCSIFADDR

Ideas??!

Thanks in advance ppls
Zomba

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20020204/e06d4838/attachment.html>


More information about the Python-list mailing list