-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(net): Temporarily completed user space testing of netlink/uevent (…
…#926) * add netlink todo directory * save the work 2 another system workplace * save the work 2 another system workplace * add the demo of netlink_create and locate the kobject_uevent\kobject_uevent_env * add the uevent directory and demo of kobject_uevent and kobject_uevent_env * delete sth else in target * handle existing errors, ready for the next period of dev * 阶段性提交,完成了kobjectuevent_env的部分逻辑,接下来需要实现uevent_ops结构体的转写 * 调整uevent_suppress和subsystem,修改分支日志打印信息 * 调整uevent_suppress和subsystem,修改分支日志打印信息 * 在kset中引入了KsetUeventOps的trait,待实现 * 阶段性提交, 基本完成了处理kset的uevent_ops相关逻辑,新增一个trait和一个结构体,正在逐步完善kobject_uevent_env * 阶段性提交:完善大部分kobject_uevent_env函数的功能 * add_uevent_var,kobject_uevent_net_broadcast,zap_modalias_env,完善其他细节的逻辑 * 阶段性提交,开始逐渐深入与netlink * 阶段性提交,重构netlinktable和netlinksocket * replace kdebug with log::info! * 理清了sock和ueventsock的关系,重构了一部分原来的代码 * 阶段性提交,新增了几个函数,进一步完善了netlink * 阶段性提交,新增了Sk_Buff封装了一层PacketBuffer,需要解决mc_list迭代器实现方案和PacketBuffer提供的接口不足的问题 * 初步解决mc_list迭代问题和consume_skb * fmt * 同步更改 * asy to antoher workplace * 初步解决现有代码中所有权和生命周期等问题 * fix nlk_sk and init test for uevent * 初步在driver中成功调用kobject_uevent()进行测试,标记需要发送uevent的地方 * ipml socket for netlinksock * 阶段性提交,完善netlink_proto相关内容 * 阶段性提交,初步实现netlink_add_usersock_entry等 * 实现netlink_proto_init() * add NetProtoFamily and NetlinkFamulyOps * 修复mprotect系统调用未正确设置vm_flags的错误 (#847) * fix(time): modify update wall time (#836) 更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新 * chore: 调整triagebot.toml以适应新的组织架构 (#848) * netlink_insert大体框架,遇到nlk无法修改的问题 * doc: 完善README.md (#849) * doc: 完善README.md * chore: 更新sphinx相关配置,适应read the docs的更新 (#850) 根据read the docs在7月15日blog,进行此修改 https://about.readthedocs.com/blog/2024/07/addons-by-default/ * 完善netlink_insert 和 netlink_lookup * feat(driver/net): 实现Loopback网卡接口 (#845) * 初步实现loopback设备 * fix: build-scripts和tools目录下的make check指定工具链版本 (#861) * fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859) * chore: 将工具链更新到2024-07-23 (#864) * chore: 将工具链更新到2024-07-23 * 考虑更换Sk_Buffer实现,留档原有方案 * feat(fs): add eventfd syscall support (#858) * feat(fs): add eventfd syscall support * 更换Sk_Buffer实现 * refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862) * 需要解决Arc内部可变性问题 * 解决sk:Arc内部可变性问题 * 默认nightly-2024-07-23 & config改为config.toml (#872) * fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870) * fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 * 基本实现netlink单播,todo回调函数 * remove unused import * 考虑是否引入回调函数,补充sockflags * updates test-uevent * add endpoint and complete to_endpoint function for NetLinkEndpoint * feat(cred): 初步实现Cred (#846) * 初步实现Cred * 添加seteuid和setegid * 添加cred测试程序 * 修改Cred::fscmp返回结果为CredFsCmp枚举 * 完善root用户相关信息 * fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877) * fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 * fix: 解决ntty潜在的panic问题 * success to call NetlinkSock bind fn and add a fn into Socket trait * modify handle in NetlinkSock * fix af_netlink problems in the new branch reported by RA * updates test-uevent * add netlink_send adn netlink_recv * fix bind * fix sth * fix var type * 初步完成了netlink/uevent在用户空间的创建、绑定和读写测试,下一步是内核中kobject/kset相关的调用调试和uevent文件挂载到sysfs中的需求 * restore recvfrom parameter --------- Co-authored-by: val213 <[email protected]> Co-authored-by: MemoryShore <[email protected]> Co-authored-by: 黄铭涛 <[email protected]> Co-authored-by: LoGin <[email protected]> Co-authored-by: SMALLC <[email protected]> Co-authored-by: linfeng <[email protected]> Co-authored-by: Jomo <[email protected]>
- Loading branch information
1 parent
8a254f0
commit 11dad02
Showing
10 changed files
with
213 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
use crate::net::syscall::SockAddrNl; | ||
#[derive(Debug, Clone)] | ||
pub struct NetlinkEndpoint { | ||
pub addr: SockAddrNl, | ||
pub addr_len: usize, | ||
pub addr: SockAddrNl | ||
} | ||
impl NetlinkEndpoint { | ||
pub fn new(addr: SockAddrNl, addr_len: usize) -> Self { | ||
NetlinkEndpoint { addr, addr_len } | ||
pub fn new(addr: SockAddrNl) -> Self { | ||
NetlinkEndpoint { addr} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.