All looks fantastic, a few small details inline...
Renee Danson wrote:
> I've made the following doc updates, in preparation for our PSARC
> commitment review:
>
> * Completed the (hopefully!) final update of the Phase 1 Spec, found at
> http://opensolaris.org/os/project/nwam/p1spec
>
>
http://opensolaris.org/os/project/nwam/p1spec/overview/
1.3 - in discussing things phase 1 does over 0.5,
a few nits:
- phase 0.5 does hotplug too
- we're not delivering tunnels for phase 1 (or at
least the initial putback), right?
The big win that I think people will notice is
nameservice, IPsec, IPfilter configuration etc, which
is probably covered by the "more robust profile
mechanism" bulletpoint, but it might be no
harm to unpack that adding "more complete
profile mechanism, supporting nameservice
configuration, IPsec, ...".
http://opensolaris.org/os/project/nwam/p1spec/ui/CLI/
In example 3, nwamadm states now match
SMF states, so it should probably look like:
# nwamadm list -t location
TYPE PROFILE STATE
location Automatic offline
location NoNet offline
location home offline
location office offline
location coffeeshop online
#
(assuming all the non-system profiles are conditional.
It might be no harm to have a few manual profiles too,
which would be "disabled").
BTW, we should probably define the
semantics of the various states as
they relate to profiles (in the nwamadm
manpage?). Here's my rough definition:
disabled - the manual profile has been disabled
by the administrator.
offline - the conditions of the conditional/system profile
are not satisfied, or in cases where only one profile
can be active at a time (locations), a profile with more
specific conditions has been given preference over this
one.
online - the conditions of the conditional/system
profile are satisfied, or the manual profile has
been enabled by the administrator.
maintenance - application of the profile failed.
uninitialized - the profile represents a configuration
object not present on the system (e.g. a physical
link that has been removed).
http://opensolaris.org/os/project/nwam/p1spec/API/
On the event stuff, I noticed I forgot to rip out
the event callback function typedef (we got
rid of the callback approach and moved to
the wait-for-event model that 0.5 uses) from
libnwam.h. I've done that now, and it might make
things clearer if we distinguish between client
event functions and those nwamd uses to talk
to those clients, i.e. something like this:
/* NWAM client functions, used to register/unregister and receive events */
extern nwam_error_t nwam_events_init(void);
extern void nwam_events_fini(void);
extern nwam_error_t nwam_event_wait(nwam_event_t *);
extern void nwam_event_free(nwam_event_t);
/*
* NWAM daemon functions, used to send, stop sending, initialize or finish
* event IPC.
*/
extern nwam_error_t nwam_event_send(nwam_event_t);
extern void nwam_event_send_fini(void);
extern nwam_error_t nwam_event_queue_init(const char *);
extern void nwam_event_queue_fini(const char *);
I've updated the header file to look like this too
(and to update the event definitions, see below...).
Additionally Darren mentioned it'd be useful for us
to pass up the channel along with other scan data
for WLANs, so I've added a channel field to the
nwam_event_wlan_t.
http://opensolaris.org/os/project/nwam/p1spec/daemon/
7.4: the events have changed a little bit - I tried to
make the naming more consistent, and coalesce
things a bit for the IF and link state events, so
DL_NOTE_LINK_DOWN and DL_NOTE_LINK_UP
are both NWAM_EVENT_TYPE_LINK_STATE,
while EC_DEV_ADD/REMOVE are
NWAM_EVENT_TYPE_LINK_ACTION. Similarly
IF_UP/DOWN are both NWAM_EVENT_TYPE_IF_ACTION
(the body of the event specifies the details).
SCAN_REPORT is NWAM_EVENT_TYPE_WLAN_SCAN_REPORT
CONNECTION_REPORT is
NWAM_EVENT_TYPE_WLAN_CONNECTION_REPORT
(this is in my latest push of the header file - I'd wrongly
replaced it with a CONNECT_FAILED event, forgetting
we also need to send an event when connections succeed).
I also broke the NO_MAGIC event up into
NWAM_EVENT_TYPE_WLAN_NEED_CHOICE and
NWAM_EVENT_TYPE_WLAN_NEED_KEY, since
these event names are bit more informative about
the details the consumer needs to provide.
7.5: I think we removed NCU contingencies
for now.
> * Updated the man pages; there might be a few more tweaks on those
> tomorrow. They're found at
> http://opensolaris.org/os/project/nwam/p1spec/manpages
>
>
http://opensolaris.org/os/project/nwam/p1spec/manpages/nwamadm_1m/
...needs the states in example 3 updated, and possibly
addition of the state definitions mentioned above.
http://opensolaris.org/os/project/nwam/p1spec/manpages/netcfgd_1m/
...states that it's started by nwamd, but it isn't - it's an
enabled-by-default service.
Thanks!
Alan