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