Discovering maximum packet size

Posted by ereOn on Stack Overflow See other posts from Stack Overflow or by ereOn
Published on 2010-03-26T10:26:04Z Indexed on 2010/03/26 10:33 UTC
Read the original article Hit count: 237

Filed under:
|
|
|
|

I'm working on a network-related project and I am using DTLS (TLS/UDP) to secure communications.

Reading the specifications for DTLS, I've noted that DTLS requires the DF flag (Don't Fragment) to be set.

On my local network if I try to send a message bigger than 1500 bytes, nothing is sent. That makes perfect sense. On Windows the sendto() reports a success but nothing is sent.

I obviously cannot unset the DF flag manually since it is mandatory for DTLS and i'm not sure whether the 1500 bytes limit (MTU ?) could change in some situations. I guess it can.

So, my question is : "Is there a way to discover this limit ?"

If not, what would be the lowest possible value ?

My software runs under UNIX (Linux/MAC OSX) and Windows OSes so different solutions for each OS are welcome ;)

Many thanks.

© Stack Overflow or respective owner

Related posts about mtu

Related posts about networking