summaryrefslogtreecommitdiffstats
path: root/hcid/parser.y
diff options
context:
space:
mode:
authorMax Krasnyansky <maxk@qualcomm.com>2002-07-18 18:12:46 +0000
committerMax Krasnyansky <maxk@qualcomm.com>2002-07-18 18:12:46 +0000
commitc5dca08e234386563667e8f790b4e1122c364c5d (patch)
tree8d87f52a29142b96b243e3a8e52def40ab7c2cd8 /hcid/parser.y
parent99148a336433ac48bd8dc1fb23f4dc7cbf8c812e (diff)
Support for multiple pairing modes.
Link key replacement.
Diffstat (limited to 'hcid/parser.y')
-rw-r--r--hcid/parser.y20
1 files changed, 18 insertions, 2 deletions
diff --git a/hcid/parser.y b/hcid/parser.y
index ff2cd1c6..b7614f85 100644
--- a/hcid/parser.y
+++ b/hcid/parser.y
@@ -56,7 +56,7 @@ int yyerror(char *s);
}
%token K_OPTIONS K_DEVICE
-%token K_AUTOINIT K_SECURITY
+%token K_AUTOINIT K_SECURITY K_PAIRING
%token K_PTYPE K_NAME K_CLASS K_LM K_LP K_AUTH K_ENCRYPT K_ISCAN K_PSCAN
%token K_PINHELP
%token K_YES K_NO
@@ -64,7 +64,7 @@ int yyerror(char *s);
%token <str> WORD PATH STRING LIST
%token <num> NUM
-%type <num> bool pkt_type link_mode link_policy sec_mode
+%type <num> bool pkt_type link_mode link_policy sec_mode pair_mode
%type <str> dev_name
%%
@@ -93,6 +93,10 @@ hcid_opt:
hcid.security = $2;
}
+ | K_PAIRING pair_mode {
+ hcid.pairing = $2;
+ }
+
| K_PINHELP PATH {
if (hcid.pin_helper)
free(hcid.pin_helper);
@@ -117,6 +121,18 @@ sec_mode:
| K_NO { $$ = HCID_SEC_NONE; }
;
+pair_mode:
+ WORD {
+ int opt = find_keyword(pair_param, $1);
+ if (opt < 0) {
+ cfg_error("Unknown pairing mode '%s'", $1);
+ $$ = 0;
+ } else
+ $$ = opt;
+ }
+ ;
+
+
device_options: '{' device_opts '}'
device_opts: | device_opt ';' | error ';' | device_opts device_opt ';';
device_opt: