trying to use SOCK_RAW yields error "

Wojtek Walczak gminick at nie.ma.takiego.adresu.w.sieci.pl
Tue Aug 12 16:54:10 CEST 2008


Dnia Tue, 12 Aug 2008 07:21:15 -0700 (PDT), Tzury Bar Yochay napisa³(a):

> I changed as instructed:
> server = socket.socket(socket.AF_PACKET, socket.SOCK_RAW,
> socket.getprotobyname('ip'))
>
> now I am getting:
>
> Traceback (most recent call last):
>   File "tcpsrv.py", line 15, in <module>
>     server.bind((host,port))
>   File "<string>", line 1, in bind
> socket.error: (19, 'No such device')

What's the value of host variable? AFAIR it should be the name
of the interface you want to bind to ('eth0', 'ppp0', whatever).


-- 
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/



More information about the Python-list mailing list