HomeFreeBSD

ifconfig: 802.11: factor out keyix printing

Description

ifconfig: 802.11: factor out keyix printing

The node unicast key (PTK) uses a key index of (-1) and printing
a 64k number does not look great. Factor out printing the key
number into a buffer and use 'ucast' for the node unicast key.
Hope is that this will be useful for the future as well when we
will have more/different keys possibly.

Looks like (with -vk):

AES-CCM 2:128-bit <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> rsc 0 tsc 0 rx
AES-CCM 3:128-bit <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> rsc 0 tsc 0 rx
AES-GCM ucast:128-bit <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> rsc 0 tsc 0 tx+rx

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D50555

Details

Provenance
bzAuthored on May 27 2025, 7:51 PM
Reviewer
adrian
Differential Revision
D50555: ifconfig: 802.11: factor out keyix printing
Parents
rGe277735ce059: ifconfig: 802.11: print node unicast key (PTK) if available in STA mode
Branches
Unknown
Tags
Unknown