]> granicus.if.org Git - strace/commit
Honor xlat styles when decoding mac addresses
authorShankara Pailoor <shankarapailoor@gmail.com>
Sun, 13 Jan 2019 23:34:04 +0000 (15:34 -0800)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 17 Mar 2019 23:38:24 +0000 (23:38 +0000)
commitc256b45ddf511b329bf4b63939cf872b38810cb4
tree09d1b3b907a134d2abb14571180b7f0e3c83a50d
parent8e48eb511fe3dd1cda289c1201f921900150eef7
Honor xlat styles when decoding mac addresses

* defs.h (print_mac_addr): Add xlat_style support, move ...
* print_mac.c: ... here.
* tests/sockaddr_xlat.c [HAVE_BLUETOOTH_BLUETOOTH_H]: Include
<bluetooth/bluetooth.h>, <bluetooth/hci.h>, <bluetooth/l2cap.h>
<bluetooth/rfcomm.h>, and <bluetooth/sco.h>.
[HAVE_BLUETOOTH_BLUETOOTH_H] (check_sco, check_rc): New functions.
(main) [HAVE_BLUETOOTH_BLUETOOTH_H]: Call them to verify
new xlat_style support in print_mac_addr().
* tests/net-packet_mreq.c: Handle XLAT_RAW, XLAT_ABBREV,
and XLAT_VERBOSE macros.
* tests/net-packet_mreq-Xabbrev.c: New test.
* tests/net-packet_mreq-Xraw.c: Likewise.
* tests/net-packet_mreq-Xverbose.c: Likewise.
* tests/gen_tests.in (net-packet_mreq-Xabbrev, net-packet_mreq-Xraw,
net-packet_mreq-Xverbose): New tests.
* tests/pure_executables.list: Add net-packet_mreq-Xabbrev,
net-packet_mreq-Xraw, and et-packet_mreq-Xverbose.
* tests/.gitignore: Likewise.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
defs.h
print_mac.c
tests/.gitignore
tests/gen_tests.in
tests/net-packet_mreq-Xabbrev.c [new file with mode: 0644]
tests/net-packet_mreq-Xraw.c [new file with mode: 0644]
tests/net-packet_mreq-Xverbose.c [new file with mode: 0644]
tests/net-packet_mreq.c
tests/pure_executables.list
tests/sockaddr_xlat.c