ns_pod1 ns_srv1
veth_pod1 veth_pod1_ep veth_srv1_ep veth_srv1
|----------- vrf1 --------|
192.168.0.1/24 192.168.0.2/24 10.0.0.2/24 10.0.0.1/24
ns_pod2 ns_srv2
This file contains 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
[logging] | |
level=TRACE | |
domains=ALL |
This file contains 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
Finished dev [unoptimized + debuginfo] target(s) in 0.11s | |
Running `sudo -E target/debug/npc -vvvv` | |
[2022-03-19T01:34:11Z DEBUG netlink_proto::handle] handle: forwarding new request to connection | |
[2022-03-19T01:34:11Z DEBUG netlink_proto::connection] reading incoming messages | |
[2022-03-19T01:34:11Z DEBUG netlink_proto::codecs] NetlinkCodec: decoding next message | |
[2022-03-19T01:34:11Z DEBUG netlink_proto::connection] forwarding unsolicited messages to the connection handle | |
[2022-03-19T01:34:11Z DEBUG netlink_proto::connection] forwaring responses to previous requests to the connection handle | |
[2022-03-19T01:34:11Z DEBUG netlink_proto::connection] handling requests | |
[2022-03-19T01:34:11Z DEBUG netlink_proto::connection] sending messages | |
[2022-03-19T01:34:11Z DEBUG netlink_proto::connection] reading incoming messages |
This file contains 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/python3 | |
""" | |
To use this script, you create ~/.config/token.conf with stuff like: | |
[default] | |
# comments | |
key = "SOME_32_CHARS" | |
[github] |
This file contains 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 | |
ip link add blue type vrf table 10 | |
ip link add red type vrf table 20 | |
ip netns add ns_pod1 | |
ip netns add ns_pod2 | |
ip link add veth_pod1 type veth peer net1 | |
ip link add veth_pod2 type veth peer net2 |
This file contains 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 | |
# Enable wayland in firefox | |
export MOZ_ENABLE_WAYLAND=1 | |
export XDG_SESSION_TYPE=wayland | |
export GTK_IM_MODULE=fcitx | |
export QT_IM_MODULE=fcitx | |
export XMODIFIERS="@im=fcitx" | |
export EDITOR="vim" |
This file contains 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
struct VlanInfo { | |
base_iface: String, | |
vlan_id: u16, | |
} | |
struct Iface { | |
name: String, | |
vlan_info: Option<VlanInfo>, | |
} |
This file contains 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/python3 | |
# Copyright 2020 Red Hat | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains 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/python3 | |
NSEC_PER_SEC = 10 ** 9 | |
MAX_U64 = 2 ** 64 | |
def jiffies_to_clock_t(user_hz, hz, jiffies): | |
tick_nsec = (NSEC_PER_SEC + hz / 2) / hz | |
if (tick_nsec % (NSEC_PER_SEC / user_hz)) == 0: | |
if hz < user_hz: |
This file contains 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
error[E0061]: this function takes 1 argument but 2 arguments were supplied | |
--> netlink-packet-route/examples/dump_links.rs:28:12 | |
| | |
28 | socket.send(&buf[..], 0).unwrap(); | |
| ^^^^ -------- - supplied 2 arguments | |
| | | |
| expected 1 argument | |
error[E0061]: this function takes 1 argument but 2 arguments were supplied | |
--> netlink-packet-route/examples/dump_rules.rs:31:28 |
NewerOlder