summaryrefslogtreecommitdiffstats
path: root/dund
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-05-07 20:40:01 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-05-07 20:40:01 +0000
commit258887a0f6a798cc021837c3f686d02ff317d271 (patch)
tree460f395f8492d08ae00bdde8e6aacfc7bf8b0eb4 /dund
parent163d14a25cec4bbe7bf906a3a3487756a47e42cf (diff)
Add authentication support
Diffstat (limited to 'dund')
-rw-r--r--dund/main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/dund/main.c b/dund/main.c
index 837073f9..2bc4f9b5 100644
--- a/dund/main.c
+++ b/dund/main.c
@@ -70,6 +70,7 @@ static char *pppd_opts[DUN_MAX_PPP_OPTS] =
static int detach = 1;
static int persist;
static int use_sdp = 1;
+static int auth;
static int encrypt;
static int secure;
static int master;
@@ -147,6 +148,8 @@ static int do_listen(void)
lm = 0;
if (master)
lm |= RFCOMM_LM_MASTER;
+ if (auth)
+ lm |= RFCOMM_LM_AUTH;
if (encrypt)
lm |= RFCOMM_LM_ENCRYPT;
if (secure)
@@ -390,6 +393,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' },
@@ -400,7 +404,7 @@ static struct option main_lopts[] = {
{ 0, 0, 0, 0 }
};
-static char main_sopts[] = "hsc:k:Kr:i:lnp::DQ::ESMP:C::P:X";
+static char main_sopts[] = "hsc:k:Kr:i:lnp::DQ::AESMP:C::P:X";
static char main_help[] =
"Bluetooth LAP (LAN Access over PPP) daemon version " VERSION " \n"
@@ -417,6 +421,7 @@ static char main_help[] =
"\t--channel -P <channel> RFCOMM channel\n"
"\t--device -i <bdaddr> 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"
@@ -480,6 +485,10 @@ int main(int argc, char **argv)
use_sdp = 0;
break;
+ case 'A':
+ auth = 1;
+ break;
+
case 'E':
encrypt = 1;
break;