New wpa_supplicand dbus API proposal

Witold Sowa witold.sowa at gmail.com
Thu Jun 25 20:07:33 EDT 2009


Witold Sowa pisze:
> Hi,
> Here is second proposal of new DBus API build basing of our earlier
> e-mail correspondence, Marcel's remarks and arrangement I made with Dan
> on #wireless.
> I will start to implement this in next week. Request for comments.
>
> Service Name: fi.w1.wpa_supplicant1
>
> O: /fi/w1/wpa_supplicant1
> I : fi.w1.wpa_supplicant1
>
> M: CreateInterface(args a{sv}) -> path o
>    args: Ifname -> s
>          Driver -> s
>          Bridge-ifname -> s
>          Level -> u
>          Timestamp -> b
>          Show_keys -> b
> E: fi.w1.wpa_supplicant1.InterfaceExists
>    fi.w1.wpa_supplicant1.InterfaceUnknown
>    fi.w1.wpa_supplicant1.UnknownError
>
> M: RemoveInterface(path o)
> E: fi.w1.wpa_supplicant1.InterfaceUnknown
>    fi.w1.wpa_supplicant1.UnknownError
>
> M: GetInterface(ifname s) -> path o
> E: fi.w1.wpa_supplicant1.InterfaceUnknown
>    fi.w1.wpa_supplicant1.UnknownError
>
> P: Interfaces -> ao
>    EapMethods -> as
>
> S: InterfaceAdded -> path o
> S: InterfaceRemoved -> path o
> S: PropertiesChanged -> properties a{sv}
>
> ****************************************
>
> O: /fi/w1.wpa_supplicant1/Interfaces/<interface_number>
> I: fi.w1.wpa_supplicant1.Interface
>
> P: Capabilities (read-only) -> a{sv}
>      Pairwise -> as          [ccmp, tkip, none]
>      Group -> as             [ccmp, tkip, wep104, wep40]
>      Keymgmt -> as           [wpa-psk, wpa-eap, ieee8021x, wpa-none,
> wps, none]
>      Protocol -> as          [rsn, wpa]
>      AuthAlg -> as           [open, shared, leap]
>      Scan -> as              [active, passive, ssid, bssid, ies, channel]
> P: State (read-only) -> s    [disconnected, inactive, scanning,
> authenticating, associating, associated, way_handshake, group_handshake,
> completed, unknown]
> P: Scanning (read-only) -> b
> P: ApScan (read/write) -> u  [0, 1, 2]
> P: Ifname (read-only) -> s
> P: Driver (read-only) -> s
> P: Bridge-ifname (read-only) -> s
> P: Level (read/write) -> u
> P: Timestamp (read/write) -> b
> P: Show_keys (read/write) -> b
> P: Blobs (read-only) ->ao
> P: Bsss (read-only) -> ao
> P: Networks (read-only) -> ao
>
> M: Scan (args a{sv})
>      args: Type -> s          [active, passive]
>            SSIDs -> aay       array of (SSID)
>            IEs -> aay         array of (IE)
>            Channels -> a(uu)  array of (center freq in KHz, width)
>
> E: fi.w1.wpa_supplicant1.Interface.ScanDenied
>    fi.w1.wpa_supplicant1.Interface.ScanError
>    fi.w1.wpa_supplicant1.InvalidArgs
>
> M: Disconnect
> E: fi.w1.wpa_supplicant1.Interface.NotConnected
>
> M: AddNetwork (args a{sv}) -> o
>      args: <dict of network properties, see
> fi.w1.wpa_supplicant1.Interface.Network>
>
> M: RemoveNetwork (path o)
> E: fi.w1.wpa_supplicant1.Interface.NetworkUnknown
>
> M: SelectNetwork (path o)
> E: fi.w1.wpa_supplicant1.Interface.NetworkUnknown
>
> M: AddBlob (name s, data ay) -> o
> E: fi.w1.wpa_supplicant1.Interface.BlobExists
> E: fi.w1.wpa_supplicant1.UnknownError
>
> M: RemoveBlob (path o)
> E: fi.w1.wpa_supplicant1.Interface.BlobUnknown
>   
Do we actually need blobs DBus objects? Couldn't we simplify it a bit
and just have methods AddBlob(name,data), RemoveBlob(name),
GetBlob(name), property Blobs returning array of names, and signals
BlobAdded/Removed with name as an argument?
> S: PropertiesChanged -> properties a{sv}
> S: ScanDone -> success b
> S: StateChanged -> new_state s, old_state s
> S: BssAdded -> path o
> S: BssRemoved -> path o
> S: BlobAdded -> path o
> S: BlobRemoved -> path o
>
> There were missing these signals in original Dan's proposal:
> S: NetworkAdded, -> path o
> S: NetworkRemoved -> path o
> S: NetworkSelected -> path o
>
> ****************************************
>
> O: /fi/w1.wpa_supplicant1/Interfaces/<interface_number>
> I: fi.w1.wpa_supplicant1.Interface.WPS
>
> M: Start (args a{sv}) -> a{sv}
>      args: Role -> s         [enrollee, registrar]
>            Type -> a         [pin, pbc]
>            Bssid -> ay       (optional)
>            Pin -> s          (optional)
>      Returns:
>            Pin -> s          (autogenerated PIN if not specified in args)
> P: Credentials (read-only) -> a{sv}
>      BSSID -> ay
>      SSID -> ay
>      AuthType -> as                       [open, shared, wpa-psk,
> wpa-eap, wpa2-eap, wpa2-psk]
>      EncrType -> as                       [none, wep, tkip, aes]
>      Key -> ay                            byte-array of key data
>      KeyIndex -> u
> P: ProcessCredentials (read/write) -> b   (TRUE ==
> wps_cred_processing=2, FALSE == wps_cred_processing=1)
> S: PropertiesChanged -> a{sv}
> S: Event -> name s, args a{sv}
>
> ****************************************
>
> O:
> /fi/w1.wpa_supplicant1/Interfaces/<interface_number>/Networks/<network_number>
> I: fi.w1.wpa_supplicant1.Interface.Network
>
> P: Enabled (read/write) -> b
> P: <wpa_supplicant network block properties> (read/write) -> a{sv}
>      - Most properties can be set as strings, but can also be set
>        as a byte array if necessary (SSID, BSSID, PSK, etc).  Supplicant
>        can autoconvert like it does right now.
>
> S: PropertiesChanged -> a{sv}
>
> ****************************************
>
> O: /fi/w1.wpa_supplicant1/Interfaces/<interface_number>/Blobs/<blob_name>
> I: fi.w1.wpa_supplicant1.Interface.Blob
>
> P: Name (read-only) -> s
> P: Data (read-only) -> ay
>
> ****************************************
>
> O: /fi/w1.wpa_supplicant1/Interfaces/<interface_number>/BSSs/<BSSID>
> I: fi.w1.wpa_supplicant1.Interface.BSS
>
> P: <BSS properties - identical to current BSSID properties> (read-only)
>
> ****************************************
>
> Regards,
> Witek
>   



More information about the HostAP mailing list