New issue 39 by dan.liberatore: IPv6 support
http://code.google.com/p/cassia/issues/detail?id=39
ITerminalServicesSession.ClientIPAddress should be able to return an
IPAddress when the underlying WinAPI function returns an IPv6 address.
Given that the IN6_ADDR structure via
http://msdn.microsoft.com/en-us/library/ff554787%28v=VS.85%29.aspx is just
a 16-byte array, you can see that it's a simple modification. I believe
this code would be sufficient to support this scenario and it works in my
limited test case. (source: Impl\TerminalServicesSession.cs, function
GetClientIPAddress, where the TODO comment is for this issue)
if (addressFamily == AddressFamily.InterNetwork)
{
byte[] address = new byte[4];
Array.Copy(clientAddress.Address, 2, address, 0, 4);
return new IPAddress(address);
} else if(addressFamily == AddressFamily.InterNetworkV6) {
byte[] address = new byte[16];
Array.Copy(clientAddress.Address, 2, address, 0, 16);
return new IPAddress(address);
}
Comment #1 on issue 39 by danports: IPv6 support
http://code.google.com/p/cassia/issues/detail?id=39
Dan,
You're right that this would be a pretty simple modification -- the only
other place that would need to be changed would be
NativeMethodsHelper.QuerySessionInformationForEndPoint (admittedly not very
DRY). The only reason I hadn't done it is that I hadn't set up IPv6 on a
network yet for testing (see issue 17). But if it works for you, I'll apply
the patch.
Comment #2 on issue 39 by danpo...@gmail.com: IPv6 support
http://code.google.com/p/cassia/issues/detail?id=39
I committed a fix for this in r111. Can you download the latest build from
the build server
(http://teamcity.codebetter.com/viewLog.html?buildId=25024&tab=artifacts&buildTypeId=bt95
-- login as a guest) and verify that
ITerminalServicesSession.ClientIPAddress and
ITerminalServicesSession.RemoteEndPoint report the correct IPv6 results in
your environment? Thanks.
Issue 17 has been merged into this issue.