1*6ba597c5SAnurag S. Maskey# 2*6ba597c5SAnurag S. Maskey# CDDL HEADER START 3*6ba597c5SAnurag S. Maskey# 4*6ba597c5SAnurag S. Maskey# The contents of this file are subject to the terms of the 5*6ba597c5SAnurag S. Maskey# Common Development and Distribution License (the "License"). 6*6ba597c5SAnurag S. Maskey# You may not use this file except in compliance with the License. 7*6ba597c5SAnurag S. Maskey# 8*6ba597c5SAnurag S. Maskey# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*6ba597c5SAnurag S. Maskey# or http://www.opensolaris.org/os/licensing. 10*6ba597c5SAnurag S. Maskey# See the License for the specific language governing permissions 11*6ba597c5SAnurag S. Maskey# and limitations under the License. 12*6ba597c5SAnurag S. Maskey# 13*6ba597c5SAnurag S. Maskey# When distributing Covered Code, include this CDDL HEADER in each 14*6ba597c5SAnurag S. Maskey# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*6ba597c5SAnurag S. Maskey# If applicable, add the following below this CDDL HEADER, with the 16*6ba597c5SAnurag S. Maskey# fields enclosed by brackets "[]" replaced with your own identifying 17*6ba597c5SAnurag S. Maskey# information: Portions Copyright [yyyy] [name of copyright owner] 18*6ba597c5SAnurag S. Maskey# 19*6ba597c5SAnurag S. Maskey# CDDL HEADER END 20*6ba597c5SAnurag S. Maskey# 21*6ba597c5SAnurag S. Maskey# 22*6ba597c5SAnurag S. Maskey# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 23*6ba597c5SAnurag S. Maskey# Use is subject to license terms. 24*6ba597c5SAnurag S. Maskey# 25*6ba597c5SAnurag S. Maskey# lib/libnwam/README 26*6ba597c5SAnurag S. Maskey# 27*6ba597c5SAnurag S. Maskey 28*6ba597c5SAnurag S. MaskeyNAME 29*6ba597c5SAnurag S. Maskey libnwam - Network Auto-Magic (NWAM) configuration and event 30*6ba597c5SAnurag S. Maskey management library 31*6ba597c5SAnurag S. Maskey 32*6ba597c5SAnurag S. MaskeyDESCRIPTION 33*6ba597c5SAnurag S. Maskey 34*6ba597c5SAnurag S. MaskeyThe libnwam library is provided so that the various consumers of 35*6ba597c5SAnurag S. MaskeyNetwork Auto-Magic (NWAM) configuration information - i.e. the NWAM 36*6ba597c5SAnurag S. MaskeyGUI, the nwamcfg CLI and the NWAM daemon - have a consistent interface 37*6ba597c5SAnurag S. Maskeyfor retrieving and updating NWAM-related configuration data, abstracted 38*6ba597c5SAnurag S. Maskeyfrom the actual manner in which the data is persistently stored. It 39*6ba597c5SAnurag S. Maskeyprovides functionality to interact with the key components of NWAM 40*6ba597c5SAnurag S. Maskeyconfiguration, as described below. Additionally the library provides 41*6ba597c5SAnurag S. Maskeyfunctionality for system events to flow from the NWAM daemon to a 42*6ba597c5SAnurag S. Maskeyclient (like the GUI panel applet). 43*6ba597c5SAnurag S. Maskey 44*6ba597c5SAnurag S. MaskeyEach of these configuration components is referred to as an 'entity'. 45*6ba597c5SAnurag S. Maskey 46*6ba597c5SAnurag S. MaskeyNetwork Configuration Units (NCUs): units that specify either link or 47*6ba597c5SAnurag S. Maskeyinterface (IP) configuration. An NCP consists of a set of NCUs, one for 48*6ba597c5SAnurag S. Maskeyeach datalink (physical, tunnel, aggregation etc), and one for each IP 49*6ba597c5SAnurag S. Maskeyinterface. 50*6ba597c5SAnurag S. Maskey 51*6ba597c5SAnurag S. MaskeyNetwork Configuration Profiles (NCPs): A network configuration profile (NCP) 52*6ba597c5SAnurag S. Maskeycomprises of a set of NCUs specifying configuration preferences to be applied 53*6ba597c5SAnurag S. Maskeywhen that profile is active. 54*6ba597c5SAnurag S. Maskey 55*6ba597c5SAnurag S. MaskeyLocations: A location consists of additional configuration preferences 56*6ba597c5SAnurag S. Maskeyto be applied when basic IP configuration is complete. Information 57*6ba597c5SAnurag S. Maskeysuch as name service specification, proxies, etc. can be specified. 58*6ba597c5SAnurag S. Maskey 59*6ba597c5SAnurag S. MaskeyExternal Network Modifiers (ENMs): units that specify an external service 60*6ba597c5SAnurag S. Maskeyor executable that modifies the network configuration. Properties of an 61*6ba597c5SAnurag S. MaskeyENM include an FMRI or Start and Stop exec strings, an optional environment 62*6ba597c5SAnurag S. Maskeywhich will be activated when the ENM is started, an activation type specifying 63*6ba597c5SAnurag S. Maskeywhen the ENM should be started (e.g. on user input, dependent on an NCU-- 64*6ba597c5SAnurag S. Maskeyeither requiring or excluding a particular NCU, or always-on). Each ENM 65*6ba597c5SAnurag S. Maskeyalso has a read-only state property, which indicates whether or not the 66*6ba597c5SAnurag S. MaskeyENM has been activated by nwam. 67*6ba597c5SAnurag S. Maskey 68*6ba597c5SAnurag S. MaskeyKnown WiFi Networks (known WLANs): units that specify configuration 69*6ba597c5SAnurag S. Maskeydata associated with known WiFi access points that the user visits. If 70*6ba597c5SAnurag S. Maskeya WLAN found by scanning is one of the known WLANs, NWAM will automatically 71*6ba597c5SAnurag S. Maskeyconnect. Priorities associated with known WLANs can also be manipulated 72*6ba597c5SAnurag S. Maskeyallowing users to prioritize particular WLANs. 73*6ba597c5SAnurag S. Maskey 74*6ba597c5SAnurag S. MaskeyEvents 75*6ba597c5SAnurag S. Maskey 76*6ba597c5SAnurag S. MaskeyThe event interface allows a client of NWAM (usu. the GUI) to subscribe 77*6ba597c5SAnurag S. Maskeyto a stream of system events such as link and interface up/down, 78*6ba597c5SAnurag S. Maskeywireless scans, and times when NWAM needs the user to be queried. 79*6ba597c5SAnurag S. Maskey 80*6ba597c5SAnurag S. MaskeyEvents types are in libnwam.h as NWAM_EVENTS_* and the actual bodies of 81*6ba597c5SAnurag S. Maskeythe events are in nwam_events_msg_t. The semantics of the events have 82*6ba597c5SAnurag S. Maskeybeen simplified so that none require response. They are all 83*6ba597c5SAnurag S. Maskeynotification. 84*6ba597c5SAnurag S. Maskey 85*6ba597c5SAnurag S. MaskeyNWAM_EVENTS_SOURCE_{DEAD,BACK} provide notification that the nwam 86*6ba597c5SAnurag S. Maskeydaemon has died or has reappeared. These are synthetic events in that 87*6ba597c5SAnurag S. Maskeythey come from the library and not from nwamd. 88*6ba597c5SAnurag S. Maskey 89*6ba597c5SAnurag S. MaskeyNWAM_EVENTS_NO_MAGIC provides notification that nwam couldn't make a 90*6ba597c5SAnurag S. Maskeydetermination of what to do without user guidance. This event provides 91*6ba597c5SAnurag S. Maskeyinformation that can be used to ask the user if he wants to pick a 92*6ba597c5SAnurag S. Maskeywireless lan although in some cases nwam might have no idea what is 93*6ba597c5SAnurag S. Maskeyintended. 94*6ba597c5SAnurag S. Maskey 95*6ba597c5SAnurag S. MaskeyNWAM_EVENTS_IF_{STATE,REMOVED} provide information about changes in 96*6ba597c5SAnurag S. Maskeyinterface state or the removal of an interface. 97*6ba597c5SAnurag S. Maskey 98*6ba597c5SAnurag S. MaskeyNWAM_EVENTS_LINK_{STATE, REMOVED} provides information about changes in 99*6ba597c5SAnurag S. Maskeylink state or the removal of a link. 100*6ba597c5SAnurag S. Maskey 101*6ba597c5SAnurag S. MaskeyNWAM_EVENTS_SCAN_REPORT is used to communicate information about 102*6ba597c5SAnurag S. Maskeywireless networks encountered. 103*6ba597c5SAnurag S. Maskey 104*6ba597c5SAnurag S. MaskeyPersistent configuration state of entities is stored in project-private 105*6ba597c5SAnurag S. Maskey/etc/nwam configuration files, and the details of storage are hidden 106*6ba597c5SAnurag S. Maskeyfrom libnwam consumers. 107*6ba597c5SAnurag S. Maskey 108*6ba597c5SAnurag S. MaskeyAccess to entities is attained via an entity-specific handle. These 109*6ba597c5SAnurag S. Maskeyhandles can be obtained via calls to nwam_<entity>_create() or 110*6ba597c5SAnurag S. Maskeynwam_<entity>_read(), and freed (in memory) via calls to nwam_<entity>_free(). 111*6ba597c5SAnurag S. Maskeynwam_<entity>_create() will create an in-memory representation of the 112*6ba597c5SAnurag S. Maskeyentity, but that entity will not be stored until nwam_<entity>_commit() is 113*6ba597c5SAnurag S. Maskeycalled. Persistently stored entitites are retrieved via nwam_<entity>_read(), 114*6ba597c5SAnurag S. Maskeycan be modified in-memory, and later persistently committed to storage 115*6ba597c5SAnurag S. Maskeyvia nwam_<entity>_commit(). Entities can also be copied with 116*6ba597c5SAnurag S. Maskeynwam_<entity>_copy(). 117*6ba597c5SAnurag S. Maskey 118*6ba597c5SAnurag S. MaskeyAll changes made after binding a handle to an entity, and prior to calling 119*6ba597c5SAnurag S. Maskeynwam_<entity>_commit() are carried out on the in-memory representation of that 120*6ba597c5SAnurag S. Maskeyentity. nwam_<entity>_commit() updates persistent storage in an all-or-none 121*6ba597c5SAnurag S. Maskeytransactional manner, applying the (possibly changed) in-memory representation 122*6ba597c5SAnurag S. Maskeyto persistent storage atomically. 123*6ba597c5SAnurag S. Maskey 124*6ba597c5SAnurag S. MaskeyTo destroy an entity in persistent storage, nwam_<entity>_destroy() is 125*6ba597c5SAnurag S. Maskeyused. This is distinct from nwam_<entity>_free(), which simply frees 126*6ba597c5SAnurag S. Maskeythe in-memory representation - destroy both removes the object from 127*6ba597c5SAnurag S. Maskeypersistent storage, and frees it in memory. 128*6ba597c5SAnurag S. Maskey 129*6ba597c5SAnurag S. MaskeyTo summarize, the pattern of interactions with an entity is 130*6ba597c5SAnurag S. Maskey - nwam_<entity>_read(), nwam_<entity>_create() or nwam_<entity>_copy() 131*6ba597c5SAnurag S. Maskey - possibly modify entity properties 132*6ba597c5SAnurag S. Maskey - nwam_<entity>_commit() or nwam_<entity>_destroy() 133*6ba597c5SAnurag S. Maskey - nwam_<entity>_handle_free() 134*6ba597c5SAnurag S. Maskey 135*6ba597c5SAnurag S. MaskeyUnless otherwise stated functions in libnwam are MT-safe. The 136*6ba597c5SAnurag S. Maskeyatomicity of _commit() and _read() operations is guaranteed - i.e. 137*6ba597c5SAnurag S. Maskey_commit() is guaranteed to deliver all property changes to persistent 138*6ba597c5SAnurag S. Maskeystorage, while _read() is guaranteed to read a consistent view of the 139*6ba597c5SAnurag S. Maskeyentity (i.e. _read() cannot collide with another entity _commit()ting 140*6ba597c5SAnurag S. Maskeychanges). However, it is possible that a _read() will retrieve an 141*6ba597c5SAnurag S. Maskeyoutdated view of an entity, if after the _read() completes, another 142*6ba597c5SAnurag S. Maskeyentity _commit()s changes. In other words, lost updates are possible. 143*6ba597c5SAnurag S. MaskeyThese are permitted given the nature of the entities changing NWAM 144*6ba597c5SAnurag S. Maskeyconfiguration (the CLI and GUI) - it seems intuitive that the most 145*6ba597c5SAnurag S. Maskeyrecent update best captures user intent. 146*6ba597c5SAnurag S. Maskey 147*6ba597c5SAnurag S. MaskeyEntity validation on an in-memory representation can be explicitly requested 148*6ba597c5SAnurag S. Maskeyvia a call to nwam_<entity>_validate(), and individual property values 149*6ba597c5SAnurag S. Maskeycan be validated via nwam_<entity>_validate_prop(). 150*6ba597c5SAnurag S. Maskey 151*6ba597c5SAnurag S. MaskeyStorage and retrieval of properties is done via nwam_<entity>_set_prop_value() 152*6ba597c5SAnurag S. Maskeyand nwam_<entity>_get_prop_value(). These functions require an nwam_value_t as 153*6ba597c5SAnurag S. Maskeya parameter, which is created via the nwam_value_create_<type>() family 154*6ba597c5SAnurag S. Maskeyof functions. Data can be retrieved from the nwam_value_t via the 155*6ba597c5SAnurag S. Maskeynwam_value_get_<type>() family of functions. Once a property has been 156*6ba597c5SAnurag S. Maskeyset, the associated nwam_value_t can be immediately freed. For retrieval, 157*6ba597c5SAnurag S. Maskeythe nwam_value_t should be freed when the value(s) are no longer needed. 158*6ba597c5SAnurag S. MaskeyA property can also be delete with nwam_<entity>_delete_prop(). 159*6ba597c5SAnurag S. Maskey 160*6ba597c5SAnurag S. MaskeyImplicit validation occurs as part of the nwam_<entity>_set_prop_value() 161*6ba597c5SAnurag S. Maskeyand nwam_<entity>_commit() functions. 162*6ba597c5SAnurag S. Maskey 163*6ba597c5SAnurag S. MaskeyINTERFACES 164*6ba597c5SAnurag S. Maskey 165*6ba597c5SAnurag S. MaskeyFor error handling: 166*6ba597c5SAnurag S. Maskey 167*6ba597c5SAnurag S. Maskeyconst char *nwam_strerror(nwam_error_t error); 168*6ba597c5SAnurag S. Maskey 169*6ba597c5SAnurag S. MaskeyFor values: 170*6ba597c5SAnurag S. Maskey 171*6ba597c5SAnurag S. MaskeyValues can be any of the following types: 172*6ba597c5SAnurag S. Maskey 173*6ba597c5SAnurag S. Maskey NWAM_VALUE_TYPE_BOOLEAN 174*6ba597c5SAnurag S. Maskey NWAM_VALUE_TYPE_UINT64 175*6ba597c5SAnurag S. Maskey NWAM_VALUE_TYPE_INT64 176*6ba597c5SAnurag S. Maskey NWAM_VALUE_TYPE_STRING 177*6ba597c5SAnurag S. Maskey 178*6ba597c5SAnurag S. Maskeyand are possibly multi-valued. An nwam_value_t must be created in order 179*6ba597c5SAnurag S. Maskeyto set property values in libnwam, this is done via the follwing functions: 180*6ba597c5SAnurag S. Maskey 181*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_create_boolean(boolean_t, nwam_value_t *); 182*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_create_boolean_array(boolean_t *, uint_t, 183*6ba597c5SAnurag S. Maskey nwam_value_t *); 184*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_create_uint64(uint64_t, nwam_value_t *); 185*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_create_uint64_array(uint64_t *, uint_t, nwam_value_t *); 186*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_create_int64(int64_t, nwam_value_t *); 187*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_create_int64_array(int64_t *, uint_t, nwam_value_t *); 188*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_create_string(char *, nwam_value_t *); 189*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_create_string_array(char **, uint_t, nwam_value_t *); 190*6ba597c5SAnurag S. Maskey 191*6ba597c5SAnurag S. MaskeyValues are returned from the _get_prop_value() functions, and the data 192*6ba597c5SAnurag S. Maskeycontained in them can be retrieved via the following functions: 193*6ba597c5SAnurag S. Maskey 194*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_get_boolean(nwam_value_t, boolean_t *); 195*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_get_boolean_array(nwam_value_t, boolean_t **, uint_t *); 196*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_get_uint64(nwam_value_t, uint64_t *); 197*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_get_uint64_array(nwam_value_t, uint64_t **, uint_t *); 198*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_get_int64(nwam_value_t, int64_t *); 199*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_get_int64_array(nwam_value_t, int64_t **, uint_t *); 200*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_get_string(nwam_value_t, char **); 201*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_get_string_array(nwam_value_t, char ***, uint_t *); 202*6ba597c5SAnurag S. Maskey 203*6ba597c5SAnurag S. MaskeyType and number of value can be retrieved via: 204*6ba597c5SAnurag S. Maskey 205*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_get_type(nwam_value_t, nwam_value_type_t *); 206*6ba597c5SAnurag S. Maskeynwam_error_t nwam_value_get_numvalues(nwam_value_t, uint_t *); 207*6ba597c5SAnurag S. Maskey 208*6ba597c5SAnurag S. Maskeyand a value is freed using: 209*6ba597c5SAnurag S. Maskey 210*6ba597c5SAnurag S. Maskeyvoid nwam_value_free(nwam_value_t); 211*6ba597c5SAnurag S. Maskey 212*6ba597c5SAnurag S. MaskeyFor property setting, a typical set of events is to create the value, 213*6ba597c5SAnurag S. Maskeycall the appropriate set_prop_value() function, then free the value (values 214*6ba597c5SAnurag S. Maskeycan be safely freed prior to commit). For retrieval, the type and 215*6ba597c5SAnurag S. Maskeynumber of values usually need to be tested before calling the appropriate 216*6ba597c5SAnurag S. Maskeyretrieval function. In this case, the value should not be freed until 217*6ba597c5SAnurag S. Maskeythe associated data is no longer needed. 218*6ba597c5SAnurag S. Maskey 219*6ba597c5SAnurag S. MaskeyNCUs, locations and ENMs can all specify conditional activation conditions. 220*6ba597c5SAnurag S. MaskeyInterfaces are provided to convert a conditional activation predicate into 221*6ba597c5SAnurag S. Maskeya string, or from a string to a parsed set of variables that comprise the 222*6ba597c5SAnurag S. Maskeycondition. Additionally a function is provided to rate the specificity of 223*6ba597c5SAnurag S. Maskeythe activation condition, used to compare location conditions to choose 224*6ba597c5SAnurag S. Maskeythe most specific condition to activate in the case where the activation 225*6ba597c5SAnurag S. Maskeyconditions of multiple locations are specified. 226*6ba597c5SAnurag S. Maskey 227*6ba597c5SAnurag S. Maskeynwam_error_t nwam_condition_to_condition_string(nwam_condition_object_type_t, 228*6ba597c5SAnurag S. Maskey nwam_condition_t, const char *, char **); 229*6ba597c5SAnurag S. Maskeynwam_error_t nwam_condition_string_to_condition(const char *, 230*6ba597c5SAnurag S. Maskey nwam_condition_object_type_t *, nwam_condition_t *, char **); 231*6ba597c5SAnurag S. Maskeynwam_error_t nwam_condition_rate(nwam_condition_object_type_t, 232*6ba597c5SAnurag S. Maskey nwam_condition_t, uint64_t *); 233*6ba597c5SAnurag S. Maskey 234*6ba597c5SAnurag S. MaskeyFor NCP entities: 235*6ba597c5SAnurag S. Maskey 236*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncp_create(const char *name, uint64_t flags, 237*6ba597c5SAnurag S. Maskey nwam_ncp_handle_t *ncp); 238*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncp_read(const char *name, uint64_t flags, 239*6ba597c5SAnurag S. Maskey nwam_ncp_handle_t *ncp); 240*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncp_copy(nwam_ncp_handle_t ncp, const char *newname, 241*6ba597c5SAnurag S. Maskey nwam_ncp_handle_t *newncp); 242*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncp_walk_ncus(nwam_ncp_handle_t ncp, 243*6ba597c5SAnurag S. Maskey int(*cb)(nwam_ncu_handle_t, void *), void *data, uint64_t flags, int *ret); 244*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncp_get_name(nwam_ncp_handle_t ncp, char **name); 245*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncp_activate(nwam_ncp_handle_t ncp); 246*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncp_deactivate(nwam_ncp_handle_t ncp); 247*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncp_destroy(nwam_ncp_handle_t ncp, uint64_t flags); 248*6ba597c5SAnurag S. Maskeyvoid nwam_ncp_free(nwam_ncp_handle_t ncp); 249*6ba597c5SAnurag S. Maskey 250*6ba597c5SAnurag S. MaskeySince the NCP simply consists of the NCUs that comprise it, there is 251*6ba597c5SAnurag S. Maskeyno NCP-specific commit() function - we simply read the NCP, walk the 252*6ba597c5SAnurag S. Maskeyconstituent NCUs, reading, changing or committing them in turn. The 253*6ba597c5SAnurag S. Maskeywalk can be modified via the flags option to only select specific NCU types 254*6ba597c5SAnurag S. Maskeyand classes. 255*6ba597c5SAnurag S. Maskey 256*6ba597c5SAnurag S. MaskeyEach NCP has a set of NCUs associated with it, each of which is created/modifed 257*6ba597c5SAnurag S. Maskeyusing the functions below. 258*6ba597c5SAnurag S. Maskey 259*6ba597c5SAnurag S. MaskeyFor NCU entities: 260*6ba597c5SAnurag S. Maskey 261*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_create(nwam_ncp_handle_t ncp, const char *name, 262*6ba597c5SAnurag S. Maskey nwam_ncu_type_t type, nwam_ncu_class_t class, nwam_ncu_handle_t *ncu); 263*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_read(nwam_ncp_handle_t ncp, const char *name, 264*6ba597c5SAnurag S. Maskey nwam_ncu_type_t type, uint64_t flags, nwam_ncu_handle_t *ncu); 265*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_copy(nwam_ncu_handle_t ncu, const char *newname, 266*6ba597c5SAnurag S. Maskey nwam_ncu_handle_t *newncu); 267*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_commit(nwam_ncu_handle_t ncu, uint64_t flags); 268*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_destroy(nwam_ncu_handle_t ncu, uint64_t flags); 269*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_free(nwam_ncu_handle_t ncu); 270*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_validate(nwam_ncu_handle_t ncu, const char **errprop); 271*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_get_prop_value(nwam_ncu_handle_t ncu, const char *prop, 272*6ba597c5SAnurag S. Maskey nwam_value_t *value); 273*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_get_prop_description(const char *prop, 274*6ba597c5SAnurag S. Maskey const char **description); 275*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_delete_prop(nwam_ncu_handle_t ncu, const char *prop); 276*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_set_prop_value(nwam_ncu_handle_t ncu, const char *prop, 277*6ba597c5SAnurag S. Maskey nwam_value_t value); 278*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_get_name(nwam_ncu_handle_t ncu, char **name); 279*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_set_name(nwam_ncu_handle_t ncu, const char *name); 280*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_get_read_only(nwam_ncu_handle_t ncu, boolean_t *readp); 281*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_validate_prop(nwam_ncu_handle_t ncu, const char *prop, 282*6ba597c5SAnurag S. Maskey nwam_value_t value); 283*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_walk_props(nwam_ncu_handle_t ncu, 284*6ba597c5SAnurag S. Maskey int (*func)(void *, const char *, nwam_value_t), void *data, 285*6ba597c5SAnurag S. Maskey uint64_t flags, int *ret); 286*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_prop_get_type(const char *prop, 287*6ba597c5SAnurag S. Maskey nwam_value_type_t *value_type); 288*6ba597c5SAnurag S. Maskeynwam_error_t nwam_ncu_get_ncp(nwam_ncu_handle_t ncu, nwam_ncp_handle_t *ncp); 289*6ba597c5SAnurag S. Maskey 290*6ba597c5SAnurag S. MaskeyNCUs are manipulated via an nwam_ncu_handle_t. 291*6ba597c5SAnurag S. Maskey 292*6ba597c5SAnurag S. MaskeyEach NCU has a set of properties associated with it. Each property can 293*6ba597c5SAnurag S. Maskeyhave mutiple values associated with it, which are set or retrieved via an 294*6ba597c5SAnurag S. Maskeynwam_value_t. The approach is similar to that used for Locations, with 295*6ba597c5SAnurag S. Maskeythe difference that read/commit/destroy must specify an NCP. Only two 296*6ba597c5SAnurag S. MaskeyNCPs are supported at present, the automatic and user NCPs. Modification 297*6ba597c5SAnurag S. Maskeyof the former is restricted to nwamd itself, and attempts to modify 298*6ba597c5SAnurag S. Maskeythe automatic NCP's consituent NCUs will result in an NWAM_ENTITY_READ_ONLY 299*6ba597c5SAnurag S. Maskeyerror. 300*6ba597c5SAnurag S. Maskey 301*6ba597c5SAnurag S. MaskeyFor Location entities: 302*6ba597c5SAnurag S. Maskey 303*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_create(const char *name, nwam_loc_handle_t *loc); 304*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_read(const char *name, uint64_t flags, 305*6ba597c5SAnurag S. Maskey nwam_loc_handle_t *loc); 306*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_copy(nwam_loc_handle_t loc, const char *newname, 307*6ba597c5SAnurag S. Maskey nwam_loc_handle_t *newloc); 308*6ba597c5SAnurag S. Maskeynwam_error_t nwam_walk_locs(int (*cb)(nwam_loc_handle_t loc, void *arg), 309*6ba597c5SAnurag S. Maskey void *arg, uint64_t flags, int *cbretp); 310*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_commit(nwam_loc_handle_t loc, uint64_t flags); 311*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_destroy(nwam_loc_handle_t loc, uint64_t flags); 312*6ba597c5SAnurag S. Maskeyvoid nwam_loc_free(nwam_loc_handle_t loc); 313*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_validate(nwam_loc_handle_t loc, const char *errprop); 314*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_walk_props(nwam_loc_handle_t loc, 315*6ba597c5SAnurag S. Maskey int (*cb)(const char *, nwam_value_t **, void *), 316*6ba597c5SAnurag S. Maskey void *arg, uint64_t flags, int *cbret); 317*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_validate_prop(nwam_loc_handle_t loc, 318*6ba597c5SAnurag S. Maskey const char *prop, nwam_value_t value); 319*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_prop_get_type(const char *prop, 320*6ba597c5SAnurag S. Maskey nwam_value_type_t *value_type); 321*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_get_prop_value(nwam_loc_handle_t loc, const char *prop, 322*6ba597c5SAnurag S. Maskey nwam_value_t *value); 323*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_get_prop_description(const char *prop, 324*6ba597c5SAnurag S. Maskey const char **description); 325*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_delete_prop(nwam_loc_handle_t loc, const char *prop); 326*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_set_prop_value(nwam_loc_handle_t loc, const char *prop, 327*6ba597c5SAnurag S. Maskey nwam_value_t value); 328*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_get_name(nwam_loc_handle_t loc, char **name); 329*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_set_name(nwam_loc_handle_t loc, const char *name); 330*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_activate(nwam_loc_handle_t loc); 331*6ba597c5SAnurag S. Maskeynwam_error_t nwam_loc_deactivate(nwam_loc_handle_t loc); 332*6ba597c5SAnurag S. Maskey 333*6ba597c5SAnurag S. MaskeyLocations are manipulated via an nwam_loc_handle_t. 334*6ba597c5SAnurag S. Maskey 335*6ba597c5SAnurag S. MaskeyA loc handle maps to an in-memory representation of a location; operations via 336*6ba597c5SAnurag S. Maskeythis interface manipulate the in-memory data. In-memory data is read from 337*6ba597c5SAnurag S. Maskeypersistant storage via the nwam_loc_read() or nwam_walk_locs() functions, and 338*6ba597c5SAnurag S. Maskeywritten out to persistent storage via the nwam_loc_commit() function. A loc 339*6ba597c5SAnurag S. Maskeymay be permanently removed from persistent storage with the nwam_loc_destroy() 340*6ba597c5SAnurag S. Maskeyfunction. Interactions with persistent storage will be nonblocking by default; 341*6ba597c5SAnurag S. Maskeythis behavior can be changed by passing the NWAM_FLAG_BLOCKING in the flags 342*6ba597c5SAnurag S. Maskeyparameter. 343*6ba597c5SAnurag S. Maskey 344*6ba597c5SAnurag S. MaskeyA typical sequence would be to allocate a loc handle, either by creating a 345*6ba597c5SAnurag S. Maskeynew loc (nwam_loc_create()) or by reading one from persistent storage (nwam_ 346*6ba597c5SAnurag S. Maskeyloc_read() or nwam_walk_locs()). The various set/get/walk/validate/(de)activate 347*6ba597c5SAnurag S. Maskeyfunctions may then be used to manipulate the loc; any changes made may then be 348*6ba597c5SAnurag S. Maskeycommitted to persistent storage via nwam_loc_commit(). A call to nwam_loc_ 349*6ba597c5SAnurag S. Maskeyfree() is required to release in-memory resources associated with the handle. 350*6ba597c5SAnurag S. Maskey 351*6ba597c5SAnurag S. MaskeyThe flags parameter in the walk functions allows filtering of the locs that 352*6ba597c5SAnurag S. Maskeywill be examined, depending on the state of each loc. Passing in 353*6ba597c5SAnurag S. MaskeyNWAM_FLAG_STATE_ALL will examine all locs; specific state flags are defined 354*6ba597c5SAnurag S. Maskeyin <libnwam.h>. 355*6ba597c5SAnurag S. Maskey 356*6ba597c5SAnurag S. MaskeyLike NCUs, each loc has a set of properties associated with it. Loc properties 357*6ba597c5SAnurag S. Maskeyare stored in nwam_value_t structures; see the Values section for how to store/ 358*6ba597c5SAnurag S. Maskeyretrieve using these. 359*6ba597c5SAnurag S. Maskey 360*6ba597c5SAnurag S. MaskeyFor ENM entities: 361*6ba597c5SAnurag S. Maskey 362*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_create(const char *name, const char *fmri, 363*6ba597c5SAnurag S. Maskey nwam_enm_handle_t *enm); 364*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_read(const char *name, uint64_t flags, 365*6ba597c5SAnurag S. Maskey nwam_enm_handle_t *enm); 366*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_copy(nwam_enm_handle_t enm, const char *newname, 367*6ba597c5SAnurag S. Maskey nwam_enm_handle_t *newenm); 368*6ba597c5SAnurag S. Maskeynwam_error_t nwam_walk_enms(int (*cb)(nwam_enm_handle_t enm, void *arg), 369*6ba597c5SAnurag S. Maskey void *arg, uint64_t flags, int *cbretp); 370*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_commit(nwam_enm_handle_t enm, uint64_t flags); 371*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_destroy(nwam_enm_handle_t enm, uint64_t flags); 372*6ba597c5SAnurag S. Maskeyvoid nwam_enm_free(nwam_enm_handle_t enm); 373*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_validate(nwam_enm_handle_t enm, const char *errprop); 374*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_walk_props(nwam_enm_handle_t enm, 375*6ba597c5SAnurag S. Maskey int (*cb)(const char *, nwam_value_t **, void *), 376*6ba597c5SAnurag S. Maskey void *arg, uint64_t flags, int *cbret); 377*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_validate_prop(nwam_enm_handle_t enm, 378*6ba597c5SAnurag S. Maskey const char *prop, nwam_value_t value); 379*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_prop_get_type(const char *prop, 380*6ba597c5SAnurag S. Maskey nwam_value_type_t *value_type); 381*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_get_prop_value(nwam_enm_handle_t enm, const char *prop, 382*6ba597c5SAnurag S. Maskey nwam_value_t *value); 383*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_get_prop_description(const char *prop, 384*6ba597c5SAnurag S. Maskey const char **description); 385*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_delete_prop(nwam_enm_handle_t enm, const char *prop); 386*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_set_prop_value(nwam_enm_handle_t enm, const char *prop, 387*6ba597c5SAnurag S. Maskey nwam_value_t value); 388*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_get_name(nwam_enm_handle_t enm, char **name); 389*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_set_name(nwam_enm_handle_t enm, const char *name); 390*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_activate(nwam_enm_handle_t enm); 391*6ba597c5SAnurag S. Maskeynwam_error_t nwam_enm_deactivate(nwam_enm_handle_t enm); 392*6ba597c5SAnurag S. Maskey 393*6ba597c5SAnurag S. MaskeyENMs are manipulated via an nwam_enm_handle_t, in a similar manner to 394*6ba597c5SAnurag S. MaskeyNCUs and locations. 395*6ba597c5SAnurag S. Maskey 396*6ba597c5SAnurag S. MaskeyThe flags parameter in the walk functions allows filtering of the ENMs that 397*6ba597c5SAnurag S. Maskeywill be examined, depending on the state of each ENM. Passing in 398*6ba597c5SAnurag S. MaskeyNWAM_FLAG_STATE_ALL will examine all ENMs; specific state flags are defined 399*6ba597c5SAnurag S. Maskeyin <libnwam.h>. 400*6ba597c5SAnurag S. Maskey 401*6ba597c5SAnurag S. MaskeyLike NCUs, each ENM has a set of properties associated with it. ENM properties 402*6ba597c5SAnurag S. Maskeyare all single valued, though the interface is aligned with the NCU interface, 403*6ba597c5SAnurag S. Maskeywhich allows for multi-valued properties. ENM properties are stored in 404*6ba597c5SAnurag S. Maskeynwam_value_t structures; see the Values section for how to store/retrieve 405*6ba597c5SAnurag S. Maskeyusing these. 406*6ba597c5SAnurag S. Maskey 407*6ba597c5SAnurag S. MaskeyFor known WLAN entities: 408*6ba597c5SAnurag S. Maskey 409*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_create(const char *name, 410*6ba597c5SAnurag S. Maskey nwam_known_wlan_handle_t *kwhp); 411*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_read(const char *name, uint64_t flags, 412*6ba597c5SAnurag S. Maskey nwam_known_wlan_handle_t *kwhp); 413*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_copy(nwam_known_wlan_handle_t kwh, 414*6ba597c5SAnurag S. Maskey const char *newname, nwam_known_wlan_handle_t *newkwh); 415*6ba597c5SAnurag S. Maskeynwam_error_t nwam_walk_known_wlans(int (*cb)(nwam_known_wlan_handle_t, void *), 416*6ba597c5SAnurag S. Maskey void *arg, uint64_t flags, int *cbretp); 417*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_commit(nwam_known_wlan_handle_t kwh, 418*6ba597c5SAnurag S. Maskey uint64_t flags); 419*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_destroy(nwam_known_wlan_handle_t kwh, 420*6ba597c5SAnurag S. Maskey uint64_t flags); 421*6ba597c5SAnurag S. Maskeyvoid nwam_known_wlan_free(nwam_known_wlan_handle_t kwh); 422*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_validate(nwam_known_wlan_handle_t kwh, 423*6ba597c5SAnurag S. Maskey const char *errprop); 424*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_walk_props(nwam_known_wlan_handle_t kwh, 425*6ba597c5SAnurag S. Maskey int (*cb)(const char *, nwam_value_t **, void *), 426*6ba597c5SAnurag S. Maskey void *arg, uint64_t flags, int *cbret); 427*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_validate_prop(nwam_known_wlan_handle_t kwh, 428*6ba597c5SAnurag S. Maskey const char *prop, nwam_value_t value); 429*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_prop_get_type(const char *prop, 430*6ba597c5SAnurag S. Maskey nwam_value_type_t *value_type); 431*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_get_prop_value(nwam_known_wlan_handle_t kwh, 432*6ba597c5SAnurag S. Maskey const char *prop, nwam_value_t *value); 433*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_get_prop_description(const char *prop, 434*6ba597c5SAnurag S. Maskey const char **description); 435*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_delete_prop(nwam_known_wlan_handle_t kwh, 436*6ba597c5SAnurag S. Maskey const char *prop); 437*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_set_prop_value(nwam_known_wlan_handle_t kwh, 438*6ba597c5SAnurag S. Maskey const char *prop, nwam_value_t value); 439*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_get_name(nwam_known_wlan_handle_t kwh, 440*6ba597c5SAnurag S. Maskey char **name); 441*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_set_name(nwam_known_wlan_handle_t kwh, 442*6ba597c5SAnurag S. Maskey const char *name); 443*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_add_to_known_wlan(const char *essid, 444*6ba597c5SAnurag S. Maskey const char *bssid); 445*6ba597c5SAnurag S. Maskeynwam_error_t nwam_known_wlan_remove_from_known_wlan(const char *essid, 446*6ba597c5SAnurag S. Maskey const char *bssid); 447*6ba597c5SAnurag S. Maskey 448*6ba597c5SAnurag S. MaskeyKnown WLANs are manipulated via an nwam_known_wlan_handle_t, in a similar 449*6ba597c5SAnurag S. Maskeymanner to NCUs, locations and ENMs. 450*6ba597c5SAnurag S. Maskey 451*6ba597c5SAnurag S. MaskeyLike ENMs, each known WLAN has a set of properties associated with it. 452*6ba597c5SAnurag S. MaskeyKnown WLAN properties are stored in nwam_value_t structures; see the Values 453*6ba597c5SAnurag S. Maskeysection for how to store/retrieve using these. 454*6ba597c5SAnurag S. Maskey 455*6ba597c5SAnurag S. MaskeyFor WLANs, we define a set of functions to ask nwamd to initiate a scan, 456*6ba597c5SAnurag S. Maskeyselect a WLAN (and possibly add it to the known WLAN list) or set a WLAN 457*6ba597c5SAnurag S. Maskeykey: 458*6ba597c5SAnurag S. Maskey 459*6ba597c5SAnurag S. Maskey 460*6ba597c5SAnurag S. Maskeyextern nwam_error_t nwam_wlan_scan(const char *linkname); 461*6ba597c5SAnurag S. Maskeyextern nwam_error_t nwam_wlan_get_scan_results(const char *linkname, 462*6ba597c5SAnurag S. Maskey uint_t *num_resultsp, nwam_wlan_t **wlansp); 463*6ba597c5SAnurag S. Maskeyextern nwam_error_t nwam_wlan_select(const char *linkname, 464*6ba597c5SAnurag S. Maskey const char *essid, const char *bssid, boolean_t add_to_known_wlans); 465*6ba597c5SAnurag S. Maskeyextern nwam_error_t nwam_wlan_set_key(const char *linkname, const char *essid, 466*6ba597c5SAnurag S. Maskey const char *bssid, uint32_t security_mode, uint_t keyslot, const char *key); 467*6ba597c5SAnurag S. Maskey 468*6ba597c5SAnurag S. MaskeyFor Events: 469*6ba597c5SAnurag S. Maskey 470*6ba597c5SAnurag S. Maskeytypedef struct nwam_event { 471*6ba597c5SAnurag S. Maskey uint32_t type; 472*6ba597c5SAnurag S. Maskey 473*6ba597c5SAnurag S. Maskey union { 474*6ba597c5SAnurag S. Maskey struct { 475*6ba597c5SAnurag S. Maskey nwam_object_type_t object_type; 476*6ba597c5SAnurag S. Maskey char name[NWAM_MAX_NAME_LEN]; 477*6ba597c5SAnurag S. Maskey nwam_action_t action; 478*6ba597c5SAnurag S. Maskey } object_action; 479*6ba597c5SAnurag S. Maskey 480*6ba597c5SAnurag S. Maskey 481*6ba597c5SAnurag S. Maskey ... and so on for each message ... 482*6ba597c5SAnurag S. Maskey 483*6ba597c5SAnurag S. Maskey } data; 484*6ba597c5SAnurag S. Maskey 485*6ba597c5SAnurag S. Maskey} *nwam_event_t; 486*6ba597c5SAnurag S. Maskey 487*6ba597c5SAnurag S. Maskeytype comes from the set of constants NWAM_EVENT_TYPE_*. 488*6ba597c5SAnurag S. Maskey 489*6ba597c5SAnurag S. MaskeyRegistration and cancellation of registration are done via 490*6ba597c5SAnurag S. Maskey_init and _fini functions: 491*6ba597c5SAnurag S. Maskey 492*6ba597c5SAnurag S. Maskeyextern nwam_error_t nwam_events_init(void); 493*6ba597c5SAnurag S. Maskeyextern void nwam_events_fini(void); 494*6ba597c5SAnurag S. Maskey 495*6ba597c5SAnurag S. MaskeyEvents can then be recieved by calling nwam_event_wait(): 496*6ba597c5SAnurag S. Maskey 497*6ba597c5SAnurag S. Maskeyextern nwam_error_t nwam_event_wait(nwam_event_t *); 498*6ba597c5SAnurag S. Maskey 499*6ba597c5SAnurag S. MaskeyThe event can then be processed, and free via nwam_event_free(); 500*6ba597c5SAnurag S. Maskey 501*6ba597c5SAnurag S. MaskeyRETURN VALUES 502*6ba597c5SAnurag S. Maskey 503*6ba597c5SAnurag S. MaskeyAll functions return an nwam_error_t if they return an error. Possible 504*6ba597c5SAnurag S. Maskeyerrors are: 505*6ba597c5SAnurag S. Maskey 506*6ba597c5SAnurag S. Maskey NWAM_SUCCESS No error occured 507*6ba597c5SAnurag S. Maskey NWAM_LIST_END End of list 508*6ba597c5SAnurag S. Maskey NWAM_INVALID_HANDLE Entity handle is invalid 509*6ba597c5SAnurag S. Maskey NWAM_HANDLE_UNBOUND Handle not bound to entity 510*6ba597c5SAnurag S. Maskey NWAM_INVALID_ARG Argument is invalid 511*6ba597c5SAnurag S. Maskey NWAM_PERMISSION_DENIED Insufficient privileges for action 512*6ba597c5SAnurag S. Maskey NWAM_NO_MEMORY Out of memory 513*6ba597c5SAnurag S. Maskey NWAM_ENTITY_EXISTS Entity already exists 514*6ba597c5SAnurag S. Maskey NWAM_ENTITY_IN_USE Another user is interacting with entity 515*6ba597c5SAnurag S. Maskey NWAM_ENTITY_COMMITTED Entity already committed 516*6ba597c5SAnurag S. Maskey NWAM_ENTITY_NOT_FOUND Entity not found 517*6ba597c5SAnurag S. Maskey NWAM_ENTITY_TYPE_MISMATCH Entity value-type mismatch 518*6ba597c5SAnurag S. Maskey NWAM_ENTITY_INVALID Validation of entity failed 519*6ba597c5SAnurag S. Maskey NWAM_ENTITY_INVALID_MEMBER Entity member invalid 520*6ba597c5SAnurag S. Maskey NWAM_ENTITY_INVALID_VALUE Validation of entity value failed 521*6ba597c5SAnurag S. Maskey NWAM_ENTITY_NO_VALUE No value associated with entity 522*6ba597c5SAnurag S. Maskey NWAM_ENTITY_MULTIPLE_VALUES, Multiple values for entity 523*6ba597c5SAnurag S. Maskey NWAM_ENTITY_READ_ONLY, Entity is marked read only 524*6ba597c5SAnurag S. Maskey NWAM_WALK_HALTED, Callback function returned nonzero 525*6ba597c5SAnurag S. Maskey NWAM_ERROR_BIND, Could not bind to backend 526*6ba597c5SAnurag S. Maskey NWAM_ERROR_BACKEND_INIT, Could not initialize backend 527*6ba597c5SAnurag S. Maskey NWAM_ERROR_INTERNAL Internal error 528*6ba597c5SAnurag S. Maskey 529*6ba597c5SAnurag S. MaskeyFILES 530*6ba597c5SAnurag S. Maskey /lib/libnwam.so.1 shared object 531*6ba597c5SAnurag S. Maskey 532*6ba597c5SAnurag S. MaskeyATTRIBUTES 533*6ba597c5SAnurag S. Maskey 534*6ba597c5SAnurag S. Maskey 535*6ba597c5SAnurag S. MaskeySEE ALSO 536*6ba597c5SAnurag S. Maskey nwamd(1M), nwamcfg(1M), nwamadm(1M) 537