From 15ad172a847fa667c57a4594ef4158405db9a984 Mon Sep 17 00:00:00 2001 From: Angelo Mantellini Date: Tue, 31 Mar 2020 17:50:43 +0200 Subject: [HICN-554] hicn-light refactoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I36f2d393741d4502ce14d3791158e43e3e9cd4cf Signed-off-by: Jordan Augé --- ctrl/facemgr/src/api.c | 6 +++--- ctrl/facemgr/src/cfg.c | 2 +- ctrl/facemgr/src/facelet.c | 14 +++++++------- .../src/interfaces/android_utility/android_utility.c | 2 +- ctrl/facemgr/src/interfaces/bonjour/bonjour.h | 2 +- .../src/interfaces/network_framework/network_framework.c | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) (limited to 'ctrl/facemgr/src') diff --git a/ctrl/facemgr/src/api.c b/ctrl/facemgr/src/api.c index f934883de..5d48e993f 100644 --- a/ctrl/facemgr/src/api.c +++ b/ctrl/facemgr/src/api.c @@ -63,7 +63,7 @@ #include "interfaces/android_utility/android_utility.h" #endif /* WITH_ANDROID_UTILITY */ -#include +#include #include #include "common.h" #include "facelet_array.h" @@ -655,7 +655,7 @@ facemgr_facelet_satisfy_rules(facemgr_t * facemgr, facelet_t * facelet) /* Default ignore list */ if ((netdevice_type == NETDEVICE_TYPE_LOOPBACK) || (netdevice_type == NETDEVICE_TYPE_UNDEFINED)) { DEBUG("Ignored interface '%s/%s'...", netdevice.name, - netdevice_type_str[netdevice_type]); + netdevice_type_str(netdevice_type)); return -3; } @@ -666,7 +666,7 @@ facemgr_facelet_satisfy_rules(facemgr_t * facemgr, facelet_t * facelet) return -1; if (ignore) { DEBUG("Ignored interface '%s/%s'...", netdevice.name, - netdevice_type_str[netdevice_type]); + netdevice_type_str(netdevice_type)); return -3; } diff --git a/ctrl/facemgr/src/cfg.c b/ctrl/facemgr/src/cfg.c index df73acd1b..872769d23 100644 --- a/ctrl/facemgr/src/cfg.c +++ b/ctrl/facemgr/src/cfg.c @@ -182,7 +182,7 @@ void facemgr_cfg_rule_dump(facemgr_cfg_rule_t * rule) DEBUG(" "); DEBUG(" ", rule->match.interface_name, - netdevice_type_str[rule->match.interface_type]); + netdevice_type_str(rule->match.interface_type)); DEBUG(" "); if (rule->override.is_face_type) { DEBUG(" %d", rule->override.face_type); diff --git a/ctrl/facemgr/src/facelet.c b/ctrl/facemgr/src/facelet.c index 0cf44d4dc..1958749ae 100644 --- a/ctrl/facemgr/src/facelet.c +++ b/ctrl/facemgr/src/facelet.c @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include @@ -1072,7 +1072,7 @@ facelet_snprintf(char * s, size_t size, const facelet_t * facelet) /* Netdevice type */ if (facelet_has_netdevice_type(facelet)) { rc = snprintf(cur, s + size - cur, " type=%s", - netdevice_type_str[facelet->netdevice_type]); + netdevice_type_str(facelet->netdevice_type)); if (rc < 0) return rc; cur += rc; @@ -1141,7 +1141,7 @@ facelet_snprintf(char * s, size_t size, const facelet_t * facelet) /* Admin state */ if (facelet_has_admin_state(facelet)) { rc = snprintf(cur, s + size - cur, " admin_state=%s", - face_state_str[facelet->admin_state]); + face_state_str(facelet->admin_state)); if (rc < 0) return rc; cur += rc; @@ -1152,7 +1152,7 @@ facelet_snprintf(char * s, size_t size, const facelet_t * facelet) /* State */ if (facelet_has_state(facelet)) { rc = snprintf(cur, s + size - cur, " state=%s", - face_state_str[facelet->state]); + face_state_str(facelet->state)); if (rc < 0) return rc; cur += rc; @@ -1295,7 +1295,7 @@ int facelet_snprintf_json(char * s, size_t size, const facelet_t * facelet, int if (facelet_has_netdevice_type(facelet)) { rc = snprintf(cur, s + size - cur, "%*s%s: \"%s\",\n", 4 * (indent+1), "", "\"netdevice_type\"", - netdevice_type_str[facelet->netdevice_type]); + netdevice_type_str(facelet->netdevice_type)); if (rc < 0) return rc; cur += rc; @@ -1383,7 +1383,7 @@ int facelet_snprintf_json(char * s, size_t size, const facelet_t * facelet, int if (facelet_has_admin_state(facelet)) { rc = snprintf(cur, s + size - cur, "%*s%s: \"%s\",\n", 4 * (indent+1), "", "\"admin_state\"", - face_state_str[facelet->admin_state]); + face_state_str(facelet->admin_state)); if (rc < 0) return rc; cur += rc; @@ -1395,7 +1395,7 @@ int facelet_snprintf_json(char * s, size_t size, const facelet_t * facelet, int if (facelet_has_state(facelet)) { rc = snprintf(cur, s + size - cur, "%*s%s: \"%s\",\n", 4 * (indent+1), "", "\"state\"", - face_state_str[facelet->state]); + face_state_str(facelet->state)); if (rc < 0) return rc; cur += rc; diff --git a/ctrl/facemgr/src/interfaces/android_utility/android_utility.c b/ctrl/facemgr/src/interfaces/android_utility/android_utility.c index d1fe324fb..55468baf8 100644 --- a/ctrl/facemgr/src/interfaces/android_utility/android_utility.c +++ b/ctrl/facemgr/src/interfaces/android_utility/android_utility.c @@ -20,8 +20,8 @@ #include +#include #include -#include #include #include "../../common.h" #include "../../interface.h" diff --git a/ctrl/facemgr/src/interfaces/bonjour/bonjour.h b/ctrl/facemgr/src/interfaces/bonjour/bonjour.h index fe053079d..ece6dce5d 100644 --- a/ctrl/facemgr/src/interfaces/bonjour/bonjour.h +++ b/ctrl/facemgr/src/interfaces/bonjour/bonjour.h @@ -25,7 +25,7 @@ * queries... */ -#include /* netdevice_t */ +#include /* netdevice_t */ typedef struct { netdevice_t netdevice; diff --git a/ctrl/facemgr/src/interfaces/network_framework/network_framework.c b/ctrl/facemgr/src/interfaces/network_framework/network_framework.c index 2c4bff513..c8963d83a 100644 --- a/ctrl/facemgr/src/interfaces/network_framework/network_framework.c +++ b/ctrl/facemgr/src/interfaces/network_framework/network_framework.c @@ -32,7 +32,7 @@ #include #include "../../common.h" -#include +#include #include "../../interface.h" #include "network_framework.h" -- cgit 1.2.3-korg