just to follow up, I've pushed these changes now.
I'm not sure if we're planning another build today,
but either today or tomorrow the changes will be
available for use. I've placed a webrev at

http://zhadum.east/export/ws/amaguire/nwam1-fixes/webrev/

which shows the changes made in case any bugs crop up -
I've tried to test as much as possible, but some things may
have gotten through.

Remember, once this build is installed, /etc/nwam/ncp-*.conf
files must be removed, and the GUI may not work as
expected (since the structure fields it expects for events
and wlans have changed name).

Thanks!

Alan

Alan Maguire wrote:
> one thing I forgot - with these changes, I'm pushing
> the fix for
>
> http://defect.opensolaris.org/bz/show_bug.cgi?id=11001
>
> DHCP and AUTOCONF are required in the ipv6-addrsrc property
>
> The implications of this are that an ipv6-addrsrc
> in an IP NCU _must_ (if set) specify dhcp and autoconf.
> The reason for this is we don't have a way to switch
> these off at present in nwamd, so we don't want
> to mislead people into thinking they can configure
> static-only. This may have consequences for the test suite and
> the GUI, and again existing NCP configuration
> will have to be nuked (since an existing config
> specifying static only for example will be invalid).
>
> These changes will be pushed together with
> those described below. Thanks!
>
> Alan
>
>
>
> Alan Maguire wrote:
>> hi folks
>>
>> given their scope, I wanted to give people
>> notice about some libnwam changes that
>> impact the GUI and existing NWAM NCP
>> configuration. These arise out of libnwam
>> code review.
>>
>> Firstly, the enum nwam_ip_version_t
>> and its associated values NWAM_IP_VERSION_IPV4
>> NWAM_IP_VERSION_IPV6 will be replaced
>> by the more generic (and already existing)
>> IPV4_VERSION and IPV6_VERSION values.
>> These are #define'd in /usr/include/inet/ip.h and
>> /usr/include/inet/ip6.h respectively (these are
>> #include'd via libnwam.h), but since they have
>> different values (4 and 6) to those used in the
>> previously-used enum, it is necessary to remove
>> any existing NCP  configuration prior to using
>> libnwam/nwamd on a build with these changes
>> in (tomorrow's build will have the changes hopefully). So
>> it's just a matter of removing /etc/nwam/ncp-*.conf
>> and restarting nwamd. The GUI should remove
>> any references to nwam_ip_version_t or
>> NWAM_IP_VERSION_IPV4/NWAM_IP_VERSION_IPV6
>> and replace them with IPV4_VERSION/IPV6_VERSION.
>>
>> Secondly, the structure fields of nwam_event_t
>> and nwam_wlan_t's will be changing names,
>> adding a prefix qualifier (nwe_ for nwam events,
>> nww_ for nwam_wlan_t's etc). This will likely
>> be a reasonably big job for the GUI to change
>> references to these fields, but I'm afraid it
>> can't be helped. Hopefully getting it done
>> ASAP will mean it won't impact on our time
>> too much. I've made the changes to the onnv
>> consumers of libnwam (nwamd, nwamcfg, nwamadm).
>>
>> I'll detail the changes here in advance:
>>
>> nwam_wlan_t: The new definition is
>>
>> typedef struct {
>>        char nww_essid[NWAM_MAX_NAME_LEN];
>>        char nww_bssid[NWAM_MAX_NAME_LEN];
>>        char nww_signal_strength[NWAM_MAX_NAME_LEN];
>>        uint32_t nww_security_mode; /* a dladm_wlan_secmode_t */
>>        uint32_t nww_speed; /* a dladm_wlan_speed_t */
>>        uint32_t nww_channel; /* a dladm_wlan_channel_t */
>>        uint32_t nww_bsstype; /* a dladm_wlan_bsstype_t */
>>        uint_t nww_keyindex;
>>        boolean_t nww_have_key;
>>        boolean_t nww_selected;
>>        boolean_t nww_connected;
>> } nwam_wlan_t;
>>
>> ...i.e. fields are all prefixed by "nww_"
>>
>> nwam_event_t: The new definition is:
>>
>> struct nwam_event {
>>        int nwe_type;
>>        uint32_t nwe_size;
>>
>>        union {
>>                struct {
>>                        nwam_object_type_t nwe_object_type;
>>                        char nwe_name[NWAM_MAX_NAME_LEN];
>>                        char nwe_parent[NWAM_MAX_NAME_LEN];
>>                        nwam_action_t nwe_action;
>>                } nwe_object_action;
>>
>>                struct {
>>                        nwam_object_type_t nwe_object_type;
>>                        char nwe_name[NWAM_MAX_NAME_LEN];
>>                        nwam_state_t nwe_state;
>>                        nwam_aux_state_t nwe_aux_state;
>>                } nwe_object_state;
>>
>>                struct {
>>                        int64_t nwe_priority;
>>                } nwe_priority_group_info;
>>
>>                struct {
>>                        char nwe_message[NWAM_MAX_VALUE_LEN];
>>                } nwe_info;
>>
>>                /*
>>                 * wlan_info stores both scan results and the single
>>                 * WLAN we require a key for in the case of 
>> _WLAN_NEED_KEY
>>                 * events.  For _WLAN_CONNECTION_REPORT events, it stores
>>                 * the WLAN the connection succeeded/failed for, 
>> indicating
>>                 * success/failure using the 'connected' boolean.
>>                 */
>>                struct {
>>                        char nwe_name[NWAM_MAX_NAME_LEN];
>>                        boolean_t nwe_connected;
>>                        uint16_t nwe_num_wlans;
>>                        nwam_wlan_t nwe_wlans[1];
>>                        /*
>>                         * space may be allocated by user here for the
>>                         * number of wlans
>>                         */
>>                } nwe_wlan_info;
>>
>>                struct {
>>                        char nwe_name[NWAM_MAX_NAME_LEN];
>>                        nwam_action_t nwe_action;
>>                } nwe_if_action;
>>
>>                struct {
>>                        char nwe_name[NWAM_MAX_NAME_LEN];
>>                        uint32_t nwe_flags;
>>                        uint32_t nwe_index;
>>                        uint32_t nwe_addr_valid; /* boolean */
>>                        uint32_t nwe_addr_added; /* boolean */
>>                        struct sockaddr_storage nwe_addr;
>>                        /* might be longer then sizeof(if_state) for 
>> addr */
>>                } nwe_if_state;
>>
>>                struct {
>>                        char nwe_name[NWAM_MAX_NAME_LEN];
>>                        int32_t nwe_link_state;
>>                        /* link_state_t from sys/mac.h */
>>                } nwe_link_state;
>>
>>                struct {
>>                        char nwe_name[NWAM_MAX_NAME_LEN];
>>                        nwam_action_t nwe_action;
>>                } nwe_link_action;
>>        } nwe_data;
>> };
>>
>> i.e. fields and nested structures are all prefixed by "nwe_".
>>
>> Again, apologies for the scope of the changes, hopefully
>> getting this done ASAP will make life easier in the long
>> run.
>>
>> Alan
>> _______________________________________________
>> nwam-dev mailing list
>> nwam-dev at opensolaris.org
>> http://mail.opensolaris.org/mailman/listinfo/nwam-dev
>

Reply via email to