mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 07:17:27 +00:00
refactor: pcap packet buffer size
This commit is contained in:
parent
48aa5115c0
commit
c34392a3da
1 changed files with 1 additions and 7 deletions
|
|
@ -21,13 +21,7 @@ use super::packet::{
|
|||
PACKET_SIZE,
|
||||
};
|
||||
|
||||
const BUFFER_SIZE: usize = PACKET_SIZE
|
||||
- (if HEADER_SIZE_IP4 > HEADER_SIZE_IP6 {
|
||||
HEADER_SIZE_IP4
|
||||
} else {
|
||||
HEADER_SIZE_IP6
|
||||
})
|
||||
- HEADER_SIZE_ETHERNET;
|
||||
const BUFFER_SIZE: usize = PACKET_SIZE - HEADER_SIZE_IP6 - HEADER_SIZE_ETHERNET;
|
||||
|
||||
pub(crate) struct Pcap<W: Write> {
|
||||
writer: PcapNgWriter<W>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue