This allows the same routines to be shared with other programs since these are not really specific to wpa_cli.