Skip to content

Instantly share code, notes, and snippets.

View rwestphal's full-sized avatar

Renato Westphal rwestphal

View GitHub Profile
#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;
# +-------+ +-------+ +-------+
# | | | | | |
# | HOST1 | | HOST2 | | HOST3 |
# | | | | | |
# +---+---+ +---+---+ +---+---+
# | | |
# |fd00:10:1::/64 | |
# +-----+ +------+ fd00:20:1::/64|
# | |fd00:10:2::/64 |
# | | |
# +-------+ +-------+ +-------+
# | | | | | |
# | HOST1 | | HOST2 | | HOST3 |
# | | | | | |
# +---+---+ +---+---+ +---+---+
# | | |
# |fd00:10:1::/64 | |
# +-----+ +------+ fd00:20:1::/64|
# | |fd00:10:2::/64 |
# | | |
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBF3C/GkBDACpXnye1WQMJ+EWYABO9/Vk/eIpL8FxL2wdK12VBxf/UztZNQC2
busAOofASgub2wu9b3wtBNJYs4uq5RHw2GqSmV5g3WiV9UW3I5x7vg7AJC+6JaM/
ZcFLpbAFA49Sj2mucyHsZbbIFahfDl/Ispyo2b1Mw/FBA/LAJafPHMZB59dk0OVE
0+rq8m+AQHVFjQxqY3q0AiStFhAlS3aUa++VwwzgIJKNSfJxF/Ld0NDiFEKBjHgR
OQdXZYcIWHti71xOdAifHTCFjh8ZoVkTkSJOkXVSsuyX+uO9Hj93nAivryKgUZkF
oqBkBM585Ji2KV4z3hk5J+NufBaG6FUPFiSvyyjBfmCe6stwILnFUUgVUZF1eXoI
sDyHklQ/zwhl3HeqWPTow+dx95oEwFnrySkSdPG+UdEzLcYeByo2yXDeTOwm2FQi
wTbR1rX2xdYXEYNqHwdbnj3NCk+NaDoPxWUwx1Sfb7OoZbqlxOf0S14O/wekMoTd
#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;
#
# +---------+
# | |
# xge4| RT1 |xge2
# +----------------+ 7.0.0.1 +----------------+
# | | | |
# 14.0.0.0/24| +---------+ |12.0.0.0/24
# | xge3-1| |xge3-2 |
# | | | |
# | 31.0.0.0/24 | |13.0.0.0/24 |
# Dynamic topology
---
autogen:
layout:
type: grid
width: 10
height: 10
#
# +-------+ +-------+
# | | | |
# | CE1 | | CE2 |
# | | | |
# +---+---+ +---+---+
# |fd00:10:0::1/64 fd00:10:0::2/64|
# | |
# | |
# | |
#
# +-------+ +-------+
# | | | |
# | CE1 | | CE2 |
# | | | |
# +---+---+ +---+---+
# | |
# | |
# |fd00:10:0::/64 fd00:20:0::/64|
# | |