上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: 共享内存-进程间通信 基本流程 创建/打开 一块共享内存空间 将共享内存映射到用户进程空间 操作 解除映射 销毁共享内存 创建共享内存源码 #include <stdio.h> #include <sys/shm.h> #include <unistd.h> #include <string.h> 阅读全文
posted @ 2021-11-05 14:59 roverqqq 阅读(79) 评论(0) 推荐(0)
摘要: 无名管道源码 #include <stdio.h> #include <unistd.h> #include <string.h> #include <errno.h> int main() { int fd[2]; char buf[1024]; memset(buf,'\0',sizeof(bu 阅读全文
posted @ 2021-11-05 14:11 roverqqq 阅读(69) 评论(0) 推荐(0)
摘要: linux多线程 1. 头文件 <pthread.h> 2. 编译 gcc -o test test.c -lpthread 3. 变量 pthread_t pthread_cond_t pthread_mutex_t 4. 函数 pthread_create pthread_join pthrea 阅读全文
posted @ 2021-11-03 16:11 roverqqq 阅读(78) 评论(0) 推荐(0)
摘要: 交叉编译tcpdump 准备 确认目标平台:arm-linux, mips-linux 确认目标编译链:***-gcc 1. 下载tcpdump源码和libpcap源码 tcpdump libpcap 2. 解压 tar -zxvf tcpdump-4.99.1.tar.gz tar -zxvf l 阅读全文
posted @ 2021-11-02 16:03 roverqqq 阅读(792) 评论(0) 推荐(0)
摘要: 目录结构 - ssl_client.h # 头文件 - ssl_client.c # 代码文件 - Makefile # makefile - ca # 证书目录 - ca.crt # CA证书 - client.crt # 服务端证书 - client.key # 服务端密钥 ssl_client 阅读全文
posted @ 2021-10-29 19:03 roverqqq 阅读(572) 评论(0) 推荐(0)
摘要: 目录结构 - ssl_server.h # 头文件 - ssl_server.c # 代码文件 - Makefile # makefile - ca # 证书目录 - ca.crt # CA证书 - server.crt # 服务端证书 - server.key # 服务端密钥 ssl_server 阅读全文
posted @ 2021-10-29 19:01 roverqqq 阅读(548) 评论(0) 推荐(0)
摘要: 源码安装openssl centos7 1. 进入openssl官网选择版本 官网地址:https://www.openssl.org/source/old/ 2. 下载版本 wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1b.t 阅读全文
posted @ 2021-10-28 15:05 roverqqq 阅读(371) 评论(0) 推荐(0)
摘要: openssl生成自签名证书 1. 生成CA 1.1 生成CA私钥 openssl> genrsa -des3 -out ca.key 1024 1.2 去除CA私钥密码 openssl> rsa -in ca.key -out ca.key 1.3 生成CA openssl> req -new - 阅读全文
posted @ 2021-10-28 15:04 roverqqq 阅读(152) 评论(0) 推荐(0)
摘要: centos7添加http服务 1. 安装httpd sudo yum install -y httpd 2. 开放端口80,开启服务 sudo firewall-cmd --permanent --add-port=80/tcp sudo firewall-cmd --add-service=ht 阅读全文
posted @ 2021-10-28 15:04 roverqqq 阅读(320) 评论(0) 推荐(0)
摘要: centos7支持https 1. 安装mod_ssl sudo yum install -y mod_ssl 2. 创建CA目录并将证书和私钥文件存放到该目录 sudo mkdir /etc/httpd/ca #假设证书和私钥所在目录为~ #证书名:server.crt 私钥名:server.ke 阅读全文
posted @ 2021-10-28 15:03 roverqqq 阅读(158) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 下一页