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