ipconfig: Added helper function that returns the config type
authorJukka Rissanen <jukka.rissanen@nokia.com>
Thu, 10 Feb 2011 15:52:12 +0000 (17:52 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 11 Feb 2011 11:25:28 +0000 (12:25 +0100)
src/connman.h
src/ipconfig.c

index 992d5339a53a5d02789700b0aea899ae34b41b52..7f18ff4f93d042138618efb2ce87b539b967b493 100644 (file)
@@ -218,6 +218,8 @@ void __connman_ipconfig_delroute(int index, int family, unsigned char scope,
 
 void __connman_ipconfig_foreach(void (*function) (int index, void *user_data),
                                                        void *user_data);
+enum connman_ipconfig_type __connman_ipconfig_get_config_type(
+                                       struct connman_ipconfig *ipconfig);
 unsigned short __connman_ipconfig_get_type(int index);
 unsigned int __connman_ipconfig_get_flags(int index);
 const char *__connman_ipconfig_get_gateway(int index);
index bd664f33485aa98c8f990300cbecfd107c5965ae..4d9b30f7874f90b5802d499679d3632c8df8b819 100644 (file)
@@ -853,6 +853,12 @@ void __connman_ipconfig_foreach(void (*function) (int index, void *user_data),
        g_list_free(keys);
 }
 
+enum connman_ipconfig_type __connman_ipconfig_get_config_type(
+                                       struct connman_ipconfig *ipconfig)
+{
+       return ipconfig ? ipconfig->type : CONNMAN_IPCONFIG_TYPE_UNKNOWN;
+}
+
 unsigned short __connman_ipconfig_get_type(int index)
 {
        struct connman_ipdevice *ipdevice;