public static byte[] calcEmptySubnetMaskFields(TextBox shortField) { byte tmp; byte.TryParse(shortField.Text, out tmp); IPAddress address = IPNetwork.ToNetmask(tmp, System.Net.Sockets.AddressFamily.InterNetwork); return(address.GetAddressBytes()); }
public IPNetwork GetIPNetwork() { return(IPNetwork.Parse(Address, IPNetwork.ToNetmask((byte)Cidr))); }
/* * Funktion Berechnet die noch Fehlenden Felder der Subnetzmaske... * * VALIDATION VORHER ABGESCHLOSSEN!!! * InterNetwork = IpV4 (Laut Google :D) */ public static byte[] calcEmptySubnetMaskFields(int shortField) { IPAddress address = IPNetwork.ToNetmask((byte)shortField, System.Net.Sockets.AddressFamily.InterNetwork); return(address.GetAddressBytes()); }
public IPNetwork GetIPNetwork() { return(IPNetwork.Parse(Address, IPNetwork.ToNetmask((byte)Prefix, Address.AddressFamily))); }