summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xa.outbin0 -> 22208 bytes
-rw-r--r--dhcp_probe.c250
-rw-r--r--dhcp_probe.cflags1
-rw-r--r--dhcp_probe.config2
-rw-r--r--dhcp_probe.creator1
-rw-r--r--dhcp_probe.creator.user227
-rw-r--r--dhcp_probe.cxxflags1
-rw-r--r--dhcp_probe.files1
-rw-r--r--dhcp_probe.includes0
9 files changed, 483 insertions, 0 deletions
diff --git a/a.out b/a.out
new file mode 100755
index 0000000..04bc884
--- /dev/null
+++ b/a.out
Binary files differdiff --git a/dhcp_probe.c b/dhcp_probe.c
new file mode 100644
index 0000000..03bde74
--- /dev/null
+++ b/dhcp_probe.c
@@ -0,0 +1,250 @@
+#include<stdio.h>
+#include<ctype.h>
+#include<stdlib.h>
+#include<string.h>
+#include<unistd.h>
+#include<signal.h>
+#include<sys/wait.h>
+#include<sys/types.h>
+#include<sys/socket.h>
+#include<netinet/in.h>
+#include<arpa/inet.h>
+#include<errno.h>
+#include<sys/file.h>
+#include<sys/msg.h>
+#include<sys/ipc.h>
+#include<time.h>
+#include <sys/ioctl.h>
+#include <linux/if.h>
+#include <getopt.h>
+
+//TODO: Name DHCPPROBE'
+
+#define BROADCAST_ADDRESS "255.255.255.255"
+
+#define MAX_DHCP_CHADDR_LENGTH 16
+#define MAX_DHCP_SNAME_LENGTH 64
+#define MAX_DHCP_FILE_LENGTH 128
+#define DHCP_MAGIC_LENGTH 4
+#define MAX_DHCP_OPTIONS_LENGTH 312 - DHCP_MAGIC_LENGTH
+
+typedef struct dhcp_packet
+{
+    uint8_t op;
+    uint8_t htype;
+    uint8_t hlen;
+    uint8_t hops;
+    uint32_t xid;
+    uint16_t secs;
+    uint16_t flags;
+    uint32_t ciaddr;
+    uint32_t yiaddr;
+    uint32_t siaddr;
+    uint32_t giaddr;
+    uint8_t chaddr[MAX_DHCP_CHADDR_LENGTH];
+    uint8_t sname[MAX_DHCP_SNAME_LENGTH];
+    uint8_t file[MAX_DHCP_FILE_LENGTH];
+    uint8_t magic[DHCP_MAGIC_LENGTH];
+    uint8_t opt[MAX_DHCP_OPTIONS_LENGTH];
+} __attribute__((__packed__)) dhcp_packet_t;
+
+static int fill_mac_address(uint8_t* base_addr, const char* interface_name)
+{
+    int fd;
+    struct ifreq ifr;
+
+    if ((fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP)) < 0)
+        exit(1);
+
+    strcpy(ifr.ifr_name, interface_name);
+
+    if(ioctl(fd, SIOCGIFHWADDR, &ifr) < 0)
+        exit(1);
+
+    close(fd);
+
+    memcpy(base_addr, ifr.ifr_addr.sa_data, 6);
+
+    return 0;
+}
+
+static int construct_dhcp_discover(dhcp_packet_t* packet, const char* iface_name)
+{
+    srand(time(NULL));
+
+    packet->op = 1; //request
+    packet->htype = 6; //wifi
+    packet->hlen = 6; //default
+    packet->hops = 0;
+    packet->xid = htonl(rand()); //random
+    packet->secs = htons(0);
+    packet->flags = htons(0x8000); //dont know my own ip, so send back by broadcast
+    packet->ciaddr = 0; //my ip address
+    packet->yiaddr = 0; //my future ip address
+    packet->siaddr = 0; //server address
+    packet->giaddr = 0; //gateway address
+
+    if(fill_mac_address(packet->chaddr, iface_name) < 0)
+        exit(1);
+
+    packet->magic[0]=0x63;
+    packet->magic[1]=0x82;
+    packet->magic[2]=0x53;
+    packet->magic[3]=0x63;
+
+    packet->opt[0]=53;
+    packet->opt[1]=1;
+    packet->opt[2]=1;
+
+    packet->opt[MAX_DHCP_OPTIONS_LENGTH - 1] = 0xFF;
+
+    return 0;
+}
+
+static int handle_dhcp_option(uint8_t option_type, const uint8_t* option_start, uint32_t option_length)
+{
+    //printf("Option type: %d (length: %d)\n", option_type, option_length);
+
+    // http://networksorcery.com/enp/protocol/bootp/options.htm
+    switch(option_type)
+    {
+        case 1: //mask
+        {
+            printf("Mask: %u.%u.%u.%u\n", option_start[0], option_start[1], option_start[2], option_start[3]);
+            break;
+        }
+        case 6: //dns
+        {
+            printf("DNS Server: %u.%u.%u.%u\n", option_start[0], option_start[1], option_start[2], option_start[3]);
+            break;
+        }
+        case 15: //domain name
+        {
+            char domain_name[option_length + 1];
+            strncpy(domain_name, (const char*)option_start, option_length);
+            domain_name[option_length] = '\0';
+            printf("Domain name: %s\n", domain_name);
+            break;
+        }
+        case 54: //router
+        {
+            printf("DHCP server ip: %u.%u.%u.%u\n", option_start[0], option_start[1], option_start[2], option_start[3]);
+            break;
+        }
+        default: //undefined
+            return 0; //-1
+    }
+
+    return 0;
+}
+
+static void print_dhcp_offer_info(const dhcp_packet_t* dhcp_offer)
+{
+    //uint32_t ip = ntohl(dhcp_offer->yiaddr);
+    //printf("Got IP %u.%u.%u.%u\n", ip >> 24, ((ip << 8) >> 24), (ip << 16) >> 24, (ip << 24) >> 24);
+
+    size_t i = 0;
+    while(i < MAX_DHCP_OPTIONS_LENGTH && dhcp_offer->opt[i] != 0)
+    {
+        uint8_t option = dhcp_offer->opt[i++];
+        uint32_t length = dhcp_offer->opt[i++];
+
+        if(handle_dhcp_option(option, &dhcp_offer->opt[i], length) < 0)
+            exit(1);
+
+        i += dhcp_offer->opt[length];
+    }
+}
+
+int main(int argc, char** argv)
+{
+    const char* iface_name = NULL;
+
+    char c;
+    while((c = getopt(argc, argv, "i:")) > 0)
+    {
+        switch(c)
+        {
+            case 'i':
+                iface_name = optarg;
+                break;
+            default:
+            usage:
+                printf("Usage: ./dhcpprobe -i %%INTERFACE\n");
+                exit(1);
+        }
+    }
+
+    if(iface_name == NULL)
+        goto usage;
+
+    int sock_fd;
+
+    printf("Creating socket...\n");
+    if((sock_fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
+        exit(1);
+    else
+        printf("Succesfully created socket.\n");
+
+    printf("Setting socket options...\n");
+    int broadcast_enabled = 1;
+    if(setsockopt(sock_fd, SOL_SOCKET, SO_BROADCAST, &broadcast_enabled, sizeof(int)) < 0)
+        exit(1);
+    else
+        printf("Succesfully set socket options.\n");
+
+    printf("Binding... ");
+    struct sockaddr_in server_send_addr = {0};
+    server_send_addr.sin_family = AF_INET;
+    server_send_addr.sin_addr.s_addr = inet_addr(BROADCAST_ADDRESS);
+    server_send_addr.sin_port = htons(67);
+    if(bind(sock_fd, (struct sockaddr*)&server_send_addr, sizeof(struct sockaddr_in)) < 0)
+         exit(1);
+    else
+        printf("Succesfully binded.\n");
+
+    printf("Sending dhcpdiscover...\n");
+    dhcp_packet_t dhcp_discover = {0};
+    construct_dhcp_discover(&dhcp_discover, iface_name);
+
+    if(sendto(sock_fd, &dhcp_discover, sizeof(dhcp_packet_t), 0, (struct sockaddr*)&server_send_addr, sizeof(struct sockaddr_in)) == -1)
+        exit(1);
+    else
+        printf("Succesfully sent dhcpdiscover.\n");
+
+    close(sock_fd);
+
+    if((sock_fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
+            exit(1);
+    else
+        printf("Opened socket to recieve response.\n");
+
+    if(setsockopt(sock_fd, SOL_SOCKET, SO_BROADCAST, &broadcast_enabled, sizeof(int)) < 0)
+        exit(1);
+    else
+        printf("Succesfully set socket options.\n");
+
+    struct sockaddr_in server_recv_addr = {0};
+    server_recv_addr.sin_family = AF_INET;
+    server_recv_addr.sin_port = htons(68);
+    server_recv_addr.sin_addr.s_addr = INADDR_ANY;
+
+    if(bind(sock_fd, (struct sockaddr*)&server_recv_addr, sizeof(struct sockaddr_in)) < 0)
+         exit(1);
+    else
+        printf("Succesfully binded.\n");
+
+    dhcp_packet_t dhcp_recv = {0};
+    recieve:
+    if(recvfrom(sock_fd, &dhcp_recv, sizeof(dhcp_packet_t), 0, NULL, 0) < 0)
+        exit(1);
+    else if(dhcp_discover.xid != dhcp_recv.xid)
+    {
+            printf("Recieved invalid dhcp offer.\n");
+            goto recieve;
+    }
+    else
+        printf("Succesfully recieved dhcp offer.\n");
+
+    print_dhcp_offer_info(&dhcp_recv);
+}
diff --git a/dhcp_probe.cflags b/dhcp_probe.cflags
new file mode 100644
index 0000000..68d5165
--- /dev/null
+++ b/dhcp_probe.cflags
@@ -0,0 +1 @@
+-std=c17
\ No newline at end of file
diff --git a/dhcp_probe.config b/dhcp_probe.config
new file mode 100644
index 0000000..e0284f4
--- /dev/null
+++ b/dhcp_probe.config
@@ -0,0 +1,2 @@
+// Add predefined macros for your project here. For example:
+// #define THE_ANSWER 42
diff --git a/dhcp_probe.creator b/dhcp_probe.creator
new file mode 100644
index 0000000..e94cbbd
--- /dev/null
+++ b/dhcp_probe.creator
@@ -0,0 +1 @@
+[General]
diff --git a/dhcp_probe.creator.user b/dhcp_probe.creator.user
new file mode 100644
index 0000000..916aafa
--- /dev/null
+++ b/dhcp_probe.creator.user
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorProject>
+<!-- Written by QtCreator 4.14.0, 2021-02-11T11:05:12. -->
+<qtcreator>
+ <data>
+  <variable>EnvironmentId</variable>
+  <value type="QByteArray">{e4a6d94c-61a3-42c8-a0d7-27ab927ca53a}</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.ActiveTarget</variable>
+  <value type="int">0</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.EditorSettings</variable>
+  <valuemap type="QVariantMap">
+   <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
+   <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
+   <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
+   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
+    <value type="QString" key="language">Cpp</value>
+    <valuemap type="QVariantMap" key="value">
+     <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
+    </valuemap>
+   </valuemap>
+   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
+    <value type="QString" key="language">QmlJS</value>
+    <valuemap type="QVariantMap" key="value">
+     <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
+    </valuemap>
+   </valuemap>
+   <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
+   <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
+   <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
+   <value type="int" key="EditorConfiguration.IndentSize">4</value>
+   <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
+   <value type="int" key="EditorConfiguration.MarginColumn">80</value>
+   <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
+   <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
+   <value type="int" key="EditorConfiguration.PaddingMode">1</value>
+   <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
+   <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
+   <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
+   <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
+   <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
+   <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
+   <value type="int" key="EditorConfiguration.TabSize">8</value>
+   <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
+   <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
+   <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
+   <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
+   <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
+   <value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
+   <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
+   <value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.PluginSettings</variable>
+  <valuemap type="QVariantMap">
+   <valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
+    <value type="bool" key="AutoTest.Framework.Boost">true</value>
+    <value type="bool" key="AutoTest.Framework.Catch">true</value>
+    <value type="bool" key="AutoTest.Framework.GTest">true</value>
+    <value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
+    <value type="bool" key="AutoTest.Framework.QtTest">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
+   <value type="int" key="AutoTest.RunAfterBuild">0</value>
+   <value type="bool" key="AutoTest.UseGlobal">true</value>
+   <valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
+   <value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
+   <value type="QString" key="ClangCodeModel.WarningConfigId">Builtin.Questionable</value>
+   <valuemap type="QVariantMap" key="ClangTools">
+    <value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
+    <value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
+    <value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
+    <value type="int" key="ClangTools.ParallelJobs">4</value>
+    <valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
+    <valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
+    <valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
+    <value type="bool" key="ClangTools.UseGlobalSettings">true</value>
+   </valuemap>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.0</variable>
+  <valuemap type="QVariantMap">
+   <value type="QString" key="DeviceType">Desktop</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{940da921-a368-46d8-94a2-042c01365756}</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/baitinq/dhcp_probe</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">GenericProjectManager.GenericMakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">GenericProjectManager.GenericMakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Default</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">GenericProjectManager.GenericBuildConfiguration</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
+    <value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
+    <value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
+    <valuelist type="QVariantList" key="Analyzer.Perf.Events">
+     <value type="QString">cpu-cycles</value>
+    </valuelist>
+    <valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
+    <value type="int" key="Analyzer.Perf.Frequency">250</value>
+    <valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
+     <value type="QString">-e</value>
+     <value type="QString">cpu-cycles</value>
+     <value type="QString">--call-graph</value>
+     <value type="QString">dwarf,4096</value>
+     <value type="QString">-F</value>
+     <value type="QString">250</value>
+    </valuelist>
+    <value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
+    <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
+    <value type="int" key="Analyzer.Perf.StackSize">4096</value>
+    <value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
+    <value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
+    <value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
+    <value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
+    <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
+    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
+    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
+    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
+    <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
+    <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
+    <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
+     <value type="int">0</value>
+     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <valuelist type="QVariantList" key="CustomOutputParsers"/>
+    <value type="int" key="PE.EnvironmentAspect.Base">2</value>
+    <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
+    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.TargetCount</variable>
+  <value type="int">1</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+  <value type="int">22</value>
+ </data>
+ <data>
+  <variable>Version</variable>
+  <value type="int">22</value>
+ </data>
+</qtcreator>
diff --git a/dhcp_probe.cxxflags b/dhcp_probe.cxxflags
new file mode 100644
index 0000000..6435dfc
--- /dev/null
+++ b/dhcp_probe.cxxflags
@@ -0,0 +1 @@
+-std=c++17
\ No newline at end of file
diff --git a/dhcp_probe.files b/dhcp_probe.files
new file mode 100644
index 0000000..ce24291
--- /dev/null
+++ b/dhcp_probe.files
@@ -0,0 +1 @@
+dhcp_probe.c
diff --git a/dhcp_probe.includes b/dhcp_probe.includes
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dhcp_probe.includes