| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This patch fixes the uninitiailzed varialble(CWE-457) reported by
the Coverity scan.
|
|
|
|
| |
Byte order is assumed to be big endian instead of little endian.
|
|
|
|
|
|
|
|
|
|
| |
When RFCOMM_TEST_EA returns false, btmon assumes packet data has at
least 5 bytes long. If that assumption fails, btmon could crash when
trying to read the next byte.
This patch fix it by checking the remaining size before reading the last
byte.
Reviewed-by: apusaka@chromium.org
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds SPDX License Identifier and removes the license text.
-------------------------------------
License COUNT
-------------------------------------
LGPL-2.1-or-later : 47
License: LGPL-2.1-or-later
monitor/bt.h
monitor/hcidump.h
monitor/avdtp.h
monitor/crc.c
monitor/sdp.c
monitor/hwdb.c
monitor/intel.h
monitor/avctp.c
monitor/control.h
monitor/display.c
monitor/a2dp.c
monitor/ll.c
monitor/ll.h
monitor/jlink.h
monitor/broadcom.h
monitor/lmp.c
monitor/keys.c
monitor/ellisys.c
monitor/main.c
monitor/ellisys.h
monitor/hwdb.h
monitor/display.h
monitor/jlink.c
monitor/rfcomm.h
monitor/packet.c
monitor/crc.h
monitor/keys.h
monitor/sdp.h
monitor/rfcomm.c
monitor/avdtp.c
monitor/a2dp.h
monitor/avctp.h
monitor/vendor.h
monitor/hcidump.c
monitor/intel.c
monitor/tty.h
monitor/control.c
monitor/lmp.h
monitor/analyze.c
monitor/bnep.c
monitor/l2cap.c
monitor/vendor.c
monitor/packet.h
monitor/broadcom.c
monitor/analyze.h
monitor/l2cap.h
monitor/bnep.h
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit e0e7eb08d5d28a952221070a4b50794d63dcc625 tried to fix this, but
missed most of the files concerned.
Without the fix an out-of-tree build (e.g. make distcheck) will throw
errors like this:
CC monitor/l2cap.o
../monitor/l2cap.c:41:18: fatal error: uuid.h: No such file or directory
#include "uuid.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch removes "packed" attribute from the definition of struct rfcomm_rpn
to prevent the access to an unaligned struct member in mmc_rpn(). This patch
also introduces a temp variable in mcc_pn() to prevent unaligned access without
touching the definition of struct rfcomm_pn, since struct rfcomm_pn is used as
a PDU.
error messages from LLVM build:
monitor/rfcomm.c:238:36: error: taking address of packed member 'pm' of class
or structure 'rfcomm_rpn' may result in an unaligned pointer value
[-Werror,-Waddress-of-packed-member]
if (!l2cap_frame_get_le16(frame, &rpn.pm))
monitor/rfcomm.c:287:36: error: taking address of packed member 'mtu' of class
or structure 'rfcomm_pn' may result in an unaligned pointer value
[-Werror,-Waddress-of-packed-member]
if (!l2cap_frame_get_le16(frame, &pn.mtu))
Currently there is no corresponding flag in GCC to generate the same error
messages. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51628.
|
| |
|
|
|
|
|
| |
These structs do not represent the raw PDU format thus they don't need
to be the exact same size.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
RFCOMM: Unnumbered Info with Header Check (UIH)(0xef)
Address: 0x01 cr 0 dlci 0x00
Control: 0xef poll/final 0
Length: 6
FCS: 0xaa
MCC Message type: Test Command RSP(0x08)
Length: 4
Test Data: 0x 5f 54 65 73
|
|
|
|
|
| |
The correct byte order for RFCOMM protocol is
little endian.
|
|
|
|
|
| |
Fix RFCOMM RPN parity type bit according to Spec. GSM 07.10 version
6.3.0. (PT1 - PT2 indicates the parity type).
|
|
|
|
| |
Those were already converted to host order with l2cap_frame_get_be16.
|
|
|
|
|
| |
Changes made to decode NSC frame in RFCOMM for btmon.
Not able capture the output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes made to decode PN frame in RFCOMM for btmon.
RFCOMM: Unnumbered Info with Header Check (UIH)(0xef)
Address: 0x01 cr 0 dlci 0x00
Control: 0xef poll/final 0
Length: 10
FCS: 0xaa
MCC Message type: DLC Parameter Negotiation RSP(0x20)
Length: 8
dlci 32 frame_type 0 credit_flow 14 pri 39
ack_timer 0 frame_size 666 max_retrans 0 credits 7
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes made to decode RLS frame in RFCOMM for btmon.
RFCOMM: Unnumbered Info with Header Check (UIH)(0xef)
Address: 0x03 cr 1 dlci 0x00
Control: 0xef poll/final 0
Length: 4
FCS: 0x70
MCC Message type: Remote Line Status CMD(0x14)
Length: 2
dlci 32 error: 5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes made to decode RPN frame in RFCOMM for btmon.
RFCOMM: Unnumbered Info with Header Check (UIH)(0xef)
Address: 0x03 cr 1 dlci 0x00
Control: 0xef poll/final 0
Length: 10
FCS: 0x70
MCC Message type: Remote Port Negotiation Command CMD(0x24)
Length: 8
dlci 32
br 3 db 2 sb 0 p 0 pt 0 xi 0 xo 0
rtri 0 rtro 0 rtci 0 rtco 0 xon 17 xoff 19
pm 0x3f7f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes made to decode MSC frame in RFCOMM for btmon.
RFCOMM: Unnumbered Info with Header Check (UIH)(0xef)
Address: 0x01 cr 0 dlci 0x00
Control: 0xef poll/final 0
Length: 4
FCS: 0xaa
MCC Message type: Modem Status Command CMD(0x38)
Length: 2
dlci 32
fc 0 rtc 1 rtr 1 ic 0 dv 1
|
|
|
|
|
|
|
|
|
|
|
|
| |
> ACL Data RX: Handle 7 flags 0x02 dlen 19 [hci0] 8.723738
Channel: 65 len 15 [PSM 3 mode 0] {chan 1}
RFCOMM: Unnumbered Info with Header Check (UIH)(0xef)
Address: 0x09 cr 0 dlci 0x02
Control: 0xff poll/final 1
Length: 10
FCS: 0x5c
Credits: 1
41 54 2b 43 49 4e 44 3d 3f 0d 5c AT+CIND=?.\
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes made to decode MCC frame in RFCOMM for btmon.
RFCOMM: Unnumbered Info with Header Check (UIH)(0xef)
Address: 0x01 cr 0 dlci 0x00
Control: 0xef poll/final 0
Length: 10
FCS: 0xaa
MCC Message type: DLC Parameter Negotiation RSP(0x20)
Length: 8
20 e0 27 00 9a 02 00 07 aa .'......
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes made to decode UIH frame in btmon.
In below UIH frame, MCC frame is present, so no credits field is printed.
RFCOMM: Unnumbered Info with Header Check (UIH)(0xef)
Address: 0x01 cr 0 dlci 0x00
Control: 0xef poll/final 0
Length: 10
FCS: 0xaa
81 11 20 e0 27 00 9a 02 00 07 aa .. .'......
In this UIH frame, no MCC frame, so credits field is printed.
RFCOMM: Unnumbered Info with Header Check (UIH)(0xef)
Address: 0x81 cr 0 dlci 0x20
Control: 0xff poll/final 1
Length: 0
FCS: 0x1e
Credits : 33
|
|
|
|
|
|
|
|
|
|
|
| |
Changes made to decode RFCOMM hdr and print the same.
RFCOMM: Unnumbered Info with Header Check (UIH)(0xef)
Address: 0x01 cr 0 dlci 0x00
Control: 0xef poll/final 0
Length: 10
FCS: 0xaa
81 11 20 e0 27 00 9a 02 00 07 aa .. .'......
|
|
Changes made to add initial code to support RFCOMM frame in btmon
btmon logs:
RFCOMM: Set Async Balance Mode (SABM) (0x2f)
01 1c ..
RFCOMM: Unnumbered Ack (UA)(0x63)
01 d7 ..
RFCOMM: Unnumbered Info with Header Check (UIH)(0xef)
15 81 11 20 e0 27 00 9a 02 00 07 aa ... .'......
RFCOMM: Disconnect (DISC)(0x43)
01 fd
|