Factor out the priv(9) checks into OS specifc code so other OSes can equally
We provide 3 arguments (cmd, vap, ifp) where available to the functions, in
order to allow other OSes to use that data but also in case we'd add auditing
to these check to have the information available. For now the arguments are
NetBSD might want to pass in cmd, ic, ifp.
PR: 249403 Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")