]> git.proxmox.com Git - mirror_frr.git/blob - isisd/isis_tx_queue.h
pimd: When doing json output do not output non-json strings
[mirror_frr.git] / isisd / isis_tx_queue.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * IS-IS Rout(e)ing protocol - LSP TX Queuing logic
4 *
5 * Copyright (C) 2018 Christian Franke
6 *
7 * This file is part of FRRouting (FRR)
8 */
9 #ifndef ISIS_TX_QUEUE_H
10 #define ISIS_TX_QUEUE_H
11
12 enum isis_tx_type {
13 TX_LSP_NORMAL = 0,
14 TX_LSP_CIRCUIT_SCOPED
15 };
16
17 struct isis_tx_queue;
18
19 struct isis_tx_queue *isis_tx_queue_new(
20 struct isis_circuit *circuit,
21 void(*send_event)(struct isis_circuit *circuit,
22 struct isis_lsp *,
23 enum isis_tx_type)
24 );
25
26 void isis_tx_queue_free(struct isis_tx_queue *queue);
27
28 #define isis_tx_queue_add(queue, lsp, type) \
29 _isis_tx_queue_add((queue), (lsp), (type), \
30 __func__, __FILE__, __LINE__)
31 void _isis_tx_queue_add(struct isis_tx_queue *queue, struct isis_lsp *lsp,
32 enum isis_tx_type type, const char *func,
33 const char *file, int line);
34
35 #define isis_tx_queue_del(queue, lsp) \
36 _isis_tx_queue_del((queue), (lsp), __func__, __FILE__, __LINE__)
37 void _isis_tx_queue_del(struct isis_tx_queue *queue, struct isis_lsp *lsp,
38 const char *func, const char *file, int line);
39
40 unsigned long isis_tx_queue_len(struct isis_tx_queue *queue);
41
42 void isis_tx_queue_clean(struct isis_tx_queue *queue);
43
44 #endif