]>
Commit | Line | Data |
---|---|---|
58e16237 | 1 | /* |
9b39405f | 2 | * IS-IS Rout(e)ing protocol - LSP TX Queuing logic |
58e16237 | 3 | * |
9b39405f | 4 | * Copyright (C) 2018 Christian Franke |
58e16237 | 5 | * |
8678d638 | 6 | * This file is part of FRRouting (FRR) |
58e16237 CF |
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 | */ | |
9b39405f CF |
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 | ||
161fa356 CF |
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 | ); | |
9b39405f CF |
38 | |
39 | void isis_tx_queue_free(struct isis_tx_queue *queue); | |
40 | ||
161fa356 CF |
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, | |
89cdc4df RM |
45 | enum isis_tx_type type, const char *func, |
46 | const char *file, int line); | |
161fa356 CF |
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); | |
9b39405f CF |
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 | ||
58e16237 | 57 | #endif |