HomeFreeBSD

libifconfig: Overhaul ifconfig_media_* interfaces

Description

libifconfig: Overhaul ifconfig_media_* interfaces

Define an ifmedia_t type to use for ifmedia words.

Add ifconfig_media_lookup_* functions to lookup ifmedia words by name.

Get media options as an array of option names rather than formatting it
as a comma-delimited list into a buffer.

Sprinkle const on static the static description tables for peace of
mind.

Don't need to zero memory allocated by calloc.

Reviewed by: kp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D29029

Details

Provenance
freqlabsAuthored on Mar 2 2021, 10:29 AM
Reviewer
kp
Differential Revision
D29029: libifconfig: Overhaul ifconfig_media_* interfaces
Parents
rG5084dde5f087: pchtherm: fix a wrong bit and a wrong register use
Branches
Unknown
Tags
Unknown