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
| #!/bin/bash | |
| set -eu | |
| # Example script which will get the number of IPv4 and IPv6 prefixes seen via each ASN in PeeringDB with a non-zero prefix limit. | |
| # For example purposes; script is limited to the first 10 ASNs in PeeringDB, and one route collector, route-views.isc. | |
| # Possible usage would be to query the broken API (https://status.broker.bgpkit.com/?tab=collectors) for a few route collectors | |
| # which DON'T have this ASN connected, but DO have a few full table feeds each, to get a world view of that ASN. | |
| # This script uses a locally built Monocle binary, the docker image can't be used until v1.4 is released: | |
| # https://github.com/bgpkit/monocle/milestone/11 |
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
| Draft Policy Name: Require newly created AS-SETs to have hierarchical names | |
| ID: AFPUB-2026-ASN-001-DRAFT01 | |
| Submission Date: 2026/05/15 | |
| Version: 2.0 | |
| Author(s): | |
| (a) Name: James Bensley | |
| (b) Email address: james@inter.link | |
| (c) Affiliation: Inter.link GmbH | |
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
| trait Parent { | |
| fn print_x(&self) { | |
| println!("X is: {}", self.get_x()); | |
| } | |
| fn get_x(&self) -> u16; | |
| } | |
| trait Child: Parent { | |
| fn child_fn(&self) { |
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
| #!/usr/bin/env python3 | |
| """ | |
| ASN to AS-SET mapping: | |
| AS4200000011 -> AS-A1 | |
| AS4200000021 -> AS-B1 | |
| AS4200000022 -> AS-B2 | |
| AS4200000023 -> AS-B3 | |
| AS4200000031 -> AS-C1 | |
| AS4200000032 -> AS-C2 |
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 <inttypes.h> // uint*_t | |
| #include <stdio.h> // perror(), printf() | |
| #include <stdlib.h> // memcpy, posix_memalign() | |
| #include <string.h> // malloc() | |
| #include <time.h> // clock_t, CLOCKS_PER_SEC | |
| #include <unistd.h> // getpagesize() | |
| static inline void memcpy_aligned(void *to, const void *from, size_t len) { | |
| if (len <= 64) { | |
| memcpy(to, from, 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
| // Not all functions are referenced below are called, that is intentional to verify that they are not being called. | |
| // Provide timestamps: | |
| function print_ts() { | |
| ts = gettimeofday_us(); | |
| printf("[%10d.%06d] ", ts/1000000, ts%1000000); | |
| } |
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
| #!/bin/bash | |
| # | |
| # Kills all iptables rules and unloads all iptables/netfilter related | |
| # kernel modules. | |
| # | |
| # From: https://github.com/netoptimizer/network-testing/blob/master/bin/netfilter_unload_modules.sh | |
| # Author: Jesper Dangaard Brouer <netoptimizer@brouer.com> | |
| # Trick so, program can be run as normal user, will just use "sudo" | |
| if [ "$EUID" -ne 0 ]; then |
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
| # Code from https://github.com/cisco-grpc-connection-libs/ios-xr-grpc-python/blob/master/examples/grpc_cfg.py | |
| from grpc.framework.interfaces.face.face import AbortionError | |
| import json | |
| from time import sleep | |
| import sys | |
| sys.path.insert(0, '../') | |
| from lib.cisco_grpc_client import CiscoGRPCClient | |