diff --git a/Networking.sln b/Networking.sln
new file mode 100644
index 0000000..3895bce
--- /dev/null
+++ b/Networking.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.1684
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Networking", "Networking\Networking.csproj", "{85D8795C-E9DC-4A59-B669-E2A8EEAC7A9E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {85D8795C-E9DC-4A59-B669-E2A8EEAC7A9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {85D8795C-E9DC-4A59-B669-E2A8EEAC7A9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {85D8795C-E9DC-4A59-B669-E2A8EEAC7A9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {85D8795C-E9DC-4A59-B669-E2A8EEAC7A9E}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {0C433798-2BCB-40EC-A25B-9013BBA832EE}
+ EndGlobalSection
+EndGlobal
diff --git a/Networking/IPTool.cs b/Networking/IPTool.cs
new file mode 100644
index 0000000..b684e87
--- /dev/null
+++ b/Networking/IPTool.cs
@@ -0,0 +1,382 @@
+using System;
+using System.Net;
+
+namespace NetCalc
+{
+ ///
+ /// Summary description for IPTool.
+ ///
+ public class IPTool
+ {
+ // first (0x00) only for fill - so array starts with bit 1
+ static byte[] bit = { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, (byte)0x80 };
+
+ protected string ip = null;
+ protected byte[] ipBytes = null;
+ //protected byte a,b,c,d;
+ protected int networkPrefix; // z.b. 24 for /24
+ protected bool firstSubNetBit = false;
+
+ public IPTool(string ip)
+ {
+ this.setIp(ip);
+ }
+
+ public static byte getBit(int bit)
+ {
+ byte r = 0;
+ if (bit >= 1 && bit <= 8)
+ r = IPTool.bit[bit];
+
+ return r;
+ }
+
+ public static byte setBit(byte b, int bit)
+ {
+ if (bit >= 1 && bit <= 8)
+ return (byte)(b | IPTool.bit[bit]);
+ else return 0;
+ }
+
+ public static bool isBitSet(byte b, int bit)
+ {
+ bool r = false;
+ if (bit >= 1 && bit <= 8)
+ r = ((b & IPTool.bit[bit]) != 0);
+
+ return r;
+ }
+
+
+ /*
+ * return true if domainName is an IP
+ */
+ static public bool isIP(String domainName)
+ {
+ //if (domainName.matches("[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}"))
+ if (domainName.Equals("[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}"))
+ return true;
+ else return false;
+ }
+
+ /*
+ * Converts (unsigned)byte to int
+ */
+ public static int byte2int(byte b)
+ {
+ int i = b;
+ if (b < 0) i = b & 0x7f + 128;
+
+ return i;
+ }
+
+ // return first byte of IP
+ public byte get1Byte()
+ {
+ return this.ipBytes[0];
+ }
+
+ // return second byte of IP
+ public byte get2Byte()
+ {
+ return this.ipBytes[1];
+ }
+
+ // return third byte of IP
+ public byte get3Byte()
+ {
+ return this.ipBytes[2];
+ }
+
+ // return fourth byte of IP
+ public byte get4Byte()
+ {
+ return this.ipBytes[3];
+ }
+
+ // return array with all bytes of IP
+ public byte[] getBytes()
+ {
+ //return InetAddress.getByName(this.ip).getAddress();
+ //return Dns.GetHostByName(this.ip).AddressList;
+ return IPAddress.Parse(this.ip).GetAddressBytes();
+ }
+
+ public String getIp()
+ {
+ return this.ip;
+ }
+
+ public void setIp(String ip)
+ {
+ this.ip = ip;
+ this.ipBytes = getBytes();
+ this.setPrefix2NetworkClassPrefix();
+ }
+
+ public void setPrefix2NetworkClassPrefix()
+ {
+ this.setNetworkPrefix(this.getNetworkClassPrefix());
+ }
+
+ public int getNetworkClassPrefix()
+ {
+ // set network-prefix with Class-Type
+ int netClass = getNetworkClass();
+ switch (netClass)
+ {
+ case 0: return 8; // Class A
+ case 1: return 16; // Class B
+ case 2: return 24; // Class C
+ //default: setNetworkPrefix(-1); // other Classes have no default Prefix
+ }
+ return -1;
+ }
+
+ /*
+ * return -1 if out of range (0-255) or other error
+ */
+ private int convertIPByte(String ipByte)
+ {
+ //int res = Integer.valueOf(ipByte).intValue();
+ int res = Int32.Parse(ipByte);
+ if (res < 0 || res > 255)
+ {
+ res = -1;
+ this.ip = null;
+ }
+ return res;
+ }
+
+ /**
+ * @return
+ */
+ public int getNetworkPrefix()
+ {
+ return this.networkPrefix;
+ }
+
+ /**
+ * @param prefix
+ */
+ public void setNetworkPrefix(int prefix)
+ {
+ this.networkPrefix = prefix;
+ }
+
+ public String getNetworkClassName()
+ {
+ switch (this.getNetworkClass())
+ {
+ case 0: return "Class A";
+ case 1: return "Class B";
+ case 2: return "Class C";
+ case 3: return "Class D/Multicast";
+ case 4: return "Class E/not used";
+ default: return "error";
+ }
+ }
+
+ /*
+ * 0=Class A
+ * 1=Class B
+ * 2=Class C
+ * 3=Class D
+ * 4=Class E
+ * -1=error
+ */
+ public int getNetworkClass()
+ {
+ // Test Class A: first bit=0
+ if (!IPTool.isBitSet(this.get1Byte(), 8)) return 0;
+ // Test Class B: first 2bit=10
+ else if (!IPTool.isBitSet(this.get1Byte(), 7)) return 1;
+ // Test Class C: first 3bit=110
+ else if (!IPTool.isBitSet(this.get1Byte(), 6)) return 2;
+ // Test Class D: first 4bit=1110
+ else if (!IPTool.isBitSet(this.get1Byte(), 5)) return 3;
+ // Test Class E: first 4bit=1111 ( = all other)
+ // else if (!IPTool.isBitSet(this.get1Byte(),8)) return 4;
+ else return 4;
+
+
+ /*
+ // Test Class A: first bit=0
+ if ((this.get1Byte() | (byte)0x7f) == (byte)0x7f) return 0;
+ // Test Class B: first 2bit=10
+ if ((this.get1Byte() | 0xbf) == 0xbf) return 1;
+ // Test Class C: first 3bit=110
+ if ((this.get1Byte() | 0xdf) == 0xdf) return 2;
+ // Test Class D: first 4bit=1110
+ if ((this.get1Byte() | 0xef) == 0xef) return 3;
+ // Test Class E: first 4bit=1111
+ if ((this.get1Byte() & 0xf0) == 0xf0) return 4;
+ return -1;
+ */
+
+ }
+
+ public String getNetworkMask()
+ {
+ return getNetworkMaskByPrefix(this.networkPrefix);
+ }
+
+ public String getNetworkMaskByPrefix(int prefix)
+ {
+ switch (prefix)
+ {
+ case 8: return "255.0.0.0";
+ case 9: return "255.128.0.0";
+ case 10: return "255.192.0.0";
+ case 11: return "255.224.0.0";
+ case 12: return "255.240.0.0";
+ case 13: return "255.248.0.0";
+ case 14: return "255.252.0.0";
+ case 15: return "255.254.0.0";
+ case 16: return "255.255.0.0";
+ case 17: return "255.255.128.0";
+ case 18: return "255.255.192.0";
+ case 19: return "255.255.224.0";
+ case 20: return "255.255.240.0";
+ case 21: return "255.255.248.0";
+ case 22: return "255.255.252.0";
+ case 23: return "255.255.254.0";
+ case 24: return "255.255.255.0";
+ case 25: return "255.255.255.128";
+ case 26: return "255.255.255.192";
+ case 27: return "255.255.255.224";
+ case 28: return "255.255.255.240";
+ case 29: return "255.255.255.248";
+ case 30: return "255.255.255.252";
+ default: return "";
+ }
+ }
+
+ public int getMaxNetworkHosts()
+ {
+ // 2^(32-networkprefix)
+ // -2 ... because .0 and .255
+ return ((int)Math.Pow(2, (32 - this.networkPrefix))) - 2;
+ }
+
+ public int getMaxSubNets()
+ {
+ // Bits from Subnet = prefix-class_prefix
+
+ int count = (int)Math.Pow(2, this.networkPrefix - this.getNetworkClassPrefix());
+
+ // -2 because 1 bit for routing
+ if (!this.isFirstSubNetBit() || this.getNetworkClassPrefix() == this.networkPrefix)
+ count -= 2;
+
+ if (count < 0) count = 0;
+ return count;
+ }
+
+ public long getNetworkLong()
+ {
+ long mask = (long)Math.Pow(2, this.networkPrefix) - 1;
+ mask = mask << (32 - this.networkPrefix);
+
+ return (mask & ip2Long());
+ }
+
+ public String getNetwork()
+ {
+ return long2String(getNetworkLong());
+ }
+
+ public long getBroadCastLong()
+ {
+ long netMask = (long)Math.Pow(2, this.networkPrefix) - 1;
+ netMask = netMask << (32 - this.networkPrefix);
+ long hostMask = (long)Math.Pow(2, 32 - this.networkPrefix) - 1;
+
+ return (netMask = (ip2Long() & netMask) | hostMask);
+ }
+
+ public String getBroadCast()
+ {
+ return long2String(getBroadCastLong());
+ }
+
+
+ public String[] getNetworkIPRange()
+ {
+ String[] result = new String[2];
+ //String from, to;
+ /**
+ * Start
+ * +1 because first = network
+ */
+ result[0] = long2String(getNetworkLong() + 1);
+ /**
+ * End
+ * -1 because last = broadcast
+ */
+ result[1] = long2String(getBroadCastLong() - 1);
+ return result;
+ }
+
+ public long ip2Long()
+ {
+ return ((long)(IPTool.byte2int(this.get1Byte()) * 256 +
+ IPTool.byte2int(this.get2Byte())) * 256 +
+ IPTool.byte2int(this.get3Byte())) * 256 +
+ IPTool.byte2int(this.get4Byte());
+ }
+
+ public String long2String(long ip)
+ {
+ long a = (long)(ip & 0xff000000) >> 24;
+ long b = (long)(ip & 0x00ff0000) >> 16;
+ long c = (long)(ip & 0x0000ff00) >> 8;
+ long d = (long)(ip & 0xff);
+
+ return a + "." + b + "." + c + "." + d;
+ }
+
+ public bool isFirstSubNetBit()
+ {
+ return firstSubNetBit;
+ }
+
+ public void setFirstSubNetBit(bool b)
+ {
+ firstSubNetBit = b;
+ }
+
+ public static IPTool getNextIP(String ip)
+ {
+ IPTool nextIp = new IPTool(ip);
+ nextIp.setIp(nextIp.long2String(nextIp.ip2Long() + (long)1));
+
+ return nextIp;
+
+ }
+
+ public IPTool getNextSubNet(long numberOfHosts)
+ {
+ IPTool ip = IPTool.getNextIP(this.getBroadCast());
+ ip.setIp(this.long2String(ip.ip2Long() + (long)1));
+ ip.setFirstSubNetBit(this.isFirstSubNetBit());
+
+ int lastPrefix = ip.getNetworkClassPrefix();
+
+ int prefix = 30;
+ do
+ {
+ if (prefix < ip.getNetworkClassPrefix())
+ return null; // no subnet found
+ ip.setNetworkPrefix(prefix);
+ prefix--;
+ // ignore subnetbit?
+ if (!ip.isFirstSubNetBit() && prefix == lastPrefix + 1) prefix--;
+
+ }
+ while (ip.getMaxNetworkHosts() < numberOfHosts);
+
+ return ip;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Networking/Networking.IPv4.xaml b/Networking/Networking.IPv4.xaml
new file mode 100644
index 0000000..e9a5f10
--- /dev/null
+++ b/Networking/Networking.IPv4.xaml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Networking/Networking.IPv4.xaml.cs b/Networking/Networking.IPv4.xaml.cs
new file mode 100644
index 0000000..ca0678e
--- /dev/null
+++ b/Networking/Networking.IPv4.xaml.cs
@@ -0,0 +1,350 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using NetCalc;
+using PTConverter.Plugin;
+
+namespace Networking
+{
+ ///
+ /// Interaktionslogik für Networking.xaml
+ ///
+ public partial class Networking_IPv4 : UserControl, IPlugin, IPage
+ {
+ #region Declarations
+ protected IPTool ip = null;
+ protected bool fill = false; // lock events wenn updating
+ protected bool isIP = false;
+
+ public string Author => "Kevin Krüger";
+
+ public string Company => "PeaceToke";
+
+ public string PluginName => "Networking";
+
+ public string Description => "Calculate networks very easy!";
+
+ public string Version => "1.0.0";
+
+ public string IconLink => "https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.clipartmax.com%2Fpng%2Fmiddle%2F276-2769230_networking-deep-neural-network-icon.png&f=1&nofb=1";
+
+ public IPage Page => this;
+ #endregion
+
+ public Networking_IPv4()
+ {
+ InitializeComponent();
+
+
+ tbNETClass.ItemsSource = new object[] {
+ "Class A: 0.0.0.0-127.255.255.255",
+ "Class B: 128.0.0.0-191.255.255.255",
+ "Class C: 192.0.0.0-223.255.255.255",
+ "Class D: 224.0.0.0-239.255.255.255",
+ "Class E: 240.0.0.0-254.255.255.255"};
+
+ tbNETClass.SelectedIndex = 0;
+ }
+ public string GetCategory() => "Networking";
+ public string GetUnderCategory() => "IPv4";
+ public UserControl GetPage() => new Networking_IPv4();
+
+ #region Methods Used
+ protected void newIP()
+ {
+ try
+ {
+ ip = new IPTool(tbIPAddress.Text);
+ fillIPCalc();
+ }
+ catch (Exception e)
+ {
+ MessageBox.Show(e.StackTrace);
+ }
+ //catch (UnknownHostException e)
+ //{
+ // main.getJp_Calc().getJtf_IP_Calc().setBackground(java.awt.Color.red);
+ //}
+ }
+
+ protected void fillIPCalc()
+ {
+ if (ip == null || ip.getIp() == null) return;
+ this.fill = true;
+
+ this.fillComboBox_Prefix();
+ this.fillComboBox_NetworkMask();
+
+ // Prefix
+ int prefix = ip.getNetworkPrefix();
+ if (prefix >= 8 && prefix <= 30)
+ {
+ if (prefix != ip.getNetworkClassPrefix() && !ip.isFirstSubNetBit()) prefix--;
+ prefix = prefix - ip.getNetworkClassPrefix();
+ }
+ else prefix = -1;
+ prefixComboBox.SelectedIndex = prefix;
+ // NetMask
+ netMaskComboBox.SelectedIndex = prefix;
+
+ // folgendes nur wenn Netzwerkmaske vorhanden
+ // nicht der Fall bei Class-D oder E
+ if (prefix != -1)
+ {
+ // max Net Hosts
+ maxCountHosts.Text = ip.getMaxNetworkHosts() + "";
+ // Net Class
+ calcNetwork.Text = ip.getNetworkClassName();
+ // Broadcast
+ calcBroadcast.Text = ip.getBroadCast();
+ // Network
+ calcNetwork.Text = ip.getNetwork();
+ // Net-Class
+ tbNETClass.SelectedIndex = ip.getNetworkClass();
+ // IP-Range
+ string[] ipRange = ip.getNetworkIPRange();
+ calcIPRange.Text = ipRange[0] + " - " + ipRange[1];
+ // max Sub-Nets
+ clacMaxNetCount.Text = ip.getMaxSubNets() + "";
+ }
+ else // Anzeige löschen
+ {
+ // max Net Hosts
+ maxCountHosts.Text = "";
+ // Net Class
+ calcNetwork.Text = "";
+ // Broadcast
+ calcBroadcast.Text = "";
+ // Network
+ calcNetwork.Text = "";
+ // IP-Range
+ calcIPRange.Text = "";
+ // max Sub-Nets
+ clacMaxNetCount.Text = "";
+ }
+ // Description
+ string desc = "";
+ if (ip.get1Byte() >= (byte)64 && ip.getNetworkClass() == (byte)0) // 64.
+ desc = "reserved for future use";
+ if (ip.get1Byte() == (byte)127) // localhost
+ desc = "localhost and loopback-Device - your one computer";
+ if (ip.get1Byte() == (byte)10) // private 10.0.0.0
+ desc = "private net - for internal use only, would not be routed in internet";
+ if (ip.get1Byte() == (byte)192 && ip.get2Byte() == (byte)168) // private 192. - 168.
+ desc = "private net - for internal use only, would not be routed in internet";
+ if (ip.get1Byte() == (byte)172 && (ip.get2Byte() >= (byte)16 && ip.get2Byte() <= (byte)31)) //private 172.16 - 172.31
+ desc = "private net - for internal use only, would not be routed in internet";
+ if ((ip.get1Byte() == (byte)169) && (ip.get2Byte() == (byte)254)) // 169.254.
+ desc = "APIPA Automatic Private IP Addressing";
+ if (ip.get1Byte() == (byte)0) // 0.
+ desc = "0.0.0.0 = default route";
+ if (ip.getNetworkClass() == (byte)4) // Class-E
+ desc = "reserved for future use";
+ if (ip.getNetworkClass() == (byte)3) // Class-D
+ desc = "used for multicast";
+
+ noticeLabel.Content = "Info stuff: " + desc;
+ this.fill = false;
+ }
+
+ protected void fillComboBox_Prefix()
+ {
+ if (ip == null || ip.getIp() == null) return;
+
+ prefixComboBox.Items.Clear();
+
+ if (ip.getNetworkClassPrefix() == -1)
+ {
+ prefixComboBox.Items.Add("");
+ return;
+ }
+
+ int startPrefix = ip.getNetworkClassPrefix();
+ // first is Networkclass
+ prefixComboBox.Items.Add(startPrefix + "");
+ startPrefix++;
+ if (!ip.isFirstSubNetBit()) startPrefix++;
+
+ for (int i = startPrefix; i <= 30; i++)
+ prefixComboBox.Items.Add(i + "");
+ }
+ protected void fillComboBox_NetworkMask()
+ {
+ if (ip == null || ip.getIp() == null) return;
+
+ netMaskComboBox.Items.Clear();
+
+ if (ip.getNetworkClassPrefix() == -1)
+ {
+ netMaskComboBox.Items.Add("");
+ return;
+ }
+
+ int startPrefix = ip.getNetworkClassPrefix();
+ // first is Networkclass
+ netMaskComboBox.Items.Add(ip.getNetworkMaskByPrefix(startPrefix));
+ startPrefix++;
+ if (!ip.isFirstSubNetBit()) startPrefix++;
+
+ for (int i = startPrefix; i <= 30; i++)
+ netMaskComboBox.Items.Add(ip.getNetworkMaskByPrefix(i));
+ }
+ #endregion
+
+ #region Events
+ private void ipAddress_Leave(object sender, System.EventArgs e)
+ {
+ newIP();
+ }
+
+ private void ipAddress_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (e.Key == Key.Enter)
+ {
+ newIP();
+ }
+ }
+
+ private void prefixComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
+ {
+ if (ip == null || ip.getIp() == null || fill) return;
+ if (ip.getNetworkClassPrefix() == -1) return;
+
+ int prefix = Int32.Parse((string)prefixComboBox.SelectedItem);
+ ip.setNetworkPrefix(prefix);
+
+ fillIPCalc();
+ }
+
+ private void netMaskComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
+ {
+ if (ip == null || ip.getIp() == null || fill) return;
+ if (ip.getNetworkClassPrefix() == -1) return;
+
+ int select = netMaskComboBox.SelectedIndex;
+ int prefix = select + ip.getNetworkClassPrefix();
+ if (select != 0 && !ip.isFirstSubNetBit()) prefix++;
+ //int prefix = Integer.parseInt((String)main.getJcb_Calc_NetworkMask().getSelectedItem());
+ ip.setNetworkPrefix(prefix);
+
+ fillIPCalc();
+ }
+
+ private void netClassComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
+ {
+ if (fill) return;
+ switch (tbNETClass.SelectedIndex)
+ {
+ case 0:
+ tbIPAddress.Text = "1.0.0.1";
+ break;
+ case 1:
+ tbIPAddress.Text = "128.0.0.1";
+ break;
+ case 2:
+ tbIPAddress.Text = "192.0.0.1";
+ break;
+ case 3:
+ tbIPAddress.Text = "224.0.0.1";
+ break;
+ case 4:
+ tbIPAddress.Text = "240.0.0.1";
+ break;
+ }
+
+ newIP();
+ }
+
+ private void firstBitCheckBox_CheckedChanged(object sender, System.EventArgs e)
+ {
+ if (ip == null || ip.getIp() == null || fill) return;
+
+ ip.setFirstSubNetBit((bool)firstBitCheckBox.IsChecked);
+ fillIPCalc();
+ }
+
+ private void nextSubnetButt_Click(object sender, System.EventArgs e)
+ {
+ if (ip == null || ip.getIp() == null || fill) return;
+ ///nextNumOfHosts.BackColor = Color.White;
+
+ try
+ {
+ int hosts = Int32.Parse(nextNumOfHosts.Text);
+
+ IPTool newIp = ip.getNextSubNet(hosts);
+ if (newIp == null)
+ {
+ //ToManyHosts
+ noticeLabel.Content = "Info stuff: Number of hosts in this network-class not possible!";
+ return;
+ }
+ ip = newIp;
+ tbIPAddress.Text = ip.getIp();
+ }
+ catch (System.FormatException)
+ {
+ //nextNumOfHosts.BackColor = Color.Red;
+ return;
+ }
+ catch (Exception e1)
+ {
+ MessageBox.Show(e1.StackTrace);
+ return;
+ }
+
+ fillIPCalc();
+ }
+
+ private void calcButt_Click(object sender, System.EventArgs e)
+ {
+ newIP();
+ }
+
+ #endregion
+
+ private void btnNextSubnet_Click(object sender, RoutedEventArgs e)
+ {
+ if (ip == null || ip.getIp() == null || fill) return;
+
+
+ try
+ {
+ int hosts = Int32.Parse(nextNumOfHosts.Text);
+
+ IPTool newIp = ip.getNextSubNet(hosts);
+ if (newIp == null)
+ {
+ //ToManyHosts
+ noticeLabel.Content = "Info stuff: Number of hosts in this network-class not possible!";
+ return;
+ }
+ ip = newIp;
+ tbIPAddress.Text = ip.getIp();
+ }
+ catch (System.FormatException)
+ {
+ //nextNumOfHosts.BackColor = Color.Red;
+ return;
+ }
+ catch (Exception e1)
+ {
+ MessageBox.Show(e1.StackTrace);
+ return;
+ }
+
+ fillIPCalc();
+ }
+ }
+}
diff --git a/Networking/Networking.csproj b/Networking/Networking.csproj
new file mode 100644
index 0000000..15473ad
--- /dev/null
+++ b/Networking/Networking.csproj
@@ -0,0 +1,64 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {85D8795C-E9DC-4A59-B669-E2A8EEAC7A9E}
+ Library
+ Properties
+ Networking
+ Networking
+ v4.7.2
+ 512
+ true
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Networking.IPv4.xaml
+
+
+
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Networking/Properties/AssemblyInfo.cs b/Networking/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..5a603cb
--- /dev/null
+++ b/Networking/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Allgemeine Informationen über eine Assembly werden über die folgenden
+// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
+// die einer Assembly zugeordnet sind.
+[assembly: AssemblyTitle("Networking")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Networking")]
+[assembly: AssemblyCopyright("Copyright © 2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
+// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
+// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
+[assembly: ComVisible(false)]
+
+// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
+[assembly: Guid("85d8795c-e9dc-4a59-b669-e2a8eeac7a9e")]
+
+// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
+//
+// Hauptversion
+// Nebenversion
+// Buildnummer
+// Revision
+//
+// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
+// indem Sie "*" wie unten gezeigt eingeben:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]