File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
mcs/class/System/System.Net.NetworkInformation Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -622,6 +622,9 @@ public override NetBiosNodeType NodeType {
622
622
[ DllImport ( "iphlpapi.dll" ) ]
623
623
static extern int GetIpStatisticsEx ( out Win32_MIB_IPSTATS pStats , int dwFamily ) ;
624
624
625
+ [ DllImport ( "Ws2_32.dll" ) ]
626
+ static extern ushort ntohs ( ushort netshort ) ;
627
+
625
628
// Win32 structures
626
629
627
630
[ StructLayout ( LayoutKind . Explicit ) ]
@@ -682,10 +685,10 @@ public TcpConnectionInformation TcpInfo {
682
685
class Win32_MIB_UDPROW
683
686
{
684
687
public uint LocalAddr ;
685
- public int LocalPort ;
688
+ public uint LocalPort ;
686
689
687
690
public IPEndPoint LocalEndPoint {
688
- get { return new IPEndPoint ( LocalAddr , LocalPort ) ; }
691
+ get { return new IPEndPoint ( LocalAddr , ntohs ( ( ushort ) LocalPort ) ) ; }
689
692
}
690
693
}
691
694
You can’t perform that action at this time.
0 commit comments