422794eacd0ceaf085884d707a9a991f0b876399
[mtetherd] / net.c
1 /*
2   mtetherd
3   (c) 2010 Gregor Riepl <onitake@gmail.com>
4   
5   Tethering utility for Maemo
6   
7   This program is free software: you can redistribute it and/or modify
8   it under the terms of the GNU General Public License as published by
9   the Free Software Foundation, either version 3 of the License, or
10   (at your option) any later version.
11   
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16   
17   You should have received a copy of the GNU General Public License
18   along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <netinet/in.h>
22 #include "net.h"
23
24 #define MTETHERD_DEVICE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MTETHERD_DEVICE_TYPE_BAR, MTetherDDevicePrivate))
25
26 struct _MTetherDDevicePrivate {
27         char *interface;
28         char *udi;
29         struct in_addr addr;
30         struct in_addr netmask;
31         struct in_addr dhcp_start;
32         struct in_addr dhcp_end;
33 };
34
35 static void mtetherd_device_bar_finalize(MTetherDDevice *self) {
36         self->priv = MTETHERD_DEVICE_GET_PRIVATE(self);
37 }
38
39 static void mtetherd_device_class_init(MTetherDDeviceClass *klass) {
40         GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
41
42         gobject_class->finalize = mtetherd_device_bar_finalize;
43         g_type_class_add_private(klass, sizeof(MTetherDDevicePrivate));
44 }
45
46 static void mtetherd_device_bar_init(MTetherDDevice *self) {
47         self->priv = MTETHERD_DEVICE_GET_PRIVATE(self);
48         
49         
50 }
51