aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Kaczmarek <andrzej.kaczmarek@tieto.com>2012-03-30 14:24:38 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-03-30 15:43:27 +0300
commit70af51090a58015a08f5fc07c9b4ebce7b20aa51 (patch)
tree1db1ac2ae06b2b246392329a8566ec0c45c68050
parent52de2026d684b056b4340168a0529d2f800895a4 (diff)
downloadbluez-hcidump-70af51090a58015a08f5fc07c9b4ebce7b20aa51.tar.gz
core: Add support for passing RFCOMM channel for SAP
-rw-r--r--src/hcidump.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/hcidump.c b/src/hcidump.c
index 089bff8..089d444 100644
--- a/src/hcidump.c
+++ b/src/hcidump.c
@@ -859,6 +859,7 @@ static void usage(void)
" -H, --hcrp=psm PSM for HCRP\n"
" -O, --obex=port Channel/PSM for OBEX\n"
" -P, --ppp=channel Channel for PPP\n"
+ " -S, --sap=channel Channel for SAP\n"
" -D, --pppdump=file Extract PPP traffic\n"
" -A, --audio=file Extract SCO audio data\n"
" -Y, --novendor No vendor commands or events\n"
@@ -887,6 +888,7 @@ static struct option main_options[] = {
{ "hcrp", 1, 0, 'H' },
{ "obex", 1, 0, 'O' },
{ "ppp", 1, 0, 'P' },
+ { "sap", 1, 0, 'S' },
{ "pppdump", 1, 0, 'D' },
{ "audio", 1, 0, 'A' },
{ "novendor", 0, 0, 'Y' },
@@ -908,7 +910,9 @@ int main(int argc, char *argv[])
int opt, pppdump_fd = -1, audio_fd = -1;
uint16_t obex_port;
- while ((opt=getopt_long(argc, argv, "i:l:p:m:w:r:d:taxXRC:H:O:P:D:A:YZ46hv", main_options, NULL)) != -1) {
+ while ((opt = getopt_long(argc, argv,
+ "i:l:p:m:w:r:d:taxXRC:H:O:P:S:D:A:YZ46hv",
+ main_options, NULL)) != -1) {
switch(opt) {
case 'i':
if (strcasecmp(optarg, "none") && strcasecmp(optarg, "system"))
@@ -984,6 +988,10 @@ int main(int argc, char *argv[])
set_proto(0, 0, atoi(optarg), SDP_UUID_LAN_ACCESS_PPP);
break;
+ case 'S':
+ set_proto(0, 0, atoi(optarg), SDP_UUID_SIM_ACCESS);
+ break;
+
case 'D':
pppdump_file = strdup(optarg);
break;