FAQ
Does Python socket module support raw socket? I tries to create socket with
AF_INET and SOCK_RAW. But when I tried to pass a string which contains null
byte to sendto(). It complains about "expected string without null bytes,
string found". Anybody has same experience?

Thanks,

Hua

Search Discussions

  • Grant Edwards at Apr 5, 2001 at 9:08 pm

    In article <ht4z6.2168$Dh2.173527 at paloalto-snr1.gtei.net>, HW wrote:
    Does Python socket module support raw socket?
    Yes, under Linux, Python >= 2.0, for some values of "support
    raw socket".
    I tries to create socket with AF_INET and SOCK_RAW.
    I don't believe that AF_INET,SOCK_RAW is supported (I don't
    know what it would do if it were).

    I know that socket(PF_PACKET, SOCK_RAW, EthernetProtoNumber)
    works.
    But when I tried to pass a string which contains null byte to
    sendto(). It complains about "expected string without null
    bytes, string found". Anybody has same experience?
    With PF_PACKET,SOCK_RAW sockets you should use send() and
    recv() methods.

    --
    Grant Edwards grante Yow! Why are these
    at athletic shoe salesmen
    visi.com following me??

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedApr 5, '01 at 8:21p
activeApr 5, '01 at 9:08p
posts2
users2
websitepython.org

2 users in discussion

HW: 1 post Grant Edwards: 1 post

People

Translate

site design / logo © 2023 Grokbase