OpenQNX :: The QNX Community Portal

Oct 07, 2008 - 11:42 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 43 unlogged users and 2 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
mdz
Post subject: RPC clnt_control(CLIENT * , CLGET_SERVER_ADDR, *) broken  PostPosted: May 22, 2007 - 09:01 PM
New Member


Joined: Apr 13, 2006
Posts: 2

Hi:

I am porting our RPC software from Linux to QNX and have encountered one problem: the clnt_control() method in the RPC library (sort of an RPC ioctl()) does not seem to be working - at least the CLGET_SERVER_ADDR function.

Refer to the below code fragment:

CLIENT * client; // passed in as a parameter
struct sockaddr_in addr;
bool status = clnt_control(client, CLGET_SERVER_ADDR, (char *) &addr);
in_addr_t ip_addr = addr.sin_addr.s_addr;

On both Linux and QNX the call to clnt_control() returns true.
On our Linux systems this code returns the server IP address in addr.
On our QNX 6.3.2 systems, this code always returns 100.117.0.0 (interpreted as an IP address) in addr.

Any ideas? Is this a bug in the RPC library?
Does anybody have another suggestion on how I can get the server IP address from a CLIENT * ???

Of course I could do a name server lookup from the host name, but I would have to jump through several hoops to make that information available at this point in the code...

Thanks,
Mark Dzmura
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.