]> git.proxmox.com Git - mirror_frr.git/blame - tools/cocci.h
isisd: implement the 'lsp-generation' notification
[mirror_frr.git] / tools / cocci.h
CommitLineData
d62a17ae 1/* some of this stuff doesn't seem to parse properly in coccinelle
896014f4 2 */
52c6b0e2 3
d62a17ae 4#define DEFUN(funcname, cmdname, str, help) \
5 static int funcname(const struct cmd_element *self, struct vty *vty, \
6 int argc, struct cmd_token *argv[])
7#define DEFUN_HIDDEN(funcname, cmdname, str, help) \
8 static int funcname(const struct cmd_element *self, struct vty *vty, \
9 int argc, struct cmd_token *argv[])
52c6b0e2
DL
10
11#define ENABLE_BGP_VNC 1
d62a17ae 12#define ALL_LIST_ELEMENTS_RO(list, node, data) \
13 (node) = listhead(list), ((data) = NULL); \
14 (node) != NULL && ((data) = listgetdata(node)); \
15 (node) = listnextnode(node), ((data) = NULL)
16#define ALL_LIST_ELEMENTS(list, node, nextnode, data) \
17 (node) = listhead(list), ((data) = NULL); \
18 (node) != NULL \
19 && ((data) = listgetdata(node), (nextnode) = node->next); \
20 (node) = (nextnode), ((data) = NULL)
21#define LIST_HEAD(name, type) \
22 struct name { \
23 struct type *lh_first; /* first element */ \
24 }
25#define LIST_ENTRY(type) \
26 struct { \
27 struct type *le_next; /* next element */ \
28 struct type **le_prev; /* address of previous next element */ \
29 }