Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java on Tiger and UDP



Jamie Curmi wrote:

>On Panther, you could send UDP packets > 16356 bytes from Java, and
>receive them without issue.
>
>On Tiger, any UDP packets > 16356 bytes are dropped.  You just never
>receive them.

The MTU differs for the various network interfaces.  In Terminal, type:
  ifconfig

and inspect the mtu values for the lo0, en0, and other interfaces.

Here, under 10.4.2, I see:
  lo0 mtu 16384
  en0 mtu 1500

and several other interfaces.  Since your example using "localhost", it's
almost certainly going over the lo0 interface (localhost loopback).

I suspect that your other platforms have different mtu sizes for lo0, or
whatever their equivalent is.

Under 10.3.5 here, I see the same mtu sizes, so maybe this isn't the
problem.  Or maybe it's just that 10.4 is enforcing mtu strictly, or has
some other constraint being applied that 10.3 did not.  It could also be
that Java on 10.4 is applying a constraint more strictly, regardless of
what the OS itself is doing.  Hard to say without seeing the actual packets
on the network, or bringing a non-Java test program into play (either send
or receive).


In any case, the "m" in mtu stands for "maximum", and exceeding a maximum
seems dubious under the best of circumstances.

You might try using 'ifconfig' to change the mtu of lo0, or the other
interfaces.  An interesting test would be to decrease the mtu and see if
your Java test case then failed at the reduced mtu level.  That would be a
good indicator the limitation is mtu enforcement.

Or try sending packets of various sizes out over the physical network, and
observing what happens with 'tcpdump', to see if it's a send problem, a
receive problem, or both.


However, the first thing I suggest is to print the stack-traces of
IOExceptions, rather than ignoring them completely.

If errors are happening in Send, you're not seeing what they are, nor
whether they even happen.  It could be that Send is failing because of mtu
limits, so nothing is ever sent.  You can't tell.

Send is always silent, even when it fails to send any packet.  You may
never receive long packets for the simple reason they're never being sent.

Exceptions matter, especially in tests.

  -- GG


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.