Lines Matching +full:per +full:- +full:module
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2010-2011 The FreeBSD Foundation
33 * This example Khelp module uses the helper hook points available in the TCP
34 * stack to calculate a per-connection count of inbound and outbound packets
43 #include <sys/module.h>
62 * Our per-connection persistent data storage struct.
70 * Fill in the required bits of our module's struct helper (defined in
73 * - Our helper will be storing persistent state for each TCP connection, so we
77 * - Our helper is related to the TCP subsystem, so tell the Khelp framework
78 * this by setting an appropriate class for the module. When a new TCP
88 * Set which helper hook points our module wants to hook by creating an array of
113 * - hhook_type and hhook_id are useful if you use a single function with many
116 * - udata will be NULL, because we didn't elect to pass a pointer in either of
119 * - ctx_data contains context specific data from the hook point call site. The
123 * - hdata is a pointer to the persistent per-object storage for our module. The
127 * - hosd can be used with the Khelp framework's khelp_get_osd() function to
128 * access data belonging to a different Khelp module.
139 data->est_in_count++; in example_hook()
141 data->est_out_count++; in example_hook()
147 * We use a convenient macro which handles registering our module with the Khelp
149 * require persistent per-object storage) must use the KHELP_DECLARE_MOD_UMA()
150 * macro. If you don't require per-object storage, use the KHELP_DECLARE_MOD()