diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-01-17 10:48:22 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-01-17 10:48:22 +0000 |
commit | 67d4c0b35c9708ad5d637bd868c76bc7bb99bf71 (patch) | |
tree | e37811efe3a9074817041164d1a553bb9b4babff /dund/main.c | |
parent | aebaa2bd80065ac380237d2f52bc675e4d1462d1 (diff) |
Add support for dialup/telephone connections
Diffstat (limited to 'dund/main.c')
-rw-r--r-- | dund/main.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/dund/main.c b/dund/main.c index 4aedebd7..06055fde 100644 --- a/dund/main.c +++ b/dund/main.c @@ -398,10 +398,11 @@ static struct option main_lopts[] = { { "msdun", 2, 0, 'X' }, { "activesync", 0, 0, 'a' }, { "mrouter", 1, 0, 'm' }, + { "dialup", 1, 0, 'u' }, { 0, 0, 0, 0 } }; -static char main_sopts[] = "hsc:k:Kr:i:lnp::DQ::AESMP:C::P:Xa"; +static char main_sopts[] = "hsc:k:Kr:i:lnp::DQ::AESMP:C::P:Xam:u"; static char main_help[] = "Bluetooth LAP (LAN Access over PPP) daemon version " VERSION " \n" @@ -410,6 +411,7 @@ static char main_help[] = "Options:\n" "\t--show --list -l Show active LAP connections\n" "\t--listen -s Listen for LAP connections\n" + "\t--dialup -u Pretend to be a dialup/telephone\n" "\t--connect -c <bdaddr> Create LAP connection\n" "\t--mrouter -m <bdaddr> Create mRouter connection\n" "\t--search -Q[duration] Search and connect\n" @@ -539,6 +541,11 @@ int main(int argc, char **argv) type = MROUTER; break; + case 'u': + mode = LISTEN; + type = DIALUP; + break; + case 'h': default: printf(main_help); @@ -599,7 +606,7 @@ int main(int argc, char **argv) fd = open("/dev/null", O_RDWR); dup2(fd, 0); dup2(fd, 1); dup2(fd, 2); close(fd); - + setsid(); chdir("/"); } |