自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (1)
  • 收藏
  • 关注

原创 FIFIO命名管道

fifo_read.c #include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdlib.h> #include <errno.h> int main(int argc,..

2021-02-02 14:46:24 278

原创 C语言标准输入输出函数集合

fprint()将格式化信息输出到指定的文件流 int fprintf(FILE *stream, const char *format, …); int main(int argc, char const *argv[]) { FILE *fp; fp = fopen("1.txt", "wb"); char *str = "this is a string"; fprintf(fp, "hello, %s\n", str); fclose(fp); return 0; } printf()

2021-02-02 14:18:02 584

原创 linuxC异常处理

errno() 定义在errno.h中,#include <errno.h> 记录系统最后一次的错误码,int类型 每个errno值对应一个字符串表示的错误类型,可以使用strerror(errno)获取errno对应的错误 参照https://blog.csdn.net/qq_15437629/article/details/108123190 int main(int argc, char const *argv[]) { int fw, fr; fw = open("1.txt",..

2021-02-02 10:13:14 294

原创 TCP网络编程

服务端 /* * @Author: hohj * @Date: 2020-12-13 14:14:49 * @Last Modified by: hohj * @Last Modified time: 2021-01-13 10:25:31 */ #include <unistd.h> #include <stdio.h> #include <string.h> #include <sys/socket.h> #include <sys/t..

2021-02-01 15:53:12 167

原创 iptables实现端口转发

网络环境 公网服务器: 内网IP:ens33: 192.168.33.1 外网IP:ens38:192.168.3.138 内网机器: 内网IP:192.168.33.20 通过外网IP+端口(8082)实现到内网机器的22端口(ssh服务)的的访问 iptables -t nat -A POSTROUTING -d 192.168.33.20 -p tcp --dport 22 -j SNAT --to-source 192.168.3.138 iptables -t nat -D POSTROU..

2021-02-01 11:50:21 606

原创 内网机器上网

如何让内网机器也可以互联网冲浪 网络环境 A: 192.168.33.20/24 B: 192.168.33.1/24, ens33, 192.168.3.138, ens38 B可通过ens38网卡上网,A在内网环境,不能连接互联网 配置A 将B设为A的默认路由 route add default gw 192.168.33.1 配置DNS:114.114.114.114 配置A 开启路由转发 vim /etc/sysctl.conf net.ipv4.ip_forward = 1 立即生效

2021-02-01 10:55:07 415

原创 Ubuntu配置DHCP服务

Ubuntu配置DHCP服务 安装dhcp服务:apt install isc-dhcp-server 配置dhcp服务: sudo vim /etc/default/isc-dhcp-server INTERFACES="ens33" sudo vim /etc/dhcp/dhcpd.conf subnet 192.168.33.0 netmask 255.255.255.0 { range 192.168.33.20 192.168.33.50; option routers

2021-01-29 15:48:15 1229

GeoLite2-City_20210216.tar.gz

最新GeoLite2数据库文件

2021-02-20

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除