How to get local IP address through TDI

Hi,
I need to get the local IP address of a connection.
Currently I am using TdiBuildQueryInformation like so:

TdiBuildQueryInformation(irp,
filteredDevice,
fileObj, NULL, NULL,
TDI_QUERY_ADDRESS_INFO,
mdl);

The problem is that whether I use transport address or
a connection endpoint file object I get back 0.0.0.0 for
the IP address, and the correct port. Is there another
way to get the IP address that a file object is bound to?

-Jeff

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
the latest virus scan software available for the presence of computer
viruses.
**********************************************************************

Are you making the query after the connection is established?

Thos

“Curless, Jeffrey” wrote in message
news:xxxxx@ntdev…
>
> Hi,
> I need to get the local IP address of a connection.
> Currently I am using TdiBuildQueryInformation like so:
>
> TdiBuildQueryInformation(irp,
> filteredDevice,
> fileObj, NULL, NULL,
> TDI_QUERY_ADDRESS_INFO,
> mdl);
>
> The problem is that whether I use transport address or
> a connection endpoint file object I get back 0.0.0.0 for
> the IP address, and the correct port. Is there another
> way to get the IP address that a file object is bound to?
>
> -Jeff
>
>
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> the latest virus scan software available for the presence of computer
> viruses.
>

>
>
>
>

No, I am making it after the association of endpoint to transport address.

-Jeff

-----Original Message-----
From: Thomas F. Divine [mailto:xxxxx@hotmail.com]
Sent: Wednesday, January 29, 2003 2:56 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How to get local IP address through TDI

Are you making the query after the connection is established?

Thos

“Curless, Jeffrey” wrote in message
news:xxxxx@ntdev…
>
> Hi,
> I need to get the local IP address of a connection.
> Currently I am using TdiBuildQueryInformation like so:
>
> TdiBuildQueryInformation(irp,
> filteredDevice,
> fileObj, NULL, NULL,
> TDI_QUERY_ADDRESS_INFO,
> mdl);
>
> The problem is that whether I use transport address or
> a connection endpoint file object I get back 0.0.0.0 for
> the IP address, and the correct port. Is there another
> way to get the IP address that a file object is bound to?
>
> -Jeff
>
>
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> the latest virus scan software available for the presence of computer
> viruses.
>

>
>
>
>


You are currently subscribed to ntdev as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Are you making the query after the connection is ESTABLISHED (connected,
accepted)? (Not after it is ASSOCIATED).

The local IP address (and local interface to be used for a connection) is
undefined until a connection is actually abolished. Hence, the zeros.

An exception would be if the address specified a specific local interface
when it was created. In that case, the method you are using would work.

Thos

“Curless, Jeffrey” wrote in message
news:xxxxx@ntdev…
>
> No, I am making it after the association of endpoint to transport address.
>
> -Jeff
>
> -----Original Message-----
> From: Thomas F. Divine [mailto:xxxxx@hotmail.com]
> Sent: Wednesday, January 29, 2003 2:56 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: How to get local IP address through TDI
>
>
> Are you making the query after the connection is established?
>
> Thos
>
> “Curless, Jeffrey” wrote in message
> news:xxxxx@ntdev…
> >
> > Hi,
> > I need to get the local IP address of a connection.
> > Currently I am using TdiBuildQueryInformation like so:
> >
> > TdiBuildQueryInformation(irp,
> > filteredDevice,
> > fileObj, NULL, NULL,
> > TDI_QUERY_ADDRESS_INFO,
> > mdl);
> >
> > The problem is that whether I use transport address or
> > a connection endpoint file object I get back 0.0.0.0 for
> > the IP address, and the correct port. Is there another
> > way to get the IP address that a file object is bound to?
> >
> > -Jeff
> >
> >
> >
> > This email and any files transmitted with it are confidential and
> > intended solely for the use of the individual or entity to whom they
> > are addressed. If you have received this email in error please notify
> > the system manager.
> >
> > This footnote also confirms that this email message has been swept by
> > the latest virus scan software available for the presence of computer
> > viruses.
> >

> >
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@concord.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>

Ahhh… I thought it might be something like that. Unfortunately
I need the IP address before the connection is established. I did
find a work around though.

Thanks!
-Jeff

-----Original Message-----
From: Thomas F. Divine [mailto:xxxxx@hotmail.com]
Sent: Wednesday, January 29, 2003 10:04 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How to get local IP address through TDI

Are you making the query after the connection is ESTABLISHED (connected,
accepted)? (Not after it is ASSOCIATED).

The local IP address (and local interface to be used for a connection) is
undefined until a connection is actually abolished. Hence, the zeros.

An exception would be if the address specified a specific local interface
when it was created. In that case, the method you are using would work.

Thos

“Curless, Jeffrey” wrote in message
news:xxxxx@ntdev…
>
> No, I am making it after the association of endpoint to transport address.
>
> -Jeff
>
> -----Original Message-----
> From: Thomas F. Divine [mailto:xxxxx@hotmail.com]
> Sent: Wednesday, January 29, 2003 2:56 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: How to get local IP address through TDI
>
>
> Are you making the query after the connection is established?
>
> Thos
>
> “Curless, Jeffrey” wrote in message
> news:xxxxx@ntdev…
> >
> > Hi,
> > I need to get the local IP address of a connection.
> > Currently I am using TdiBuildQueryInformation like so:
> >
> > TdiBuildQueryInformation(irp,
> > filteredDevice,
> > fileObj, NULL, NULL,
> > TDI_QUERY_ADDRESS_INFO,
> > mdl);
> >
> > The problem is that whether I use transport address or
> > a connection endpoint file object I get back 0.0.0.0 for
> > the IP address, and the correct port. Is there another
> > way to get the IP address that a file object is bound to?
> >
> > -Jeff
> >
> >
> >
> > This email and any files transmitted with it are confidential and
> > intended solely for the use of the individual or entity to whom they
> > are addressed. If you have received this email in error please notify
> > the system manager.
> >
> > This footnote also confirms that this email message has been swept by
> > the latest virus scan software available for the presence of computer
> > viruses.
> >

> >
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@concord.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>


You are currently subscribed to ntdev as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com