trying to use SOCK_RAW yields error "

Tzury Bar Yochay Afro.Systems at gmail.com
Tue Aug 12 10:21:15 EDT 2008


> When using SOCK_RAW, the family should be AF_PACKET,
> not AF_INET. Note that you need root privileges to do so.

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')




More information about the Python-list mailing list