UDP max datagram size

I

Iain King

Hi. I've been looking everywhere for this and can't find it, apologies
if I'm being obtuse: How do I set the max datagram packet size? I'm
using the socket module. It seem like it's hardcoded at 255, but I
need it to be larger.

Iain
 
H

Heiko Wundram

Am Mittwoch 12 April 2006 10:26 schrieb Iain King:
Hi. I've been looking everywhere for this and can't find it, apologies
if I'm being obtuse: How do I set the max datagram packet size? I'm
using the socket module. It seem like it's hardcoded at 255, but I
need it to be larger.

The minimal size any IP-stack has to be able to handle is 512 bytes. Normally,
modern IP stacks will handle packets up to 4096 bytes and possibly larger
packets (with correct fragmentation and rejoining). But this depends on the
IP stack that's used to send and to receive the packet.

Anyway, a maximum size of 255 bytes is certainly not true for UDP packets.

--- Heiko.
 
I

Iain King

Heiko said:
Am Mittwoch 12 April 2006 10:26 schrieb Iain King:

The minimal size any IP-stack has to be able to handle is 512 bytes. Normally,
modern IP stacks will handle packets up to 4096 bytes and possibly larger
packets (with correct fragmentation and rejoining). But this depends on the
IP stack that's used to send and to receive the packet.

Anyway, a maximum size of 255 bytes is certainly not true for UDP packets.

--- Heiko.

Yep, I was just being dumb. Thanks anyway.

Iain
 
M

malv

I seem to recall from UDP datagram tests between linux and XP I ran a
few years ago that XP maximum datagram sizes are indeed smaller than
linux.
 
G

Grant Edwards

Hi. I've been looking everywhere for this and can't find it, apologies
if I'm being obtuse: How do I set the max datagram packet size?

What do you mean "datgram packet size"?
I'm using the socket module. It seem like it's hardcoded at
255, but I need it to be larger.

My tests show that Linux handles UDP datagrams of up to about
59000 on the "lo" interface and 12500 on Ethernet interfaces.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top