HomeFreeBSD

sockets: provide solisten_clone(), solisten_enqueue()

Description

sockets: provide solisten_clone(), solisten_enqueue()

as alternative KPI to sonewconn(). The latter has three stages:

  • check the listening socket queue limits
  • allocate a new socket
  • call into protocol attach method
  • link the new socket into the listen queue of the listening socket

The attach method, originally designed for a creation of socket by the
socket(2) syscall has slightly different semantics than attach of a socket
cloned by listener. Make it possible for protocols to call into the
first stage, then perform a different attach, and then call into the
final stage. The first stage, that checks limits and clones a socket
is called solisten_clone(), and the function that enqueues the socket
is solisten_enqueue().

Reviewed by: tuexen
Differential revision: https://reviews.freebsd.org/D36063

Details

Provenance
glebiusAuthored on Aug 10 2022, 6:09 PM
Reviewer
tuexen
Differential Revision
D36063: sockets: provide solisten_clone(), solisten_enqueue()
Parents
rGc7a62c925c81: inpcb: gather v4/v6 handling code into in_pcballoc() from protocols
Branches
Unknown
Tags
Unknown