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 bash | |
| # Depends: ncurses-utils | |
| # man tput(1) terminfo(5) | |
| _BLACK=0 | |
| _RED=1 | |
| _GREEN=2 | |
| _YELLOW=3 | |
| _BLUE=4 | |
| _MAGENTA=5 |
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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #if defined (__GNUC__) || defined (__clang__) | |
| #define G_GNUC_UNUSED \ | |
| __attribute__((__unused__)) | |
| #define _AUTOPTR_TYPENAME(TypeName) TypeName##_autoptr |
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
| import os | |
| import socket | |
| import struct | |
| RTF_UP = 0x0001 | |
| RTF_GATEWAY = 0x0002 | |
| RTF_HOST = 0x0004 | |
| def format_rt_field(key, value): |
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 <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <asm/types.h> | |
| #include <linux/netlink.h> | |
| #include <linux/rtnetlink.h> | |
| #include <unistd.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <sys/ioctl.h> | |
| #include <linux/if.h> |