
Linux-网络
文章平均质量分 88
有关网络笔记
哎呀码爷
加油
展开
-
RTL8169网卡驱动
原文:http://www.bubuko.com/infodetail-844822.html本文通过学习RealTek8169/8168/8101网卡的驱动代码(drivers/net/r8169.c),梳理一下Linux下网卡的收包过程。在下水平相当有限,有不当之处,还请大家斧正_驱动的初始化如下的rtl8169_init_module函数是此驱动的初始化代码,此函数只干了一件事,就是向内核注册一个pci驱动rtl8169_pci_driver。static int __init rtl816转载 2021-12-03 16:21:30 · 2147 阅读 · 0 评论 -
Linux下用.c检测网卡与网线连接状态
使用ioctl向socket发送SIOCETHTOOL命令字。#include <stdio.h>#include <stdlib.h>#include <string.h>#include <fcntl.h>#include <errno.h>#include <sys/ioctl.h>#include <sys/types.h>#include <sys/socket.h>#include原创 2020-07-22 17:17:59 · 590 阅读 · 0 评论