X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=net.c;fp=net.c;h=422794eacd0ceaf085884d707a9a991f0b876399;hb=a063cda5cff1e3ec56dabddd8ddcd42060a57fd4;hp=0000000000000000000000000000000000000000;hpb=1416438da8af731b20b15a20e41fd45c9fdfe632;p=mtetherd diff --git a/net.c b/net.c new file mode 100644 index 0000000..422794e --- /dev/null +++ b/net.c @@ -0,0 +1,51 @@ +/* + mtetherd + (c) 2010 Gregor Riepl + + 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 . +*/ + +#include +#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); + + +} +