summaryrefslogtreecommitdiffstats
path: root/src/customdhcpcd/logwriter.h
diff options
context:
space:
mode:
authorNiklas Goby2011-11-23 11:56:19 +0100
committerNiklas Goby2011-11-23 11:56:19 +0100
commitc0b6b199a9878bc1e95907200501211c09c1e66c (patch)
tree0079c34c6536e5f1d0414aebde1793db60a78f35 /src/customdhcpcd/logwriter.h
parentdeleted the NetworkDiscovery and UnixDomainSocketServer folder (diff)
downloadfbgui-c0b6b199a9878bc1e95907200501211c09c1e66c.tar.gz
fbgui-c0b6b199a9878bc1e95907200501211c09c1e66c.tar.xz
fbgui-c0b6b199a9878bc1e95907200501211c09c1e66c.zip
created modules
Diffstat (limited to 'src/customdhcpcd/logwriter.h')
-rw-r--r--src/customdhcpcd/logwriter.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/customdhcpcd/logwriter.h b/src/customdhcpcd/logwriter.h
new file mode 100644
index 0000000..43f35fa
--- /dev/null
+++ b/src/customdhcpcd/logwriter.h
@@ -0,0 +1,40 @@
+/*
+ * logwriter.h
+ *
+ * Created on: Jul 7, 2011
+ * Author: niklas
+ */
+
+#ifndef LOGWRITER_H_
+#define LOGWRITER_H_
+
+#include <arpa/inet.h>
+#include "dhcp.h"
+#include "interface.h"
+#include "dhcpcd.h"
+
+#define LOG_MSG_SIZE 1024
+
+typedef struct _log_msg log_msg;
+struct _log_msg {
+ int status;
+ int substatus;
+ char device[IF_NAMESIZE];
+ char msg[LOG_MSG_SIZE];
+};
+
+/**
+ * new functions for communicating with Qt
+ */
+void setSocketName(const char * sn);
+void setInterfaceName(const char * in);
+int initQtLoggerSocket ();
+void closeQtLoggerSocket ();
+void sendToQt ();
+void logToQt(int status, int substatus, const char * msg);
+void logSendToQt(int type);
+void logLoggerToQt(int level, const char *fmt, ...);
+//void logToQt(char * status, char * substatus, char * msg);
+void logGatewayToFile(const interface_t *iface, const dhcp_t *dhcp);
+
+#endif /* LOGWRITER_H_ */