003 File Manager
Current Path:
/usr/src/contrib/wpa/src/utils
usr
/
src
/
contrib
/
wpa
/
src
/
utils
/
📁
..
📄
base64.c
(4.52 KB)
📄
base64.h
(653 B)
📄
bitfield.c
(1.37 KB)
📄
bitfield.h
(558 B)
📄
browser-android.c
(2.62 KB)
📄
browser-system.c
(2.39 KB)
📄
browser-wpadebug.c
(3.14 KB)
📄
browser.c
(5.93 KB)
📄
browser.h
(451 B)
📄
build_config.h
(1.38 KB)
📄
common.c
(24.26 KB)
📄
common.h
(14.84 KB)
📄
const_time.h
(5.45 KB)
📄
crc32.c
(3.7 KB)
📄
crc32.h
(297 B)
📄
edit.c
(20.21 KB)
📄
edit.h
(612 B)
📄
edit_readline.c
(3.78 KB)
📄
edit_simple.c
(1.77 KB)
📄
eloop.c
(32.23 KB)
📄
eloop.h
(13.77 KB)
📄
eloop_win.c
(15.17 KB)
📄
ext_password.c
(2.02 KB)
📄
ext_password.h
(855 B)
📄
ext_password_i.h
(713 B)
📄
ext_password_test.c
(1.72 KB)
📄
http-utils.h
(1.71 KB)
📄
http_curl.c
(44.53 KB)
📄
includes.h
(1.09 KB)
📄
ip_addr.c
(1.02 KB)
📄
ip_addr.h
(608 B)
📄
json.c
(12.54 KB)
📄
json.h
(1.02 KB)
📄
list.h
(2.4 KB)
📄
module_tests.h
(438 B)
📄
os.h
(19.54 KB)
📄
os_internal.c
(8.66 KB)
📄
os_none.c
(3.3 KB)
📄
os_unix.c
(15.06 KB)
📄
os_win32.c
(4.68 KB)
📄
pcsc_funcs.c
(37.61 KB)
📄
pcsc_funcs.h
(1.4 KB)
📄
platform.h
(508 B)
📄
radiotap.c
(12.25 KB)
📄
radiotap.h
(10.67 KB)
📄
radiotap_iter.h
(2.86 KB)
📄
state_machine.h
(5.25 KB)
📄
trace.c
(8.28 KB)
📄
trace.h
(1.88 KB)
📄
utils_module_tests.c
(28.14 KB)
📄
uuid.c
(1.8 KB)
📄
uuid.h
(439 B)
📄
wpa_debug.c
(18.68 KB)
📄
wpa_debug.h
(12.38 KB)
📄
wpabuf.c
(7.44 KB)
📄
wpabuf.h
(4.14 KB)
📄
xml-utils.c
(9.29 KB)
📄
xml-utils.h
(4.01 KB)
📄
xml_libxml2.c
(9.07 KB)
Editing: state_machine.h
/* * wpa_supplicant/hostapd - State machine definitions * Copyright (c) 2002-2005, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. * * This file includes a set of pre-processor macros that can be used to * implement a state machine. In addition to including this header file, each * file implementing a state machine must define STATE_MACHINE_DATA to be the * data structure including state variables (enum machine_state, * Boolean changed), and STATE_MACHINE_DEBUG_PREFIX to be a string that is used * as a prefix for all debug messages. If SM_ENTRY_MA macro is used to define * a group of state machines with shared data structure, STATE_MACHINE_ADDR * needs to be defined to point to the MAC address used in debug output. * SM_ENTRY_M macro can be used to define similar group of state machines * without this additional debug info. */ #ifndef STATE_MACHINE_H #define STATE_MACHINE_H /** * SM_STATE - Declaration of a state machine function * @machine: State machine name * @state: State machine state * * This macro is used to declare a state machine function. It is used in place * of a C function definition to declare functions to be run when the state is * entered by calling SM_ENTER or SM_ENTER_GLOBAL. */ #define SM_STATE(machine, state) \ static void sm_ ## machine ## _ ## state ## _Enter(STATE_MACHINE_DATA *sm, \ int global) /** * SM_ENTRY - State machine function entry point * @machine: State machine name * @state: State machine state * * This macro is used inside each state machine function declared with * SM_STATE. SM_ENTRY should be in the beginning of the function body, but * after declaration of possible local variables. This macro prints debug * information about state transition and update the state machine state. */ #define SM_ENTRY(machine, state) \ if (!global || sm->machine ## _state != machine ## _ ## state) { \ sm->changed = TRUE; \ wpa_printf(MSG_DEBUG, STATE_MACHINE_DEBUG_PREFIX ": " #machine \ " entering state " #state); \ } \ sm->machine ## _state = machine ## _ ## state; /** * SM_ENTRY_M - State machine function entry point for state machine group * @machine: State machine name * @_state: State machine state * @data: State variable prefix (full variable: prefix_state) * * This macro is like SM_ENTRY, but for state machine groups that use a shared * data structure for more than one state machine. Both machine and prefix * parameters are set to "sub-state machine" name. prefix is used to allow more * than one state variable to be stored in the same data structure. */ #define SM_ENTRY_M(machine, _state, data) \ if (!global || sm->data ## _ ## state != machine ## _ ## _state) { \ sm->changed = TRUE; \ wpa_printf(MSG_DEBUG, STATE_MACHINE_DEBUG_PREFIX ": " \ #machine " entering state " #_state); \ } \ sm->data ## _ ## state = machine ## _ ## _state; /** * SM_ENTRY_MA - State machine function entry point for state machine group * @machine: State machine name * @_state: State machine state * @data: State variable prefix (full variable: prefix_state) * * This macro is like SM_ENTRY_M, but a MAC address is included in debug * output. STATE_MACHINE_ADDR has to be defined to point to the MAC address to * be included in debug. */ #define SM_ENTRY_MA(machine, _state, data) \ if (!global || sm->data ## _ ## state != machine ## _ ## _state) { \ sm->changed = TRUE; \ wpa_printf(MSG_DEBUG, STATE_MACHINE_DEBUG_PREFIX ": " MACSTR " " \ #machine " entering state " #_state, \ MAC2STR(STATE_MACHINE_ADDR)); \ } \ sm->data ## _ ## state = machine ## _ ## _state; /** * SM_ENTER - Enter a new state machine state * @machine: State machine name * @state: State machine state * * This macro expands to a function call to a state machine function defined * with SM_STATE macro. SM_ENTER is used in a state machine step function to * move the state machine to a new state. */ #define SM_ENTER(machine, state) \ sm_ ## machine ## _ ## state ## _Enter(sm, 0) /** * SM_ENTER_GLOBAL - Enter a new state machine state based on global rule * @machine: State machine name * @state: State machine state * * This macro is like SM_ENTER, but this is used when entering a new state * based on a global (not specific to any particular state) rule. A separate * macro is used to avoid unwanted debug message floods when the same global * rule is forcing a state machine to remain in on state. */ #define SM_ENTER_GLOBAL(machine, state) \ sm_ ## machine ## _ ## state ## _Enter(sm, 1) /** * SM_STEP - Declaration of a state machine step function * @machine: State machine name * * This macro is used to declare a state machine step function. It is used in * place of a C function definition to declare a function that is used to move * state machine to a new state based on state variables. This function uses * SM_ENTER and SM_ENTER_GLOBAL macros to enter new state. */ #define SM_STEP(machine) \ static void sm_ ## machine ## _Step(STATE_MACHINE_DATA *sm) /** * SM_STEP_RUN - Call the state machine step function * @machine: State machine name * * This macro expands to a function call to a state machine step function * defined with SM_STEP macro. */ #define SM_STEP_RUN(machine) sm_ ## machine ## _Step(sm) #endif /* STATE_MACHINE_H */
Upload File
Create Folder