Patch: running external commands from wpa_supplicant

Henrik Brix Andersen brix
Tue Jan 11 11:08:59 PST 2005

Hi Jouni,

I've written a preliminary patch for wpa_supplicant to allow running
external commands (ifconfig, dhcp client, distribution specific
scripts, ...) upon receiving various events.

The patch is not yet fully complete. I need advice on where to add the
hooks for auth_cmd and reauth_cmd - see the patch for more details. The
hook for startup_cmd is already in place.

The patch could be modified to use the exec family of system calls for
executing the commands instead of using system(). This would allow
running commands which are in PATH without specifying the full path to
the binary, but I don't know how exec() influences portability?

Perhaps it would be useful to have a shutdown_cmd as well? For bringing
down the interface upon shutdown of wpa_supplicant?

Let me hear what you think.


Patch against current CVS HEAD attached.
Henrik Brix Andersen <brix at>
Gentoo Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wpa_supplicant-cmd-2005-01-11.patch
Type: text/x-patch
Size: 6311 bytes
Desc: not available
Url : 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : 

More information about the Hostap mailing list