dCache / oncrpc4j

Pure Java implementation of ONCRPC/SUNRPC
Other
30 stars 30 forks source link

Port number #74

Closed challenger572 closed 5 years ago

challenger572 commented 5 years ago
        assertTrue( portmapClient.getPort(OncRpcPortmap.PORTMAP_PROGRAMM, OncRpcPortmap.PORTMAP_V2, "tcp").equals("127.0.0.1.0.111") ); // check port

What is the port number here 0.111 Please let me know what is the format it is giving

kofemann commented 5 years ago

This is so called uaddr format, described in https://www.rfc-editor.org/rfc/rfc5665.txt

To get the port number following expression can be used:

127.0.0.1.a.b

port = (a << 8) + b;

Have a look at:

https://github.com/dCache/oncrpc4j/blob/master/oncrpc4j-core/src/main/java/org/dcache/oncrpc4j/rpc/net/InetSocketAddresses.java#L68

On Tue, Dec 25, 2018, 07:55 challenger572 <notifications@github.com wrote:

  assertTrue( portmapClient.getPort(OncRpcPortmap.PORTMAP_PROGRAMM, OncRpcPortmap.PORTMAP_V2, "tcp").equals("127.0.0.1.0.111") ); // check port

What is the port number here 0.111 Please let me know what is the format it is giving

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dCache/oncrpc4j/issues/74, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjJ3RiH1SVLblwLjY9-Um6TUfvKFb4lks5u8cvqgaJpZM4Zg3j9 .

challenger572 commented 5 years ago

Thank you ..

challenger572 commented 5 years ago

It is giving one port number but I have lot of programs are running on port mapper .how to get all port number .. I am able to get one port number from above u mentioned . Thanks in advance