raw socket exapmle?

Grant Edwards ge at nowhere.none
Fri Jul 14 11:50:47 EDT 2000


In article <woFb5.1075$6E.147665 at ptah.visi.com>, Grant Edwards wrote:

>Does anybody know where I can find an example of how to
>send/receive raw Ethernet frames?   The C examples I've found
>use either AF_INET/SOCK_PACKET or PF_PACKET/SOCK_RAW.
>
>The socket module doesn't support SOCK_PACKET or PF_PACKET, so
>I'm trying to use AF_INET/SOCK_RAW.  I can't figure out the
>format of the address string to pass to bind() to select the
>ethernet interface to use.

After looking at the source code for the socket module in 1.52
and 1.6a2, it doesn't look like either RAW or PACKET sockets
are supported.

Darn.  Maybe I'll work on that.  It should be pretty trivial to
add for Linux.

Does Win32 support any type of raw access to Ethernet devices?

-- 
Grant Edwards                   grante             Yow!  I have the power
                                  at               to HALT PRODUCTION on all
                               visi.com            TEENAGE SEX COMEDIES!!



More information about the Python-list mailing list