]> git.proxmox.com Git - mirror_frr.git/blob - zebra/zebra_opaque.h
Merge pull request #6506 from volta-networks/ldp_pwstatus_cleanup
[mirror_frr.git] / zebra / zebra_opaque.h
1 /*
2 * Zebra opaque message zapi message handler
3 * Copyright (c) 2020 Volta Networks, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; see the file COPYING; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #include <zebra.h>
21
22 #ifndef _ZEBRA_OPAQUE_H
23 #define _ZEBRA_OPAQUE_H 1
24
25 /* Default for number of messages to dequeue per lock cycle */
26 #define ZEBRA_OPAQUE_MSG_LIMIT 1000
27
28 /*
29 * Initialize the module at startup
30 */
31 void zebra_opaque_init(void);
32
33 /*
34 * Start the module pthread. This step is run later than the
35 * 'init' step, in case zebra has fork-ed.
36 */
37 void zebra_opaque_start(void);
38
39 /*
40 * Does this module handle (intercept) the specified zapi message type?
41 */
42 bool zebra_opaque_handles_msgid(uint16_t id);
43
44 /*
45 * Module stop, called from the main pthread. This is synchronous:
46 * once it returns, the pthread has stopped and exited.
47 */
48 void zebra_opaque_stop(void);
49
50 /*
51 * Module cleanup, called from the zebra main pthread. When it returns,
52 * all module cleanup is complete.
53 */
54 void zebra_opaque_finish(void);
55
56 /*
57 * Enqueue a batch of messages for processing. Returns the number dequeued
58 * from the batch fifo.
59 */
60 uint32_t zebra_opaque_enqueue_batch(struct stream_fifo *batch);
61
62
63 #endif /* _ZEBRA_OPAQUE_H */