]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
58e16237 | 2 | /* |
9b39405f | 3 | * IS-IS Rout(e)ing protocol - LSP TX Queuing logic |
58e16237 | 4 | * |
9b39405f | 5 | * Copyright (C) 2018 Christian Franke |
58e16237 | 6 | * |
8678d638 | 7 | * This file is part of FRRouting (FRR) |
58e16237 | 8 | */ |
9b39405f CF |
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 | ||
161fa356 CF |
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 | ); | |
9b39405f CF |
25 | |
26 | void isis_tx_queue_free(struct isis_tx_queue *queue); | |
27 | ||
161fa356 CF |
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, | |
89cdc4df RM |
32 | enum isis_tx_type type, const char *func, |
33 | const char *file, int line); | |
161fa356 CF |
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); | |
9b39405f CF |
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 | ||
58e16237 | 44 | #endif |