summaryrefslogtreecommitdiffstats
path: root/src/lib/connections/dummy
blob: 879fc925b5932b4797c7510d304f1eca8875aeb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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: