HI, If we could get the Interface type (WIFI or LAN ) along with the Web service call, then we only we have to do is to determine the client's network connection type.
How to determine client network connection type:- Ex- Linux * You could get the active interface by looking at route command out put. default 10.100.5.254 0.0.0.0 UG 1024 0 0 *wlp4s0* * Then By looking at /proc/net/wireless you can find out the above interface is Wired or Wireless. So same can be done for windows using available commands such as [1]. Once Client network type is determined we could pick the reachable IP from the web service call output. [1]. http://superuser.com/questions/507250/how-to-check-wifi-networking-standard-of-current-connection Regards, ChamaraT On Sun, Sep 25, 2016 at 6:14 PM, Sidath Weerasinghe <[email protected]> wrote: > Hi, > > In the client, user give the initial IP address to call the Admin service. > By calling Admin service client get the all cluster node IP address (LAN > interface IP and WiFi interface IP). My concern is how to choose suitable > IP address which is related to client network. > > Think, client is in the LAN. So client want to select LAN IP address. Not > WiFi IP address. > In the client I want to select one of the suitable IP address form the IP > list. > > On Sun, Sep 25, 2016 at 10:02 AM, Rajith Vitharana <[email protected]> > wrote: > >> Hi, >> >> If you need to know the server IP address, via a service call, Can't you >> just take it from request "host" header?(which will be the one client side >> actually uses to call the server) >> >> Thanks, >> >> On 24 September 2016 at 22:17, Sidath Weerasinghe <[email protected]> >> wrote: >> >>> Hi all, >>> >>> On the server side, I am currently getting all the network interface's >>> IP addresses and store them in the database. Then I wrote the web service >>> to get those details from the database. >>> >>> >>> [image: Inline image 1] >>> >>> >>> In Andes client side, I will call that web service to retrieve the IP >>> addresses. >>> The concern I have is how can I choose the IPs (LAN & WiFi) which is >>> related to the client network (When client is on WiFi network, client need >>> to choose WiFi IP address) to the MB client. >>> >>> Need a way for do this? >>> >>> >>> -- >>> Thank You, >>> Best Regards, >>> >>> Sidath Weerasinghe >>> >>> >>> *Intern* >>> >>> *WSO2, Inc. * >>> >>> *lean . enterprise . middleware * >>> >>> >>> *Mobile: +94719802550 <%2B94719802550>* >>> >>> *Email: *[email protected] >>> >>> Blog: https://medium.com/@sidath >>> >>> Linkedin: https://lk.linkedin.com/in/sidathweerasinghe >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Rajith Vitharana >> >> Senior Software Engineer, >> WSO2 Inc. : wso2.com >> Mobile : +94715883223 >> Blog : http://lankavitharana.blogspot.com/ >> <http://wso2.com/signature> >> > > > > -- > Thank You, > Best Regards, > > Sidath Weerasinghe > > > *Intern* > > *WSO2, Inc. * > > *lean . enterprise . middleware * > > > *Mobile: +94719802550 <%2B94719802550>* > > *Email: *[email protected] > > Blog: https://medium.com/@sidath > > Linkedin: https://lk.linkedin.com/in/sidathweerasinghe > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Chamara Thilina Samarakoon Senior Systems Engineer WSO2 Inc.; http://wso2.com lean.enterprise.middleware mobile: +94772929487 blog: http://mageconfig.blogspot.com/ linkedin: https://www.linkedin.com/pub/chamara-samarakoon
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
