[Olsr-dev] [PATCH v1 1/9] ifnet: remove unused function set_flag
Ferry Huberts
(spam-protected)
Wed Feb 10 14:35:40 CET 2016
From: Ferry Huberts <(spam-protected)>
Signed-off-by: Ferry Huberts <(spam-protected)>
---
src/ifnet.h | 2 --
src/unix/ifnet.c | 30 ------------------------------
2 files changed, 32 deletions(-)
diff --git a/src/ifnet.h b/src/ifnet.h
index 8209356..3bc1dd7 100644
--- a/src/ifnet.h
+++ b/src/ifnet.h
@@ -54,8 +54,6 @@
#include "olsr_cfg.h"
-int set_flag(char *, short);
-
void check_interface_updates(void *);
int chk_if_changed(struct olsr_if *);
diff --git a/src/unix/ifnet.c b/src/unix/ifnet.c
index ef1c582..c1055ec 100644
--- a/src/unix/ifnet.c
+++ b/src/unix/ifnet.c
@@ -82,36 +82,6 @@
static const uint8_t zero_v6[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
-int
-set_flag(char *ifname, short flag __attribute__ ((unused)))
-{
- struct ifreq ifr;
-
- strscpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
-
- /* Get flags */
- if (ioctl(olsr_cnf->ioctl_s, SIOCGIFFLAGS, &ifr) < 0) {
- fprintf(stderr, "ioctl (get interface flags)");
- return -1;
- }
-
- strscpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
-
- //printf("Setting flags for if \"%s\"\n", ifr.ifr_name);
-
- if (!(ifr.ifr_flags & IFF_UP)) {
- /* Add UP */
- ifr.ifr_flags |= (IFF_UP | IFF_RUNNING);
- /* Set flags + UP */
- if (ioctl(olsr_cnf->ioctl_s, SIOCSIFFLAGS, &ifr) < 0) {
- fprintf(stderr, "ERROR(%s): %s\n", ifr.ifr_name, strerror(errno));
- return -1;
- }
- }
- return 1;
-
-}
-
void
check_interface_updates(void *foo __attribute__ ((unused)))
{
--
2.5.0
More information about the Olsr-dev
mailing list