Re: [users@httpd] How to retrieve IP address of incoming packets in text file using httpd source code

2012-12-28 Thread Bouchot j.
Hi Bhavna, I need the source code file of apache which accepts requests and through which I can get the IP at the initial stage. i think you looking for that path-to-http-2.2.23/server/listen.c line 174 173 #ifdef MPM_ACCEPT_FUNC 174 server-accept_func = MPM_ACCEPT_FUNC; 175

Re: [users@httpd] How to retrieve IP address of incoming packets in text file using httpd source code

2012-12-26 Thread Bhavna Saini
Thanks for the info. I have gone through customlog and i understand that it is used to log the IP and other parameters, But I want to compare the IP address of incoming requests with IP address present in a pre-built data structure. After comparing, the request will be served accordingly.

Re: [users@httpd] How to retrieve IP address of incoming packets in text file using httpd source code

2012-12-26 Thread John Iliffe
Maybe I'm missing something following this discussion, but doesn't the following PHP command fetch the information you need? If so, I'm sure the same results can be obtained in other scripting languages. $_SERVER['REMOTE_ADDR']; Regards, John === On

Re: [users@httpd] How to retrieve IP address of incoming packets in text file using httpd source code

2012-12-26 Thread Bhavna Saini
I have not used any PHP command up till now. I was trying to make it work using the apache(httpd) source code itself. Can it be done without using any script language?? OR by adding some code lines in the apache source code files itself?? On Thu, Dec 27, 2012 at 1:01 AM, John Iliffe

Re: [users@httpd] How to retrieve IP address of incoming packets in text file using httpd source code

2012-12-26 Thread Nick Kew
On 26 Dec 2012, at 19:31, John Iliffe wrote: Maybe I'm missing something following this discussion, but doesn't the following PHP command fetch the information you need? If so, I'm sure the same results can be obtained in other scripting languages. $_SERVER['REMOTE_ADDR']; You may

Re: [users@httpd] How to retrieve IP address of incoming packets in text file using httpd source code

2012-12-20 Thread Bhavna Saini
Hi Eric, In the previous mail you mentioned that webserver can't write to /file.txt from a child process. I couldn't get it properly. Please give some more details of it. Actually I want to retrieve the IP addresses of incoming requests as soon as it reaches the server and want to save it in a

Re: [users@httpd] How to retrieve IP address of incoming packets in text file using httpd source code

2012-12-20 Thread Tom Evans
On Thu, Dec 20, 2012 at 4:20 PM, Bhavna Saini bhavnasain...@gmail.com wrote: Hi Eric, In the previous mail you mentioned that webserver can't write to /file.txt from a child process. I couldn't get it properly. Please give some more details of it. Eric is saying that normally only root can

Re: [users@httpd] How to retrieve IP address of incoming packets in text file using httpd source code

2012-12-15 Thread Bhavna Saini
Thanks Eric. I need.one more help. In mod_log_config file, I found r-connection-remote_ip and r-connection-local_ip fields. To retrieve the values of these fields i wrote a small code in mod_log_config file itself under static const char*log_remote_address(request_rec *r, char *a) which is as

Re: [users@httpd] How to retrieve IP address of incoming packets in text file using httpd source code

2012-12-15 Thread Eric Covener
On Sat, Dec 15, 2012 at 5:04 AM, Bhavna Saini bhavnasain...@gmail.com wrote: Thanks Eric. I need.one more help. In mod_log_config file, I found r-connection-remote_ip and r-connection-local_ip fields. To retrieve the values of these fields i wrote a small code in mod_log_config file itself

Re: [users@httpd] How to retrieve IP address of incoming packets in text file using httpd source code

2012-12-14 Thread Eric Covener
mod_log_config writes out IP addresses to the log. You could read the same data in any hook. On Fri, Dec 14, 2012 at 12:56 AM, Bhavna Saini bhavnasain...@gmail.com wrote: Hi, I am working on Apache httpd web server source code i.e. httpd-2.2.23 for my thesis. I want to retrieve the IP