NIOCGREGIF is invalid
未关闭
还没有人认领这个 Issue。
- 主要语言
- Rust
- 星标
- 28
- 派生
- 11
- PR 合并指标
- 30 天内没有已合并 PR
描述
The original NIOCGREGIF is defined in netmap_legacy.h as the following:
/*
* FreeBSD uses the size value embedded in the _IOWR to determine
* how much to copy in/out. So we need it to match the actual
* data structure we pass. We put some spares in the structure
* to ease compatibility with other versions
*/
#define NIOCGINFO _IOWR('i', 145, struct nmreq) /* return IF info */
#define NIOCREGIF _IOWR('i', 146, struct nmreq) /* interface register */
#define NIOCCONFIG _IOWR('i',150, struct nm_ifreq) /* for ext. modules */
The Rust's NIOCREGIF is defined here:
#[cfg(target_os = "linux")]
pub const NIOCREGIF: c_ulong = 3225184658;
#[cfg(target_os = "freebsd")]
pub const NIOCREGIF: c_ulong = 3225184658;
They are different on Linux and libc::ioctl(fd, NIOCREGIF, &mut nmr as *mut nmreq) results in Operation bot supported. Valid NIOCREGIF for Linux is 3225446802, isn't it?
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
定位 Rust 中 NIOCREGIF 的定义,并将其与 netmap_legacy.h 中的声明以及 issue 中报告的 Linux 值进行比较。使用特定于平台的常量验证 ioctl 调用;完成的标准是 Linux 使用有效值,而 FreeBSD 保留其自身的定义。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- linux, rust
- 领域
- networking
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100