mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Implements protocol templates.
Based on the patch from Alexander V. Chernikov. Extended to support almost all protocols. Uses 'protocol bgp NAME from TEMPLATE { ... }' syntax.
This commit is contained in:
15
conf/conf.c
15
conf/conf.c
@@ -377,3 +377,18 @@ cfg_strdup(char *c)
|
||||
memcpy(z, c, l);
|
||||
return z;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
cfg_copy_list(list *dest, list *src, unsigned node_size)
|
||||
{
|
||||
node *dn, *sn;
|
||||
|
||||
init_list(dest);
|
||||
WALK_LIST(sn, *src)
|
||||
{
|
||||
dn = cfg_alloc(node_size);
|
||||
memcpy(dn, sn, node_size);
|
||||
add_tail(dest, dn);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user