BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to get IP of connecting client?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Michael Fullerton
Guest





PostPosted: Wed Sep 06, 2006 2:21 am    Post subject: How to get IP of connecting client? Reply with quote



Delphi 5

I have this Internet app that uses Datastead's TVideoGrabber. When
another instance of this software connects to the program I need to
get the IP address of the connecting machine. How can I get this IP
address?

Thanks in advance.

___
Free Project Time Tracker for Delphi Developers
http://www.cybermatrix.com/pcdelphi.html
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Sep 06, 2006 4:52 am    Post subject: Re: How to get IP of connecting client? Reply with quote



"Michael Fullerton" <fullerm@spamkiller-remove.cyber-matrix.com> wrote in
message news:jdqrf2d1l6btagdbaiqtjemcvd9kh3t05l (AT) 4ax (DOT) com...

Quote:
When another instance of this software connects to the program
I need to get the IP address of the connecting machine. How
can I get this IP address?

How is it connecting to begin with? Please provide more details.


Gambit
Back to top
Michael Fullerton
Guest





PostPosted: Wed Sep 06, 2006 7:15 am    Post subject: Re: How to get IP of connecting client? Reply with quote



"Remy Lebeau \(TeamB\)" <no.spam (AT) no (DOT) spam.com> wrote:

Quote:

"Michael Fullerton" <fullerm@spamkiller-remove.cyber-matrix.com> wrote in
message news:jdqrf2d1l6btagdbaiqtjemcvd9kh3t05l (AT) 4ax (DOT) com...

When another instance of this software connects to the program
I need to get the IP address of the connecting machine. How
can I get this IP address?

How is it connecting to begin with? Please provide more details.

What do you mean how is it connecting and how is that relevant anyway?
TVideoGrabber handles all of that. I don't have the source code for
TVideoGrabber. ZoneAlarm for example knows what IP is trying to
connect to what program regardless of how it is connecting.

___
Free Project Time Tracker for Delphi Developers
http://www.cybermatrix.com/pcdelphi.html
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Sep 06, 2006 8:11 am    Post subject: Re: How to get IP of connecting client? Reply with quote

"Michael Fullerton" <fullerm@spamkiller-remove.cyber-matrix.com> wrote in
message news:ajbsf2l767v1a9nhs470f1kuqeamrn3mad (AT) 4ax (DOT) com...

Quote:
What do you mean how is it connecting

I mean, where exactly are you trying to obtain the IP address from in the
first place, and how are you handing inbound connections?

Quote:
how is that relevant anyway?

It is very relevant. Depending on how exactly you are managing the
connections dictates what code you have to write to access the IP addresses.
Please show an actual code snippet that demonstrates what you are trying to
accomplish.

Quote:
TVideoGrabber handles all of that. I don't have the source code for
TVideoGrabber.

I did not ask you for TVideoGrabber's source code. I asked for YOUR code
that is trying to use it.

Quote:
ZoneAlarm for example knows what IP is trying to connect to
what program regardless of how it is connecting.

ZoneAlarm is hooked directly into the OS's socket stack and thus can detect
every socket that is active in every running process.


Gambit
Back to top
Michael Fullerton
Guest





PostPosted: Wed Sep 06, 2006 8:11 am    Post subject: Re: How to get IP of connecting client? Reply with quote

"Remy Lebeau \(TeamB\)" <no.spam (AT) no (DOT) spam.com> wrote:

Quote:

"Michael Fullerton" <fullerm@spamkiller-remove.cyber-matrix.com> wrote in
message news:ajbsf2l767v1a9nhs470f1kuqeamrn3mad (AT) 4ax (DOT) com...

What do you mean how is it connecting

I mean, where exactly are you trying to obtain the IP address from in the
first place, and how are you handing inbound connections?

I don't know what you are talking about. Right now I am not actively
trying to obtain IP addresses since I don't know how. This is why I am
posting here. Again, I am not handling inbound connections,
TVideoGrabber is.

Quote:
how is that relevant anyway?

It is very relevant. Depending on how exactly you are managing the
connections dictates what code you have to write to access the IP addresses.
Please show an actual code snippet that demonstrates what you are trying to
accomplish.

How could I have a code snippet when I am asking how to do this?

Quote:
TVideoGrabber handles all of that. I don't have the source code for
TVideoGrabber.

I did not ask you for TVideoGrabber's source code. I asked for YOUR code
that is trying to use it.

My code is _completely_ _absolutely_ 100% irrelevant to this. My code
does not handle the Internet in any way, TVideoGrabber does all that.
Understand?

Quote:
ZoneAlarm for example knows what IP is trying to connect to
what program regardless of how it is connecting.

ZoneAlarm is hooked directly into the OS's socket stack and thus can detect
every socket that is active in every running process.

Well then, how do I hook directly into the OS's socket stack?

___
Free Project Time Tracker for Delphi Developers
http://www.cybermatrix.com/pcdelphi.html
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Sep 06, 2006 8:11 am    Post subject: Re: How to get IP of connecting client? Reply with quote

"Michael Fullerton" <fullerm@spamkiller-remove.cyber-matrix.com> wrote in
message news:b7msf2lvk2er8lkati11ohdue61bi95vgt (AT) 4ax (DOT) com...

Quote:
I don't know what you are talking about. Right now I am not
actively trying to obtain IP addresses since I don't know how.

That is the topic of this discussion, since that is what you originally
asked for. I cannot give you details about how to accomplish that until you
provide details about how you are working with the connections in the first
place.

Quote:
This is why I am posting here. Again, I am not handling
inbound connections, TVideoGrabber is.

Well, you are obviously doing SOMETHING with it. What EXACTLY are you
doing?

Quote:
How could I have a code snippet when I am asking how to do this?

There is no way to answer your original question without knowing more
details about what you are doing in the first place.

Quote:
My code is _completely_ _absolutely_ 100% irrelevant to this. My
code does not handle the Internet in any way, TVideoGrabber does
all that. Understand?

How exactly are you using the TVideoGrabber in the first place? It is not
irrelevant to your question, since the only way you are going to gain access
to the IP addresses is through TVideoGrabber, if it is indeed managing the
connections for you. If it does not provide access to the connections, then
you have no way to get their information.

Quote:
Well then, how do I hook directly into the OS's socket stack?

You have to write your own NDIS device driver, or else use a third-party
driver.


Gambit
Back to top
Francois Piette [ICS & Mi
Guest





PostPosted: Wed Sep 06, 2006 8:11 am    Post subject: Re: How to get IP of connecting client? Reply with quote

Quote:
I mean, where exactly are you trying to obtain the IP address from in the
first place, and how are you handing inbound connections?

I don't know what you are talking about. Right now I am not actively
trying to obtain IP addresses since I don't know how. This is why I am
posting here. Again, I am not handling inbound connections,
TVideoGrabber is.

If I understand what you try to say, you are writing a program which doesn't
accept itself any IP connection but need to know what is the remote IP for a
connection established from a remote computer to a program named
TVideoGrabber. Or maybe you wrote a Delphi program using the component
TVideoGrabber and that component is accepting connection and you want to
know the remote IP address for that connection ?

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
francois.piette (AT) overbyte (DOT) be
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be
Back to top
Michael Fullerton
Guest





PostPosted: Wed Sep 06, 2006 6:18 pm    Post subject: Re: How to get IP of connecting client? Reply with quote

"Francois Piette [ICS & Midware]" <francois.piette (AT) overbyte (DOT) be> wrote:

Quote:
I mean, where exactly are you trying to obtain the IP address from in the
first place, and how are you handing inbound connections?

I don't know what you are talking about. Right now I am not actively
trying to obtain IP addresses since I don't know how. This is why I am
posting here. Again, I am not handling inbound connections,
TVideoGrabber is.

If I understand what you try to say, you are writing a program which doesn't
accept itself any IP connection but need to know what is the remote IP for a
connection established from a remote computer to a program named
TVideoGrabber. Or maybe you wrote a Delphi program using the component
TVideoGrabber and that component is accepting connection and you want to
know the remote IP address for that connection ?

It is the latter, yes. I wrote a Delphi program using the
TVideoGrabber component and that component is accepting connections
and I want to know the remote IP address for that connection.

Quote:
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html

___
Free Project Time Tracker for Delphi Developers
http://www.cybermatrix.com/pcdelphi.html
Back to top
Francois Piette [ICS & Mi
Guest





PostPosted: Wed Sep 06, 2006 7:36 pm    Post subject: Re: How to get IP of connecting client? Reply with quote

Quote:
TVideoGrabber. Or maybe you wrote a Delphi program using the component
TVideoGrabber and that component is accepting connection and you want to
know the remote IP address for that connection ?

It is the latter, yes. I wrote a Delphi program using the
TVideoGrabber component and that component is accepting connections
and I want to know the remote IP address for that connection.

OK. So you have see in TVideoGrabber source code or to ask the TVideoGrabber
author to know how to get hand either directly to the IP address, or a least
to the winsock handle for the connection. Using the handle and winsock call
(getpeername) you can get the remote IP address.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
francois.piette (AT) overbyte (DOT) be
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.