Subject | Getting a client's ip-address |
---|---|
Author | Daniel Albuschat |
Post date | 2006-11-16T10:47:42Z |
Hello there,
I have the following problem:
I want to store the ip-address a client uses to connect to a database.
It is, of course, easy to get an ip-address at the client software and store it
to a table. The problem is here, that it has become quite common that machines
have multiple IP-addresses for various reasons.
One reason could be that it has two network adapters, another reason is that
a virtual network adapter is installed, such as a virtual VMWare bridge.
I don't know a sufficiently accurate way to calculate which IP-address is being
used to connect to the firebird-server (I would to read the routes and
the subnet
masks of the network adapters for this), so I wonder if there's some way at the
firebird server to access the client connection's remote ip-address.
Regards,
Daniel Albuschat
--
eat(this); // delicious suicide
I have the following problem:
I want to store the ip-address a client uses to connect to a database.
It is, of course, easy to get an ip-address at the client software and store it
to a table. The problem is here, that it has become quite common that machines
have multiple IP-addresses for various reasons.
One reason could be that it has two network adapters, another reason is that
a virtual network adapter is installed, such as a virtual VMWare bridge.
I don't know a sufficiently accurate way to calculate which IP-address is being
used to connect to the firebird-server (I would to read the routes and
the subnet
masks of the network adapters for this), so I wonder if there's some way at the
firebird server to access the client connection's remote ip-address.
Regards,
Daniel Albuschat
--
eat(this); // delicious suicide