NAT traversal implementation: modify nat_detect.c?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 14, 2008 at 5:42 PM, Enrico De Razza <ederazza at yahoo.it> wrote:

> Thanks Benny!
>
> Now I've a new question for you.
> I've modified the nat_detect.c in order to retrieve in the client_main.c
> the mapped addresses and the local socket for which I gained the detection.
> I've tested these data with Wireshark, and they matches.
> Now I'd like to send from the same local socket (used in the detection) a
> simple UDP datagram to a simple UDP server.
> And that's the problem: I bind to the same port, but I get a new port, and
> so I can't receive the data back from the server, because they arrives to
> the port saw by the server, but different from the port where I'm waiting
> for...
> What about the use of the SO_REUSEADDR for the local socket in
> nat_detect.c? The problem is that I don't know how to perform the call to
> your API pj_sock_setoptions()...
>

That's not how the NAT detection socket is supposed to be used actually. The
intended purpose is just to display information to user, and that's perhaps
the only reliable thing to do (people say that NAT behavior can vary
according to port number, and it can even change the behavior after some
time for the same socket).

But if you want to get the STUN mapped address, use the STUN socket
transport [1] instead.

[1] http://www.pjsip.org/pjnath/docs/html/group__PJNATH__STUN__SOCK.htm




>
> After that, I wish to initiate a ICE connectivity check, for the same
> socket for which I done the detection. How can I relay the information from
>  one point to another? That is: how can I say to ICE transport that I've
> detected (local IP_a:port_a)(mapped IP_A:port_A)? How can I forward these
> info to the peer, in order to start the check?
>
>
With SIP+SDP?


I hope you will answer soon.



Is this soon enough? ;-)

I don't know what's your expectation regarding this list's responsiveness,
but as with any open source projects, this has always been served on best
effort basis. After all, it's free (you don't pay "membership" fee to post
questions, do you? ;-) ).

Cheers
 Benny




>
> Bye.
>
>
>      Posta, news, sport, oroscopo: tutto in una sola pagina.
> Crea l&#39;home page che piace a te!
> www.yahoo.it/latuapagina
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080714/8ee13c7b/attachment.html 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux