Re: Ethernet packet size python

2009-01-13 Thread Steve Holden
K-man wrote:
 Hi,
   I am sending data using the socket interface in python, but I want
 to know how big the ethernet packet size is (in bytes).  I didn't
 really see a way using the socket library of how to do this.  Any
 suggestions?

There is no way to know what size Ethernet packets will result from
specific traffic. Or do you want to know the MTU size (largest possible
Ethernet packet size)? This shouldn't really matter, since large TCP
messages will be split into a sequence of IP datagrams, and large IP
datagrams will be automatically fragmented and then reassembled at the
other end.

Is there a specific reason this is important to you?

regards
 Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

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


Re: Ethernet packet size python

2009-01-13 Thread K-man
On Jan 13, 10:35 am, Steve Holden st...@holdenweb.com wrote:
 K-man wrote:
  Hi,
    I am sending data using the socket interface in python, but I want
  to know how big the ethernet packet size is (in bytes).  I didn't
  really see a way using the socket library of how to do this.  Any
  suggestions?

 There is no way to know what size Ethernet packets will result from
 specific traffic. Or do you want to know the MTU size (largest possible
 Ethernet packet size)? This shouldn't really matter, since large TCP
 messages will be split into a sequence of IP datagrams, and large IP
 datagrams will be automatically fragmented and then reassembled at the
 other end.

 Is there a specific reason this is important to you?

 regards
  Steve
 --
 Steve Holden        +1 571 484 6266   +1 800 494 3119
 Holden Web LLC              http://www.holdenweb.com/

I am trying to determine the actual network link speed.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Ethernet packet size python

2009-01-13 Thread Grant Edwards
On 2009-01-13, Steve Holden st...@holdenweb.com wrote:
 K-man wrote:

 I am sending data using the socket interface in python, but I
 want to know how big the ethernet packet size is (in bytes).
 I didn't really see a way using the socket library of how to
 do this.  Any suggestions?

 There is no way to know what size Ethernet packets will result
 from specific traffic.

Unless he's using a low level API such as AF_PACKET/SOCK_RAW.
If that's the case then the packets will be exactly as big as
he makes them. And he wouldn't be asking this question. :)

 Or do you want to know the MTU size (largest possible Ethernet
 packet size)? This shouldn't really matter, since large TCP
 messages will be split into a sequence of IP datagrams, and
 large IP datagrams will be automatically fragmented and then
 reassembled at the other end.

 Is there a specific reason this is important to you?

If it's just idle curiosity, then wireshark or tcpdump can show
one exactly what's going on on the wire.  A reading of 
http://en.wikipedia.org/wiki/Transmission_Control_Protocol
should also allow one to predict pretty accurately what's going
to happen when you call send().

-- 
Grant Edwards   grante Yow! I want EARS!  I want
  at   two ROUND BLACK EARS
   visi.comto make me feel warm
   'n secure!!
--
http://mail.python.org/mailman/listinfo/python-list