Skip to content
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

Replace Circular with Oval and add Miri tests #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ jobs:
- run: cargo clippy --all-features -- -D warnings
- run: cargo clippy --no-default-features -- -D warnings

miri:
name: Miri
runs-on: ubuntu-latest
env:
# Needed since the tests interact with the filesystem
MIRIFLAGS: "-Zmiri-disable-isolation"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- run: cargo miri test --all-features

doc:
name: Build documentation
runs-on: ubuntu-latest
Expand Down Expand Up @@ -91,7 +104,7 @@ jobs:
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-02-07
toolchain: nightly-2024-05-01
# ^ sync with https://github.com/awslabs/cargo-check-external-types/blob/main/rust-toolchain.toml
- run: cargo install cargo-check-external-types
- run: cargo check-external-types
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
circular = "0.3"
oval = "2.0"
cookie-factory = { version="0.3.0", optional=true }
nom = "7.0"
rusticata-macros = "4.0"
Expand All @@ -53,5 +53,5 @@ hex-literal = "0.4"
allowed_external_types = [
"nom",
"nom::*",
"circular::Buffer",
"oval::Buffer",
]
2 changes: 1 addition & 1 deletion src/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::pcap::parse_pcap_header;
use crate::pcapng::parse_sectionheaderblock;
use crate::traits::PcapReaderIterator;
use crate::{LegacyPcapReader, PcapNGReader};
use circular::Buffer;
use nom::Needed;
use oval::Buffer;
use std::io::Read;

/// Generic interface for PCAP or PCAPNG file access
Expand Down
2 changes: 1 addition & 1 deletion src/pcap/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::pcap::{
LegacyPcapBlock, PcapHeader,
};
use crate::traits::PcapReaderIterator;
use circular::Buffer;
use nom::{IResult, Needed, Offset};
use oval::Buffer;
use std::io::Read;

/// Parsing iterator over legacy pcap data (streaming version)
Expand Down
2 changes: 1 addition & 1 deletion src/pcapng/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use crate::blocks::PcapBlockOwned;
use crate::error::PcapError;
use crate::pcapng::*;
use crate::traits::PcapReaderIterator;
use circular::Buffer;
use nom::{Needed, Offset};
use oval::Buffer;
use std::io::Read;

/// Parsing iterator over pcap-ng data (streaming version)
Expand Down