HomeFreeBSD

ifconfig: introduce `ifconfig_context` to store current global state.

Description

ifconfig: introduce ifconfig_context to store current global state.

The structure consists of all current context - arguments,
open sockets, current family and so on.

Pass this structure as a first argument to most of the af_ menthods.
This allows to propagate and update shared data without using
global variables.

The diff is pretty large, but de-facto mechanical. All changes
except the structure setup in ifconfig[_netlink].c are one-line
mechanical changes.

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

Details

Provenance
melifaroAuthored on May 23 2023, 5:02 PM
Reviewer
kp
Differential Revision
D40239: ifconfig: introduce `ifconfig_context` to store current global state.
Parents
rG44cd85d42e5d: ifconfig: cleanup warnings #1
Branches
Unknown
Tags
Unknown