Diff between c9729d61215382eee43340ad937c2239ac3e8e6f and 7258285fe76c5373950521ec2b96ce6b4d85be69

Changed Files

File Additions Deletions Status
tools/hcidump.1 +1 -0 modified
tools/hcidump.c +1 -0 modified
tools/parser/avctp.c +45 -0 added
tools/parser/l2cap.c +7 -0 modified
tools/parser/parser.h +2 -0 modified

Full Patch

diff --git a/tools/hcidump.1 b/tools/hcidump.1
index 6a7c512..17a9f14 100644
--- a/tools/hcidump.1
+++ b/tools/hcidump.1
@@ -114,6 +114,7 @@ is a space-separated list of packet categories: available categories are
 .IR hidp ,
 .IR hcrp ,
 .IR avdtp ,
+.IR avctp ,
 .IR obex
 and
 .IR capi .
diff --git a/tools/hcidump.c b/tools/hcidump.c
index ac5c2ba..7beecdc 100644
--- a/tools/hcidump.c
+++ b/tools/hcidump.c
@@ -603,6 +603,7 @@ static struct {
 	{ "hidp",	FILT_HIDP	},
 	{ "hcrp",	FILT_HCRP	},
 	{ "avdtp",	FILT_AVDTP	},
+	{ "avctp",	FILT_AVCTP	},
 	{ "obex",	FILT_OBEX	},
 	{ "capi",	FILT_CAPI	},
 	{ "csr",	FILT_CSR	},
diff --git a/tools/parser/avctp.c b/tools/parser/avctp.c
new file mode 100644
index 0000000..10c46a8
--- /dev/null
+++ b/tools/parser/avctp.c
@@ -0,0 +1,45 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2004-2005  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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <sys/types.h>
+#include <netinet/in.h>
+
+#include "parser.h"
+
+void avctp_dump(int level, struct frame *frm)
+{
+	p_indent(level, frm);
+	printf("AVCTP:\n");
+
+	raw_dump(level, frm);
+}
diff --git a/tools/parser/l2cap.c b/tools/parser/l2cap.c
index b7425cf..d535b95 100644
--- a/tools/parser/l2cap.c
+++ b/tools/parser/l2cap.c
@@ -794,6 +794,13 @@ static void l2cap_parse(int level, struct frame *frm)
 				raw_dump(level + 1, frm);
 			break;
 
+		case 0x17:
+			if (!p_filter(FILT_AVCTP))
+				avctp_dump(level, frm);
+			else
+				raw_dump(level + 1, frm);
+			break;
+
 		case 0x19:
 			if (!p_filter(FILT_AVDTP))
 				avdtp_dump(level, frm);
diff --git a/tools/parser/parser.h b/tools/parser/parser.h
index 1c4f80a..9ca66f1 100644
--- a/tools/parser/parser.h
+++ b/tools/parser/parser.h
@@ -74,6 +74,7 @@ struct frame {
 #define FILT_HIDP	0x0100
 #define FILT_HCRP	0x0200
 #define FILT_AVDTP	0x0400
+#define FILT_AVCTP	0x0800
 
 #define FILT_OBEX	0x00010000
 #define FILT_CAPI	0x00020000
@@ -203,6 +204,7 @@ void cmtp_dump(int level, struct frame *frm);
 void hidp_dump(int level, struct frame *frm);
 void hcrp_dump(int level, struct frame *frm);
 void avdtp_dump(int level, struct frame *frm);
+void avctp_dump(int level, struct frame *frm);
 
 void obex_dump(int level, struct frame *frm);
 void capi_dump(int level, struct frame *frm);