diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-05-21 13:06:49 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-05-21 13:06:49 +0000 |
commit | 541d39d1abbca808107c830dcda7c72c4525be6a (patch) | |
tree | 2d1d2c678b4a2d67320a6c155c2feefb62fb222c /hcid | |
parent | a849556fef64f864b5bb6cd2899696a55fbd33db (diff) |
Add MTU option for the built-in SDP server
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/hcid.8 | 3 | ||||
-rw-r--r-- | hcid/main.c | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/hcid/hcid.8 b/hcid/hcid.8 index f9e3d7b6..a7ab0410 100644 --- a/hcid/hcid.8 +++ b/hcid/hcid.8 @@ -34,6 +34,9 @@ Enable debug information output. .TP .BI \-s Enable internal SDP server. +.TP +.BI \-m\ mtu\-size +Use specific MTU size for SDP server. .TP .BI \-f\ config\-file Use alternate configuration file instead of /etc/bluetooth/hcid.conf diff --git a/hcid/main.c b/hcid/main.c index 7cbf679a..c73c03e0 100644 --- a/hcid/main.c +++ b/hcid/main.c @@ -675,7 +675,7 @@ static void usage(void) { printf("hcid - HCI daemon ver %s\n", VERSION); printf("Usage: \n"); - printf("\thcid [-n] [-d] [-s] [-f config file]\n"); + printf("\thcid [-n] [-d] [-s] [-m mtu] [-f config file]\n"); } int main(int argc, char *argv[]) @@ -684,6 +684,7 @@ int main(int argc, char *argv[]) struct hci_filter flt; struct sigaction sa; GIOChannel *ctl_io, *child_io; + uint16_t mtu = 0; int opt, daemonize = 1, debug = 0, sdp = 0, experimental = 0; /* Default HCId settings */ @@ -702,7 +703,7 @@ int main(int argc, char *argv[]) init_defaults(); - while ((opt = getopt(argc, argv, "ndsxf:")) != EOF) { + while ((opt = getopt(argc, argv, "ndsm:xf:")) != EOF) { switch (opt) { case 'n': daemonize = 0; @@ -716,6 +717,10 @@ int main(int argc, char *argv[]) sdp = 1; break; + case 'm': + mtu = atoi(optarg); + break; + case 'x': experimental = 1; break; @@ -825,7 +830,7 @@ int main(int argc, char *argv[]) if (sdp) { set_sdp_server_enable(); - start_sdp_server(0, hcid.deviceid, SDP_SERVER_COMPAT); + start_sdp_server(mtu, hcid.deviceid, SDP_SERVER_COMPAT); } notify_init(); |