This repository has been archived by the owner on Oct 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make imports more consistent with the other crates
- Loading branch information
1 parent
38068f2
commit a8b9e01
Showing
18 changed files
with
161 additions
and
138 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
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,16 +1,12 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pub extern crate netlink_packet_core as nl; | ||
pub(crate) extern crate netlink_packet_utils as utils; | ||
pub use self::utils::{traits, DecodeError}; | ||
pub use netlink_packet_core::{ | ||
ErrorMessage, | ||
NetlinkBuffer, | ||
NetlinkHeader, | ||
NetlinkMessage, | ||
NetlinkPayload, | ||
}; | ||
|
||
pub use self::utils::{nla, traits, DecodeError}; | ||
|
||
pub(crate) mod buffer; | ||
pub mod constants; | ||
pub mod message; | ||
mod message; | ||
pub use message::{NetfilterHeader, NetfilterMessage, NetfilterMessageInner}; | ||
pub mod nflog; |
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
30 changes: 8 additions & 22 deletions
30
netlink-packet-netfilter/src/nflog.rs → ...ink-packet-netfilter/src/nflog/message.rs
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
mod message; | ||
pub use message::NfLogMessage; | ||
pub mod nlas; | ||
|
||
use crate::{ | ||
constants::NFNETLINK_V0, | ||
nflog::nlas::config::ConfigNla, | ||
nl::{NetlinkHeader, NetlinkMessage, NetlinkPayload, NLM_F_ACK, NLM_F_REQUEST}, | ||
NetfilterHeader, | ||
NetfilterMessage, | ||
}; | ||
|
||
pub fn config_request( | ||
family: u8, | ||
group_num: u16, | ||
nlas: Vec<ConfigNla>, | ||
) -> NetlinkMessage<NetfilterMessage> { | ||
let mut message = NetlinkMessage { | ||
header: NetlinkHeader { | ||
flags: NLM_F_REQUEST | NLM_F_ACK, | ||
..Default::default() | ||
}, | ||
payload: NetlinkPayload::from(NetfilterMessage::new( | ||
NetfilterHeader::new(family, NFNETLINK_V0, group_num), | ||
NfLogMessage::Config(nlas), | ||
)), | ||
}; | ||
message.finalize(); | ||
message | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// SPDX-License-Identifier: MIT | ||
mod config_cmd; | ||
mod config_flags; | ||
mod config_mode; | ||
mod nla; | ||
mod timeout; | ||
|
||
pub use config_cmd::ConfigCmd; | ||
pub use config_flags::ConfigFlags; | ||
pub use config_mode::{ConfigMode, CopyMode}; | ||
pub use nla::ConfigNla; | ||
pub use timeout::Timeout; |
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod config; | ||
pub mod packet; |
5 changes: 1 addition & 4 deletions
5
...ket-netfilter/src/nflog/packet/hw_addr.rs → ...etfilter/src/nflog/nlas/packet/hw_addr.rs
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
mod hw_addr; | ||
mod nla; | ||
mod packet_hdr; | ||
mod timestamp; | ||
|
||
pub use hw_addr::{HwAddr, HwAddrBuffer}; | ||
pub use nla::PacketNla; | ||
pub use packet_hdr::{PacketHdr, PacketHdrBuffer}; | ||
pub use timestamp::{TimeStamp, TimeStampBuffer}; |
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
File renamed without changes.
Oops, something went wrong.