Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

sof_unregister(9F)

Name

sof_register, sof_unregister - register or unregister a socket filter module

Synopsis

#include <sys/sockfilter.h>

int sof_register(int version, const char *name,
     const sof_ops_t *ops, int flags);
int sof_unregister(const char *name);

Parameters

version

the socket filter version; should always be set to SOF_VERSION.

name

a name that uniquely identifies this filter, and must match the name (not module name) used when configuring the filter via soconfig(8).

ops

a pointer to an instance of the sof_ops(9S) structure.

flags

unused; should always be 0.

Description

The sof_register() function, typically called from a module's _init(9E) entry point, is used to register a module with the socket filter framework.

The sof_unregister() function is used to unregister a module from the socket filter framework. If sof_unregister() is called from a module's _fini(9E) entry point, then the module must return EBUSY if sof_unregister() fails.

Return Values

The sof_register() and sof_unregister() functions return 0 on success, and a non-zero error, as described in Intro(2), on failure.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/kernel
Interface Stability
Uncommitted

See Also

Intro(2), attributes(7), soconfig(8), _fini(9E), _init(9E), sof_ops(9S)