Handbook:Parts/Networking/Extending

Standard function hooks
Four functions can be defined in which will be called surrounding the start/stop operations. The functions are called with the interface name first so that one function can control multiple adapters.

The return values for the  and   functions should be 0 (success) to indicate that configuration or de-configuration of the interface can continue. If  returns a non-zero value, then interface configuration will be aborted. If  returns a non-zero value, then the interface will not be allowed to continue de-configuration.

The return values for the  and   functions are ignored since there's nothing to do if they indicate failure.

${IFACE} is set to the interface being brought up/down. ${IFVAR} is ${IFACE} converted to variable name bash allows.

Wireless tools function hook
Two functions can be defined in which will be called surrounding the associate function. The functions are called with the interface name first so that one function can control multiple adapters.

The return values for the  function should be 0 (success) to indicate that configuration or de-configuration of the interface can continue. If  returns a non-zero value, then interface configuration will be aborted.

The return value for the  function is ignored since there's nothing to do if it indicates failure.

${ESSID} is set to the exact ESSID of the AP the system is connecting to. ${ESSIDVAR} is ${ESSID} converted to a variable name bash allows.