PRoblem with UDP sockets
Pierre Blanchet
Pierre.Blanchet at solsoft.fr
Fri Feb 16 10:26:36 EST 2001
More information about the Python-list mailing list
Fri Feb 16 10:26:36 EST 2001
- Previous message (by thread): Can methods and functions be overloaded?
- Next message (by thread): PRoblem with UDP sockets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On February 16 2001 at 9:28, "Steve Holden" <sholden at holdenweb.com> wrote: > "Pierre Blanchet" <Pierre.Blanchet at solsoft.fr> wrote in message > news:mailman.982332924.15258.python-list at python.org... > > I'm trying to code a TFTP client with python 1.5.2 under > > Linux. > > > > I cannot find a way to send UDP packets shorter than 14 > > bytes. > > > > By example, if i try to send (using sendto) the string ' 0 > > 4 0 1', i get on the wire '0 4 0 1 1 1 1 1 1 1 1 1 1 1 1' althougth > > sendto tell me it has send 4 bytes. > > > > Do i do something wrong ? Is there a bug in python in Linux > > ? > > > > TIA, > > > > Pierre. > > > Have you checked the data length in the UPD header? Wondered whether this > might be more to do with the minimum Ethernet frame size... > Nevermind. The bug was mine. Actually now my TFTPclient works :) But my packets are still longer than i need. But you were right, the minimum size of an ethernet packet is 60 ( as shown by ethereal) and there is a need for padding (in my case 14 bytes in the "trailer"). Thanks Steve for your help, Pierre. -- Pierre Blanchet Support Engineer http://www.solsoft.com Pierre.Blanchet at solsoft.fr Tel.: +33 147 15 55 00 Fax: +33 147 15 55 09
- Previous message (by thread): Can methods and functions be overloaded?
- Next message (by thread): PRoblem with UDP sockets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list