trying to use SOCK_RAW yields error "

Tzury Bar Yochay Afro.Systems at gmail.com
Tue Aug 12 08:40:36 EDT 2008


I am trying to create raw socket:

server = socket.socket(socket.AF_INET, socket.SOCK_RAW,
socket.getprotobyname('ip'))

As a result I get the following error:

Traceback (most recent call last):
  File "tcpsrv.py", line 14, in <module>
    server = socket.socket(socket.AF_INET, socket.SOCK_RAW,
socket.getprotobyname('ip'))
  File "/usr/lib/python2.5/socket.py", line 154, in __init__
    _sock = _realsocket(family, type, proto)
socket.error: (93, 'Protocol not supported')


Does anybody have used socket.SOCK_RAW in the past?



More information about the Python-list mailing list