The only solution I can think of is to use ioctl for C++ backend on Linux 
to get the IP address.  However, this approach may be too limited in terms 
of platform portability and various NAT schemes.

I have tried the following code to get IP address using native code, there 
is no Java equivalent now...



To try out this code: 

 $ x10c++ -o tt TryIP.x10
 $ ./tt

Regards,
  - Qiming




From:   Yan CRL Li/China/IBM
To:     x10-users@lists.sourceforge.net
Cc:     Qi Ming Teng/China/i...@ibmcn, Hai Bo HB Lin/China/i...@ibmcn, 
Stephen Fink/Watson/i...@ibmus, Yan CRL Li/China/i...@ibmcn
Date:   2010-12-10 18:35
Subject:        How to Map IP address to Place ID


For this scenario, I know the IP address of each node, I want to know each 
Place id corresponding to this IP.

For example :I put different files on these nodes. I start 5 places on two 
physical nodes:
File A, File B are on node 1 with IP: 192.168.1.1
FileC,File D and File E anre on node 2 with IP :192.168.1.2

When I access these Files, I need to know the mapping relationship between 
Place ID and IP address. 

But when programming with X10, I only know the place id, I do not know 
which node is mapping to this id, how can I do this ?

Thanks

Li Yan (李严)
 
System Group, IBM China Research Lab
Tel: 8610-58748060 
Tieline: 11905-8060 
Add: Building 19 Zhongguancun Software Park, 8 Dongbeiwang WestRoad, 
Haidian District, Beijing, 100094, P.R.China
E-mail: liyan...@cn.ibm.com

------------------------------------------------------------------------------
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to