projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
netifd: Link layer state support on device level
[project/netifd.git]
/
macvlan.c
diff --git
a/macvlan.c
b/macvlan.c
index
bf81340
..
9c03cd8
100644
(file)
--- a/
macvlan.c
+++ b/
macvlan.c
@@
-17,7
+17,11
@@
#include <stdio.h>
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <assert.h>
#include <errno.h>
+#include <net/ethernet.h>
+
+#ifdef linux
#include <netinet/ether.h>
#include <netinet/ether.h>
+#endif
#include "netifd.h"
#include "device.h"
#include "netifd.h"
#include "device.h"
@@
-65,6
+69,12
@@
macvlan_base_cb(struct device_user *dev, enum device_event ev)
case DEV_EVENT_REMOVE:
device_set_present(&mvdev->dev, false);
break;
case DEV_EVENT_REMOVE:
device_set_present(&mvdev->dev, false);
break;
+ case DEV_EVENT_LINK_UP:
+ device_set_link(&mvdev->dev, true);
+ break;
+ case DEV_EVENT_LINK_DOWN:
+ device_set_link(&mvdev->dev, false);
+ break;
default:
return;
}
default:
return;
}