Merge "Using updated clatd's Dbus interface and Path values" into tizen
[platform/core/connectivity/net-config.git] / include / util.h
index 56a7a8b..18ad640 100755 (executable)
@@ -39,14 +39,6 @@ extern "C" {
 #define WIFI_DIRECT_FEATURE "http://tizen.org/feature/network.wifi.direct"
 #define WIFI_SOFTAP_FEATURE "http://tizen.org/feature/network.wifi.softap"
 
-/** Macros to handle rtattributes */
-#define RTA_ALIGNTO    4
-#define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) )
-#define RTA_LENGTH(len)        (RTA_ALIGN(sizeof(struct rtattr)) + (len))
-#define RTA_DATA(rta)   ((void*)(((char*)(rta)) + RTA_LENGTH(0)))
-#define NLMSG_TAIL(nmsg) \
-       ((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
-
 typedef enum {
        NETCONFIG_SUPPORTED_FEATURE_ETHERNET = 0,
        NETCONFIG_SUPPORTED_FEATURE_TETHERING,
@@ -83,8 +75,8 @@ int netconfig_execute_file(const char *file_path, char *const args[], char *cons
 int netconfig_execute_file_no_wait(const char *file_path,
                char *const args[]);
 int netconfig_execute_clatd(const char *file_path, char *const args[]);
-int netconfig_add_route_ipv6(gchar *interface, gchar *gateway);
-int netconfig_del_route_ipv6(gchar *interface, gchar *gateway);
+int netconfig_add_route_ipv6(gchar *ip_addr, gchar *interface, gchar *gateway, unsigned char prefix_len);
+int netconfig_del_route_ipv6(gchar *ip_addr, gchar *interface, gchar *gateway, unsigned char prefix_len);
 int netconfig_add_route_ipv4(gchar *ip_addr, gchar *subnet, gchar *interface, gint address_family);
 int netconfig_del_route_ipv4(gchar *ip_addr, gchar *subnet, gchar *interface, gint address_family);
 
@@ -104,6 +96,9 @@ int netconfig_vconf_get_int(const char * key, int *value);
 int netconfig_vconf_get_bool(const char * key, int *value);
 char* netconfig_get_env(const char *key);
 void netconfig_set_mac_address_from_file(void);
+char *netconfig_get_mac_address_from_file(const char *ifname);
+int netconfig_freq_to_channel(int freq);
+int netconfig_get_operating_class(int freq);
 void __netconfig_pop_wifi_connected_poppup(const char *ssid);
 
 void netconfig_get_telephony_network_type(int *svctype, int *pstype);
@@ -123,6 +118,8 @@ void netconfig_plugin_deinit();
 gboolean netconfig_get_headed_plugin_flag();
 gboolean netconfig_get_telephony_plugin_flag();
 
+void netconfig_convert_bytes_to_hexstr(const char* bin, int blen, gchar* hexstr);
+
 #ifdef __cplusplus
 }
 #endif