New wpa_supplicand dbus API proposal
Dan Williams
dcbw
Tue Jun 16 13:19:24 PDT 2009
On Fri, 2009-06-12 at 00:08 +0200, Marcel Holtmann wrote:
> Hi Witold,
>
> > 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
>
> can we add an Ifindex -> u here. So you can optionally give the
> interface index or the name. Could be useful in some cases where
> everything is based around the ifindex anyway.
That's reasonable; device names aren't stable but ifindexes are (while
the machine is up of course).
> > 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}
>
> I still think using Device instead of Interface is better for the sake
> of mind :)
>
> > ****************************************
> >
> > 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
>
> Can we just add the Ifindex for completion here.
>
> > P: Driver (read-only) -> s
> > P: Bridge-ifname (read-only) -> s
> > P: Level (read/write) -> u
>
> What is Level. It is not intuitive.
>
> > 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
> >
> > 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}
>
> So what is the difference between Enabled and SelectNetwork() call. This
> differentiation confused the hell out of me already with the current
> code. Why do we bother here at all.
>
> Lets just use SelectNetwork() to switch between networks and forget
> about Enabled stuff. If some network should not be in the list, then
> just lets use RemoveNetwork().
If we were to just use SelectNetwork(), how would we completely
disconnect the supplicant and tell it to stop doing anything? We could
make SelectNetwork with a blank object path do that for us.
BTW, enabled/disabled is what allows the supplicant to make the roaming
decisions for us, so while it doesn't get used by NM right *now*, maybe
we want to push that sort of thing to the supplicant in the future.
Currently NM only enables one network at a time.
Dan
> > ****************************************
> >
> > 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)
> >
> > ****************************************
>
> Looks good after a really quick review.
>
> Regards
>
> Marcel
>
>
More information about the Hostap
mailing list