rscamper 0.2.2

Rust interface to scamper network measurement tool
Documentation
// rscamper - Rust FFI bindings for scamper_list.h
//
// 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.

use libc::{c_char, c_int, time_t};

#[repr(C)]
pub struct ScamperListT {
    _opaque: [u8; 0],
}

#[repr(C)]
pub struct ScamperCycleT {
    _opaque: [u8; 0],
}

unsafe extern "C" {
    pub fn scamper_list_use(list: *mut ScamperListT) -> *mut ScamperListT;
    pub fn scamper_list_free(list: *mut ScamperListT);
    pub fn scamper_list_id_get(list: *const ScamperListT) -> u32;
    pub fn scamper_list_name_get(list: *const ScamperListT) -> *const c_char;
    pub fn scamper_list_descr_get(list: *const ScamperListT) -> *const c_char;
    pub fn scamper_list_monitor_get(list: *const ScamperListT) -> *const c_char;
    pub fn scamper_list_cmp(a: *const ScamperListT, b: *const ScamperListT) -> c_int;

    pub fn scamper_cycle_use(cycle: *mut ScamperCycleT) -> *mut ScamperCycleT;
    pub fn scamper_cycle_free(cycle: *mut ScamperCycleT);
    pub fn scamper_cycle_list_get(cycle: *const ScamperCycleT) -> *mut ScamperListT;
    pub fn scamper_cycle_id_get(cycle: *const ScamperCycleT) -> u32;
    pub fn scamper_cycle_start_time_get(cycle: *const ScamperCycleT) -> time_t;
    pub fn scamper_cycle_stop_time_get(cycle: *const ScamperCycleT) -> time_t;
    pub fn scamper_cycle_hostname_get(cycle: *const ScamperCycleT) -> *const c_char;
    pub fn scamper_cycle_cmp(a: *mut ScamperCycleT, b: *mut ScamperCycleT) -> c_int;
}