Skip to content

Instantly share code, notes, and snippets.

View rwestphal's full-sized avatar

Renato Westphal rwestphal

View GitHub Profile
# +---------+
# | |
# | RT1 |
# | 1.1.1.1 |
# | |
# +---------+
# |rt1-eth0 (.1)
# |
# |10.0.1.0/24
# |
# +---------+ +---------+
# | | | |
# | CE1 | | CE2 |
# | | | |
# +---------+ +---------+
# ce1-eth0| |ce2-eth0
# | |
# 172.16.1.0/24| |172.16.2.0/24
# | |
# rt1-eth0| 10.0.1.0/24 10.0.3.0/24 |rt3-eth0
module frr-interface {
yang-version 1;
namespace "http://frrouting.org/yang/interface";
prefix frr-interface;
organization
"Free Range Routing";
contact
"FRR Users List: <mailto:frog@lists.frrouting.org>
FRR Development List: <mailto:dev@lists.frrouting.org>";
module frr-ripd {
yang-version 1.1;
namespace "http://frrouting.org/yang/ripd";
prefix frr-ripd;
import ietf-inet-types {
prefix inet;
}
import ietf-yang-types {
prefix yang;
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <err.h>
#include <assert.h>
#include <arpa/inet.h>
#include <stdbool.h>
#include <libyang/libyang.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <err.h>
#include <assert.h>
#include <arpa/inet.h>
#include <stdbool.h>
#include <libyang/libyang.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <err.h>
#include <libyang/libyang.h>
static struct ly_ctx *ly_ctx;
static struct lyd_node *running, *candidate;
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <err.h>
#include <libyang/libyang.h>
static struct ly_ctx *ly_ctx;
static struct lyd_node *candidate;
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <err.h>
#include <assert.h>
#include <arpa/inet.h>
#include <stdbool.h>
#include <libyang/libyang.h>
# +-----------+
# +--------+rt2-eth0 rt1-eth0| |rt1-eth7 rt9-eth0+--------+
# | rt2 +-----------------------+ +-----------------------+ rt9 |
# +--------+ (ah-md5) | | (esp-3des/ah-sha1) +--------+
# | |
# +--------+rt3-eth0 rt1-eth1| |rt1-eth8 rt10-eth0+--------+
# | rt3 +-----------------------+ +-----------------------+ rt10 |
# +--------+ (ah-sha1) | | (esp-aes-128/ah-md5) +--------+
# | |
# +--------+rt4-eth0 rt1-eth2| |rt1-eth9 rt11-eth0+--------+