HomeFreeBSD

ng_socket: simplify protosw(9) methods

Description

ng_socket: simplify protosw(9) methods

  • so_pcb can't be non-NULL in pr_attach.
  • so_pcb can't be NULL in all other methods.
  • Short circuit data socket attach down to the common attach.
  • Short circuit both detach methods down to common one.
  • Inline control socket attach.
  • Inline control pr_bind.
  • Inline data pr_connect.
  • Rely on pr_connect_notsupp() for control connect(2).
  • Don't use cast on so_pcb, it is void *.

Should be no functional change.

Details

Provenance
glebiusAuthored on Jun 26 2026, 7:01 PM
Parents
rG830d7396cd3a: loader.efi: polish SPDX header
Branches
Unknown
Tags
Unknown