public static uint GetVirtualAdapterHashCode(MacAddress MAC, IpV4Address IP, ushort VLAN) { return(Hash(UtilityLib.ByteArrayJoin(UtilityLib.ByteArrayJoin(MAC.ToBytes(), IP.ToBytes()), BitConverter.GetBytes(VLAN)))); }
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))); }
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)))); }