From edb87680564c8e67d51f20a2346d32bc56fee063 Mon Sep 17 00:00:00 2001 From: Marschall-dev Date: Sun, 6 Dec 2020 00:48:21 +0100 Subject: [PATCH] Version 2.0.2 Renamed class and method(s) with "v4". Dhcpv6 is comming soon. --- .../DhcpDotNet/DesignTimeBuild/.dtbcache.v2 | Bin 74250 -> 74250 bytes DhcpDotNet/.vs/DhcpDotNet/v16/.suo | Bin 125440 -> 125440 bytes DhcpDotNet/DhcpDotNet/DhcpDotNet.csproj | 2 +- .../{DhcpPacket.cs => Dhcpv4Packet.cs} | 17 ++++++------- .../obj/Debug/DhcpDotNet.2.0.1.nuspec | 24 ++++++++++++++++++ .../obj/DhcpDotNet.csproj.nuget.dgspec.json | 2 +- DhcpDotNet/DhcpDotNet/obj/project.assets.json | 2 +- 7 files changed, 35 insertions(+), 12 deletions(-) rename DhcpDotNet/DhcpDotNet/{DhcpPacket.cs => Dhcpv4Packet.cs} (96%) create mode 100644 DhcpDotNet/DhcpDotNet/obj/Debug/DhcpDotNet.2.0.1.nuspec diff --git a/DhcpDotNet/.vs/DhcpDotNet/DesignTimeBuild/.dtbcache.v2 b/DhcpDotNet/.vs/DhcpDotNet/DesignTimeBuild/.dtbcache.v2 index 0537790c9a1299bbc1b80b2df097a3478acf81d7..f5b96cd6664d2838de560a40f8a99b55e15a3e5c 100644 GIT binary patch delta 95 zcmeA=!qRnwWkP^Ml95TGnOU-VYO;x0qNP!ifl+FTiE)yVv6-c%QHr5)ifOW?k+E@F zl8K3>xrM1wvZZ;dxru?fQDSnUxuKcS#t9)a+4)^Ek_*aAHou(tL2C2uE&90tXvQBF delta 98 zcmeA=!qRnwWkP^Mib0y0nSrHwQi_qOnW`A@%-0`Jl=VL#{EqlzgdY*!CX6RcV4pfo%o*&+ouP~%?m=@=c)%WF1VS`* z&uXqv1Uy9zlF=K9&B`c!h_A(Ziis~Fl=}M0i2jVQgs_xQMIw@+n%=SM8ftGOIQeBE zw|c*2o(CTD)byE$NoUU(TEP@xiYSO@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JePByqeG)u-mTKOsv_a69!DzMFt9%stBzm6n#w_p9k__L3nmQdyNyTR z%0k-@!tDc5nAU$0rJg`c+ct_)r9T?C1uN0j6O_tu5{};qQS$90fD`p4IB;ICl+`-{ zE4~}8M87_vksA$;V4(M^+=wCmvFeW|H%kweFt)1X! zoE_8mrt-14`O?~es*m{JmLSv#O+q!sycfy_5u#68A%R)Cc#2k#Tv8WEfIIqDyN0b$ z3am8+c5uHMcDf7lnbZsJg|@@2trtva%64FDgCFxd1^1Y<7b3_KuSS#CZ^yCh*tveR zWd}3c8Td06^u_Zt%JjGg6tlbyW#TRY%d^vl`=N(2Er|G6PdP_FRpH~tWjOlvSeEl9 zJa5mk3`t)!;*AYq?8Fdcv%_==x|VzD&N3jYD{ C$?r=5 diff --git a/DhcpDotNet/DhcpDotNet/DhcpDotNet.csproj b/DhcpDotNet/DhcpDotNet/DhcpDotNet.csproj index 9479461..25a4490 100644 --- a/DhcpDotNet/DhcpDotNet/DhcpDotNet.csproj +++ b/DhcpDotNet/DhcpDotNet/DhcpDotNet.csproj @@ -8,7 +8,7 @@ Copyright 2020 MIT https://github.com/Marschall-dev/DhcpDotNet - 2.0.1 + 2.0.2 DHCP, DHCP Packet, DHCP Server, DHCP Client, Dynamic Host Configuration Protocol en logo.png diff --git a/DhcpDotNet/DhcpDotNet/DhcpPacket.cs b/DhcpDotNet/DhcpDotNet/Dhcpv4Packet.cs similarity index 96% rename from DhcpDotNet/DhcpDotNet/DhcpPacket.cs rename to DhcpDotNet/DhcpDotNet/Dhcpv4Packet.cs index 074dc4b..909949e 100644 --- a/DhcpDotNet/DhcpDotNet/DhcpPacket.cs +++ b/DhcpDotNet/DhcpDotNet/Dhcpv4Packet.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; @@ -9,7 +8,7 @@ namespace DhcpDotNet /// /// Creates an empty predefined DHCP packet in the form of a byte array. Please visit RFC 2131 for detaied information: https://tools.ietf.org/html/rfc2131 /// - public class DhcpPacket + public class Dhcpv4Packet { /// /// Message op code / message type. 1 = BOOTREQUEST, 2 = BOOTREPLY @@ -164,12 +163,12 @@ public bool parsePacket(byte[] pPayload) /// /// Create a DHCP option, as listed in RFC 2132[13] and IANA registry with optionId-Enum /// - public class DhcpOption + public class Dhcpv4Option { /// /// Define the DHCP options to be created by name /// - public dhcpOptionIds optionId { get; set; } = new dhcpOptionIds(); + public dhcpv4OptionIds optionId { get; set; } = new dhcpv4OptionIds(); /// /// Represents the optionId (enum) in bytes. This field is not required if you set optionId with enum. @@ -192,7 +191,7 @@ public class DhcpOption /// public byte[] buildDhcpOption() { - if (Enum.IsDefined(typeof(dhcpOptionIds), optionId)) + if (Enum.IsDefined(typeof(dhcpv4OptionIds), optionId)) { object selected = Convert.ChangeType(optionId, optionId.GetTypeCode()); optionIdBytes = Convert.ToByte(selected, null); @@ -202,9 +201,9 @@ public byte[] buildDhcpOption() return result.Concat(optionValue).ToArray(); } - public List parseDhcpOptions(byte[] pPayload) + public List parseDhcpOptions(byte[] pPayload) { - List dhcpOptionList = new List(); + List dhcpOptionList = new List(); using (MemoryStream memoryStream = new MemoryStream(pPayload)) { @@ -223,7 +222,7 @@ public List parseDhcpOptions(byte[] pPayload) dhcpOptionValueLength = binaryReader.ReadByte(); dhcpOptionValue = binaryReader.ReadBytes(Convert.ToInt32(dhcpOptionValueLength)); - DhcpOption dhcpOption = new DhcpOption + Dhcpv4Option dhcpOption = new Dhcpv4Option { optionIdBytes = dhcpOptionID, optionLength = dhcpOptionValueLength, @@ -245,7 +244,7 @@ public List parseDhcpOptions(byte[] pPayload) } } - public enum dhcpOptionIds : ushort + public enum dhcpv4OptionIds : ushort { // BOOTP Vendor Information Extensions Padding = 0, diff --git a/DhcpDotNet/DhcpDotNet/obj/Debug/DhcpDotNet.2.0.1.nuspec b/DhcpDotNet/DhcpDotNet/obj/Debug/DhcpDotNet.2.0.1.nuspec new file mode 100644 index 0000000..d6ddba7 --- /dev/null +++ b/DhcpDotNet/DhcpDotNet/obj/Debug/DhcpDotNet.2.0.1.nuspec @@ -0,0 +1,24 @@ + + + + DhcpDotNet + 2.0.1 + Marschall TM + false + MIT + https://licenses.nuget.org/MIT + logo.png + https://github.com/Marschall-dev/DhcpDotNet + Fully managed, cross platform (Windows, Mac, Linux) .NET library for creating DHCP packets + Copyright 2020 + DHCP, DHCP Packet, DHCP Server, DHCP Client, Dynamic Host Configuration Protocol + + + + + + + + + + \ No newline at end of file diff --git a/DhcpDotNet/DhcpDotNet/obj/DhcpDotNet.csproj.nuget.dgspec.json b/DhcpDotNet/DhcpDotNet/obj/DhcpDotNet.csproj.nuget.dgspec.json index f657df2..7e04465 100644 --- a/DhcpDotNet/DhcpDotNet/obj/DhcpDotNet.csproj.nuget.dgspec.json +++ b/DhcpDotNet/DhcpDotNet/obj/DhcpDotNet.csproj.nuget.dgspec.json @@ -5,7 +5,7 @@ }, "projects": { "G:\\Desktop\\DhcpDotNet\\DhcpDotNet\\DhcpDotNet\\DhcpDotNet.csproj": { - "version": "2.0.1", + "version": "2.0.2", "restore": { "projectUniqueName": "G:\\Desktop\\DhcpDotNet\\DhcpDotNet\\DhcpDotNet\\DhcpDotNet.csproj", "projectName": "DhcpDotNet", diff --git a/DhcpDotNet/DhcpDotNet/obj/project.assets.json b/DhcpDotNet/DhcpDotNet/obj/project.assets.json index 06f5acb..722bfcb 100644 --- a/DhcpDotNet/DhcpDotNet/obj/project.assets.json +++ b/DhcpDotNet/DhcpDotNet/obj/project.assets.json @@ -183,7 +183,7 @@ "C:\\Users\\mluck\\.nuget\\packages\\": {} }, "project": { - "version": "2.0.1", + "version": "2.0.2", "restore": { "projectUniqueName": "G:\\Desktop\\DhcpDotNet\\DhcpDotNet\\DhcpDotNet\\DhcpDotNet.csproj", "projectName": "DhcpDotNet",