[Patches] [ python-Patches-947352 ] AF_PACKET Hardware address
support in socket module
SourceForge.net
noreply at sourceforge.net
Thu Jul 15 21:08:08 CEST 2004
Patches item #947352, was opened at 2004-05-03 19:36
Message generated for change (Comment added) made by akuchling
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=947352&group_id=5470
Category: Modules
>Group: Python 2.4
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Jason Andryuk (thedeuce)
Assigned to: A.M. Kuchling (akuchling)
Summary: AF_PACKET Hardware address support in socket module
Initial Comment:
The current implementation of AF_PACKET only uses the
device name and protocol options even when a 5-tuple of
Device, Protocol, Packet Type, Hardware Type, and
Hardware Address are supplied. I needed
socket.sendto() to support sending to a Hardware
Address, so this patch supports such functionality.
The length check on the hardware address is hard coded
to 8 since that is the value used in the sockaddr_ll
struct.
I'm not that familiar with the Python internals, so
s->errorhandler() may not be the best call to make for
an invalid hardware address length.
----------------------------------------------------------------------
>Comment By: A.M. Kuchling (akuchling)
Date: 2004-07-15 15:08
Message:
Logged In: YES
user_id=11375
Thanks for the confirmation; marking this as closed.
----------------------------------------------------------------------
Comment By: Jason Andryuk (thedeuce)
Date: 2004-07-15 14:30
Message:
Logged In: YES
user_id=1034404
Yeah, ValueError looks good, and it sends out packets to the
desired address just fine.
Thank You
----------------------------------------------------------------------
Comment By: A.M. Kuchling (akuchling)
Date: 2004-07-10 19:40
Message:
Logged In: YES
user_id=11375
Checked in to CVS HEAD; thanks for the patch!
I think s_errorhandler is only when you're trying to report the error from a
system call; I changed to raise a ValueError if the hardware address is too
long. Please give the CVS version a try and let me know if it works for
you.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=947352&group_id=5470
More information about the Patches
mailing list