In article
<5c2800de-a6d2-4863-b423-87ef80d95...@k17g2000yqh.googlegroups.com>,
Ashwin Rao <[email protected]> wrote:
> I computed the size of the tcp_info using the
> following program, which returned 104.
> ---
> #include <stdio.h>
> #include <netinet/tcp.h>
>
> int main()
> {
> printf("%d", sizeof(struct tcp_info));
> }
In general, the right way to do stuff like this in Python is to use the
struct module. In particular, struct.calcsize() will tell you how long the
string has to be. Try that and see if you come up with the same value.
--
http://mail.python.org/mailman/listinfo/python-list