summaryrefslogtreecommitdiffstats
path: root/src/lib/connections/dummy
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/connections/dummy')
-rw-r--r--src/lib/connections/dummy26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/connections/dummy b/src/lib/connections/dummy
new file mode 100644
index 0000000..879fc92
--- /dev/null
+++ b/src/lib/connections/dummy
@@ -0,0 +1,26 @@
+# Contributed by: João Valverde <joao.valverde@ist.utl.pt>
+
+. "$SUBR_DIR/ip"
+
+declare -ag BindsToInterfaces
+
+dummy_up() {
+ if is_interface "$Interface"; then
+ report_error "Interface '$Interface' already exists"
+ return 1
+ fi
+
+ ip link add "$Interface" type dummy
+
+ bring_interface_up "$Interface"
+ ip_set
+}
+
+dummy_down() {
+ ip_unset
+ bring_interface_down "$Interface"
+ ip link del "$Interface"
+}
+
+
+# vim: ft=sh ts=4 et sw=4: