Cannot send a datagram on the desired network using TDI

Hi,

I am using TDI for sending datagrams

I have 2 NICs in my machine which are 192.168.6.17 and 192.168.71.254
RRAS routing is enabled so that both networks can talk to each other.

Using TDI , I want to send a datagram to destination 192.168.71.1
over 192.168.6.17 NIC.

So, I open a TDI Address specifying 192.168.6.17 as the IP Address and
I expect that the datagram will go over that network.
(It should work like bind() function in WINSOCK)

But, when i do a network capture, i see that the datagram has a
Source IP address of 192.168.71.254 instead of 192.168.6.17.

Has anyone seen this before and any idea how this can be resolved?

Any help will be appriciated.
Thanks
-atul


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi all,

Ignore the question…found a BUG in my code.
For some reason, Address.in_addr field was being zeroed out when
opening the Transport and hence it can pick any network.

Fixed it and now it works fine.

Sorry for the confusion.

-atul


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> But, when i do a network capture, i see that the datagram has a

Source IP address of 192.168.71.254 instead of 192.168.6.17.

Do you use raw IP or UDP?
For UDP, this is an expected behavior.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com