摘要: 1、安装cmake 2、安装vcpkg 设置默认的triplet: 安装库: 3、安装vscode安装c++与cmake插件: ctrl+shift+p的“首选项-打开设置”中加入cmake配置: 新建空文件夹,Ctrl+Shift+P中用cmake quickstart生成CMakeLists.t 阅读全文
posted @ 2022-09-12 18:28 gelare 阅读(691) 评论(0) 推荐(0) 编辑
摘要: 1、在使用SSL* ssl = SSL_new(ctx)后,立刻调用SSL_CTX_free(ctx)释放ctx安全吗,会不会影响到ssl使用?答: OpenSSL使用了引用计数,SSL_CTX_free只是减少计数,当有对象在引用ctx时,不会真正的释放ctx对象,只有引用计数为0时才会真正释放。 阅读全文
posted @ 2022-01-11 18:30 gelare 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 目标:在一台linux机器上,配置3个netns, 模拟3个节点,实现3个节点通过vxlan互通。 连接图如下图所示: (1)包括3个netns: net0,net1,net2 (2)每个netns下有一个vxlan(vxlan0,vxlan1,vxlan2)接口,其master为bridge(br 阅读全文
posted @ 2021-08-16 00:37 gelare 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 1、递规与转发 FROM:https://wangjia.net/bo-blog/how-to-deny-recursion-totally-with-bind9/ 作为域名NS记录指向的DNS服务器,不同于开放给公众的DNS服务器,不需要提供本机配置域名之外的域名解析。当DNS解析的域名本机中没有 阅读全文
posted @ 2020-09-22 09:27 gelare 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 1、安装编译 git glone https://github.com/Microsoft/vcpkg cd vcpkg bootstrap-vcpkg.bat 2、搜索与安装 vcpkg search gtest vcpkg install gtest:x64-windows 3、列出已安装的库 阅读全文
posted @ 2020-08-17 16:45 gelare 阅读(499) 评论(0) 推荐(0) 编辑
摘要: nuitka --windows-disable-console --recurse-all --output-dir=C:\output --icon=C:\myico.ico ttt.py 阅读全文
posted @ 2020-07-29 14:03 gelare 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1、 PowerShell或CMD中运行linux命令 D:\>wsl ls -l 2、WSL可直中运行的 Windows 可执行文件 gelare@archie:~$ ipconfig.exe /all 3、从windows访问linux文件 \\wsl$ 4、WSL访问 Windows 文件 / 阅读全文
posted @ 2020-05-31 08:48 gelare 阅读(1059) 评论(0) 推荐(0) 编辑
摘要: 现象: cargo build 时下载失败(Windows 10 x64, build 1903),提示: warning: spurious network error (2 tries remaining): [35] SSL connect error (schannel: next Init 阅读全文
posted @ 2020-05-18 19:08 gelare 阅读(7136) 评论(1) 推荐(2) 编辑
摘要: 成员函数指针保存: char mf_addr_[16]; void (DestT::*memfun)(int); memcpy(&mf_addr_,&memfun,sizeof(memfun)); DEMO: class Signal1{ public: template <class DestT> 阅读全文
posted @ 2020-05-16 14:40 gelare 阅读(620) 评论(0) 推荐(0) 编辑
摘要: 1、示例:对不同的操作系统调用不同的代码。 use libc; #[cfg(target_os="linux")] fn my_print(){ unsafe{ libc::printf("hello".as_ptr() as *const libc::c_char); } } #[cfg(targ 阅读全文
posted @ 2020-04-24 15:06 gelare 阅读(3041) 评论(0) 推荐(2) 编辑