2 * Copyright (C) 2009 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 static int pppox_set(char **);
21 static int pppox_connect();
22 static void pppox_disconnect();
24 static option_t pppox_options[] = {
25 {"pppox", o_special, pppox_set, "PPPoX socket", OPT_DEVNAM},
29 static struct channel pppox_channel = {
30 .options = pppox_options,
31 .process_extra_options = NULL,
32 .check_options = NULL,
33 .connect = pppox_connect,
34 .disconnect = pppox_disconnect,
35 .establish_ppp = generic_establish_ppp,
36 .disestablish_ppp = generic_disestablish_ppp,
43 static int pppox = -1;
45 static int pppox_set(char **argv) {
46 if (!int_option(*argv, &pppox)) {
49 info("Using PPPoX (socket = %d)", pppox);
50 the_channel = &pppox_channel;
54 static int pppox_connect() {
58 static void pppox_disconnect() {
66 add_options(pppox_options);