-rwxr-xr-x | Android.mk | 4 | ||||
-rwxr-xr-x | jni/src/common.c | 159 | ||||
-rwxr-xr-x | jni/src/discovery.c | 3 | ||||
-rwxr-xr-x | jni/src/pppoe.c | 2 | ||||
-rwxr-xr-x | jni/src/pppoe_cli.c | 11 |
5 files changed, 176 insertions, 3 deletions
diff --git a/jni/src/pppoe_cli.c b/jni/src/pppoe_cli.c index 9c23af5..e453416 100755 --- a/jni/src/pppoe_cli.c +++ b/jni/src/pppoe_cli.c @@ -35,10 +35,19 @@ int main(int argc, char *argv[]) struct netwrapper_ctrl * ctrl; if (argc < 2 || (0 != strcmp( "connect", argv[1]) && - 0 != strcmp( "disconnect", argv[1]) )) { + 0 != strcmp( "disconnect", argv[1] ) && + 0 != strcmp( "terminate", argv[1] ))) { usage(); return -2; } + + if (0 == strcmp( "terminate", argv[1] )) { + for ( i = 0; i < 3; i++ ) { + sendSavedPADT(_ROOT_PATH "/etc/ppp/padt_bin"); + sleep(1); + } + return 0; + } ctrl = netwrapper_ctrl_open(_ROOT_PATH "/etc/ppp/pppcli", PPPOE_WRAPPER_SERVER_PATH); if (ctrl == NULL) { |