📄 probe_ipv6
字号:
#!/bin/shset -ePATH=/bin:/usr/bin:$PATH; export PATHtrap "rm -f tmp$$a.c tmp$$b.c tmp$$a.o tmp$$b.o" 0target=port_ipv6cat > tmp$$a.c <<EOF#include <sys/types.h>#include <netinet/in.h>struct sockaddr_in6 xx;EOFcat > tmp$$b.c <<EOF#include <sys/types.h>#include <netinet/in.h>struct in6_addr xx;EOFcat > ${target}.h <<EOF/* This file is automatically generated. Do Not Edit. */#ifndef ${target}_h#define ${target}_hEOFif gcc -c tmp$$a.c > /dev/null 2>&1then echo "#define HAS_INET6_STRUCTS" >> ${target}.h if gcc -c tmp$$b.c > /dev/null 2>&1 then : else echo "#define in6_addr in_addr6" >> ${target}.h fielse echo "#undef HAS_INET6_STRUCTS" >> ${target}.hfiecho >> ${target}.hecho "#endif" >> ${target}.hexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -