0

I am deploying my ONC-RPC application in Solaris x86 platform for the first time.
It was working for years in Solaris SPARC platform.

I am seeing a weird issue.

When I start my main process, rpc program is registered, which I can see in rpcinfo.

536870992    1    tcp       0.0.0.0.76.169      -          500  

When I check the status of the program, I am getting this error:

rpcinfo -T tcp localhost 536870992
rpcinfo: RPC: Program not registered

When I start another process, the previous rpc program got de-registered.

This is what I see in rpcinfo

program version   netid             address     service      owner
1073742167    1    tcp       0.0.0.0.79.169      -          500
 536871232    4    tcp       0.0.0.0.80.169      -          500  

I have a doubt that there is some address conflict.
0.0.0.0.76.169 and 0.0.0.0.80.169 share the same last field 169.

How is address assigned and who assigns it?
What is its relevance?

cppcoder
  • 101
  • 3
  • 1
    the tcp net address is something like a.b.c.d.N.M, where a.b.c.d it the ip address, to which service is bound, and N.M in the port number as (N << 8) + M. In your case it ports 20649 and 20393. My question is why your program get's different program numbers after restart? – kofemann Dec 08 '13 at 10:20
  • @tigran The second one is a different program and hence the number is different. My issue is the program is showing as not registered, when I check the status using `rpcinfo`. One difference I noticed is that in `SPARC` machine the addresses for each program used to have unique `M` value and maybe same `N` value. But in `x86` machine, they have unique `N` value and same `M` value. Is this because of some endianness issue? – cppcoder Dec 09 '13 at 03:03

1 Answers1

0

I found out the issue. I was facing endianness issues because of the new x86 platform.
I used htons and ntohs while setting/getting port from system level RPC structures to solve the issue. Now the program is successfully registered with port mapper.

cppcoder
  • 101
  • 3