]>
git.proxmox.com Git - mirror_frr.git/blob - zebra/zebra_opaque.h
2 * Zebra opaque message zapi message handler
3 * Copyright (c) 2020 Volta Networks, Inc.
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.
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.
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
22 #ifndef _ZEBRA_OPAQUE_H
23 #define _ZEBRA_OPAQUE_H 1
25 /* Default for number of messages to dequeue per lock cycle */
26 #define ZEBRA_OPAQUE_MSG_LIMIT 1000
29 * Initialize the module at startup
31 void zebra_opaque_init(void);
34 * Start the module pthread. This step is run later than the
35 * 'init' step, in case zebra has fork-ed.
37 void zebra_opaque_start(void);
40 * Does this module handle (intercept) the specified zapi message type?
42 bool zebra_opaque_handles_msgid(uint16_t id
);
45 * Module stop, called from the main pthread. This is synchronous:
46 * once it returns, the pthread has stopped and exited.
48 void zebra_opaque_stop(void);
51 * Module cleanup, called from the zebra main pthread. When it returns,
52 * all module cleanup is complete.
54 void zebra_opaque_finish(void);
57 * Enqueue a batch of messages for processing. Returns the number dequeued
58 * from the batch fifo.
60 uint32_t zebra_opaque_enqueue_batch(struct stream_fifo
*batch
);
63 #endif /* _ZEBRA_OPAQUE_H */