Setting IP TOS fields
Tulpule Naren-MGI2846
narendra.c.tulpule at motorola.com
Thu Feb 1 17:27:03 EST 2007
Hi,
I don't see the ToS field that I set, in the generated IP packets
captured via Ethereal/WireShark. What step am I missing in the code
below?
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.bind((sIntf, sPort))
tos = 64 # I also tried tos = struct.pack("B", 64)
s.setsockopt(socket.SOL_IP, socket.IP_TOS, tos)
# at this point, s.getsockopt(socket.SOL_IP, socket.IP_TOS,1) returns
'@' i.e. chr(64)
...
s.sendto(data, 0, dAddr) # 0 here is for 'flags' argument...
-- Naren.
Narendra C. Tulpule Principal Firmware Engineer, Staff
6450 Sequence Dr +1-858-404-2650
San Diego, CA 92121 narendra.c.tulpule at motorola.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070201/118d02c8/attachment.html>
More information about the Python-list
mailing list