diff --git a/tools/hcidump.1 b/tools/hcidump.1
index d241b43..0519642 100644
--- a/tools/hcidump.1
+++ b/tools/hcidump.1
.TP
.BR -H ", " "\-\^\-hcrp"
Sets the PSM value for the Hardcopy Control Channel
+.TP
+.BR -O ", " "\-\^\-obex"
+Sets the RFCOMM channel value for the Object Exchange protocol
.SH FILTERS
.B
filter
.IR cmtp ,
.IR hidp ,
.IR hcrp ,
-.IR avdtp
+.IR avdtp ,
+.IR obex
and
.IR capi .
If filters are used, only packets belonging to the specified categories are
diff --git a/tools/hcidump.c b/tools/hcidump.c
index bcf213f..4f11efe 100644
--- a/tools/hcidump.c
+++ b/tools/hcidump.c
{ "hidp", FILT_HIDP },
{ "hcrp", FILT_HCRP },
{ "avdtp", FILT_AVDTP },
+ { "obex", FILT_OBEX },
{ "capi", FILT_CAPI },
{ 0 }
};
" -R, --raw Raw mode\n"
" -C, --cmtp=psm PSM for CMTP\n"
" -H, --hcrp=psm PSM for HCRP\n"
+ " -O, --obex=channel Channel for OBEX\n"
" -?, --help Give this help list\n"
" --usage Give a short usage message\n"
);
{ "raw", 0, 0, 'R' },
{ "cmtp", 1, 0, 'C' },
{ "hcrp", 1, 0, 'H' },
+ { "obex", 1, 0, 'O' },
{ "help", 0, 0, 'h' },
{ 0 }
};
set_proto(0, atoi(optarg), 0, SDP_UUID_HARDCOPY_CONTROL_CHANNEL);
break;
+ case 'O':
+ set_proto(0, 0, atoi(optarg), SDP_UUID_OBEX);
+ break;
+
case 'h':
default:
usage();
diff --git a/tools/parser/obex.c b/tools/parser/obex.c
new file mode 100644
index 0000000..9e4aae3
--- /dev/null
+++ b/tools/parser/obex.c
+/*
+ *
+ * Bluetooth packet analyzer - OBEX parser
+ *
+ * Copyright (C) 2004 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ *
+ * $Id$
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+
+#include <sys/types.h>
+#include <netinet/in.h>
+
+#include "parser.h"
+
+void obex_dump(int level, struct frame *frm)
+{
+ p_indent(level, frm);
+
+ printf("OBEX: \n");
+
+ raw_dump(level, frm);
+}
diff --git a/tools/parser/parser.h b/tools/parser/parser.h
index 3237b16..d2e864d 100644
--- a/tools/parser/parser.h
+++ b/tools/parser/parser.h
#define FILT_HCRP 0x0100
#define FILT_AVDTP 0x0200
+#define FILT_OBEX 0x00010000
#define FILT_CAPI 0x00020000
#define FILT_CSR 0x1000000f
void hcrp_dump(int level, struct frame *frm);
void avdtp_dump(int level, struct frame *frm);
+void obex_dump(int level, struct frame *frm);
void capi_dump(int level, struct frame *frm);
void csr_dump(int level, struct frame *frm);
diff --git a/tools/parser/rfcomm.c b/tools/parser/rfcomm.c
index f0ea8c1..6f37cf2 100644
--- a/tools/parser/rfcomm.c
+++ b/tools/parser/rfcomm.c
proto = get_proto(frm->handle, 0, frm->channel);
switch (proto) {
+ case SDP_UUID_OBEX:
+ if (!p_filter(FILT_OBEX))
+ obex_dump(level + 1, frm);
+ else
+ raw_dump(level, frm);
+ break;
+
default:
if (p_filter(FILT_RFCOMM))
break;