mac address xlat style support

Dmitry V. Levin ldv at altlinux.org
Tue Mar 19 01:40:48 UTC 2019


Hi,

On Sun, Jan 13, 2019 at 03:44:28PM -0800, shankarapailoor wrote:
> It seems that strace doesn't handle xlat_styles when printing mac
> addresses. Attached is a patch which prints mac addresses as hex
> quoted strings, just like we do for ipv4  and ipv6 addresses. Let me
> know what you all think.
> 
> Regards,
> Shankara Pailoor

> From a7e09bff9bba92a15ad13ebf79cc5a7bce5608fb Mon Sep 17 00:00:00 2001
> From: Shankara Pailoor <shankarapailoor at gmail.com>
> Date: Sun, 13 Jan 2019 15:34:04 -0800
> Subject: [PATCH v1] mac addresses: add xlat_style support
> 
> * defs.h (print_mac_addr): add xlat_style support

Moved to print_mac.c,

> * net.c (print_packet_mreq): Call print_mac_addr instead of custom print.

changed to use PRINT_FIELD_MAC_SZ which in turn uses print_mac_addr.

> * tests/sockaddr_xlat.c: Add new functions (check_sco, check_rc) to verify
> new xlat_style support in print_mac_addr().
> * tests/net-packet_mreq.c: Add XLAT_ABBREV, XLAT_RAW, XLAT_VERBOSE macros.
> * tests/net-packet_mreq-Xabbrev.c: Test print_packet_mreq change.
> * tests/net-packet_mreq-Xraw.c: Likewise.
> * tests/net-packet_mreq-Xverbose.c: Likewise.
> * tests/pure_executables.list: Add net-packet_mreq-Xabbrev,
> net-packet_mreq-Xraw, net-packet_mreq-Xverbose.
> * tests/gen_tests.in: Likewise.

Applied with these changes, thanks.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20190319/61c56ccf/attachment.bin>


More information about the Strace-devel mailing list