aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2011-09-27 14:30:55 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2011-09-27 15:04:12 +0300
commitcfb640c9575cecadc93d1a1dc908f642c6988f39 (patch)
tree030197735e5183fe037407ee6b315f989187f54a
parentf95bf08a506ceca2e1cbd9dd8140f3d22a55f12f (diff)
downloadbluez-hcidump-cfb640c9575cecadc93d1a1dc908f642c6988f39.tar.gz
bluez-hcidump-cfb640c9575cecadc93d1a1dc908f642c6988f39.tar.xz
bluez-hcidump-cfb640c9575cecadc93d1a1dc908f642c6988f39.zip
Remove magic numbers in L2CAP decoding
-rw-r--r--parser/l2cap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/parser/l2cap.c b/parser/l2cap.c
index 8d05314..d3d3b1c 100644
--- a/parser/l2cap.c
+++ b/parser/l2cap.c
@@ -346,13 +346,13 @@ static char *fcs2str(uint8_t fcs)
static char *sar2str(uint8_t sar)
{
switch (sar) {
- case 0x00:
+ case L2CAP_SAR_UNSEGMENTED:
return "Unsegmented";
- case 0x01:
+ case L2CAP_SAR_START:
return "Start";
- case 0x02:
+ case L2CAP_SAR_END:
return "End";
- case 0x03:
+ case L2CAP_SAR_CONTINUE:
return "Continuation";
default:
return "Bad SAR";
@@ -363,13 +363,13 @@ static char *sar2str(uint8_t sar)
static char *supervisory2str(uint8_t supervisory)
{
switch (supervisory) {
- case 0x00:
+ case L2CAP_SUPER_RR:
return "Receiver Ready (RR)";
- case 0x01:
+ case L2CAP_SUPER_REJ:
return "Reject (REJ)";
- case 0x02:
+ case L2CAP_SUPER_RNR:
return "Receiver Not Ready (RNR)";
- case 0x03:
+ case L2CAP_SUPER_SREJ:
return "Select Reject (SREJ)";
default:
return "Bad Supervisory";