示例#1
0
 public static uint GetVirtualAdapterHashCode(MacAddress MAC, IpV4Address IP, ushort VLAN)
 {
     return(Hash(UtilityLib.ByteArrayJoin(UtilityLib.ByteArrayJoin(MAC.ToBytes(), IP.ToBytes()), BitConverter.GetBytes(VLAN))));
 }
示例#2
0
 public static uint GetTcpSessionHashCode(IpV4Address LocalIP, ushort LocalPort, IpV4Address RemoteIP, ushort RemotePort)
 {
     byte[] LocalAdress  = UtilityLib.ByteArrayJoin(LocalIP.ToBytes(), BitConverter.GetBytes(LocalPort));
     byte[] RemoteAdress = UtilityLib.ByteArrayJoin(RemoteIP.ToBytes(), BitConverter.GetBytes(RemotePort));
     return(Hash(UtilityLib.ByteArrayJoin(LocalAdress, RemoteAdress)));
 }
示例#3
0
 public static uint GetVirtualAdapterHashCode(string MAC, string IP, ushort VLAN)
 {
     return(Hash(UtilityLib.ByteArrayJoin(UtilityLib.ByteArrayJoin(new MacAddress(MAC).ToBytes(), new IpV4Address(IP).ToBytes()), BitConverter.GetBytes(VLAN))));
 }