how to measure TCP congestion windows using python ??
plz
user at compgroups.net/
Sun Dec 19 19:45:49 EST 2010
hi
many thanks for helping me
i also tried to manipulate it last night
here is my code...
import socket
import struct
sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
tcp_info = sock.getsockopt(socket.SOL_TCP, socket.TCP_INFO, struct.calcsize('BBBBBBBLLLLLLLLLLLLLLLLLLLLLLLL'))
print struct.unpack('BBBBBBBLLLLLLLLLLLLLLLLLLLLLLLL', tcp_info)
the result of struct.unpack of tcp_info is following
in /usr/include/linux/tcp.h
used Linux Redhat and Python 2.7
anyway your code is very useful
Thxs again ;)
More information about the Python-list
mailing list