NAT traversal implementation: modify nat_detect.c?

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

 



Yes, you were faster than light... ;-) Thank you a lot.

Just to be clear:
since NAT behavior may vary according to time, traffic, and so on,...
in order to implement an application NAT-independent, we need to model the NAT device: let f(t) be the NAT behavior "at time t", based on the local socket address of the client, and the destination socket address for outgoing packets.
For these variables I wanna know:
 - the public address for the local socket;
 - if the mapping is Endpoint-Independent;
 - if the filtering is Endpoint-Indipendent. 

Thanks to these 3 informations, I know all it's needed to do NAT traversal (and I can choose among 2 techniques: Hole Punch and TURN).
Your API "pj_stun_detect_nat_type()" does the first job: model the NAT device, at the time t when I start my application, for a local socket.
The next step is doing UDP Hole Punch between 2 peers: 
 - every client detects its NAT;
 - every client sends these info to an Introducer Server;
 - the Introducer Server replies these data among peers. 
When a peer receives the client data, the Hole Punch starts: every client tries to send a simple "Hello World" to the peer, via the local or the mapped address.
At this moment, I'm not considering the case where clients are both behind a symmetric NAT, so this procedure would be succeful.
And that's why I'm studying your libraries...

So, if you have some idea or if you think I'm wrong, I'm listening...;-)
Any suggestions will be very appreciate....(?_?')
(I'm in trouble..)


--- Lun 14/7/08, Benny Prijono <bennylp at pjsip.org> ha scritto:

> Da: Benny Prijono <bennylp at pjsip.org>
> Oggetto: Re: [pjsip] NAT traversal implementation: modify nat_detect.c?
> A: "pjsip list" <pjsip at lists.pjsip.org>
> Data: Luned? 14 luglio 2008, 19:20
> 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
> >_______________________________________________
> 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


      Posta, news, sport, oroscopo: tutto in una sola pagina. 
Crea l&#39;home page che piace a te!
www.yahoo.it/latuapagina



[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