Lines Matching refs:type

92 	    "enable [-p <profile-type>] [-c <ncu-class>] <object-name>",
95 "disable [-p <profile-type>] [-c <ncu-class>] <object-name>",
98 "list [-x] [-p <profile-type>] [-c <ncu-class>] [<object-name>]",
341 * Given a name, returns object type (loc, enm, ncp, or ncu) and how many
347 nwam_object_type_t type;
353 type = NWAM_OBJECT_TYPE_LOC;
357 type = NWAM_OBJECT_TYPE_ENM;
361 type = NWAM_OBJECT_TYPE_NCP;
365 type = NWAM_OBJECT_TYPE_NCU;
368 /* if n > 1, then it means *type was set multiple times, undo it */
370 type = NWAM_OBJECT_TYPE_UNKNOWN;
373 return (type);
385 nwam_object_type_t type = NWAM_OBJECT_TYPE_UNKNOWN;
394 type = nwam_string_to_object_type(optarg);
395 if (type == NWAM_OBJECT_TYPE_UNKNOWN)
396 die("Invalid profile-type: %s", optarg);
422 if (type != NWAM_OBJECT_TYPE_UNKNOWN &&
423 type != NWAM_OBJECT_TYPE_NCU)
426 type = NWAM_OBJECT_TYPE_NCU;
438 * No need to determine type for list.
439 * If -p is not given for enable or disable, then determine type.
441 if (cmd_num != CMD_LIST && type == NWAM_OBJECT_TYPE_UNKNOWN) {
444 type = determine_object_type(*name, &num);
449 "'-p <profile-type>' to specify a profile type.",
454 *object_type = type;
499 ncu_action(const char *name, nwam_ncp_handle_t ncph, nwam_ncu_type_t type,
512 ret = nwam_ncu_read(ncph, name, type, 0, &ncuh);
540 * If more than one type of profile with the same name, return error.
549 nwam_object_type_t type = NWAM_OBJECT_TYPE_UNKNOWN;
556 parse_argv(argc, argv, CMD_ENABLE, &type, &ncu_type, &ncu_class, &name);
565 switch (type) {
592 nwam_object_type_to_string(type),
600 nwam_object_type_to_string(type),
608 * if more than one type of profile is matched by the given name.
614 nwam_object_type_t type = NWAM_OBJECT_TYPE_UNKNOWN;
621 parse_argv(argc, argv, CMD_DISABLE, &type, &ncu_type, &ncu_class,
625 switch (type) {
643 nwam_object_type_to_string(type),
652 nwam_object_type_to_string(type),
699 determine_object_state(nwam_object_type_t type, void *handle,
706 switch (type) {
738 add_to_profile_entry(nwam_object_type_t type, void *handle,
744 pent->p_type = type;
745 if (type == NWAM_OBJECT_TYPE_NCU) {
755 switch (type) {
778 pent->p_state = determine_object_state(type, handle,
860 nwam_object_type_t type = NWAM_OBJECT_TYPE_UNKNOWN;
867 char *default_fields = "type,profile,state";
868 char *extended_fields = "type,profile,state,auxiliary state";
872 parse_argv(argc, argv, CMD_LIST, &type, &ncu_type, &ncu_class,
892 * (type = UNKNOWN), then try to open handle for each object
895 if (type == NWAM_OBJECT_TYPE_NCP ||
896 type == NWAM_OBJECT_TYPE_UNKNOWN) {
904 if (type == NWAM_OBJECT_TYPE_NCU ||
905 type == NWAM_OBJECT_TYPE_UNKNOWN) {
934 if (type == NWAM_OBJECT_TYPE_LOC ||
935 type == NWAM_OBJECT_TYPE_UNKNOWN) {
943 if (type == NWAM_OBJECT_TYPE_ENM ||
944 type == NWAM_OBJECT_TYPE_UNKNOWN) {
962 * If type given (type != UNKNOWN), just walk objects in that
963 * type. Otherwise, walk all ncp, ncu, loc and enm.
965 if (type == NWAM_OBJECT_TYPE_NCP ||
966 type == NWAM_OBJECT_TYPE_UNKNOWN) {
972 if (type == NWAM_OBJECT_TYPE_NCU) {
983 if (type == NWAM_OBJECT_TYPE_LOC ||
984 type == NWAM_OBJECT_TYPE_UNKNOWN) {
990 if (type == NWAM_OBJECT_TYPE_ENM ||
991 type == NWAM_OBJECT_TYPE_UNKNOWN) {