From 258887a0f6a798cc021837c3f686d02ff317d271 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 7 May 2005 20:40:01 +0000 Subject: Add authentication support --- pand/main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pand/main.c') diff --git a/pand/main.c b/pand/main.c index 959d6057..c128d332 100644 --- a/pand/main.c +++ b/pand/main.c @@ -61,6 +61,7 @@ static int detach = 1; static int persist; static int use_sdp = 1; static int use_cache; +static int auth; static int encrypt; static int secure; static int master; @@ -169,6 +170,8 @@ static int do_listen(void) lm = 0; if (master) lm |= L2CAP_LM_MASTER; + if (auth) + lm |= L2CAP_LM_AUTH; if (encrypt) lm |= L2CAP_LM_ENCRYPT; if (secure) @@ -497,6 +500,7 @@ static struct option main_lopts[] = { { "show", 0, 0, 'l' }, { "nodetach", 0, 0, 'n' }, { "persist", 2, 0, 'p' }, + { "auth", 0, 0, 'A' }, { "encrypt", 0, 0, 'E' }, { "secure", 0, 0, 'S' }, { "master", 0, 0, 'M' }, @@ -506,7 +510,7 @@ static struct option main_lopts[] = { { 0, 0, 0, 0 } }; -static char main_sopts[] = "hsc:k:Kr:e:i:lnp::DQ::ESMC::P:z"; +static char main_sopts[] = "hsc:k:Kr:e:i:lnp::DQ::AESMC::P:z"; static char main_help[] = "Bluetooth PAN daemon version " VERSION " \n" @@ -525,6 +529,7 @@ static char main_help[] = "\t--ethernet -e Network interface name\n" "\t--device -i Source bdaddr\n" "\t--nosdp -D Disable SDP\n" + "\t--auth -A Enable authentication\n" "\t--encrypt -E Enable encryption\n" "\t--secure -S Secure connection\n" "\t--master -M Become the master of a piconet\n" @@ -589,6 +594,10 @@ int main(int argc, char **argv) use_sdp = 0; break; + case 'A': + auth = 1; + break; + case 'E': encrypt = 1; break; -- cgit