From alex at 8e14.net Thu Jul 16 12:48:19 2020 From: alex at 8e14.net (Alex Netes) Date: Thu, 16 Jul 2020 15:48:19 +0300 Subject: [libnice] How to get socket in relay mode? Message-ID: I'm trying to implement PMTU Discovery over libnice. In order to do so, I want to retrieve the selected socket, change IP_MTU_DISCOVER socket_opt, run the PMTU test and return IP_MTU_DISCOVER socket_opt to default. My problem is that nice_agent_get_selected_socket() doesn't work for relay mode. Any thoughts, how else can I retrieve the socket in case of relay mode? -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivier.crete at collabora.com Thu Jul 16 18:47:27 2020 From: olivier.crete at collabora.com (Olivier =?ISO-8859-1?Q?Cr=EAte?=) Date: Thu, 16 Jul 2020 14:47:27 -0400 Subject: [libnice] How to get socket in relay mode? In-Reply-To: References: Message-ID: <5d764775a4185ec049dd8dd4ccd676e890614d8c.camel@collabora.com> Hi, There is currently no API to do that, That said, I'm not sure how useful this is for TURN as you don't have the PMTU on the other side of the TURN server? I think this is the kind of feature that would in theory be added inside of libnice, but only if we can do it in a "safe" way. For example, by running the PMTU test using keepalive STUN indications. Olivier On Thu, 2020-07-16 at 15:48 +0300, Alex Netes wrote: > I'm trying to implement PMTU Discovery over libnice. > In order to do so, I want to retrieve the selected socket, > change IP_MTU_DISCOVER socket_opt, run the PMTU test > and return IP_MTU_DISCOVER socket_opt to default. > > My problem is that nice_agent_get_selected_socket() doesn't work for > relay mode. > Any thoughts, how else can I retrieve the socket in case of relay > mode? > > _______________________________________________nice mailing > listnice at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nice -- Olivier Cr?te olivier.crete at collabora.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivier.crete at collabora.com Thu Jul 16 19:21:49 2020 From: olivier.crete at collabora.com (Olivier =?ISO-8859-1?Q?Cr=EAte?=) Date: Thu, 16 Jul 2020 15:21:49 -0400 Subject: [libnice] How to get socket in relay mode? In-Reply-To: <5d764775a4185ec049dd8dd4ccd676e890614d8c.camel@collabora.com> References: <5d764775a4185ec049dd8dd4ccd676e890614d8c.camel@collabora.com> Message-ID: <32a8437a56c42f510514e00837830ecb353f06e8.camel@collabora.com> Hi, I guess one option is to implement https://tools.ietf.org/html/draft-ietf-tram-stun-pmtud-17 inside libnice? But there is a big limitation, it needs the peer to also support it and it must be signalled outside of STUN (so in the SDP). Tbh, most implementations (such as webrtc) are happy with just setting 1200 as the application MTU . Olivier On Thu, 2020-07-16 at 14:47 -0400, Olivier Cr?te wrote: > Hi, > > There is currently no API to do that, > > That said, I'm not sure how useful this is for TURN as you don't have > the PMTU on the other side of the TURN server? > > I think this is the kind of feature that would in theory be added > inside of libnice, but only if we can do it in a "safe" way. For > example, by running the PMTU test using keepalive STUN indications. > > Olivier > > On Thu, 2020-07-16 at 15:48 +0300, Alex Netes wrote: > > I'm trying to implement PMTU Discovery over libnice. > > In order to do so, I want to retrieve the selected socket, > > change IP_MTU_DISCOVER socket_opt, run the PMTU test > > and return IP_MTU_DISCOVER socket_opt to default. > > > > My problem is that nice_agent_get_selected_socket() doesn't work > > for relay mode. > > Any thoughts, how else can I retrieve the socket in case of relay > > mode? > > _______________________________________________nice mailing > > listnice at lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/nice > -- > Olivier Cr?te > olivier.crete at collabora.com > > > > _______________________________________________nice mailing > listnice at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nice -- Olivier Cr?te olivier.crete at collabora.com -------------- next part -------------- An HTML attachment was scrubbed... URL: