[PATCH 3/4] Add parsing of L2CAP Fixed Channel list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add DUMP_VERBOSE display of L2CAP Fixed Channel list.
Example output:

2011-10-21 12:01:50.423246 > ACL data: handle 39 flags 0x02 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list
        L2CAP
        CONNLESS
        A2MP
---
 parser/l2cap.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/parser/l2cap.c b/parser/l2cap.c
index 7915788..ce78d05 100644
--- a/parser/l2cap.c
+++ b/parser/l2cap.c
@@ -811,6 +811,7 @@ static void info_opt(int level, int type, void *ptr, int len)
 {
 	uint32_t mask;
 	int i;
+	uint8_t list;
 
 	p_indent(level, 0);
 
@@ -830,6 +831,21 @@ static void info_opt(int level, int type, void *ptr, int len)
 		break;
 	case 0x0003:
 		printf("Fixed channel list\n");
+		list = get_val(ptr, 1);
+		if (parser.flags & DUMP_VERBOSE) {
+			if (list & L2CAP_FC_L2CAP) {
+				p_indent(level + 1, 0);
+				printf("L2CAP\n");
+			}
+			if (list & L2CAP_FC_CONNLESS) {
+				p_indent(level + 1, 0);
+				printf("CONNLESS\n");
+			}
+			if (list & L2CAP_FC_A2MP) {
+				p_indent(level + 1, 0);
+				printf("A2MP\n");
+			}
+		}
 		break;
 	default:
 		printf("Unknown (len %d)\n", len);
-- 
1.7.7

--
Peter Krystad
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux