50788334c014a1ef92c4f65826e40135dafc371f
[project/netifd.git] / dummy / proto / ppp.sh
1 #!/bin/sh
2
3 . ../netifd-proto.sh
4 init_proto "$@"
5
6 ppp_init_config() {
7         proto_config_add_string "username"
8         proto_config_add_string "password"
9         proto_config_add_int "keepalive"
10 }
11
12 ppp_setup() {
13         echo "ppp_setup($1): $2"
14 }
15
16 ppp_teardown() {
17         return
18 }
19
20 ppp_init() {
21         no_device=1
22         available=1
23 }
24
25 add_protocol ppp
26
27 pppoe_init_config() {
28         ppp_init_config
29 }
30
31 pppoe_init() {
32         return
33 }
34
35 pppoe_setup() {
36         json_get_var username username
37         json_get_var password password
38         echo "pppoe_setup($1, $2), username=$username, password=$password"
39 }
40
41 pppoe_teardown() {
42         return
43 }
44
45 add_protocol pppoe