0

Can someone comment on how and at which level in portmap program version is decided. Actually in 2 different environments I am getting different Procedure and program version. in case 1 : I am getting Program version as 2 and procedure GETPORT in case 2 : I am getting Program version as 4 and procedure GETADDR.

How can I ensure that in every case GETPORT is called not GETADDR.

AMS
  • 29
  • 4

1 Answers1

0

The small confusion comes from the fact that you use probably the same client that talk to two 'different' services to portmap, exposed as program with #100000, version 2 and rpcbind service, exposed as program #100000, version 4. To match the correct service the combination of program and the version is used. Thus, bough can share the same TPC/UDP port, but provide different services.

portmap

Returns TCP/UDP port number of registered program, like:

GETPORT {'program': '100003', 'version': 4} => 2049

rpcbind

Returns the universal addresses of registered program, like:

GETADDR {'program': '100003', 'version': 4, 'netid': 'tcp'} => 0.0.0.0.8.1

Typical rpcbind service support the portmap protocol as well.

kofemann
  • 4,217
  • 1
  • 34
  • 39
  • Is there any way in which I can ensure program version 2 is used always. As with new library order is changed earlier Program Version 2 was preferred 1st but now program version 4 is requested 1st. – AMS Feb 23 '22 at 08:14
  • This depends on the client app. – kofemann Feb 23 '22 at 08:54
  • How can we achieve that in client app that is what I want to know actually. – AMS Feb 24 '22 at 07:02