Socket ICMP V6 error

Chris Angelico rosuav at gmail.com
Thu Jan 22 05:13:03 EST 2015


On Thu, Jan 22, 2015 at 7:00 PM, ermanolillo <ermanolillo at hotmail.com> wrote:
> s = socket.socket(socket.AF_INET6, socket.SOCK_RAW, socket.IPPROTO_ICMPV6)
>
> However I recive the next error:
>
>
>
> File "server.py", line 16, in <module>
> s.bind((HOST, 0))
> File "/usr/lib/python2.7/socket.py", line 224, in meth
> return getattr(self._sock,name)(*args)
> socket.error: [Errno 22] Invalid argument
>
> Could someone please help me?.
>

For a start, what HOST are you using?

(Point of style: It's unusual to use an all-uppercase name like HOST
for something non-constant - in this case, it's coming from keyboard
input.)

ChrisA



More information about the Python-list mailing list