On Thu, 3 Dec 2009 10:29:13 -0800 (PST),
Ashwin Rao wrote:
> tcp_info = sock.getsockopt(socket.SOL_SOCKET, socket.TCP_INFO, 104)
In C, to get tcp_info, SOL_SOCKET should be IPPROTO_TCP. I'm assuming
it's the same in Python, although I've never tried it.
Martien
--
In article
<5c2800de-a6d2-4863-b423-87ef80d95...@k17g2000yqh.googlegroups.com>,
Ashwin Rao wrote:
> I computed the size of the tcp_info using the
> following program, which returned 104.
> ---
> #include
> #include
>
> int main()
> {
> printf("%d", sizeof(struct tcp_info));
> }
In general
Hi,
I need to retrieve the tcp_info from a socket using getsockopt. The
details of structure tcp_info are available at [http://src.gnu-
darwin.org/src/sys/netinet/tcp.h.html]. The getsockopt method for a
socket whose documentation is available at [http://docs.python.org/
library/socket.html
Steve Holden wrote:
> Fabian Deutsch wrote:
> >>--- Ursprüngliche Nachricht ---
> >>Von: Steve Holden <[EMAIL PROTECTED]>
> >>An: python-list@python.org
> >>Betreff: Re: getsockopt
> >>Datum: Fri, 16 Dec 2005 08:29:08 +
> >>
&
Stave Holde wrote:
> Fabian Deutsch wrote:
> >>--- Ursprüngliche Nachricht ---
> >>Von: Steve Holden <[EMAIL PROTECTED]>
> >>An: python-list@python.org
> >>Betreff: Re: getsockopt
> >>Datum: Fri, 16 Dec 2005 08:29:08 +
> >>
&
Fabian Deutsch wrote:
>>--- Ursprüngliche Nachricht ---
>>Von: Steve Holden <[EMAIL PROTECTED]>
>>An: python-list@python.org
>>Betreff: Re: getsockopt
>>Datum: Fri, 16 Dec 2005 08:29:08 +
>>
>>Fabian Deutsch wrote:
>>
>>>Hello,
&
> --- Ursprüngliche Nachricht ---
> Von: Steve Holden <[EMAIL PROTECTED]>
> An: python-list@python.org
> Betreff: Re: getsockopt
> Datum: Fri, 16 Dec 2005 08:29:08 +
>
> Fabian Deutsch wrote:
> > Hello,
> >
> > my name is fabian and i'm a stu
Fabian Deutsch wrote:
> Hello,
>
> my name is fabian and i'm a student from northern germany. right now i
> try to create som kind of decapsulation of esp-udp packets using python.
>
> therefor i need to use the socket.getsockopt (SOL_IP, IP_OPTIONS, 20)
> method. But al i get is some empty value
Forgot:
> The lines:
> s = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP)
> s.bind(('',4500))
> while 1:# Run until cancelled
> message, client = s.recvfrom(1400) # <=256 byte datagram
> hdr = s.getsockopt (SOL_IP, IP_OPTIONS, 20)
> print "Client connected:", client
> pri
Hello,
my name is fabian and i'm a student from northern germany. right now i
try to create som kind of decapsulation of esp-udp packets using python.
therefor i need to use the socket.getsockopt (SOL_IP, IP_OPTIONS, 20)
method. But al i get is some empty value. Nothin.
Does someone know or have
10 matches
Mail list logo