From d0656e6ee69f695a568a686312fec5127392371c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 21 May 2009 00:07:05 -0700 Subject: [PATCH] Add skeleton for generic INET helpers --- include/Makefile.am | 2 +- include/inet.h | 33 +++++++++++++++++++++++++++++++++ src/Makefile.am | 2 +- src/connman.h | 2 ++ src/inet.c | 26 ++++++++++++++++++++++++++ 5 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 include/inet.h create mode 100644 src/inet.c diff --git a/include/Makefile.am b/include/Makefile.am index 86845ac..345ff04 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,7 +2,7 @@ includedir = @includedir@/connman include_HEADERS = types.h log.h plugin.h security.h notifier.h \ - storage.h device.h network.h + storage.h device.h network.h inet.h nodist_include_HEADERS = version.h diff --git a/include/inet.h b/include/inet.h new file mode 100644 index 0000000..d043317 --- /dev/null +++ b/include/inet.h @@ -0,0 +1,33 @@ +/* + * + * Connection Manager + * + * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef __CONNMAN_INET_H +#define __CONNMAN_INET_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __CONNMAN_INET_H */ diff --git a/src/Makefile.am b/src/Makefile.am index 82ad37f..17c2768 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,7 +11,7 @@ connmand_SOURCES = main.c connman.h log.c selftest.c error.c plugin.c \ element.c device.c network.c connection.c \ manager.c profile.c service.c agent.c \ security.c resolver.c ipconfig.c notifier.c \ - storage.c ipv4.c detect.c rtnl.c dbus.c + storage.c ipv4.c detect.c rtnl.c inet.c dbus.c if UDEV connmand_SOURCES += udev.c diff --git a/src/connman.h b/src/connman.h index b2522a1..7f85da2 100644 --- a/src/connman.h +++ b/src/connman.h @@ -89,6 +89,8 @@ int __connman_security_check_privilege(DBusMessage *message, const char *__connman_ipv4_method2string(enum connman_ipv4_method method); enum connman_ipv4_method __connman_ipv4_string2method(const char *method); +#include + #include #include diff --git a/src/inet.c b/src/inet.c new file mode 100644 index 0000000..97a6592 --- /dev/null +++ b/src/inet.c @@ -0,0 +1,26 @@ +/* + * + * Connection Manager + * + * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "connman.h" -- 1.7.9.5