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 ;)



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to