blob: 86372da422a11dedebc00ad0ed4cf104cda40ecf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Zebra opaque message zapi message handler
* Copyright (c) 2020 Volta Networks, Inc.
*/
#include <zebra.h>
#ifndef _ZEBRA_OPAQUE_H
#define _ZEBRA_OPAQUE_H 1
/* Default for number of messages to dequeue per lock cycle */
#define ZEBRA_OPAQUE_MSG_LIMIT 1000
/*
* Initialize the module at startup
*/
void zebra_opaque_init(void);
/*
* Start the module pthread. This step is run later than the
* 'init' step, in case zebra has fork-ed.
*/
void zebra_opaque_start(void);
/*
* Does this module handle (intercept) the specified zapi message type?
*/
bool zebra_opaque_handles_msgid(uint16_t id);
/*
* Module stop, called from the main pthread. This is synchronous:
* once it returns, the pthread has stopped and exited.
*/
void zebra_opaque_stop(void);
/*
* Module cleanup, called from the zebra main pthread. When it returns,
* all module cleanup is complete.
*/
void zebra_opaque_finish(void);
/*
* Enqueue a batch of messages for processing. Returns the number dequeued
* from the batch fifo.
*/
uint32_t zebra_opaque_enqueue_batch(struct stream_fifo *batch);
#endif /* _ZEBRA_OPAQUE_H */
|