├── AndroidManetManager ├── .classpath ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── AndroidManifest.xml ├── docs │ └── license │ │ ├── copyright.txt │ │ └── gpl-3.0.txt ├── jni │ ├── Android.mk │ ├── README.txt │ ├── adhoc-edify │ │ ├── Android.mk │ │ ├── adhoc.c │ │ ├── adhoc.h │ │ ├── edify │ │ │ ├── Android.mk │ │ │ ├── README.txt │ │ │ ├── expr.c │ │ │ ├── expr.h │ │ │ ├── lex.yy.c │ │ │ ├── lexer.l │ │ │ ├── main.c │ │ │ ├── parser.c │ │ │ ├── parser.h │ │ │ ├── parser.y │ │ │ └── yydefs.h │ │ ├── install.c │ │ └── install.h │ ├── ifconfig │ │ ├── Android.mk │ │ └── ifconfig.c │ └── wireless-tools │ │ ├── Android.mk │ │ ├── CHANGELOG.h │ │ ├── Makefile │ │ ├── NOTICE │ │ ├── changes.log │ │ ├── ethernet.h │ │ ├── getdelim.c │ │ ├── getdelim.h │ │ ├── getline.c │ │ ├── getline.h │ │ ├── ifrename.c │ │ ├── iwconfig.c │ │ ├── iwevent.c │ │ ├── iwgetid.c │ │ ├── iwlib.c │ │ ├── iwlib.h │ │ ├── iwlist.c │ │ ├── iwmulticall.c │ │ ├── iwpriv.c │ │ ├── iwspy.c │ │ ├── macaddr.c │ │ ├── sample_enc.c │ │ ├── sample_pm.c │ │ ├── sample_priv_addr.c │ │ ├── wireless.10.h │ │ ├── wireless.11.h │ │ ├── wireless.12.h │ │ ├── wireless.13.h │ │ ├── wireless.14.h │ │ ├── wireless.15.h │ │ ├── wireless.16.h │ │ ├── wireless.17.h │ │ ├── wireless.18.h │ │ ├── wireless.19.h │ │ ├── wireless.20.h │ │ ├── wireless.21.h │ │ ├── wireless.22.h │ │ └── wireless.h ├── libmanet.jar ├── libs │ ├── armeabi │ │ ├── adhoc │ │ ├── gdb.setup │ │ ├── gdbserver │ │ ├── ifconfig │ │ ├── ifrename │ │ ├── iwconfig │ │ ├── iwevent │ │ ├── iwgetid │ │ ├── iwlist │ │ ├── iwpriv │ │ ├── iwspy │ │ ├── libbinder.so │ │ ├── libc.so │ │ ├── libcutils.so │ │ ├── libhardware_legacy.so │ │ ├── liblog.so │ │ ├── libnetutils.so │ │ ├── libutils.so │ │ ├── libwpa_client.so │ │ └── libz.so │ └── commons-collections-3.2.1.jar ├── lint.xml ├── obj │ └── local │ │ └── armeabi │ │ ├── adhoc │ │ ├── ifconfig │ │ ├── ifrename │ │ ├── iwconfig │ │ ├── iwevent │ │ ├── iwgetid │ │ ├── iwlist │ │ ├── iwpriv │ │ ├── iwspy │ │ ├── libbinder.so │ │ ├── libc.so │ │ ├── libcutils.so │ │ ├── libedify.a │ │ ├── libhardware_legacy.so │ │ ├── libiwlib.a │ │ ├── liblog.so │ │ ├── libnetutils.so │ │ ├── libutils.so │ │ ├── libwpa_client.so │ │ ├── libz.so │ │ └── objs-debug │ │ ├── adhoc │ │ ├── adhoc.o │ │ ├── adhoc.o.d │ │ ├── install.o │ │ └── install.o.d │ │ ├── edify │ │ ├── expr.o │ │ ├── expr.o.d │ │ ├── lex.yy.o │ │ ├── lex.yy.o.d │ │ ├── parser.o │ │ └── parser.o.d │ │ ├── ifconfig │ │ ├── ifconfig.o │ │ └── ifconfig.o.d │ │ ├── ifrename │ │ ├── getdelim.o │ │ ├── getdelim.o.d │ │ ├── ifrename.o │ │ └── ifrename.o.d │ │ ├── iwconfig │ │ ├── iwconfig.o │ │ └── iwconfig.o.d │ │ ├── iwevent │ │ ├── iwevent.o │ │ └── iwevent.o.d │ │ ├── iwgetid │ │ ├── iwgetid.o │ │ └── iwgetid.o.d │ │ ├── iwlib │ │ ├── iwlib.o │ │ └── iwlib.o.d │ │ ├── iwlist │ │ ├── iwlist.o │ │ └── iwlist.o.d │ │ ├── iwpriv │ │ ├── iwpriv.o │ │ └── iwpriv.o.d │ │ └── iwspy │ │ ├── iwspy.o │ │ └── iwspy.o.d ├── project.properties ├── res │ ├── drawable │ │ ├── adhoc_off.png │ │ ├── adhoc_off_notification.png │ │ ├── adhoc_on.png │ │ ├── adhoc_on_notification.png │ │ ├── background.jpg │ │ ├── battery.png │ │ ├── bluetooth.png │ │ ├── exclamation.png │ │ ├── gear_icon_48.png │ │ ├── lock.png │ │ ├── lock_open.png │ │ ├── master_off.png │ │ ├── master_on.png │ │ ├── sechigh.png │ │ ├── seclow.png │ │ ├── secmedium.png │ │ ├── service_icon_64.png │ │ └── wifi.png │ ├── layout │ │ ├── aboutview.xml │ │ ├── btwarningview.xml │ │ ├── clientrow.xml │ │ ├── ignoreviewwrapper.xml │ │ ├── logview.xml │ │ ├── main.xml │ │ ├── messageview.xml │ │ ├── nonetfilterview.xml │ │ ├── norootview.xml │ │ ├── routinginfoview.xml │ │ ├── sendmessageview.xml │ │ ├── settingsview.xml │ │ ├── settingsviewwrapper.xml │ │ ├── share.xml │ │ └── txpowerwarningview.xml │ ├── raw │ │ ├── adhoc │ │ ├── adhoc_edify │ │ ├── adhoc_edify_old │ │ ├── asus_forward_sh │ │ ├── blue_down_sh │ │ ├── blue_up_sh │ │ ├── dnsmasq │ │ ├── dnsmasq_conf │ │ ├── fixpersist_sh │ │ ├── fixroute_sh │ │ ├── hostapd_conf_blade │ │ ├── hostapd_conf_droidx │ │ ├── ifconfig │ │ ├── iperf │ │ ├── iptables │ │ ├── iwconfig │ │ ├── manet_conf │ │ ├── nc │ │ ├── olsrd │ │ ├── olsrd_conf_tpl │ │ ├── olsrd_txtinfo_so_0_1 │ │ ├── pand │ │ ├── routing_ignore_list_conf │ │ ├── tcpdump │ │ ├── tiwlan_ini │ │ ├── ultra_bcm_config │ │ └── wpa_supplicant_conf │ └── values │ │ └── strings.xml ├── scripts │ ├── bin │ │ └── unzip │ ├── build-native.sh │ ├── create-lib.sh │ ├── extract-all.sh │ ├── extract.sh │ ├── install-all.sh │ ├── push-all.sh │ └── push.sh └── src │ └── org │ ├── servalproject │ ├── RequestThread.java │ ├── SimpleWebServer.java │ └── system │ │ ├── WiFiRadio.java │ │ └── WifiApControl.java │ └── span │ ├── manager │ ├── ChangeSettingsActivity.java │ ├── EditIgnoreListActivity.java │ ├── MainActivity.java │ ├── ManetManagerApp.java │ ├── MessageService.java │ ├── SendMessageActivity.java │ ├── ShareActivity.java │ ├── Validation.java │ ├── ViewLogActivity.java │ ├── ViewLogActivityHelper.java │ ├── ViewMessageActivity.java │ └── ViewRoutingInfoActivity.java │ └── service │ ├── CircularStringBuffer.java │ ├── LogObserver.java │ ├── ManetHelper.java │ ├── ManetObserver.java │ ├── ManetParser.java │ ├── core │ ├── ManetBootBroadcastReceiver.java │ ├── ManetCustomBroadcastReceiver.java │ ├── ManetService.java │ └── ManetServiceHelper.java │ ├── legal │ ├── EulaHelper.java │ └── EulaObserver.java │ ├── routing │ ├── Dijkstra.java │ ├── Edge.java │ ├── HelloMessage.java │ ├── Node.java │ ├── OlsrProtocol.java │ ├── Route.java │ ├── RoutingProtocol.java │ ├── SimpleProactiveProtocol.java │ └── SimpleReactiveProtocol.java │ └── system │ ├── BluetoothConfig.java │ ├── BluetoothService.java │ ├── BluetoothService_cupcake.java │ ├── BluetoothService_eclair.java │ ├── CoreTask.java │ ├── DeviceConfig.java │ ├── DnsmasqConfig.java │ ├── HostapdConfig.java │ ├── ManetConfig.java │ ├── ManetConfigHelper.java │ ├── RoutingIgnoreListConfig.java │ ├── TiWlanConf.java │ └── WpaSupplicant.java └── README.md /AndroidManetManager/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /AndroidManetManager/.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | /gen 3 | -------------------------------------------------------------------------------- /AndroidManetManager/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | AndroidManetManager 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /AndroidManetManager/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Tue May 29 18:00:53 EDT 2012 2 | eclipse.preferences.version=1 3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.6 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.source=1.6 13 | -------------------------------------------------------------------------------- /AndroidManetManager/docs/license/copyright.txt: -------------------------------------------------------------------------------- 1 | SPAN - Smart Phone Ad-Hoc Networking project 2 | Copyright (c) 2012 The MITRE Corporation. 3 | 4 | Portions of the code, images, and other resources are 5 | copyright (c) 2009 WiFi Tether for Root Users. 6 | 7 | Portions of the code, images, and other resources are 8 | copyright (c) 2012 The Serval Project. -------------------------------------------------------------------------------- /AndroidManetManager/jni/Android.mk: -------------------------------------------------------------------------------- 1 | AOSP_PATH := /home/dev/Desktop/PROJECTS/ANDROID_PLATFORM_GINGERBREAD 2 | AOSP_SHARED_LIBRARIES_PATH := $(AOSP_PATH)/out/target/product/generic/obj/SHARED_LIBRARIES 3 | 4 | LOCAL_PATH := $(my-dir) 5 | 6 | PROJECT_PATH := $(call parent-dir, $(LOCAL_PATH)) 7 | PROJECT_LIBS_PATH := $(PROJECT_PATH)/libs/armeabi 8 | PROJECT_RAW_PATH := $(PROJECT_PATH)/res/raw 9 | 10 | include $(call all-makefiles-under, $(LOCAL_PATH)) 11 | 12 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/README.txt: -------------------------------------------------------------------------------- 1 | NOTE: Rebuild the native executables and libraries by executing "./scripts/build-native.sh". -------------------------------------------------------------------------------- /AndroidManetManager/jni/adhoc-edify/Android.mk: -------------------------------------------------------------------------------- 1 | WORKING_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | 6 | # build libedify.a 7 | include $(WORKING_PATH)/edify/Android.mk 8 | 9 | 10 | # set local path set that NDK will pull libraries from the Android source code 11 | LOCAL_PATH := $(AOSP_SHARED_LIBRARIES_PATH) 12 | 13 | 14 | include $(CLEAR_VARS) 15 | 16 | LOCAL_MODULE := cutils 17 | LOCAL_SRC_FILES := /libcutils_intermediates/LINKED/libcutils.so 18 | 19 | include $(PREBUILT_SHARED_LIBRARY) 20 | 21 | 22 | include $(CLEAR_VARS) 23 | 24 | LOCAL_MODULE := hardware_legacy 25 | LOCAL_SRC_FILES := /libhardware_legacy_intermediates/LINKED/libhardware_legacy.so 26 | 27 | include $(PREBUILT_SHARED_LIBRARY) 28 | 29 | 30 | include $(CLEAR_VARS) 31 | 32 | LOCAL_MODULE := libutils 33 | LOCAL_SRC_FILES := /libutils_intermediates/LINKED/libutils.so 34 | 35 | include $(PREBUILT_SHARED_LIBRARY) 36 | 37 | 38 | include $(CLEAR_VARS) 39 | 40 | LOCAL_MODULE := libbinder 41 | LOCAL_SRC_FILES := /libbinder_intermediates/LINKED/libbinder.so 42 | 43 | include $(PREBUILT_SHARED_LIBRARY) 44 | 45 | 46 | include $(CLEAR_VARS) 47 | 48 | LOCAL_MODULE := libwpa_client 49 | LOCAL_SRC_FILES := /libwpa_client_intermediates/LINKED/libwpa_client.so 50 | 51 | include $(PREBUILT_SHARED_LIBRARY) 52 | 53 | 54 | include $(CLEAR_VARS) 55 | 56 | LOCAL_MODULE := libnetutils 57 | LOCAL_SRC_FILES := /libnetutils_intermediates/LINKED/libnetutils.so 58 | 59 | include $(PREBUILT_SHARED_LIBRARY) 60 | 61 | 62 | include $(CLEAR_VARS) 63 | 64 | LOCAL_MODULE := libc 65 | LOCAL_SRC_FILES := /libc_intermediates/LINKED/libc.so 66 | 67 | include $(PREBUILT_SHARED_LIBRARY) 68 | 69 | 70 | include $(CLEAR_VARS) 71 | 72 | LOCAL_MODULE := liblog 73 | LOCAL_SRC_FILES := /liblog_intermediates/LINKED/liblog.so 74 | 75 | include $(PREBUILT_SHARED_LIBRARY) 76 | 77 | 78 | include $(CLEAR_VARS) 79 | 80 | LOCAL_MODULE := libz 81 | LOCAL_SRC_FILES := /libz_intermediates/LINKED/libz.so 82 | 83 | include $(PREBUILT_SHARED_LIBRARY) 84 | 85 | 86 | # revert back to working path to build adhoc binary 87 | LOCAL_PATH := $(WORKING_PATH) 88 | 89 | updater_src_files := \ 90 | install.c \ 91 | adhoc.c 92 | 93 | include $(CLEAR_VARS) 94 | 95 | LOCAL_SRC_FILES += $(updater_src_files) 96 | 97 | LOCAL_C_INCLUDES += $(dir $(inc)) 98 | LOCAL_C_INCLUDES += $(AOSP_PATH)/system/core/include 99 | LOCAL_C_INCLUDES += $(AOSP_PATH)/hardware/libhardware_legacy/include 100 | 101 | LOCAL_STATIC_LIBRARIES := edify 102 | 103 | LOCAL_SHARED_LIBRARIES := hardware_legacy cutils utils binder libwpa_client libnetutils libc liblog libz 104 | 105 | LOCAL_MODULE := adhoc 106 | 107 | include $(BUILD_EXECUTABLE) 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/adhoc-edify/adhoc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Ben Buxton 3 | * 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 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 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. 15 | */ 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #include "edify/expr.h" 25 | #include "adhoc.h" 26 | #include "install.h" 27 | 28 | // Where in the package we expect to find the edify script to execute. 29 | #define SCRIPT_NAME "/data/data/org.span/conf/adhoc.edify" 30 | 31 | int main(int argc, char** argv) { 32 | FILE *f; 33 | /* 34 | if (argc != 4) { 35 | fprintf(stderr, "unexpected number of arguments (%d)\n", argc); 36 | return 1; 37 | } 38 | 39 | */ 40 | // Set up the pipe for sending commands back to the parent process. 41 | int fd = atoi(argv[2]); 42 | FILE* cmd_pipe = fdopen(fd, "wb"); 43 | setlinebuf(cmd_pipe); 44 | 45 | struct stat st; 46 | if (stat(SCRIPT_NAME, &st) < 0) { 47 | fprintf(stderr, "Could not stat %s: %s", SCRIPT_NAME, strerror(errno)); 48 | return 1; 49 | } 50 | if (st.st_size > 128000) { 51 | fprintf(stderr, "%s too large (max 128k)", SCRIPT_NAME); 52 | return 1; 53 | } 54 | char *script = malloc(st.st_size+1); 55 | 56 | f = fopen(SCRIPT_NAME, "rb"); 57 | if (f == NULL) { 58 | fprintf(stderr, "Cannot read %s\n", SCRIPT_NAME); 59 | return 1; 60 | } 61 | if (fread(script, 1, st.st_size, f) != st.st_size) { 62 | fprintf(stderr, "Failed to read %d bytes from %s", st.st_size+1, SCRIPT_NAME); 63 | return 1; 64 | } 65 | script[st.st_size] = '\0'; 66 | fclose(f); 67 | 68 | // Configure edify's functions. 69 | 70 | RegisterBuiltins(); 71 | RegisterInstallFunctions(); 72 | FinishRegistration(); 73 | 74 | // Parse the script. 75 | 76 | Expr* root; 77 | int error_count = 0; 78 | yy_scan_string(script); 79 | int error = yyparse(&root, &error_count); 80 | if (error != 0 || error_count > 0) { 81 | fprintf(stderr, "%d parse errors\n", error_count); 82 | return 6; 83 | } 84 | 85 | // Evaluate the parsed script. 86 | 87 | UpdaterInfo updater_info; 88 | updater_info.cmd_pipe = cmd_pipe; 89 | updater_info.log_fd = fopen ("/data/data/org.span/var/adhoc.log","w"); 90 | 91 | updater_info.action = strdup(argv[1]); 92 | 93 | State state; 94 | state.cookie = &updater_info; 95 | state.script = script; 96 | state.errmsg = NULL; 97 | 98 | char* result = Evaluate(&state, root); 99 | if (result == NULL) { 100 | if (state.errmsg == NULL) { 101 | fprintf(stderr, "script aborted (no error message)\n"); 102 | fprintf(cmd_pipe, "ui_print script aborted (no error message)\n"); 103 | } else { 104 | fprintf(stderr, "script aborted: %s\n", state.errmsg); 105 | char* line = strtok(state.errmsg, "\n"); 106 | while (line) { 107 | fprintf(cmd_pipe, "ui_print %s\n", line); 108 | line = strtok(NULL, "\n"); 109 | } 110 | fprintf(cmd_pipe, "ui_print\n"); 111 | } 112 | free(state.errmsg); 113 | return 7; 114 | } else { 115 | fprintf(stderr, "script result was [%s]\n", result); 116 | free(result); 117 | } 118 | 119 | free(script); 120 | 121 | return 0; 122 | } 123 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/adhoc-edify/adhoc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 The Android Open Source Project 3 | * 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 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 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. 15 | */ 16 | 17 | #ifndef _UPDATER_UPDATER_H_ 18 | #define _UPDATER_UPDATER_H_ 19 | 20 | #include 21 | 22 | typedef struct { 23 | FILE* cmd_pipe; 24 | FILE* log_fd; 25 | char *action; 26 | } UpdaterInfo; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/adhoc-edify/edify/Android.mk: -------------------------------------------------------------------------------- 1 | # NOTE: Android NDK will not build a static library unless some other build process 2 | # in the Android.mk makes use of it (i.e. NDK attempts to "optimize out" the need to 3 | # build the static library). 4 | 5 | LOCAL_PATH := $(call my-dir) 6 | 7 | edify_src_files := \ 8 | expr.c \ 9 | lex.yy.c \ 10 | parser.c 11 | 12 | # "-x c" forces the lex/yacc files to be compiled as c; 13 | # the build system otherwise forces them to be c++. 14 | edify_cflags := -x c 15 | 16 | # 17 | # Build the device-side library 18 | # 19 | include $(CLEAR_VARS) 20 | 21 | LOCAL_MODULE := libedify 22 | 23 | LOCAL_CFLAGS := $(edify_cflags) 24 | 25 | LOCAL_SRC_FILES := $(edify_src_files) 26 | 27 | include $(BUILD_STATIC_LIBRARY) 28 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/adhoc-edify/edify/README.txt: -------------------------------------------------------------------------------- 1 | Update scripts (from donut onwards) are written in a new little 2 | scripting language ("edify") that is superficially somewhat similar to 3 | the old one ("amend"). This is a brief overview of the new language. 4 | 5 | - The entire script is a single expression. 6 | 7 | - All expressions are string-valued. 8 | 9 | - String literals appear in double quotes. \n, \t, \", and \\ are 10 | understood, as are hexadecimal escapes like \x4a. 11 | 12 | - String literals consisting of only letters, numbers, colons, 13 | underscores, slashes, and periods don't need to be in double quotes. 14 | 15 | - The following words are reserved: 16 | 17 | if then else endif 18 | 19 | They have special meaning when unquoted. (In quotes, they are just 20 | string literals.) 21 | 22 | - When used as a boolean, the empty string is "false" and all other 23 | strings are "true". 24 | 25 | - All functions are actually macros (in the Lisp sense); the body of 26 | the function can control which (if any) of the arguments are 27 | evaluated. This means that functions can act as control 28 | structures. 29 | 30 | - Operators (like "&&" and "||") are just syntactic sugar for builtin 31 | functions, so they can act as control structures as well. 32 | 33 | - ";" is a binary operator; evaluating it just means to first evaluate 34 | the left side, then the right. It can also appear after any 35 | expression. 36 | 37 | - Comments start with "#" and run to the end of the line. 38 | 39 | 40 | 41 | Some examples: 42 | 43 | - There's no distinction between quoted and unquoted strings; the 44 | quotes are only needed if you want characters like whitespace to 45 | appear in the string. The following expressions all evaluate to the 46 | same string. 47 | 48 | "a b" 49 | a + " " + b 50 | "a" + " " + "b" 51 | "a\x20b" 52 | a + "\x20b" 53 | concat(a, " ", "b") 54 | "concat"(a, " ", "b") 55 | 56 | As shown in the last example, function names are just strings, 57 | too. They must be string *literals*, however. This is not legal: 58 | 59 | ("con" + "cat")(a, " ", b) # syntax error! 60 | 61 | 62 | - The ifelse() builtin takes three arguments: it evaluates exactly 63 | one of the second and third, depending on whether the first one is 64 | true. There is also some syntactic sugar to make expressions that 65 | look like if/else statements: 66 | 67 | # these are all equivalent 68 | ifelse(something(), "yes", "no") 69 | if something() then yes else no endif 70 | if something() then "yes" else "no" endif 71 | 72 | The else part is optional. 73 | 74 | if something() then "yes" endif # if something() is false, 75 | # evaluates to false 76 | 77 | ifelse(condition(), "", abort()) # abort() only called if 78 | # condition() is false 79 | 80 | The last example is equivalent to: 81 | 82 | assert(condition()) 83 | 84 | 85 | - The && and || operators can be used similarly; they evaluate their 86 | second argument only if it's needed to determine the truth of the 87 | expression. Their value is the value of the last-evaluated 88 | argument: 89 | 90 | file_exists("/data/system/bad") && delete("/data/system/bad") 91 | 92 | file_exists("/data/system/missing") || create("/data/system/missing") 93 | 94 | get_it() || "xxx" # returns value of get_it() if that value is 95 | # true, otherwise returns "xxx" 96 | 97 | 98 | - The purpose of ";" is to simulate imperative statements, of course, 99 | but the operator can be used anywhere. Its value is the value of 100 | its right side: 101 | 102 | concat(a;b;c, d, e;f) # evaluates to "cdf" 103 | 104 | A more useful example might be something like: 105 | 106 | ifelse(condition(), 107 | (first_step(); second_step();), # second ; is optional 108 | alternative_procedure()) 109 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/adhoc-edify/edify/expr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 The Android Open Source Project 3 | * 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 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 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. 15 | */ 16 | 17 | #ifndef _EXPRESSION_H 18 | #define _EXPRESSION_H 19 | 20 | #include "yydefs.h" 21 | 22 | #define MAX_STRING_LEN 1024 23 | 24 | typedef struct Expr Expr; 25 | 26 | typedef struct { 27 | // Optional pointer to app-specific data; the core of edify never 28 | // uses this value. 29 | void* cookie; 30 | 31 | // The source of the original script. Must be NULL-terminated, 32 | // and in writable memory (Evaluate may make temporary changes to 33 | // it but will restore it when done). 34 | char* script; 35 | 36 | // The error message (if any) returned if the evaluation aborts. 37 | // Should be NULL initially, will be either NULL or a malloc'd 38 | // pointer after Evaluate() returns. 39 | char* errmsg; 40 | } State; 41 | 42 | typedef char* (*Function)(const char* name, State* state, 43 | int argc, Expr* argv[]); 44 | 45 | struct Expr { 46 | Function fn; 47 | char* name; 48 | int argc; 49 | Expr** argv; 50 | int start, end; 51 | }; 52 | 53 | char* Evaluate(State* state, Expr* expr); 54 | 55 | // Glue to make an Expr out of a literal. 56 | char* Literal(const char* name, State* state, int argc, Expr* argv[]); 57 | 58 | // Functions corresponding to various syntactic sugar operators. 59 | // ("concat" is also available as a builtin function, to concatenate 60 | // more than two strings.) 61 | char* ConcatFn(const char* name, State* state, int argc, Expr* argv[]); 62 | char* LogicalAndFn(const char* name, State* state, int argc, Expr* argv[]); 63 | char* LogicalOrFn(const char* name, State* state, int argc, Expr* argv[]); 64 | char* LogicalNotFn(const char* name, State* state, int argc, Expr* argv[]); 65 | char* SubstringFn(const char* name, State* state, int argc, Expr* argv[]); 66 | char* EqualityFn(const char* name, State* state, int argc, Expr* argv[]); 67 | char* InequalityFn(const char* name, State* state, int argc, Expr* argv[]); 68 | char* SequenceFn(const char* name, State* state, int argc, Expr* argv[]); 69 | 70 | // Convenience function for building expressions with a fixed number 71 | // of arguments. 72 | Expr* Build(Function fn, YYLTYPE loc, int count, ...); 73 | 74 | // Global builtins, registered by RegisterBuiltins(). 75 | char* IfElseFn(const char* name, State* state, int argc, Expr* argv[]); 76 | char* AssertFn(const char* name, State* state, int argc, Expr* argv[]); 77 | char* AbortFn(const char* name, State* state, int argc, Expr* argv[]); 78 | 79 | 80 | // For setting and getting the global error string (when returning 81 | // NULL from a function). 82 | void SetError(const char* message); // makes a copy 83 | const char* GetError(); // retains ownership 84 | void ClearError(); 85 | 86 | 87 | typedef struct { 88 | const char* name; 89 | Function fn; 90 | } NamedFunction; 91 | 92 | // Register a new function. The same Function may be registered under 93 | // multiple names, but a given name should only be used once. 94 | void RegisterFunction(const char* name, Function fn); 95 | 96 | // Register all the builtins. 97 | void RegisterBuiltins(); 98 | 99 | // Call this after all calls to RegisterFunction() but before parsing 100 | // any scripts to finish building the function table. 101 | void FinishRegistration(); 102 | 103 | // Find the Function for a given name; return NULL if no such function 104 | // exists. 105 | Function FindFunction(const char* name); 106 | 107 | 108 | // --- convenience functions for use in functions --- 109 | 110 | // Evaluate the expressions in argv, giving 'count' char* (the ... is 111 | // zero or more char** to put them in). If any expression evaluates 112 | // to NULL, free the rest and return -1. Return 0 on success. 113 | int ReadArgs(State* state, Expr* argv[], int count, ...); 114 | 115 | // Evaluate the expressions in argv, returning an array of char* 116 | // results. If any evaluate to NULL, free the rest and return NULL. 117 | // The caller is responsible for freeing the returned array and the 118 | // strings it contains. 119 | char** ReadVarArgs(State* state, int argc, Expr* argv[]); 120 | 121 | // Use printf-style arguments to compose an error message to put into 122 | // *state. Returns NULL. 123 | char* ErrorAbort(State* state, char* format, ...); 124 | 125 | 126 | #endif // _EXPRESSION_H 127 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/adhoc-edify/edify/lexer.l: -------------------------------------------------------------------------------- 1 | %{ 2 | /* 3 | * Copyright (C) 2009 The Android Open Source Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #include "expr.h" 19 | #include "yydefs.h" 20 | #include "parser.h" 21 | 22 | int gLine = 1; 23 | int gColumn = 1; 24 | int gPos = 0; 25 | 26 | // TODO: enforce MAX_STRING_LEN during lexing 27 | char string_buffer[MAX_STRING_LEN]; 28 | char* string_pos; 29 | 30 | #define ADVANCE do {yylloc.start=gPos; yylloc.end=gPos+yyleng; \ 31 | gColumn+=yyleng; gPos+=yyleng;} while(0) 32 | 33 | %} 34 | 35 | %x STR 36 | 37 | %option noyywrap 38 | 39 | %% 40 | 41 | 42 | \" { 43 | BEGIN(STR); 44 | string_pos = string_buffer; 45 | yylloc.start = gPos; 46 | ++gColumn; 47 | ++gPos; 48 | } 49 | 50 | { 51 | \" { 52 | ++gColumn; 53 | ++gPos; 54 | BEGIN(INITIAL); 55 | *string_pos = '\0'; 56 | yylval.str = strdup(string_buffer); 57 | yylloc.end = gPos; 58 | return STRING; 59 | } 60 | 61 | \\n { gColumn += yyleng; gPos += yyleng; *string_pos++ = '\n'; } 62 | \\t { gColumn += yyleng; gPos += yyleng; *string_pos++ = '\t'; } 63 | \\\" { gColumn += yyleng; gPos += yyleng; *string_pos++ = '\"'; } 64 | \\\\ { gColumn += yyleng; gPos += yyleng; *string_pos++ = '\\'; } 65 | 66 | \\x[0-9a-fA-F]{2} { 67 | gColumn += yyleng; 68 | gPos += yyleng; 69 | int val; 70 | sscanf(yytext+2, "%x", &val); 71 | *string_pos++ = val; 72 | } 73 | 74 | \n { 75 | ++gLine; 76 | ++gPos; 77 | gColumn = 1; 78 | *string_pos++ = yytext[0]; 79 | } 80 | 81 | . { 82 | ++gColumn; 83 | ++gPos; 84 | *string_pos++ = yytext[0]; 85 | } 86 | } 87 | 88 | if ADVANCE; return IF; 89 | then ADVANCE; return THEN; 90 | else ADVANCE; return ELSE; 91 | endif ADVANCE; return ENDIF; 92 | 93 | [a-zA-Z0-9_:/.]+ { 94 | ADVANCE; 95 | yylval.str = strdup(yytext); 96 | return STRING; 97 | } 98 | 99 | \&\& ADVANCE; return AND; 100 | \|\| ADVANCE; return OR; 101 | == ADVANCE; return EQ; 102 | != ADVANCE; return NE; 103 | 104 | [+(),!;] ADVANCE; return yytext[0]; 105 | 106 | [ \t]+ ADVANCE; 107 | 108 | (#.*)?\n gPos += yyleng; ++gLine; gColumn = 1; 109 | 110 | . return BAD; 111 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/adhoc-edify/edify/parser.h: -------------------------------------------------------------------------------- 1 | 2 | /* A Bison parser, made by GNU Bison 2.4.1. */ 3 | 4 | /* Skeleton interface for Bison's Yacc-like parsers in C 5 | 6 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 7 | Free Software Foundation, Inc. 8 | 9 | This program is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with this program. If not, see . */ 21 | 22 | /* As a special exception, you may create a larger work that contains 23 | part or all of the Bison parser skeleton and distribute that work 24 | under terms of your choice, so long as that work isn't itself a 25 | parser generator using the skeleton or a modified version thereof 26 | as a parser skeleton. Alternatively, if you modify or redistribute 27 | the parser skeleton itself, you may (at your option) remove this 28 | special exception, which will cause the skeleton and the resulting 29 | Bison output files to be licensed under the GNU General Public 30 | License without this special exception. 31 | 32 | This special exception was added by the Free Software Foundation in 33 | version 2.2 of Bison. */ 34 | 35 | 36 | /* Tokens. */ 37 | #ifndef YYTOKENTYPE 38 | # define YYTOKENTYPE 39 | /* Put the tokens into the symbol table, so that GDB and other debuggers 40 | know about them. */ 41 | enum yytokentype { 42 | AND = 258, 43 | OR = 259, 44 | SUBSTR = 260, 45 | SUPERSTR = 261, 46 | EQ = 262, 47 | NE = 263, 48 | IF = 264, 49 | THEN = 265, 50 | ELSE = 266, 51 | ENDIF = 267, 52 | STRING = 268, 53 | BAD = 269 54 | }; 55 | #endif 56 | 57 | 58 | 59 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 60 | typedef union YYSTYPE 61 | { 62 | 63 | /* Line 1676 of yacc.c */ 64 | #line 36 "parser.y" 65 | 66 | char* str; 67 | Expr* expr; 68 | struct { 69 | int argc; 70 | Expr** argv; 71 | } args; 72 | 73 | 74 | 75 | /* Line 1676 of yacc.c */ 76 | #line 77 "parser.h" 77 | } YYSTYPE; 78 | # define YYSTYPE_IS_TRIVIAL 1 79 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 80 | # define YYSTYPE_IS_DECLARED 1 81 | #endif 82 | 83 | extern YYSTYPE yylval; 84 | 85 | #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED 86 | typedef struct YYLTYPE 87 | { 88 | int first_line; 89 | int first_column; 90 | int last_line; 91 | int last_column; 92 | } YYLTYPE; 93 | # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ 94 | # define YYLTYPE_IS_DECLARED 1 95 | # define YYLTYPE_IS_TRIVIAL 1 96 | #endif 97 | 98 | extern YYLTYPE yylloc; 99 | 100 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/adhoc-edify/edify/parser.y: -------------------------------------------------------------------------------- 1 | %{ 2 | /* 3 | * Copyright (C) 2009 The Android Open Source Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | #include "expr.h" 23 | #include "yydefs.h" 24 | #include "parser.h" 25 | 26 | extern int gLine; 27 | extern int gColumn; 28 | 29 | void yyerror(Expr** root, int* error_count, const char* s); 30 | int yyparse(Expr** root, int* error_count); 31 | 32 | %} 33 | 34 | %locations 35 | 36 | %union { 37 | char* str; 38 | Expr* expr; 39 | struct { 40 | int argc; 41 | Expr** argv; 42 | } args; 43 | } 44 | 45 | %token AND OR SUBSTR SUPERSTR EQ NE IF THEN ELSE ENDIF 46 | %token STRING BAD 47 | %type expr 48 | %type arglist 49 | 50 | %parse-param {Expr** root} 51 | %parse-param {int* error_count} 52 | %error-verbose 53 | 54 | /* declarations in increasing order of precedence */ 55 | %left ';' 56 | %left ',' 57 | %left OR 58 | %left AND 59 | %left EQ NE 60 | %left '+' 61 | %right '!' 62 | 63 | %% 64 | 65 | input: expr { *root = $1; } 66 | ; 67 | 68 | expr: STRING { 69 | $$ = malloc(sizeof(Expr)); 70 | $$->fn = Literal; 71 | $$->name = $1; 72 | $$->argc = 0; 73 | $$->argv = NULL; 74 | $$->start = @$.start; 75 | $$->end = @$.end; 76 | } 77 | | '(' expr ')' { $$ = $2; $$->start=@$.start; $$->end=@$.end; } 78 | | expr ';' { $$ = $1; $$->start=@1.start; $$->end=@1.end; } 79 | | expr ';' expr { $$ = Build(SequenceFn, @$, 2, $1, $3); } 80 | | error ';' expr { $$ = $3; $$->start=@$.start; $$->end=@$.end; } 81 | | expr '+' expr { $$ = Build(ConcatFn, @$, 2, $1, $3); } 82 | | expr EQ expr { $$ = Build(EqualityFn, @$, 2, $1, $3); } 83 | | expr NE expr { $$ = Build(InequalityFn, @$, 2, $1, $3); } 84 | | expr AND expr { $$ = Build(LogicalAndFn, @$, 2, $1, $3); } 85 | | expr OR expr { $$ = Build(LogicalOrFn, @$, 2, $1, $3); } 86 | | '!' expr { $$ = Build(LogicalNotFn, @$, 1, $2); } 87 | | IF expr THEN expr ENDIF { $$ = Build(IfElseFn, @$, 2, $2, $4); } 88 | | IF expr THEN expr ELSE expr ENDIF { $$ = Build(IfElseFn, @$, 3, $2, $4, $6); } 89 | | STRING '(' arglist ')' { 90 | $$ = malloc(sizeof(Expr)); 91 | $$->fn = FindFunction($1); 92 | if ($$->fn == NULL) { 93 | char buffer[256]; 94 | snprintf(buffer, sizeof(buffer), "unknown function \"%s\"", $1); 95 | yyerror(root, error_count, buffer); 96 | YYERROR; 97 | } 98 | $$->name = $1; 99 | $$->argc = $3.argc; 100 | $$->argv = $3.argv; 101 | $$->start = @$.start; 102 | $$->end = @$.end; 103 | } 104 | ; 105 | 106 | arglist: /* empty */ { 107 | $$.argc = 0; 108 | $$.argv = NULL; 109 | } 110 | | expr { 111 | $$.argc = 1; 112 | $$.argv = malloc(sizeof(Expr*)); 113 | $$.argv[0] = $1; 114 | } 115 | | arglist ',' expr { 116 | $$.argc = $1.argc + 1; 117 | $$.argv = realloc($$.argv, $$.argc * sizeof(Expr*)); 118 | $$.argv[$$.argc-1] = $3; 119 | } 120 | ; 121 | 122 | %% 123 | 124 | void yyerror(Expr** root, int* error_count, const char* s) { 125 | if (strlen(s) == 0) { 126 | s = "syntax error"; 127 | } 128 | printf("line %d col %d: %s\n", gLine, gColumn, s); 129 | ++*error_count; 130 | } 131 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/adhoc-edify/edify/yydefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 The Android Open Source Project 3 | * 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 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 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. 15 | */ 16 | 17 | #ifndef _YYDEFS_H_ 18 | #define _YYDEFS_H_ 19 | 20 | #define YYLTYPE YYLTYPE 21 | typedef struct { 22 | int start, end; 23 | } YYLTYPE; 24 | 25 | #define YYLLOC_DEFAULT(Current, Rhs, N) \ 26 | do { \ 27 | if (N) { \ 28 | (Current).start = YYRHSLOC(Rhs, 1).start; \ 29 | (Current).end = YYRHSLOC(Rhs, N).end; \ 30 | } else { \ 31 | (Current).start = YYRHSLOC(Rhs, 0).start; \ 32 | (Current).end = YYRHSLOC(Rhs, 0).end; \ 33 | } \ 34 | } while (0) 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/adhoc-edify/install.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 The Android Open Source Project 3 | * 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 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 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. 15 | */ 16 | 17 | #ifndef _UPDATER_INSTALL_H_ 18 | #define _UPDATER_INSTALL_H_ 19 | 20 | void RegisterInstallFunctions(); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/ifconfig/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_SRC_FILES:= ifconfig.c 6 | 7 | LOCAL_MODULE := ifconfig 8 | 9 | include $(BUILD_EXECUTABLE) -------------------------------------------------------------------------------- /AndroidManetManager/jni/wireless-tools/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | WT_INCS := -I$(LOCAL_PATH) 5 | WT_DEFS := -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -g 6 | WT_DEFS += -DWT_NOLIMB=y 7 | 8 | ##################### 9 | LOCAL_SRC_FILES := iwlib.c 10 | LOCAL_MODULE := iwlib 11 | LOCAL_CFLAGS := $(WT_INCS) $(WT_DEFS) 12 | include $(BUILD_STATIC_LIBRARY) 13 | ##################### 14 | include $(CLEAR_VARS) 15 | LOCAL_SRC_FILES := iwspy.c 16 | LOCAL_MODULE := iwspy 17 | LOCAL_STATIC_LIBRARIES := iwlib 18 | LOCAL_CFLAGS := $(WT_INCS) $(WT_DEFS) 19 | include $(BUILD_EXECUTABLE) 20 | ##################### 21 | include $(CLEAR_VARS) 22 | LOCAL_SRC_FILES := iwconfig.c 23 | LOCAL_MODULE := iwconfig 24 | LOCAL_STATIC_LIBRARIES := iwlib 25 | LOCAL_CFLAGS := $(WT_INCS) $(WT_DEFS) 26 | include $(BUILD_EXECUTABLE) 27 | ##################### 28 | include $(CLEAR_VARS) 29 | LOCAL_SRC_FILES := iwlist.c 30 | LOCAL_MODULE := iwlist 31 | LOCAL_STATIC_LIBRARIES := iwlib 32 | LOCAL_CFLAGS := $(WT_INCS) $(WT_DEFS) 33 | include $(BUILD_EXECUTABLE) 34 | ##################### 35 | include $(CLEAR_VARS) 36 | LOCAL_SRC_FILES := iwpriv.c 37 | LOCAL_MODULE := iwpriv 38 | LOCAL_STATIC_LIBRARIES := iwlib 39 | LOCAL_CFLAGS := $(WT_INCS) $(WT_DEFS) 40 | include $(BUILD_EXECUTABLE) 41 | ##################### 42 | include $(CLEAR_VARS) 43 | LOCAL_SRC_FILES := iwevent.c 44 | LOCAL_MODULE := iwevent 45 | LOCAL_STATIC_LIBRARIES := iwlib 46 | LOCAL_CFLAGS := $(WT_INCS) $(WT_DEFS) 47 | include $(BUILD_EXECUTABLE) 48 | ##################### 49 | include $(CLEAR_VARS) 50 | LOCAL_SRC_FILES := iwgetid.c 51 | LOCAL_MODULE := iwgetid 52 | LOCAL_STATIC_LIBRARIES := iwlib 53 | LOCAL_CFLAGS := $(WT_INCS) $(WT_DEFS) 54 | include $(BUILD_EXECUTABLE) 55 | ##################### 56 | include $(CLEAR_VARS) 57 | LOCAL_SRC_FILES := ifrename.c \ 58 | getdelim.c 59 | LOCAL_MODULE := ifrename 60 | LOCAL_STATIC_LIBRARIES := iwlib 61 | LOCAL_CFLAGS := $(WT_INCS) $(WT_DEFS) 62 | include $(BUILD_EXECUTABLE) 63 | 64 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/wireless-tools/CHANGELOG.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/jni/wireless-tools/CHANGELOG.h -------------------------------------------------------------------------------- /AndroidManetManager/jni/wireless-tools/changes.log: -------------------------------------------------------------------------------- 1 | commit d9d43b9b14972c650210012e54e24372584199de 2 | Merge: 95cc23e... 0a2633e... 3 | Author: Fenwick Peng 4 | Date: Thu Nov 19 11:23:54 2009 -0600 5 | 6 | Merge commit 'arsenal-qcom/sv-master' into ssw-stable 7 | 8 | commit 0a2633e30c5cec1e595332af65401c6da6cf554e 9 | Author: Yukitomi Fujinaga 10 | Date: Wed Nov 18 15:48:39 2009 -0800 11 | 12 | Removed NOTICE_FR files from master branch 13 | 14 | commit 95cc23e8dcef98ad4df035d9a966ee6283b64785 15 | Author: Yukitomi Fujinaga 16 | Date: Fri Sep 25 16:34:55 2009 -0700 17 | 18 | L10N: Added French NOTICE files 19 | 20 | commit c7c96535eaea7e3c14da91fc933b15e05e21fe69 21 | Author: Fenwick Peng 22 | Date: Thu Jul 9 14:51:59 2009 -0500 23 | 24 | Notice file update 25 | 26 | commit d5e90c33eefe8d8b9cc7eeec9fd4cec4d9f4c8fa 27 | Merge: ed654db... b7ab547... 28 | Author: Mani Varadarajan 29 | Date: Sat May 2 19:02:46 2009 -0700 30 | 31 | Merge commit 'repo-blurdev/all-cupcake-integration' into aci-cleanup-2 32 | 33 | commit b7ab547f78b23ef3fca24cecb51d2ed43832d5f2 34 | Merge: 82ed472... ed654db... 35 | Author: Wang Qi 36 | Date: Thu Apr 30 10:40:32 2009 -0700 37 | 38 | Merge commit 'repo-blurdev/syssw-cupcake-integration' into aci-ssw-merge 39 | 40 | commit ed654db7d639c44f6d00c9f30343367c5122da0c 41 | Author: Andrew Wheeler 42 | Date: Mon Apr 27 18:37:26 2009 -0500 43 | 44 | initial commit from 6365-ohd-mot-built-4.tgz 45 | 46 | commit 82ed472b5618ddc647dc0e08df29745997632e23 47 | Merge: 3b3956a... f517d5c... 48 | Author: Maulik Desai 49 | Date: Fri Apr 10 00:12:24 2009 -0700 50 | 51 | Merge syssw 6355 changes to all-cupcake-integration (copymerge) 52 | 53 | Merge branch 'all-cupcake-integration' into syssw-6355-merge 54 | 55 | commit 3b3956a1b2851980b844765ba5eebb6fe4d37d08 56 | Author: Andrew Wheeler 57 | Date: Wed Apr 1 06:14:39 2009 -0500 58 | 59 | initial commit 60 | 61 | commit f517d5ca1ad1cfa05577d662ea577a5a8a8d1dd7 62 | Author: ejm121 63 | Date: Mon Jan 26 13:59:16 2009 -0800 64 | 65 | Add a small set of filters through .gitignore 66 | 67 | commit f14748561573cfb08ebd253d73a86932b5890d7e 68 | Author: Repo Man 69 | Date: Mon Jan 12 06:59:23 2009 -0600 70 | 71 | morrison-oxmas patch 72 | 73 | commit 3034e2bfc8fd9e6c351dc413204118a5427df64e 74 | Author: Repo Man 75 | Date: Mon Jan 12 06:53:55 2009 -0600 76 | 77 | release 29 from http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html 78 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/wireless-tools/ethernet.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc. 2 | This file is part of the GNU C Library. 3 | 4 | The GNU C Library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | The GNU C Library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with the GNU C Library; if not, write to the Free 16 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 17 | 02111-1307 USA. */ 18 | 19 | /* Based on the FreeBSD version of this file. Curiously, that file 20 | lacks a copyright in the header. */ 21 | 22 | #ifndef __NET_ETHERNET_H 23 | #define __NET_ETHERNET_H 1 24 | 25 | #include 26 | #include 27 | #include /* IEEE 802.3 Ethernet constants */ 28 | 29 | __BEGIN_DECLS 30 | 31 | /* This is a name for the 48 bit ethernet address available on many 32 | systems. */ 33 | struct ether_addr 34 | { 35 | u_int8_t ether_addr_octet[ETH_ALEN]; 36 | } __attribute__ ((__packed__)); 37 | 38 | /* 10Mb/s ethernet header */ 39 | struct ether_header 40 | { 41 | u_int8_t ether_dhost[ETH_ALEN]; /* destination eth addr */ 42 | u_int8_t ether_shost[ETH_ALEN]; /* source ether addr */ 43 | u_int16_t ether_type; /* packet type ID field */ 44 | } __attribute__ ((__packed__)); 45 | 46 | /* Ethernet protocol ID's */ 47 | #define ETHERTYPE_PUP 0x0200 /* Xerox PUP */ 48 | #define ETHERTYPE_IP 0x0800 /* IP */ 49 | #define ETHERTYPE_ARP 0x0806 /* Address resolution */ 50 | #define ETHERTYPE_REVARP 0x8035 /* Reverse ARP */ 51 | 52 | #define ETHER_ADDR_LEN ETH_ALEN /* size of ethernet addr */ 53 | #define ETHER_TYPE_LEN 2 /* bytes in type field */ 54 | #define ETHER_CRC_LEN 4 /* bytes in CRC field */ 55 | #define ETHER_HDR_LEN ETH_HLEN /* total octets in header */ 56 | #define ETHER_MIN_LEN (ETH_ZLEN + ETHER_CRC_LEN) /* min packet length */ 57 | #define ETHER_MAX_LEN (ETH_FRAME_LEN + ETHER_CRC_LEN) /* max packet length */ 58 | 59 | /* make sure ethenet length is valid */ 60 | #define ETHER_IS_VALID_LEN(foo) \ 61 | ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN) 62 | 63 | /* 64 | * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have 65 | * (type-ETHERTYPE_TRAIL)*512 bytes of data followed 66 | * by an ETHER type (as given above) and then the (variable-length) header. 67 | */ 68 | #define ETHERTYPE_TRAIL 0x1000 /* Trailer packet */ 69 | #define ETHERTYPE_NTRAILER 16 70 | 71 | #define ETHERMTU ETH_DATA_LEN 72 | #define ETHERMIN (ETHER_MIN_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN) 73 | 74 | __END_DECLS 75 | 76 | #endif /* net/ethernet.h */ 77 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/wireless-tools/getdelim.c: -------------------------------------------------------------------------------- 1 | /* getdelim.c --- Implementation of replacement getdelim function. 2 | Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005 Free 3 | Software Foundation, Inc. 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License as 7 | published by the Free Software Foundation; either version 2, or (at 8 | your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 | 02110-1301, USA. */ 19 | 20 | /* Ported from glibc by Simon Josefsson. */ 21 | 22 | #ifdef HAVE_CONFIG_H 23 | # include 24 | #endif 25 | 26 | #include "getdelim.h" 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | #ifndef SIZE_MAX 33 | # define SIZE_MAX ((size_t) -1) 34 | #endif 35 | #ifndef SSIZE_MAX 36 | # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) 37 | #endif 38 | #if !HAVE_FLOCKFILE 39 | # undef flockfile 40 | # define flockfile(x) ((void) 0) 41 | #endif 42 | #if !HAVE_FUNLOCKFILE 43 | # undef funlockfile 44 | # define funlockfile(x) ((void) 0) 45 | #endif 46 | 47 | /* Read up to (and including) a DELIMITER from FP into *LINEPTR (and 48 | NUL-terminate it). *LINEPTR is a pointer returned from malloc (or 49 | NULL), pointing to *N characters of space. It is realloc'ed as 50 | necessary. Returns the number of characters read (not including 51 | the null terminator), or -1 on error or EOF. */ 52 | 53 | ssize_t 54 | getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) 55 | { 56 | ssize_t result; 57 | size_t cur_len = 0; 58 | 59 | if (lineptr == NULL || n == NULL || fp == NULL) 60 | { 61 | errno = EINVAL; 62 | return -1; 63 | } 64 | 65 | flockfile (fp); 66 | 67 | if (*lineptr == NULL || *n == 0) 68 | { 69 | *n = 120; 70 | *lineptr = (char *) malloc (*n); 71 | if (*lineptr == NULL) 72 | { 73 | result = -1; 74 | goto unlock_return; 75 | } 76 | } 77 | 78 | for (;;) 79 | { 80 | int i; 81 | 82 | i = getc (fp); 83 | if (i == EOF) 84 | { 85 | result = -1; 86 | break; 87 | } 88 | 89 | /* Make enough space for len+1 (for final NUL) bytes. */ 90 | if (cur_len + 1 >= *n) 91 | { 92 | size_t needed_max = 93 | SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; 94 | size_t needed = 2 * *n + 1; /* Be generous. */ 95 | char *new_lineptr; 96 | 97 | if (needed_max < needed) 98 | needed = needed_max; 99 | if (cur_len + 1 >= needed) 100 | { 101 | result = -1; 102 | goto unlock_return; 103 | } 104 | 105 | new_lineptr = (char *) realloc (*lineptr, needed); 106 | if (new_lineptr == NULL) 107 | { 108 | result = -1; 109 | goto unlock_return; 110 | } 111 | 112 | *lineptr = new_lineptr; 113 | *n = needed; 114 | } 115 | 116 | (*lineptr)[cur_len] = i; 117 | cur_len++; 118 | 119 | if (i == delimiter) 120 | break; 121 | } 122 | (*lineptr)[cur_len] = '\0'; 123 | result = cur_len ? cur_len : result; 124 | 125 | unlock_return: 126 | funlockfile (fp); 127 | return result; 128 | } 129 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/wireless-tools/getdelim.h: -------------------------------------------------------------------------------- 1 | /* getdelim.h --- Prototype for replacement getdelim function. 2 | Copyright (C) 2005 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License as 6 | published by the Free Software Foundation; either version 2, or (at 7 | your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | 02110-1301, USA. */ 18 | 19 | /* Written by Simon Josefsson. */ 20 | 21 | /* Get size_t, FILE, ssize_t. And getdelim, if available. */ 22 | # include 23 | # include 24 | # include 25 | 26 | #if !HAVE_DECL_GETDELIM 27 | ssize_t getdelim (char **lineptr, size_t *n, int delimiter, FILE *stream); 28 | #endif /* !HAVE_GETDELIM */ 29 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/wireless-tools/getline.c: -------------------------------------------------------------------------------- 1 | /* getline.c --- Implementation of replacement getline function. 2 | Copyright (C) 2005 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License as 6 | published by the Free Software Foundation; either version 2, or (at 7 | your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | 02110-1301, USA. */ 18 | 19 | /* Written by Simon Josefsson. */ 20 | 21 | #ifdef HAVE_CONFIG_H 22 | # include 23 | #endif 24 | 25 | #include "getdelim.h" 26 | #include "getline.h" 27 | 28 | ssize_t 29 | getline (char **lineptr, size_t *n, FILE *stream) 30 | { 31 | return getdelim (lineptr, n, '\n', stream); 32 | } 33 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/wireless-tools/getline.h: -------------------------------------------------------------------------------- 1 | /* getline.h --- Prototype for replacement getline function. 2 | Copyright (C) 2005 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License as 6 | published by the Free Software Foundation; either version 2, or (at 7 | your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | 02110-1301, USA. */ 18 | 19 | /* Written by Simon Josefsson. */ 20 | 21 | /* Get size_t, FILE, ssize_t. And getline, if available. */ 22 | # include 23 | # include 24 | # include 25 | 26 | #if !HAVE_DECL_GETLINE 27 | ssize_t getline (char **lineptr, size_t *n, FILE *stream); 28 | #endif /* !HAVE_GETLINE */ 29 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/wireless-tools/iwmulticall.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Wireless Tools 3 | * 4 | * Jean II - HPL 04 5 | * 6 | * Main code for "iwmulticall". This is a wrapper for the multicall version 7 | * of the wireless tools. 8 | * You need to link this code against "-lm". 9 | * Thanks to Ned Ludd for the inspiration... 10 | * 11 | * This file is released under the GPL license. 12 | * Copyright (c) 1997-2004 Jean Tourrilhes 13 | */ 14 | 15 | /***************************** INCLUDES *****************************/ 16 | 17 | #include /* Basename */ 18 | 19 | /**************************** PROTOTYPES ****************************/ 20 | 21 | /* Prototypes of the main of each tool */ 22 | extern int 23 | main_iwconfig(int argc, 24 | char ** argv); 25 | extern int 26 | main_iwlist(int argc, 27 | char ** argv); 28 | extern int 29 | main_iwspy(int argc, 30 | char ** argv); 31 | extern int 32 | main_iwpriv(int argc, 33 | char ** argv); 34 | extern int 35 | main_iwgetid(int argc, 36 | char ** argv); 37 | 38 | /************************** MULTICALL HACK **************************/ 39 | /* 40 | * The idea for multicall is to put all the tools and the library in 41 | * the same binary. This way, you can save the overhead of the library, 42 | * of each tool, can better optimise the code and throw away the stuff 43 | * you don't need from the library. 44 | * This almost divide the size of the tools by two (without stripping). 45 | * On the down side, you no longer have the libiw for other tools to 46 | * use, but for the target systems (embedded), this doesn't matter 47 | * much, as they just need to configure the card... 48 | * Note that splitting the lib and the multicall tools would not 49 | * make sense, as most gains are found in the inclusion of the lib... 50 | * 51 | * Our strategy is to include directly the *.c, rather than compile 52 | * them separatly. This allow to simplify compilation and hide the 53 | * multicall tweaks from the other tools. 54 | * Yeah, this leads to a bit a preprocessor abuse... 55 | * Jean II 56 | */ 57 | 58 | /* We need the library */ 59 | #include "iwlib.c" 60 | 61 | /* Get iwconfig in there. Mandatory. */ 62 | #define main(args...) main_iwconfig(args) 63 | #define iw_usage(args...) iwconfig_usage(args) 64 | #define find_command(args...) iwconfig_find_command(args) 65 | #include "iwconfig.c" 66 | #undef find_command 67 | #undef iw_usage 68 | #undef main 69 | 70 | /* Get iwlist in there. Scanning support is pretty sweet. */ 71 | #define main(args...) main_iwlist(args) 72 | #define iw_usage(args...) iwlist_usage(args) 73 | #define find_command(args...) iwlist_find_command(args) 74 | #include "iwlist.c" 75 | #undef find_command 76 | #undef iw_usage 77 | #undef main 78 | 79 | #ifndef WE_ESSENTIAL 80 | /* Get iwspy in there, it's not that big. */ 81 | #define main(args...) main_iwspy(args) 82 | #include "iwspy.c" 83 | #undef main 84 | #endif /* WE_ESSENTIAL */ 85 | 86 | /* Get iwpriv in there. Mandatory for HostAP and some other drivers. */ 87 | #define main(args...) main_iwpriv(args) 88 | #define iw_usage(args...) iwpriv_usage(args) 89 | #include "iwpriv.c" 90 | #undef iw_usage 91 | #undef main 92 | 93 | /* Do we really need iwgetid ? Well, it's not like it's a big one */ 94 | #define main(args...) main_iwgetid(args) 95 | #define iw_usage(args...) iwgetid_usage(args) 96 | #include "iwgetid.c" 97 | #undef iw_usage 98 | #undef main 99 | 100 | /* iwevent is useless for most people, don't grab it ? */ 101 | 102 | /* ifrename is big and useless for those systems */ 103 | 104 | 105 | /******************************* MAIN ********************************/ 106 | 107 | /*------------------------------------------------------------------*/ 108 | /* 109 | * The main ! 110 | */ 111 | int 112 | main(int argc, 113 | char ** argv) 114 | { 115 | char * call_name = basename(argv[0]); /* Strip path */ 116 | 117 | /* This is a testing hack */ 118 | if(!strcmp(call_name, "iwmulticall") && (argc > 0)) 119 | { 120 | argv++; 121 | argc--; 122 | call_name = basename(argv[0]); 123 | } 124 | 125 | /* Just check the name under which we were called... */ 126 | 127 | if(!strcmp(call_name, "iwconfig")) 128 | return(main_iwconfig(argc, argv)); 129 | if(!strcmp(call_name, "iwlist")) 130 | return(main_iwlist(argc, argv)); 131 | #ifndef WE_ESSENTIAL 132 | if(!strcmp(call_name, "iwspy")) 133 | return(main_iwspy(argc, argv)); 134 | #endif /* WE_ESSENTIAL */ 135 | if(!strcmp(call_name, "iwpriv")) 136 | return(main_iwpriv(argc, argv)); 137 | if(!strcmp(call_name, "iwgetid")) 138 | return(main_iwgetid(argc, argv)); 139 | 140 | /* Uh oh... Not supposed to come here. */ 141 | printf("iwmulticall : you are not supposed to call me this way...\n"); 142 | return(0); 143 | } 144 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/wireless-tools/macaddr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * macaddr 3 | * 4 | * Program to return the MAC address of an Ethernet 5 | * adapter. This was written to help configure the 6 | * adapter based on the MAC address rather than the 7 | * name. 8 | * 9 | * Version 1.0 Eric Dittman 2001-10-19 10 | * 11 | * This is released unther the GPL license. 12 | */ 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #include "iwlib.h" 23 | 24 | int main(int argc, char** argv) 25 | { 26 | 27 | int devsock; 28 | struct ifreq ifbuffer; 29 | char buf[20]; 30 | 31 | if ((argc != 2) || (argv[1][0] == '-')) { 32 | printf("Usage: macaddr interface\n"); 33 | exit(1); 34 | } 35 | 36 | devsock = socket(AF_INET, SOCK_STREAM, 0); 37 | 38 | if (devsock == -1) { 39 | perror("Failed opening socket"); 40 | exit (1); 41 | } 42 | 43 | memset(&ifbuffer, 0, sizeof(ifbuffer)); 44 | strncpy(ifbuffer.ifr_name, argv[1], sizeof(ifbuffer.ifr_name)); 45 | if (ioctl(devsock, SIOCGIFHWADDR, &ifbuffer) == -1) { 46 | fprintf(stderr, "There is no MACADDR for %s\n", argv[1]); 47 | exit(1); 48 | } 49 | close(devsock); 50 | 51 | puts(iw_saether_ntop(&ifbuffer.ifr_ifru.ifru_hwaddr, buf)); 52 | 53 | exit(0); 54 | } 55 | -------------------------------------------------------------------------------- /AndroidManetManager/jni/wireless-tools/sample_enc.c: -------------------------------------------------------------------------------- 1 | /* Note : this particular snipset of code is available under 2 | * the LGPL, MPL or BSD license (at your choice). 3 | * Jean II 4 | */ 5 | 6 | /* --------------------------- INCLUDE --------------------------- */ 7 | 8 | #define MAX_KEY_SIZE 16 9 | #define MAX_KEYS 8 10 | int key_on = 0; 11 | int key_open = 1; 12 | int key_current = 0; 13 | char key_table[MAX_KEYS][MAX_KEY_SIZE]; 14 | int key_size[MAX_KEYS]; 15 | 16 | /* --------------------------- HANDLERS --------------------------- */ 17 | 18 | static int ioctl_set_encode(struct net_device *dev, 19 | struct iw_request_info *info, 20 | struct iw_point *erq, 21 | char *key) 22 | { 23 | int index = (erq->flags & IW_ENCODE_INDEX) - 1; 24 | 25 | if (erq->length > 0) 26 | { 27 | /* Check the size of the key */ 28 | if(erq->length > MAX_KEY_SIZE) 29 | return(-EINVAL); 30 | 31 | /* Check the index */ 32 | if((index < 0) || (index >= MAX_KEYS)) 33 | index = key_current; 34 | 35 | /* Copy the key in the driver */ 36 | memcpy(key_table[index], key, erq->length); 37 | key_size[index] = erq->length; 38 | key_on = 1; 39 | } 40 | else 41 | { 42 | /* Do we want to just set the current key ? */ 43 | if((index >= 0) && (index < MAX_KEYS)) 44 | { 45 | if(key_size[index] > 0) 46 | { 47 | key_current = index; 48 | key_on = 1; 49 | } 50 | else 51 | return(-EINVAL); 52 | } 53 | } 54 | 55 | /* Read the flags */ 56 | if(erq->flags & IW_ENCODE_DISABLED) 57 | key_on = 0; /* disable encryption */ 58 | if(erq->flags & IW_ENCODE_RESTRICTED) 59 | key_open = 0; /* disable open mode */ 60 | if(erq->flags & IW_ENCODE_OPEN) 61 | key_open = 1; /* enable open mode */ 62 | 63 | return(0); 64 | } 65 | 66 | static int ioctl_get_encode(struct net_device *dev, 67 | struct iw_request_info *info, 68 | struct iw_point *erq, 69 | char *key) 70 | { 71 | int index = (erq->flags & IW_ENCODE_INDEX) - 1; 72 | 73 | /* Set the flags */ 74 | erq->flags = 0; 75 | if(key_on == 0) 76 | erq->flags |= IW_ENCODE_DISABLED; 77 | if(key_open == 0) 78 | erq->flags |= IW_ENCODE_RESTRICTED; 79 | else 80 | erq->flags |= IW_ENCODE_OPEN; 81 | 82 | /* Which key do we want */ 83 | if((index < 0) || (index >= MAX_KEYS)) 84 | index = key_current; 85 | erq->flags |= index + 1; 86 | 87 | /* Copy the key to the user buffer */ 88 | erq->length = key_size[index]; 89 | memcpy(key, key_table[index], key_size[index]); 90 | 91 | return(0); 92 | } 93 | 94 | static int ioctl_get_range(struct net_device *dev, 95 | struct iw_request_info *info, 96 | struct iw_point *rrq, 97 | char *extra) 98 | { 99 | struct iw_range *range = (struct iw_range *) extra; 100 | 101 | rrq->length = sizeof(struct iw_range); 102 | 103 | memset(range, 0, sizeof(struct iw_range)); 104 | 105 | #if WIRELESS_EXT > 10 106 | /* Version we are compiled with */ 107 | range->we_version_compiled = WIRELESS_EXT; 108 | /* Minimum version we recommend */ 109 | range->we_version_source = 8; 110 | #endif /* WIRELESS_EXT > 10 */ 111 | 112 | #if WIRELESS_EXT > 8 113 | range->encoding_size[0] = 8; /* DES = 64 bits key */ 114 | range->encoding_size[1] = 16; 115 | range->num_encoding_sizes = 2; 116 | range->max_encoding_tokens = 8; 117 | #endif /* WIRELESS_EXT > 8 */ 118 | return(0); 119 | } 120 | 121 | /* --------------------------- BINDING --------------------------- */ 122 | 123 | #if WIRELESS_EXT > 12 124 | static const iw_handler handler_table[] = 125 | { 126 | ... 127 | (iw_handler) ioctl_set_encode, /* SIOCSIWENCODE */ 128 | (iw_handler) ioctl_get_encode, /* SIOCGIWENCODE */ 129 | }; 130 | #else /* WIRELESS_EXT < 12 */ 131 | static int 132 | do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 133 | { 134 | struct iwreq *wrq = (struct iwreq *) ifr; 135 | int err = 0; 136 | 137 | switch (cmd) 138 | { 139 | #if WIRELESS_EXT > 8 140 | case SIOCSIWENCODE: 141 | { 142 | char keybuf[MAX_KEY_SIZE]; 143 | if(wrq->u.encoding.pointer) 144 | { 145 | /* We actually have a key to set */ 146 | if(wrq->u.encoding.length > MAX_KEY_SIZE) 147 | { 148 | err = -E2BIG; 149 | break; 150 | } 151 | if(copy_from_user(keybuf, wrq->u.encoding.pointer, 152 | wrq->u.encoding.length)) 153 | { 154 | err = -EFAULT; 155 | break; 156 | } 157 | } 158 | else 159 | if(wrq->u.encoding.length != 0) 160 | { 161 | err = -EINVAL; 162 | break; 163 | } 164 | err = ioctl_set_encode(dev, NULL, &(wrq->u.encoding), keybuf); 165 | } 166 | break; 167 | 168 | case SIOCGIWENCODE: 169 | /* only super-user can see encryption key */ 170 | if(! capable(CAP_NET_ADMIN)) 171 | { 172 | err = -EPERM; 173 | break; 174 | } 175 | { 176 | char keybuf[MAX_KEY_SIZE]; 177 | err = ioctl_get_encode(dev, NULL, &(wrq->u.encoding), keybuf); 178 | if(wrq->u.encoding.pointer) 179 | { 180 | if (copy_to_user(wrq->u.encoding.pointer, keybuf, 181 | wrq->u.encoding.length)) 182 | err= -EFAULT; 183 | } 184 | } 185 | break; 186 | #endif /* WIRELESS_EXT > 8 */ 187 | } 188 | return(err); 189 | } 190 | #endif /* WIRELESS_EXT < 12 */ 191 | 192 | -------------------------------------------------------------------------------- /AndroidManetManager/libmanet.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libmanet.jar -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/adhoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/adhoc -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/gdb.setup: -------------------------------------------------------------------------------- 1 | set solib-search-path ./obj/local/armeabi 2 | directory /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include ./ /home/dev/Desktop/PROJECTS/ANDROID_PLATFORM_GINGERBREAD/system/core/include /home/dev/Desktop/PROJECTS/ANDROID_PLATFORM_GINGERBREAD/hardware/libhardware_legacy/include jni/adhoc-edify /home/dev/Desktop/PROJECTS/ANDROID_PLATFORM_GINGERBREAD/out/target/product/generic/obj/SHARED_LIBRARIES jni/adhoc-edify/edify jni/ifconfig jni/wireless-tools /home/dev/Desktop/android-ndk-r8b/sources/cxx-stl/system 3 | -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/gdbserver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/gdbserver -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/ifconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/ifconfig -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/ifrename: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/ifrename -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/iwconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/iwconfig -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/iwevent: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/iwevent -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/iwgetid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/iwgetid -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/iwlist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/iwlist -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/iwpriv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/iwpriv -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/iwspy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/iwspy -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/libbinder.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/libbinder.so -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/libc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/libc.so -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/libcutils.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/libcutils.so -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/libhardware_legacy.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/libhardware_legacy.so -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/liblog.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/liblog.so -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/libnetutils.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/libnetutils.so -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/libutils.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/libutils.so -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/libwpa_client.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/libwpa_client.so -------------------------------------------------------------------------------- /AndroidManetManager/libs/armeabi/libz.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/armeabi/libz.so -------------------------------------------------------------------------------- /AndroidManetManager/libs/commons-collections-3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/libs/commons-collections-3.2.1.jar -------------------------------------------------------------------------------- /AndroidManetManager/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/adhoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/adhoc -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/ifconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/ifconfig -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/ifrename: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/ifrename -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/iwconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/iwconfig -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/iwevent: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/iwevent -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/iwgetid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/iwgetid -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/iwlist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/iwlist -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/iwpriv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/iwpriv -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/iwspy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/iwspy -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/libbinder.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/libbinder.so -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/libc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/libc.so -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/libcutils.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/libcutils.so -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/libedify.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/libedify.a -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/libhardware_legacy.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/libhardware_legacy.so -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/libiwlib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/libiwlib.a -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/liblog.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/liblog.so -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/libnetutils.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/libnetutils.so -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/libutils.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/libutils.so -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/libwpa_client.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/libwpa_client.so -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/libz.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/libz.so -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/adhoc/adhoc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/adhoc/adhoc.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/adhoc/install.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/adhoc/install.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/edify/expr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/edify/expr.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/edify/lex.yy.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/edify/lex.yy.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/edify/parser.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/edify/parser.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/edify/parser.o.d: -------------------------------------------------------------------------------- 1 | obj/local/armeabi/objs-debug/edify/parser.o: \ 2 | jni/adhoc-edify/edify/parser.c \ 3 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/stdio.h \ 4 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/sys/cdefs.h \ 5 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/sys/cdefs_elf.h \ 6 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/sys/_types.h \ 7 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/machine/_types.h \ 8 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/sys/types.h \ 9 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/stdint.h \ 10 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/linux/posix_types.h \ 11 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/linux/stddef.h \ 12 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/linux/compiler.h \ 13 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/asm/posix_types.h \ 14 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/asm/types.h \ 15 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/linux/types.h \ 16 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/machine/kernel.h \ 17 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/sys/sysmacros.h \ 18 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/stdlib.h \ 19 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/string.h \ 20 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/malloc.h \ 21 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/alloca.h \ 22 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/strings.h \ 23 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/memory.h \ 24 | jni/adhoc-edify/edify/expr.h jni/adhoc-edify/edify/yydefs.h \ 25 | jni/adhoc-edify/edify/parser.h 26 | 27 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/stdio.h: 28 | 29 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/sys/cdefs.h: 30 | 31 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/sys/cdefs_elf.h: 32 | 33 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/sys/_types.h: 34 | 35 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/machine/_types.h: 36 | 37 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/sys/types.h: 38 | 39 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/stdint.h: 40 | 41 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/linux/posix_types.h: 42 | 43 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/linux/stddef.h: 44 | 45 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/linux/compiler.h: 46 | 47 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/asm/posix_types.h: 48 | 49 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/asm/types.h: 50 | 51 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/linux/types.h: 52 | 53 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/machine/kernel.h: 54 | 55 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/sys/sysmacros.h: 56 | 57 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/stdlib.h: 58 | 59 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/string.h: 60 | 61 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/malloc.h: 62 | 63 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/alloca.h: 64 | 65 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/strings.h: 66 | 67 | /home/dev/Desktop/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/memory.h: 68 | 69 | jni/adhoc-edify/edify/expr.h: 70 | 71 | jni/adhoc-edify/edify/yydefs.h: 72 | 73 | jni/adhoc-edify/edify/parser.h: 74 | -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/ifconfig/ifconfig.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/ifconfig/ifconfig.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/ifrename/getdelim.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/ifrename/getdelim.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/ifrename/ifrename.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/ifrename/ifrename.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/iwconfig/iwconfig.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/iwconfig/iwconfig.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/iwevent/iwevent.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/iwevent/iwevent.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/iwgetid/iwgetid.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/iwgetid/iwgetid.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/iwlib/iwlib.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/iwlib/iwlib.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/iwlist/iwlist.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/iwlist/iwlist.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/iwpriv/iwpriv.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/iwpriv/iwpriv.o -------------------------------------------------------------------------------- /AndroidManetManager/obj/local/armeabi/objs-debug/iwspy/iwspy.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/obj/local/armeabi/objs-debug/iwspy/iwspy.o -------------------------------------------------------------------------------- /AndroidManetManager/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | # Project target. 11 | target=android-9 12 | -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/adhoc_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/adhoc_off.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/adhoc_off_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/adhoc_off_notification.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/adhoc_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/adhoc_on.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/adhoc_on_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/adhoc_on_notification.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/background.jpg -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/battery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/battery.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/bluetooth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/bluetooth.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/exclamation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/exclamation.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/gear_icon_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/gear_icon_48.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/lock.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/lock_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/lock_open.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/master_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/master_off.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/master_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/master_on.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/sechigh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/sechigh.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/seclow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/seclow.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/secmedium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/secmedium.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/service_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/service_icon_64.png -------------------------------------------------------------------------------- /AndroidManetManager/res/drawable/wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProjectSPAN/android-manet-manager/8a5eb384e2a2bb5e401c18ca530a94dcf333b44c/AndroidManetManager/res/drawable/wifi.png -------------------------------------------------------------------------------- /AndroidManetManager/res/layout/aboutview.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 | 14 | 22 | 28 | 34 | 42 | 51 | 60 | 68 | 74 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /AndroidManetManager/res/layout/btwarningview.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 | 14 | 23 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /AndroidManetManager/res/layout/clientrow.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 13 | 14 | 20 | 21 | 26 | 27 | 31 | 36 | 37 | 38 | 42 | 48 | 49 | 50 | 54 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /AndroidManetManager/res/layout/ignoreviewwrapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 |