Lines Matching defs:type

93 	    "specifies the NCP management type - valid values are "
107 "specifies the NCU type - valid values are \'datalink\' and \'ip\'",
206 * Returns the configuration filename for the given NCU type.
209 nwam_ncu_filename(nwam_ncu_type_t type, const char *ncpname, char **filename)
213 if (type != NWAM_NCU_TYPE_LINK && type != NWAM_NCU_TYPE_INTERFACE)
220 type == NWAM_NCU_TYPE_LINK ? NWAM_DATALINK_CONF_FILE_PRE :
285 /* default management-type is reactive */
412 nwam_ncu_type_t type;
433 if ((err = nwam_ncu_get_ncu_type(oldncuh, &type)) != NWAM_SUCCESS ||
445 if (type == NWAM_NCU_TYPE_INTERFACE)
466 /* NCPs of "fixed" type cannot be copied */
504 * Convert type to flag
507 nwam_ncu_type_to_flag(nwam_ncu_type_t type)
509 switch (type) {
522 * Are ncu type and class compatible?
525 nwam_ncu_type_class_compatible(nwam_ncu_type_t type, nwam_ncu_class_t class)
527 switch (type) {
558 * Convert the given type and class to a class flag
561 nwam_ncu_type_class_to_flag(nwam_ncu_type_t type, nwam_ncu_class_t class)
563 if (!nwam_ncu_type_class_compatible(type, class))
566 switch (type) {
608 nwam_ncu_class_to_string(nwam_ncu_type_t type, nwam_ncu_class_t class,
613 switch (type) {
893 /* Given a property, return expected property data type */
977 /* If the "type" property does not exist, add it */
1047 * The properties type, class, parent, enabled, ip{v4,v6}-default-route
1076 /* If the "type" property doesn't exist, add it */
1367 nwam_ncu_type_t type = NWAM_NCU_TYPE_LINK;
1405 matchflags = nwam_ncu_type_to_flag(type) |
1406 nwam_ncu_type_class_to_flag(type, class);
1425 uint64_t type = NWAM_NCU_TYPE_INTERFACE, class, matchflags, walkfilter;
1484 matchflags = nwam_ncu_type_to_flag(type) |
1485 nwam_ncu_type_class_to_flag(type, class);
1555 nwam_ncu_type_t type;
1557 if (nwam_ncu_typed_name_to_name(name, &type, &n) == NWAM_SUCCESS) {
1568 nwam_ncu_create(nwam_ncp_handle_t ncph, const char *name, nwam_ncu_type_t type,
1595 if (nwam_ncu_type_class_to_flag(type, class) &
1599 if (nwam_ncu_read(ncph, name, type, 0, &ncuh) == NWAM_SUCCESS) {
1605 !nwam_ncu_type_class_compatible(type, class))
1608 if ((err = nwam_ncu_name_to_typed_name(name, type, &typedname))
1612 if ((err = nwam_ncu_filename(type, ncph->nwh_name, &ncufile))
1625 /* The new NCU is initialized with the appropriate type and class */
1626 if ((err = nwam_value_create_uint64(type, &typeval))
1648 if (type == NWAM_NCU_TYPE_INTERFACE && class == IPADMIF_CLASS_IP) {
1659 } else if (type == NWAM_NCU_TYPE_LINK && class == DATALINK_CLASS_PHYS) {
1684 nwam_ncu_type_t type, uint64_t flags, nwam_ncu_handle_t *ncuhp)
1700 if (type == NWAM_NCU_TYPE_ANY) {
1703 * NCU type is discernable from name or type arguments.
1705 * type, or the operation should fail.
1732 if ((err = nwam_ncu_filename(type, ncph->nwh_name, &ncufile))
1744 * requested type.
1746 if (type != tmptype) {
1761 if (type == NWAM_NCU_TYPE_LINK)
1800 nwam_ncu_type_t type;
1804 return (nwam_ncu_typed_name_to_name(ncuh->nwh_name, &type, namep));
1808 * Generate the link:name or interface:name from the given name and type.
1811 nwam_ncu_name_to_typed_name(const char *name, nwam_ncu_type_t type,
1819 switch (type) {
1833 /* Name may be already qualified by type */
1845 * Retrieve the NCU name and type from the given link:name or interface:name.
1885 uint64_t type;
1895 if (nwam_value_get_uint64(typeval, &type) != NWAM_SUCCESS) {
1905 if ((err = nwam_ncu_name_to_typed_name(newname, type, &typednewname))
1909 if ((err = nwam_ncu_filename(type, newname, &ncufile))
2006 /* Need to ensure property, type and value are valid */
2175 /* type */
2434 nwam_ncu_type_t type;
2448 (err = nwam_ncu_typed_name_to_name(ncuh->nwh_name, &type, &ncuname))
2457 if (type == NWAM_NCU_TYPE_LINK)
2459 else if (type == NWAM_NCU_TYPE_INTERFACE)
2468 /* Get the NCU type */
2474 uint64_t type;
2479 err = nwam_value_get_uint64(typeval, &type);
2484 *typep = type;
2560 nwam_ncu_type_t type;
2577 if ((err = nwam_ncu_get_ncu_type(ncuh, &type)) != NWAM_SUCCESS)
2580 if (type == NWAM_NCU_TYPE_LINK) {
2611 nwam_ncu_type_t type;
2628 if ((err = nwam_ncu_get_ncu_type(ncuh, &type)) != NWAM_SUCCESS)
2631 if (type == NWAM_NCU_TYPE_LINK) {
2706 nwam_ncu_type_t type;
2719 if ((err = nwam_ncu_get_ncu_type(ncuh, &type)) != NWAM_SUCCESS ||
2728 if (type == NWAM_NCU_TYPE_LINK) {
2735 err = nwam_ncu_filename(type, ncpname, &ncufile);
2807 /* Get expected property data type */
2833 * type and class, belong there.
2840 uint64_t type, class;
2843 /* Get type/class from ncu */
2847 if (nwam_value_get_uint64(typeval, &type) != NWAM_SUCCESS) {
2851 typeflags = nwam_ncu_type_to_flag((nwam_ncu_type_t)type);
2861 classflags = nwam_ncu_type_class_to_flag(type, (nwam_ncu_class_t)class);
2884 /* Validate property's ncu membership and type, number and range of values */
2918 uint64_t type;
2920 if (nwam_value_get_uint64(value, &type) != NWAM_SUCCESS ||
2921 type >= NWAM_NCU_TYPE_ANY)
3075 * Given the ncu type and ncu class, return the list of properties that needs
3080 nwam_ncu_get_default_proplist(nwam_ncu_type_t type, nwam_ncu_class_t class,
3083 uint64_t typeflags = nwam_ncu_type_to_flag(type);
3084 uint64_t classflags = nwam_ncu_type_class_to_flag(type, class);
3137 nwam_ncu_type_t type;
3141 if ((err = nwam_ncu_get_ncu_type(ncuh, &type)) != NWAM_SUCCESS ||
3145 classflags = nwam_ncu_type_class_to_flag(type, class);
3161 nwam_ncu_external_action(nwam_ncu_type_t type, const char *name,
3173 if (nwam_ncu_name_to_typed_name(name, type, &typedname) != NWAM_SUCCESS)
3276 nwam_ncu_dr_offline(nwam_ncu_type_t type, const char *name, uint64_t flags)
3282 arg.ncu_type = type;
3300 nwam_ncu_dr_online(nwam_ncu_type_t type, const char *name, uint64_t flags)
3306 arg.ncu_type = type;