Lines Matching refs:opt
116 static void cmd_rstat(int ctl, int hdev, char *opt) in cmd_rstat() argument
126 static void cmd_scan(int ctl, int hdev, char *opt) in cmd_scan() argument
132 if (!strcmp(opt, "iscan")) in cmd_scan()
134 else if (!strcmp(opt, "pscan")) in cmd_scan()
136 else if (!strcmp(opt, "piscan")) in cmd_scan()
146 static void cmd_iac(int ctl, int hdev, char *opt) in cmd_iac() argument
155 if (opt) { in cmd_iac()
156 int l = strtoul(opt, 0, 16); in cmd_iac()
158 if (!strcasecmp(opt, "giac")) { in cmd_iac()
160 } else if (!strcasecmp(opt, "liac")) { in cmd_iac()
195 static void cmd_auth(int ctl, int hdev, char *opt) in cmd_auth() argument
200 if (!strcmp(opt, "auth")) in cmd_auth()
212 static void cmd_encrypt(int ctl, int hdev, char *opt) in cmd_encrypt() argument
217 if (!strcmp(opt, "encrypt")) in cmd_encrypt()
229 static void cmd_up(int ctl, int hdev, char *opt) in cmd_up() argument
241 static void cmd_down(int ctl, int hdev, char *opt) in cmd_down() argument
251 static void cmd_reset(int ctl, int hdev, char *opt) in cmd_reset() argument
265 static void cmd_ptype(int ctl, int hdev, char *opt) in cmd_ptype() argument
271 if (hci_strtoptype(opt, &dr.dev_opt)) { in cmd_ptype()
283 static void cmd_lp(int ctl, int hdev, char *opt) in cmd_lp() argument
289 if (hci_strtolp(opt, &dr.dev_opt)) { in cmd_lp()
301 static void cmd_lm(int ctl, int hdev, char *opt) in cmd_lm() argument
307 if (hci_strtolm(opt, &dr.dev_opt)) { in cmd_lm()
319 static void cmd_aclmtu(int ctl, int hdev, char *opt) in cmd_aclmtu() argument
324 if (!opt) in cmd_aclmtu()
327 if (sscanf(opt, "%4hu:%4hu", &mtu, &mpkt) != 2) in cmd_aclmtu()
339 static void cmd_scomtu(int ctl, int hdev, char *opt) in cmd_scomtu() argument
344 if (!opt) in cmd_scomtu()
347 if (sscanf(opt, "%4hu:%4hu", &mtu, &mpkt) != 2) in cmd_scomtu()
359 static void cmd_features(int ctl, int hdev, char *opt) in cmd_features() argument
407 static void cmd_name(int ctl, int hdev, char *opt) in cmd_name() argument
418 if (opt) { in cmd_name()
419 if (hci_write_local_name(dd, opt, 2000) < 0) { in cmd_name()
646 static void cmd_class(int ctl, int hdev, char *opt) in cmd_class() argument
671 if (opt) { in cmd_class()
672 uint32_t cod = strtoul(opt, NULL, 16); in cmd_class()
708 static void cmd_voice(int ctl, int hdev, char *opt) in cmd_voice() argument
721 if (opt) { in cmd_voice()
722 uint16_t vs = htobs(strtoul(opt, NULL, 16)); in cmd_voice()
775 static void cmd_putkey(int ctl, int hdev, char *opt) in cmd_putkey() argument
782 if (!opt) in cmd_putkey()
798 str2ba(opt, &bdaddr); in cmd_putkey()
800 fprintf(stderr, "Can't find link key for %s on hci%d\n", opt, hdev); in cmd_putkey()
813 static void cmd_delkey(int ctl, int hdev, char *opt) in cmd_delkey() argument
819 if (!opt) in cmd_delkey()
829 if (!strcasecmp(opt, "all")) { in cmd_delkey()
833 str2ba(opt, &bdaddr); in cmd_delkey()
846 static void cmd_oob_data(int ctl, int hdev, char *opt) in cmd_oob_data() argument
876 static void cmd_commands(int ctl, int hdev, char *opt) in cmd_commands() argument
915 static void cmd_version(int ctl, int hdev, char *opt) in cmd_version() argument
952 static void cmd_inq_tpl(int ctl, int hdev, char *opt) in cmd_inq_tpl() argument
963 if (opt) { in cmd_inq_tpl()
964 int8_t level = atoi(opt); in cmd_inq_tpl()
987 static void cmd_inq_mode(int ctl, int hdev, char *opt) in cmd_inq_mode() argument
998 if (opt) { in cmd_inq_mode()
999 uint8_t mode = atoi(opt); in cmd_inq_mode()
1036 static void cmd_inq_data(int ctl, int hdev, char *opt) in cmd_inq_data() argument
1047 if (opt) { in cmd_inq_data()
1055 size = (strlen(opt) + 1) / 2; in cmd_inq_data()
1060 memcpy(tmp, opt + (i * 2), 2); in cmd_inq_data()
1138 static void cmd_inq_type(int ctl, int hdev, char *opt) in cmd_inq_type() argument
1149 if (opt) { in cmd_inq_type()
1150 uint8_t type = atoi(opt); in cmd_inq_type()
1174 static void cmd_inq_parms(int ctl, int hdev, char *opt) in cmd_inq_parms() argument
1187 if (opt) { in cmd_inq_parms()
1191 if (sscanf(opt,"%4u:%4u", &window, &interval) != 2) { in cmd_inq_parms()
1243 static void cmd_page_parms(int ctl, int hdev, char *opt) in cmd_page_parms() argument
1256 if (opt) { in cmd_page_parms()
1260 if (sscanf(opt,"%4u:%4u", &window, &interval) != 2) { in cmd_page_parms()
1312 static void cmd_page_to(int ctl, int hdev, char *opt) in cmd_page_to() argument
1325 if (opt) { in cmd_page_to()
1329 if (sscanf(opt,"%5u", &timeout) != 1) { in cmd_page_to()
1376 static void cmd_afh_mode(int ctl, int hdev, char *opt) in cmd_afh_mode() argument
1387 if (opt) { in cmd_afh_mode()
1388 uint8_t mode = atoi(opt); in cmd_afh_mode()
1409 static void cmd_ssp_mode(int ctl, int hdev, char *opt) in cmd_ssp_mode() argument
1420 if (opt) { in cmd_ssp_mode()
1421 uint8_t mode = atoi(opt); in cmd_ssp_mode()
1522 static void cmd_revision(int ctl, int hdev, char *opt) in cmd_revision() argument
1616 void (*func)(int ctl, int hdev, char *opt);
1617 char *opt; member
1671 command[i].opt ? command[i].opt : " ", in usage()
1683 int opt, ctl, i, cmd=0; in main() local
1685 while ((opt=getopt_long(argc, argv, "ah", main_options, NULL)) != -1) { in main()
1686 switch(opt) { in main()
1733 if (command[i].opt) { in main()