This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <assert.h> | |
#include <err.h> | |
#include <libyang/libyang.h> | |
static struct ly_ctx *ly_ctx; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# +---------+ | |
# | | | |
# | RT1 | | |
# | 1.1.1.1 | | |
# | | | |
# +---------+ | |
# |rt1-eth0 (.1) | |
# | | |
# |10.0.1.0/24 | |
# | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# +---------+ +---------+ | |
# | | global | | | |
# | |rt1-eth0 rt2-eth0| | | |
# | +-------------------+ | | |
# | | 10.0.0.0/24 | | | |
# | | | | | |
# | | VRF RED | | | |
# | |rt1-eth1 rt2-eth1| | | |
# | RT1 +-------------------+ RT2 | | |
# | | 10.0.1.0/24 | | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ripd# conf t | |
ripd(config)# router rip | |
ripd(config-router)# network eth2 | |
ripd(config-router)# show configuration candidate changes | |
@@ -14,6 +14,7 @@ | |
distance 25 172.16.1.0/24 | |
network eth0 | |
network eth1 | |
+ network eth2 | |
redistribute ospf metric 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <errno.h> | |
#include <err.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int nb_db_init(void) | |
{ | |
#ifdef HAVE_CONFIG_ROLLBACKS | |
int ret; | |
ret = db_execute( | |
" \ | |
BEGIN TRANSACTION; \ | |
CREATE TABLE IF NOT EXISTS TRANSACTIONS( \ | |
ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int nb_db_set_max_transactions(unsigned int max) | |
{ | |
#ifdef HAVE_CONFIG_ROLLBACKS | |
int ret; | |
/* | |
* Delete old entries if necessary and update the SQL trigger that | |
* auto-deletes old entries. | |
*/ | |
ret = db_execute( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# +---------+ | |
# | | | |
# | RT1 | | |
# | 1.1.1.1 | | |
# | | | |
# +---------+ | |
# |rt1-eth0 (.1) | |
# | | |
# |10.0.1.0/24 | |
# | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# +---------+ | |
# | | | |
# | RT1 | | |
# | 1.1.1.1 |-lo1 (2001:db8:1000::1/128) | |
# | | | |
# +---------+ | |
# |rt1-eth0 (.1) | |
# | | |
# |10.0.1.0/24 | |
# |2001:DB8:1::/64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module frr-deviations-ietf-rip { | |
yang-version 1.1; | |
namespace "http://frrouting.org/yang/frr-deviations-ietf-rip"; | |
prefix frr-deviations-ietf-rip; | |
import ietf-routing { | |
prefix ietf-routing; | |
} | |
import ietf-rip { |