博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
udev修改网卡name的patch
阅读量:4216 次
发布时间:2019-05-26

本文共 691 字,大约阅读时间需要 2 分钟。

网卡的name一般是在udev中命名的,这个patch 为https://github.com/systemd/systemd/pull/5933/files从这个patch中可以看到网卡name有一定的规则,其中vendor id 一般占四个字符具体的规则如下:  *   [P
]p
s
[f
][u
][..][c
][i
] * — USB port number chain * v
- VIO slot number (IBM PowerVM)+ * a
i
— Platform bus ACPI instance id下面的code中可以看到网卡规则合成网卡name+ /* Platform devices are named after ACPI table match, and instance id+ * eg. "/sys/devices/platform/HISI00C2:00");+ * The Vendor (3 or 4 char), followed by hexdecimal model number : instance id.+ */+ if (sscanf(syspath, pattern, vendor, &model, &instance, ðid) != 4)例如这里的vendor id就是从sys文件系统中会的,例如这里的/sys/devices/platform/HISI00C2:00");

 

转载地址:http://yinmi.baihongyu.com/

你可能感兴趣的文章
【iOS游戏开发】icon那点事 之 图标设计(三)
查看>>
【IOS游戏开发】之测试发布(Distribution)
查看>>
【IOS游戏开发】之IPA破解原理
查看>>
【一天一道LeetCode】#45. Jump Game II
查看>>
【一天一道LeetCode】#56. Merge Intervals
查看>>
【一天一道LeetCode】#58. Length of Last Word
查看>>
【一天一道LeetCode】#59. Spiral Matrix II
查看>>
【一天一道LeetCode】#30. Substring with Concatenation of All Words
查看>>
【一天一道LeetCode】#60. Permutation Sequence.
查看>>
【unix网络编程第三版】阅读笔记(二):套接字编程简介
查看>>
【一天一道LeetCode】#116. Populating Next Right Pointers in Each Node
查看>>
【一天一道LeetCode】#118. Pascal's Triangle
查看>>
JAVA实现文件树
查看>>
ebay api - GetUserDisputes 函数
查看>>
ebay api GetMyMessages 函数
查看>>
手动12 - 安装php加速器 Zend OPcache
查看>>
set theme -yii2
查看>>
yii2 - controller
查看>>
yii2 - 增加actions
查看>>
php图像处理函数大全(缩放、剪裁、缩放、翻转、旋转、透明、锐化的实例总结)
查看>>