]> git.proxmox.com Git - mirror_frr.git/blob - isisd/isis_tx_queue.h
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / isisd / isis_tx_queue.h
1 /*
2 * IS-IS Rout(e)ing protocol - LSP TX Queuing logic
3 *
4 * Copyright (C) 2018 Christian Franke
5 *
6 * This file is part of FreeRangeRouting (FRR)
7 *
8 * FRR is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2, or (at your option) any
11 * later version.
12 *
13 * FRR is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; see the file COPYING; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22 #ifndef ISIS_TX_QUEUE_H
23 #define ISIS_TX_QUEUE_H
24
25 enum isis_tx_type {
26 TX_LSP_NORMAL = 0,
27 TX_LSP_CIRCUIT_SCOPED
28 };
29
30 struct isis_tx_queue;
31
32 struct isis_tx_queue *isis_tx_queue_new(
33 struct isis_circuit *circuit,
34 void(*send_event)(struct isis_circuit *circuit,
35 struct isis_lsp *,
36 enum isis_tx_type)
37 );
38
39 void isis_tx_queue_free(struct isis_tx_queue *queue);
40
41 #define isis_tx_queue_add(queue, lsp, type) \
42 _isis_tx_queue_add((queue), (lsp), (type), \
43 __func__, __FILE__, __LINE__)
44 void _isis_tx_queue_add(struct isis_tx_queue *queue, struct isis_lsp *lsp,
45 enum isis_tx_type type, const char *func,
46 const char *file, int line);
47
48 #define isis_tx_queue_del(queue, lsp) \
49 _isis_tx_queue_del((queue), (lsp), __func__, __FILE__, __LINE__)
50 void _isis_tx_queue_del(struct isis_tx_queue *queue, struct isis_lsp *lsp,
51 const char *func, const char *file, int line);
52
53 unsigned long isis_tx_queue_len(struct isis_tx_queue *queue);
54
55 void isis_tx_queue_clean(struct isis_tx_queue *queue);
56
57 #endif