[jitsi-dev] ICE4J truncating received DataPacket Size (Boris Grozev)

I am confused. I am using the socket after having gotten a connection. The
Connector code might have its purpose in analyzing STUN messages, but all
my messages were being truncated.

*"The Network Access Point is the most outward part of the stack. It is
constructed around a datagram socket and takes care of forwarding incoming
messages to the MessageProcessor as well as sending datagrams to the STUN
server specified by the original NetAccessPointDescriptor."*

The Connector Class has the above comment. It sounds like it relays packets
down the chain of sockets whether STUN packets or not....

Perhaps JITSI fragments packets to be 1500 so it has never been seen as an
issue? Or the above comment is misleading imo.

I am confused. I am using the socket after having gotten a connection.
The
Connector code might have its purpose in analyzing STUN messages, but
all
my messages were being truncated.

*"The Network Access Point is the most outward part of the stack. It is
constructed around a datagram socket and takes care of forwarding
incoming
messages to the MessageProcessor as well as sending datagrams to the
STUN
server specified by the original NetAccessPointDescriptor."*

The Connector Class has the above comment. It sounds like it relays
packets
down the chain of sockets whether STUN packets or not....

Perhaps JITSI fragments packets to be 1500 so it has never been seen as
an
issue? Or the above comment is misleading imo.

I don't want to comment on the truncating issue directly, because I haven't look at it carefully. It could be the case that the code has been mostly used in environments with a low MTU and so the issue hasn't arisen.

However I don't see the comment as misleading (apart from some class names that have been changed). Note that "stack" refers to the STUN stack only and not the whole ICE stack. The application data does not pass through Connector (and the DatagramSocket instance used by Connector is not the same as the one provided to the application).

Regards,
Boris

···

On April 17, 2015 6:10:11 AM CEST, Matt J <msj242@gmail.com> wrote:

------------------------------------------------------------------------

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
Sent from a mobile. Please excuse my brevity.

Hi,
  I apologize, I am really not trying to be aggressive here, just trying to
get a handle on what is going on. I won't be surprised if I am wrong, but I
was using Socket provided and changing code in the Connector stopped my
Packets from being truncated. I might have grabbed the socket improperly.
Here was my code:

                Component rtp = ims.getComponent(Component.RTP);

                DatagramSocket ds = rtp
.getSelectedPair().getDatagramSocket();

I was sending with this socket and receiving on the other end with this
code as well.

Perhaps MTU size was just being enforced by the Connector class, but if it
isn't supposed to be called than there might be an inefficiency in the code
that maybe should be changed? I don't know, but I would like my code to
work properly.

···

On Fri, Apr 17, 2015 at 1:18 AM, Boris Grozev <boris@jitsi.org> wrote:

On April 17, 2015 6:10:11 AM CEST, Matt J <msj242@gmail.com> wrote:
>I am confused. I am using the socket after having gotten a connection.
>The
>Connector code might have its purpose in analyzing STUN messages, but
>all
>my messages were being truncated.
>
>*"The Network Access Point is the most outward part of the stack. It is
>constructed around a datagram socket and takes care of forwarding
>incoming
>messages to the MessageProcessor as well as sending datagrams to the
>STUN
>server specified by the original NetAccessPointDescriptor."*
>
>The Connector Class has the above comment. It sounds like it relays
>packets
>down the chain of sockets whether STUN packets or not....
>
>Perhaps JITSI fragments packets to be 1500 so it has never been seen as
>an
>issue? Or the above comment is misleading imo.

I don't want to comment on the truncating issue directly, because I
haven't look at it carefully. It could be the case that the code has been
mostly used in environments with a low MTU and so the issue hasn't arisen.

However I don't see the comment as misleading (apart from some class names
that have been changed). Note that "stack" refers to the STUN stack only
and not the whole ICE stack. The application data does not pass through
Connector (and the DatagramSocket instance used by Connector is not the
same as the one provided to the application).

Regards,
Boris

>
>------------------------------------------------------------------------
>
>_______________________________________________
>dev mailing list
>dev@jitsi.org
>Unsubscribe instructions and other list options:
>http://lists.jitsi.org/mailman/listinfo/dev

--
Sent from a mobile. Please excuse my brevity.

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

Hey Matt,

Don't worry about it. No one saw any aggression.

What Boris said earlier is that data packets (as opposed to STUN ones)
should not be going through the Connector at all.

I haven't had time to look through your specific issue but I hope the above
may provide a pointer.

Emil

···

On Sunday, April 19, 2015, Matt J <msj242@gmail.com> wrote:

Hi,
  I apologize, I am really not trying to be aggressive here, just trying
to get a handle on what is going on. I won't be surprised if I am wrong,
but I was using Socket provided and changing code in the Connector stopped
my Packets from being truncated. I might have grabbed the socket
improperly. Here was my code:

                Component rtp = ims.getComponent(Component.RTP);

                DatagramSocket ds = rtp
.getSelectedPair().getDatagramSocket();

I was sending with this socket and receiving on the other end with this
code as well.

Perhaps MTU size was just being enforced by the Connector class, but if it
isn't supposed to be called than there might be an inefficiency in the code
that maybe should be changed? I don't know, but I would like my code to
work properly.

On Fri, Apr 17, 2015 at 1:18 AM, Boris Grozev <boris@jitsi.org > <javascript:_e(%7B%7D,'cvml','boris@jitsi.org');>> wrote:

On April 17, 2015 6:10:11 AM CEST, Matt J <msj242@gmail.com >> <javascript:_e(%7B%7D,'cvml','msj242@gmail.com');>> wrote:
>I am confused. I am using the socket after having gotten a connection.
>The
>Connector code might have its purpose in analyzing STUN messages, but
>all
>my messages were being truncated.
>
>*"The Network Access Point is the most outward part of the stack. It is
>constructed around a datagram socket and takes care of forwarding
>incoming
>messages to the MessageProcessor as well as sending datagrams to the
>STUN
>server specified by the original NetAccessPointDescriptor."*
>
>The Connector Class has the above comment. It sounds like it relays
>packets
>down the chain of sockets whether STUN packets or not....
>
>Perhaps JITSI fragments packets to be 1500 so it has never been seen as
>an
>issue? Or the above comment is misleading imo.

I don't want to comment on the truncating issue directly, because I
haven't look at it carefully. It could be the case that the code has been
mostly used in environments with a low MTU and so the issue hasn't arisen.

However I don't see the comment as misleading (apart from some class
names that have been changed). Note that "stack" refers to the STUN stack
only and not the whole ICE stack. The application data does not pass
through Connector (and the DatagramSocket instance used by Connector is not
the same as the one provided to the application).

Regards,
Boris

>
>------------------------------------------------------------------------
>
>_______________________________________________
>dev mailing list
>dev@jitsi.org <javascript:_e(%7B%7D,'cvml','dev@jitsi.org');>
>Unsubscribe instructions and other list options:
>http://lists.jitsi.org/mailman/listinfo/dev

--
Sent from a mobile. Please excuse my brevity.

_______________________________________________
dev mailing list
dev@jitsi.org <javascript:_e(%7B%7D,'cvml','dev@jitsi.org');>
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
--sent from my mobile

Hi,
   I apologize, I am really not trying to be aggressive here, just
trying to get a handle on what is going on.

I never saw any aggression either. Sorry if my last reply seemed terse. I, too, would like to get to the bottom of this :slight_smile:

I won't be surprised if I am
wrong, but I was using Socket provided and changing code in the
Connector stopped my Packets from being truncated. I might have grabbed
the socket improperly. Here was my code:

                 Component rtp = ims.getComponent(Component.RTP);

                 DatagramSocket ds =
rtp.getSelectedPair().getDatagramSocket();

This looks like the right way to get the socket.

I still haven't looked into it, so I don't have anything more specific to say. I will try to investigate tomorrow. Do you have some sample code which illustrates the problem that you could share?

Regards,
Boris

···

On 19/04/15 15:48, Matt J wrote: