NATNEG emulation

      NATNEG emulation

      I realize this is beyond the scope of your project, so I hope it's not inappropriate for me to post this here. There really aren't any resources out there about this, but I was hoping that since we have similar interests someone involved in this project might have some insight for me.

      I'm working on a NATNEG emulator for PC games and have run into a situation where the guest only sends one NN_INIT packet to NATNEG1, sequence NN_PT_NN1. This appears to come from a temporary port, not the public port of the guest.

      The HOST sends two NN_INIT packets to NATNEG1, sequence NN_PT_GP and NN_PT_NN1. (this is initiated by my server browser server sending a NATNEG SEND_MESSAGE_REQUEST to the hosts public ip:port with the cookie of the NATNEG session)

      My server sends back the NN_INIT_ACK packet to each received packet. Once guest NN_PT_NN1, host NN_PT_GP and NN_PT_NN1 have been received, my server sends an NN_CONNECT packet to both the guest and host.

      I receive a NN_CONNECT_ACK back from the host, but not the guest. The host then continuously sends a NN_CONNECT_PING packet to the guest (ip:port from recvfrom on the guest NN_INIT packet), and the guest never replies. Obviously, the connection is never successfully because of this.

      My question is, since I never receive a NN_INIT packet, sequence NN_PT_GP from the guest, how do I know what the guest's public port is? I believe I need the public port to send to the host in the NN_CONNECT packet.

      Reviewing the Gamespy SDK source, it would appear the guest will never send NN_INIT, sequence NN_PT_GP and that it will never acknowledge NN_CONNECT_ACK either. It appears this is working as designed, however the guest never connects to the host because I'm missing some piece of the NATNEG negotiation.

      I can provide packet dumps if it would be helpful. The game in question is ToCA Race Driver 3.
      The Wii use also different ports. Here is the protocol implemented by me, maybe it helps:
      * wiki.tockdom.com/wiki/Natneg#Connection_Protocol

      WIT: Wiimms ISO Tools
      Verwaltet Plain ISO, WDF, WIA, CISO, WBFS, FST: kann Extrahieren, Erstellen, Patchen, Mischen und Überprüfen

      SZS: Wiimms SZS Tools
      Verwaltet SZS-, BRRES-, U8-, BMG-, BREFT-Dateien uvm.



      PN ohne persönlichen Charakter werden ignoriert. Support-Anfragen gehören ins Forum.