public static DHCP_CLIENT_INFO ConvertClientInfoToNative(DhcpClient client) { DHCP_CLIENT_INFO ClientInfo = new DHCP_CLIENT_INFO(); ClientInfo.ClientIpAddress = StringToUint(client.ClientIpAddress); ClientInfo.SubnetMask = StringToUint(client.SubnetMask); ClientInfo.ClientHardwareAddress = ConverToNativeMac(client.ClientHardwareAddress); ClientInfo.ClientName = client.ClientName; ClientInfo.ClientComment = client.ClientComment; ClientInfo.ClientLeaseExpires = ConvertDateTimeToNative(client); DHCP_HOST_INFO host = new DHCP_HOST_INFO(); host.HostName = client.OwnerHost.HostName; host.IpAddress = StringToUint(client.OwnerHost.IpAddress); host.NetBiosName = client.OwnerHost.NetBiosName; ClientInfo.OwnerHost = host; return(ClientInfo); }
public static DHCP_CLIENT_INFO ConvertClientInfoToNative(DhcpClient client) { DHCP_CLIENT_INFO ClientInfo = new DHCP_CLIENT_INFO(); ClientInfo.ClientIpAddress = StringToUint(client.ClientIpAddress); ClientInfo.SubnetMask = StringToUint(client.SubnetMask); ClientInfo.ClientHardwareAddress = ConverToNativeMac(client.ClientHardwareAddress); ClientInfo.ClientName = client.ClientName; ClientInfo.ClientComment = client.ClientComment; ClientInfo.ClientLeaseExpires = ConvertDateTimeToNative(client); DHCP_HOST_INFO host = new DHCP_HOST_INFO(); host.HostName = client.OwnerHost.HostName; host.IpAddress = StringToUint(client.OwnerHost.IpAddress); host.NetBiosName = client.OwnerHost.NetBiosName; ClientInfo.OwnerHost = host; return ClientInfo; }