Split up functionality of plugin in separate modules
[mtetherd] / net.c
diff --git a/net.c b/net.c
new file mode 100644 (file)
index 0000000..422794e
--- /dev/null
+++ b/net.c
@@ -0,0 +1,51 @@
+/*
+  mtetherd
+  (c) 2010 Gregor Riepl <onitake@gmail.com>
+  
+  Tethering utility for Maemo
+  
+  This program is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+  
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <netinet/in.h>
+#include "net.h"
+
+#define MTETHERD_DEVICE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MTETHERD_DEVICE_TYPE_BAR, MTetherDDevicePrivate))
+
+struct _MTetherDDevicePrivate {
+       char *interface;
+       char *udi;
+       struct in_addr addr;
+       struct in_addr netmask;
+       struct in_addr dhcp_start;
+       struct in_addr dhcp_end;
+};
+
+static void mtetherd_device_bar_finalize(MTetherDDevice *self) {
+       self->priv = MTETHERD_DEVICE_GET_PRIVATE(self);
+}
+
+static void mtetherd_device_class_init(MTetherDDeviceClass *klass) {
+       GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
+
+       gobject_class->finalize = mtetherd_device_bar_finalize;
+       g_type_class_add_private(klass, sizeof(MTetherDDevicePrivate));
+}
+
+static void mtetherd_device_bar_init(MTetherDDevice *self) {
+       self->priv = MTETHERD_DEVICE_GET_PRIVATE(self);
+       
+       
+}
+