rscamper 0.2.2

Rust interface to scamper network measurement tool
Documentation
// rscamper - Rust interface to scamper network measurement tool
//
// Copyright (C) 2026 Dimitrios Giakatos
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 3.

/// Minimum scamper version required by this crate.
///
/// rscamper links against `libscamperfile` and `libscamperctrl`. These libraries
/// must come from a scamper release dated **20260204 or later**. Older releases
/// expose a different API and will fail to link or behave incorrectly at runtime.
///
/// The build script (`build.rs`) checks for this automatically when you run
/// `cargo build` and emits a warning if the installed scamper is too old.
pub const SCAMPER_MIN_VERSION: &str = "20260204";

pub mod ffi;

pub mod addr;
pub mod list;
pub mod icmpext;
pub mod trace;
pub mod ping;
pub mod tracelb;
pub mod dealias;
pub mod host;
pub mod http;
pub mod tbit;
pub mod sniff;
pub mod udpprobe;
pub mod owamp;
pub mod sting;
pub mod neighbourdisc;

pub mod file;
pub mod vp;
pub mod mux;
pub mod task;
pub mod inst;
pub mod ctrl;

// Re-export the most commonly used types at the crate root.
pub use addr::ScamperAddr;
pub use list::{ScamperList, ScamperCycle};
pub use icmpext::{ScamperIcmpExt, ScamperIcmpExts, MplsLabel};
pub use trace::{ScamperTrace, ScamperTraceProbe, ScamperTraceReply, ScamperTracePmtud};
pub use ping::{ScamperPing, ScamperPingProbe, ScamperPingReply, ScamperPingStats};
pub use tracelb::{ScamperTracelb, ScamperTracelbNode, ScamperTracelbLink,
    ScamperTracelbProbe, ScamperTracelbReply, ScamperTracelbProbeset,
    ScamperTracelbProbesetSummary};
pub use dealias::{ScamperDealias, ScamperDealiasProbe, ScamperDealiasReply,
    ScamperDealiasProbedef};
pub use host::{ScamperHost, ScamperHostQuery, ScamperHostRr};
pub use http::{ScamperHttp, ScamperHttpBuf};
pub use tbit::{ScamperTbit, ScamperTbitPkt};
pub use sniff::{ScamperSniff, ScamperSniffPkt};
pub use udpprobe::{ScamperUdpprobe, ScamperUdpprobeProbe, ScamperUdpprobeReply};
pub use owamp::{ScamperOwamp, ScamperOwampTx, ScamperOwampRx, ScamperOwampSched,
    OwampResult, OwampSchedType};
pub use sting::ScamperSting;
pub use neighbourdisc::ScamperNeighbourdisc;

pub use file::{ScamperFile, ScamperObject, ScamperReadbuf};
pub use vp::ScamperVp;
pub use mux::ScamperMux;
pub use task::ScamperTask;
pub use inst::ScamperInst;
pub use ctrl::{ScamperCtrl, AttachParams, ScamperCtrlError, ResponseItem};

// File object type constants (re-exported for filter_types usage).
pub use ffi::scamper_file::{
    SCAMPER_FILE_OBJ_LIST,
    SCAMPER_FILE_OBJ_CYCLE_START,
    SCAMPER_FILE_OBJ_CYCLE_DEF,
    SCAMPER_FILE_OBJ_CYCLE_STOP,
    SCAMPER_FILE_OBJ_TRACE,
    SCAMPER_FILE_OBJ_PING,
    SCAMPER_FILE_OBJ_TRACELB,
    SCAMPER_FILE_OBJ_DEALIAS,
    SCAMPER_FILE_OBJ_NEIGHBOURDISC,
    SCAMPER_FILE_OBJ_TBIT,
    SCAMPER_FILE_OBJ_STING,
    SCAMPER_FILE_OBJ_SNIFF,
    SCAMPER_FILE_OBJ_HOST,
    SCAMPER_FILE_OBJ_HTTP,
    SCAMPER_FILE_OBJ_UDPPROBE,
    SCAMPER_FILE_OBJ_OWAMP,
};