Is it possible to get the IP address of an ODBC server? - odbc

This is under Windows. I can get the servername through a call to SQLGetInfo() but since I dont have the server name in my hosts file I cant use gethostbyname() to find its ip address. Is there a method I am missing which would return back the IP address as defined in the ODBC Data Source Administrator dialog?

gethostbyname is deprecated in favor of getaddrinfo. Use that instead.

Related

AzerothCore.Can I use my DDNS hostname in realmlist table?

I am configuring my first AzerothCore server. I got to the part where I configure the acore_with database's realm list table's address field. Can I use my ddns hostname here or do I need to use the dynamic public IP and change it every time my IP resets?
You can use your ddns hostname, you just need to make sure the right ports are opened and your machine is reachable using that address from outside (you can try ping to make sure of it).

Get IP address of a kamailio user

I have installed a sip kamailio proxy.
I'd like to find the IP address associated with my kamailio (registered) sip users but I can't find where it is stored and how to retreive it.
My guess is to use db_query from SQLOps module but I can't find the right table in my mysql database.
Does someone knows how to do that ?
I finally found that the location table has a "received" column that contains the IP address of a registered user (a regexp is necessary though).

how to access website hosted on Xampp server through my ip address instead of local host

I've installed xxamp. what i am looking for is i want to access xamp/htdocs/index.php through my IP address not from local host. can any One tell me step by step procedure ? thank you ?
Assuming that xxamp uses Apache (since I've only used wamp) there is configuration file that you can modify: httpd.conf
There should be a line that says "ServerName local host" add a '#' sign in front of it start a new line and type "ServerName (your IP address)" without the quotes and without the parathensis and insert your IP address. I THINK you have to put :80 at the end of your IP.
I did this with wamp, and accessed my files through my tablet and other devices with a router.

way to detect list of changes in ip address in client machine

Ours is a small network consisting of 15 users. We have LAN messenger installed in every machine. Someone is misusing it by using anonymous IP address in their system. We traced the anonymous IP as 192.168.0.155. Now we want to check each system if they have manually changed their IP to the above address. Does Windows stores IP address change event anywhere? All are static IP within a LAN.
With some luck, I've got an easy solution for you to retrieve some information about the target. You could try to use the nbtstat-command.
Just open a command prompt and type in the following:
nbtstat -A 192.168.0.155
This will output a bunch of information about the target host, including the machinename and MAC address.
Here is an example, how the output could look like:
(source: onlinecomputertips.com)
Good luck

client-server communication

We have written a client-server programme. Programme is running fine when we run both client and server on the same machine on different terminals by calling gethostbyname(127.0.0.1). We have to communicate between different machine. So my question is, how to determine the IP of the other machine (server's), and how to find out the IP of one's own machine. Is it simply chosen as something we wish? How to get hostname of the server and one's own machine?
Thanks
It's not clear what platform you are operating on but for Unix/Linux you can discover the IP addresses assigned to the interfaces on your system with the ifconfig command (you may need to be root to get to this, it's often found in the sbin folder), on Windows ipconfig will get you the same information.
Ideally you'd have domain name resolution set up on your network and would have a 'name' for the server, i.e. server.mydomain.com then you could use gethostbyname("server.mydomain.com"). For more information on domain name services (dns) you could do worse than start here: http://en.wikipedia.org/wiki/Domain_name_system
You cannot get the IP of the other machine in some magical way; you either have to know it or develop some sort of broadcast protocol in your network app, where the server or clients broadcasts their IP.
Getting your own IP depends on your platform and what language you use.
If this is a client/server environment, so the client is going to need to know the server address.
If you are using gethostbyname, then the name resolution systems that are actually supported (DNS, NIS, etc.) will vary by OS and system configuration.
The most common configuration is to use DNS. In this case, it is worth noting that the server cannot easily discovery its own name on the network (or name itself). This is because the naming service that the client will use is external to the server. The server has a local idea of what its hostname and it's resolver's default domain, but they are not necessarily the FQDN that DNS externally maps to the server's IP addresses.

Resources