>> >I am using VC++ 6.0 (with SP5 installed). When using WinXP this is with SP2
>> >installed.
[quoted text clipped - 69 lines]
>an ethernet hub rather that an ethernet switch too - which could be more of a
>challenge - may need to visit a museum.
> >> >I am using VC++ 6.0 (with SP5 installed). When using WinXP this is with SP2
> >> >installed.
[quoted text clipped - 79 lines]
> some other area -- switching systems around could mean changing TCP/IP
> setup values and mis-setting things like DNS server address and masks.
> I obtained a sniffer and have used it to identify the problem. By comparing working and non-working scenarios I noted that the available receive buffer space notified in the tcp/ip packets is around 64K from XP, but much lower e.g. <=16K for NT. I suspect that the legacy DOS TCP/IP package I am using is not correctly interpreting buffer available space when >16K and is perhaps treating this as zero or negative, hence is not attempting to transmit.
I have tried using SetSockOpt() in my code to set SO_RCVBUF to <16K for the
socket I am using. However this does not seem to work. An initial call to
GetSockOpt() is not reporting the same as I am seeing with the sniffer, and
though I use SetSockOpt() to set a different value which a subsequent
GetSockOpt() demonstrates has been set, the buffer space shown by the sniffer
remains unchanged - hence the DOS TCP/IP is still not able to transmit.
The only way I have been able to get successful communications is to force
the XP network card to operate at 10Mb/s rather than the default auto which
results in 100Mb/s. This seems to have the side effect of reducing the
announced buffer space. This is not ideal, but it does at least work though.
This has now allowed me at least to progress, though this has revealed
another unexpected problem. I plan to use 2 ethernet cards, one for a small
isolated network for comms with the set of computers running my specialised
system, and one for wider external comms on our main network for file / print
servers etc. When I plug the 'external' network cable into the 2nd card
communications stops on the original card. It carries on working if I plug
the external cable into the local hub on the other card's network. Is there
some odd problem with having 2 ethernet cards? I've used 2 cards of different
types in the past to enable a PC to access ethernet and token ring
simultaneously OK.
r norman - 01 May 2007 15:14 GMT
>> >> >I am using VC++ 6.0 (with SP5 installed). When using WinXP this is with SP2
>> >> >installed.
[quoted text clipped - 101 lines]
>types in the past to enable a PC to access ethernet and token ring
>simultaneously OK.
I seem to recall problems with buffer size back a number of years ago
but I can't recall at all how I solved it. I think it was setting the
buffer size in the Windows system through the registry. See, for
example,
http://rdweb.cns.vt.edu/public/notes/win2k-tcpip.htm
Obviously a DOS system can't handle anything bigger than 64K and it is
indeed possible that a value greater than 32K is misinterpreted.
There is indeed something odd about using several network cards in one
system to get everything to work properly but I am afraid that I don't
understand network communications sufficiently (or at all, for that
matter!) to help you properly with either this problem or the buffer
size problem. My impression is that if the two network cards have
different network IP addresses not within the range of the subnet mask
of each other and you try to connect to an outside system within the
subnet range of either card, then your operating system knows which
card to use. If the IP address is totally different, then I have no
idea how the operating system figures out which one to use. I have
had problems switching connections between different network
connections. There are various caches maintained by the operating
system to indicate how connections can best be maintained and when I
have problems I have to run around looking up reference books to find
out just what the caches are, how to access them, and how to clear
them. After I do this, it all seems to work. But you need somebody
experienced and knowledgeable in what is happening. When they answer
you, I will be sure to carefully read the solution and this time print
it out and paste it on the wall above my work area so I can find it
next time I need it!
r norman - 01 May 2007 15:26 GMT
Perhaps a better place to find out about how to solve the problems
described in TCP/IP communication between systems (which I have
snipped out) would be on microsoft.public.win32.programmer.networks.
Ask there, including the information on buffer size and multiple
hosted systems.
Ben Voigt - 03 May 2007 15:00 GMT
>> I obtained a sniffer and have used it to identify the problem. By
>> comparing working and non-working scenarios I noted that the available
[quoted text clipped - 18 lines]
> announced buffer space. This is not ideal, but it does at least work
> though.
I believe that advertising an MSS (maximum segment size) or recvwnd (receive
window) that large requires an extension in the IP header.