nmsg 1.3.1
statsmod_plugin.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 by Domaintools, LLC.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef NMSG_STATSMOD_PLUGIN_H
18#define NMSG_STATSMOD_PLUGIN_H
19
47#include <nmsg.h>
48
50#define NMSG_STATSMOD_VERSION 1
51
74typedef nmsg_res
75(*nmsg_statsmod_module_init_fp)(const void *param,
76 size_t len_param,
77 void **mod_data);
78
86typedef void
87(*nmsg_statsmod_module_fini_fp)(void *mod_data);
88
101typedef nmsg_res
102(*nmsg_statsmod_add_io_fp)(void *mod_data, nmsg_io_t io, const char *name);
103
114typedef nmsg_res
115(*nmsg_statsmod_remove_io_fp)(void *mod_data, nmsg_io_t io);
116
118#define NMSG_STATSMOD_REQUIRED_INIT \
119 .statsmod_version = NMSG_STATSMOD_VERSION
120
131
137
144
151
157
161 void *_reserved15;
162 void *_reserved14;
163 void *_reserved13;
164 void *_reserved12;
165 void *_reserved11;
166 void *_reserved10;
167 void *_reserved9;
168 void *_reserved8;
169 void *_reserved7;
170 void *_reserved6;
171 void *_reserved5;
172 void *_reserved4;
173 void *_reserved3;
174 void *_reserved2;
175 void *_reserved1;
176 void *_reserved0;
177};
178
179#endif /* NMSG_STATSMOD_PLUGIN_H */
Base nmsg support header.
nmsg_res
nmsg result code
Definition: res.h:25
void(* nmsg_statsmod_module_fini_fp)(void *mod_data)
Destroy the filter module.
nmsg_res(* nmsg_statsmod_remove_io_fp)(void *mod_data, nmsg_io_t io)
Remove an nmsg_io_t with the filter module.
nmsg_res(* nmsg_statsmod_module_init_fp)(const void *param, size_t len_param, void **mod_data)
Initialize the stats module.
nmsg_res(* nmsg_statsmod_add_io_fp)(void *mod_data, nmsg_io_t io, const char *name)
Add an nmsg_io_t with the statistics module for instrumentation.
Structure exported by statistics modules.
long statsmod_version
Module interface version.
nmsg_statsmod_add_io_fp io_add
Add an nmsg_io_t to statsmod instrumentation.
nmsg_statsmod_module_init_fp module_init
Module-wide initialization function.
nmsg_statsmod_remove_io_fp io_remove
Remove an nmsg_io_t from statsmod instrumentation.
nmsg_statsmod_module_fini_fp module_fini
Module-wide finalization function.