GithubHelp home page GithubHelp logo

Comments (7)

browntownington avatar browntownington commented on July 19, 2024

I imagine ps2netfs is the same as FTP active (port 20/21 TCP) and passive (21 TCP and 1024-65536 TCP) as I was able to connect using one of the ps2-klients.

Just need to figure out what p2link uses for ports.

from ps2client.

AKuHAK avatar AKuHAK commented on July 19, 2024

Are you sure that you investigate all documentation? https://www.github.com/ps2dev/ps2client/tree/master/doc%2Fps2link-protocol.txt
Contains answers for all your questions.

from ps2client.

sp193 avatar sp193 commented on July 19, 2024

ps2netfs isn't FTP, from what I do recall. If it were, then you should have been able to use any FTP client.

from ps2client.

browntownington avatar browntownington commented on July 19, 2024

ps2netfs isn't FTP, from what I do recall. If it were, then you should have been able to use any FTP client.

Wasn't suggesting ps2netfs is using FTP protocol only that it was using a similar port range to FTP... 1024-65536 TCP there's a fair chance something will fall in that range ;) :)

from ps2client.

browntownington avatar browntownington commented on July 19, 2024

Are you sure that you investigate all documentation? https://www.github.com/ps2dev/ps2client/tree/master/doc%2Fps2link-protocol.txt
Contains answers for all your questions.

Thanks @AKuHAK I do recall seeing this document recently and forgot where i had read it... Anyway, there is ambiguity or perhaps a typo in this document.
Firstly i believe the port numbers are listed in hex so I will convert them to a decimal port number below.

          PS2LINK PORT NUMBERS
          
              Command (UDP) 0x4712 - One way communication to send commands. Decimal port number [**18194**]
              Request (TCP) 0x4711 - Two way communication to serve requests. Decimal port number [**18193**]
              Log (UDP)     0x4712 - One way communication to receive log text. Decimal port number [**18194**]

Now the documentation also states that communication takes place on three ports. It mentioned 1 UDP port, 1 TCP port, and another UDP port.

                    Communication with ps2link takes place on three ports. I'm not entirely
                      sure why, but it does. One udp port is used to send commands to ps2link
                      in the form of command packets. A tcp port is used to receive requests
                      and send responses during program runtime. And another udp port is used
                      to receive log text from ps2link for debug or informational purposes.

So I wonder if there is actually a third port number or if the server (PS2) initiates a log connection back to the client on 18194 UDP and the author is suggesting there is third port because the connection is imitated from the server back to the client. I will run some debugs and see.

Source Destination Type Destination-Port Description
ps2client ps2link UDP 18194 Command (one-way)
ps2client ps2link TCP 18193 Request & Reply (two-way)
ps2link ps2client UDP 18194 Log connection (on-way)

from ps2client.

bignaux avatar bignaux commented on July 19, 2024

I think having 2 services on same UDP port is confusing user. In a first place, i'd like to remove any reference to Log in ps2client and change UDP command port. udptty was designed so that its messages can be accessed without establishing a connection, so we can let a basic command run, such as using netcat :
nc -ukl 18194
or tshark (promiscous) : tshark -o data.show_as_text:TRUE -f "dst port 18194" -Tfields -e data.text

Such easy first move would make (non-exhaustive list) :

  • avoid confusion and issue about same port for cmd and log
  • avoid tcp connection when we only want listening log ( https://github.com/ps2dev/ps2client/blob/master/src/ps2client.c#L76 )
  • easier to script if ps2client is not listening after we send a cmd
  • make clear that udptty doesn't need tcp server running when we just want log (ingame for example).
  • avoid losing message and issue when ps2link or udptty are reset

from ps2client.

F0bes avatar F0bes commented on July 19, 2024

Removing listen from PS2client would technically break existing workflows that rely on listen

  • avoid confusion and issue about same port for cmd and log

From personal experience, it isn't that confusing. Why not just change the command port and keep the log.

I'm plenty sure PS2client can be fixed to not use TCP during listen.

  • easier to script if ps2client is not listening after we send a cmd

I agree that after a command it should exit. Possibly add a -listen argument for old behaviour.

  • make clear that udptty doesn't need tcp server running when we just want log (ingame for example).

Make it clear to users? Or remove the fact that a TCP server is currently needed. Either way, changing PS2client listen behaviour is a solution as said above.

  • avoid losing message and issue when ps2link or udptty are reset

I think this is for changing the port, which I'm not against.

from ps2client.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.