]> git.proxmox.com Git - mirror_frr.git/blob - tools/cocci.h
zebra: replace zlog_err with flog_err
[mirror_frr.git] / tools / cocci.h
1 /* some of this stuff doesn't seem to parse properly in coccinelle
2 */
3
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[])
10
11 #define ENABLE_BGP_VNC 1
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 }