LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-20-2010, 04:41 AM   #1
santhu.s
LQ Newbie
 
Registered: Dec 2010
Posts: 2

Rep: Reputation: 0
How to get local(xp_laddr) transport address in montavista(linux) while using rpc


Hi all,

Need your help in fixing the below problem....

I have facing a problem when porting a code on Solaries to Motavista Linux. The code on solaries is an implementation of a simulator which simulates many virtual systems( having different ip address ). And the code implementation is using RPC interfaces for implementing the same. SVCXPRT data structure is used to extract the ip address's as below.

The structure(data) SVCXPRT of the RPC interface on solaries is having the two data members called xp_rtaddr(remote tranfport addess) and xp_ltaddr(local transport address). As per my knowledge the xp_ltaddr gives the ip address of the virtual system to which actualy data(message) as been sent so the simulator can use the ip address to simulate the perticular virtual machine and to provide the services of that system.
The XP_rtaddr and xp_ltaddr are of netdb pointer type members.

But when it comes to Montavista linux, it is also having the structure SVCXPRT which differs in few cases in definition when compares to solaries.
Which is having one member called xp_raddr which seems equal to solaries xp_rtaddr( but the type is diffesrent i.e, sockaddr_in type member). I think this will give the remote address.

Now My problem is I am unable find any member in SVCXPRT data structure which provides the local transport address( equivalent to solaries xp_ltaddr). I tried to get the same on net but i could not find any way.
I found one interface in RPC on linux i.e, get_myaddr() which gives the address of the physical system. But simulator needs the address of the virtual system to which the message is actually been sent, to simulate the perticular system.

My question's,
1. is there any way on Montavista(Linux) to get the local transport address which will be same as solaries xp_ltaddr.

2. Is there any possibality in the socket programming to get the ip address of the message receiver on the receiving end after erceiving the message on socket( using recefrom() interface ). As per my undersatnding when we use recv, recvfrom etc facilities to receive the message we will get only the address of the message sender.

Please help me in fixing this problem on Montavista(Linux).
If this is not the right place for above query, Please guide me to the related site.

I will be greate full to your help.

Thanks in advance.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
failed to send 'clear' to local ypserv: RPC:Program not registered beginner16 Linux - Newbie 3 04-29-2014 12:25 PM
How to find Local TransPort Address(xp_ltaddr there in solaries) on Montavista Linux santhu.s Linux - Networking 0 12-16-2010 06:10 AM
Postfix issues - Local delivery okay, no virtual: or maildrop: transport. gankoji Linux - Server 1 08-05-2009 03:46 PM
relay all non-local mail to 1 local address and NOT real destinations manqox Linux - Server 6 09-04-2008 04:13 AM
xinetd[25588]: warning: can't get client address: Transport endpoint is not connected Niceman2005 Linux - General 0 04-16-2006 09:12 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration