public void updateHosts() { Int64 hosts_count = IpCalculator.GetHostsPerSubnet(mask_octet); if (hosts_count == -1) { label6.Text = "Error mask input"; } else { label6.Text = Convert.ToString(hosts_count); } }
public void updateNetworkID() { int netInc = IpCalculator.GetIncrement(this.mask_octet, this.ip_octet); int[] netid = IpCalculator.GetNetID(this.ip_octet, this.mask_octet); int[] broadcastid = IpCalculator.GetNetIDRange(netid, netInc, this.mask_octet); int[] netid_start = new int[netid.Length]; netid.CopyTo(netid_start, 0); netid_start[3] += 1; int[] netid_range = new int[broadcastid.Length]; broadcastid.CopyTo(netid_range, 0); netid_range[3] -= 1; label8.Text = String.Join(".", netid_start) + " - " + String.Join(".", netid_range); label10.Text = String.Join(".", broadcastid); label11.Text = String.Join(".", netid); }
public void updateSubnets() { int sub_count = IpCalculator.GetSubnets(this.mask_octet, this.ip_class); label7.Text = Convert.ToString(sub_count); }
public void updateClass() { this.ip_class = IpCalculator.CalcClass(this.ip_octet); label5.Text = IpCalculator.GetClass(ref this.ip_class); }