Skip to content

Copy netlink-packet-utils code to netlink-packet-core #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

qinqon
Copy link

@qinqon qinqon commented May 30, 2025

This PR add the functionalit at netlink-packet-util to this repository so we can deprecate that repo making dependencies easier to handle.

@qinqon qinqon force-pushed the move-utils-code-to-core branch from b2f7247 to 90b0556 Compare May 30, 2025 09:20
@qinqon qinqon changed the title Move utils code to core Move netlink-packet-utils code to netlink-packet-core May 30, 2025
@qinqon qinqon force-pushed the move-utils-code-to-core branch from 90b0556 to 7f142c4 Compare May 30, 2025 09:48
@qinqon qinqon changed the title Move netlink-packet-utils code to netlink-packet-core Copy netlink-packet-utils code to netlink-packet-core May 30, 2025
src/lib.rs Outdated
Comment on lines 271 to 275
pub mod nla;
pub use self::nla::*;

pub mod parsers;
pub use self::parsers::*;
Copy link
Member

@cathay4t cathay4t Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are breaking stuff, let's not expose the module path to public allowing us to re-organize the code in the future. Try expose everything as top level data type or function and don't use ::*.

pub use self::nla::{NlaBuffer, DefaultNla, NlaIterator};
pub use self::parsers::{parse_u8, ...};

}

#[macro_export(local_inner_macros)]
macro_rules! buffer {
Copy link
Member

@cathay4t cathay4t Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

@qinqon qinqon Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I should just use "cratre" right ?

UPDATE: Ahh ok just leave #[macro_export]

Cargo.toml Outdated
@@ -14,7 +14,6 @@ description = "netlink packet types"
[dependencies]
anyhow = "1.0.31"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This crate is not required anymore.

@qinqon qinqon force-pushed the move-utils-code-to-core branch from 7f142c4 to e3b38a9 Compare June 16, 2025 10:13
Signed-off-by: Enrique Llorente <[email protected]>
@qinqon qinqon force-pushed the move-utils-code-to-core branch from e3b38a9 to fa25183 Compare June 16, 2025 10:16
@qinqon qinqon requested a review from cathay4t June 16, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants