From 87596aa6b7647f618ee8e7981d8e946f8edfa33e Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Tue, 30 Jun 2026 18:55:39 +0200 Subject: ffi: Add fccntl wrapper and update headers --- ffi/pyouroboros_build_dev.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'ffi/pyouroboros_build_dev.py') diff --git a/ffi/pyouroboros_build_dev.py b/ffi/pyouroboros_build_dev.py index 778cc40..d32d577 100644 --- a/ffi/pyouroboros_build_dev.py +++ b/ffi/pyouroboros_build_dev.py @@ -19,6 +19,11 @@ # Foundation, Inc., http://www.fsf.org/about/contact/. # +"""CFFI build script for the ouroboros-dev library.""" + +# qosspec_t / timespec cdef is duplicated in the irm builder per CFFI module. +# pylint: disable=duplicate-code + from cffi import FFI ffibuilder: FFI = FFI() @@ -40,12 +45,12 @@ struct timespec { /* OUROBOROS QOS.H */ typedef struct qos_spec { + uint8_t service; uint32_t delay; uint64_t bandwidth; uint8_t availability; uint32_t loss; uint32_t ber; - uint8_t in_order; uint32_t max_gap; uint32_t timeout; /* Timeout in ms */ } qosspec_t; @@ -89,6 +94,8 @@ int flow_get_rx_qlen(int fd, size_t * sz); int flow_get_tx_qlen(int fd, size_t * sz); +int flow_get_mtu(int fd, size_t * mtu); + int flow_set_flags(int fd, uint32_t flags); int flow_get_flags(int fd); @@ -97,6 +104,18 @@ int flow_set_frct_flags(int fd, uint16_t flags); int flow_get_frct_flags(int fd); +int flow_set_frct_max_sdu(int fd, size_t max); + +int flow_get_frct_max_sdu(int fd, size_t * max); + +int flow_set_frct_rcv_ring_sz(int fd, size_t sz); + +int flow_get_frct_rcv_ring_sz(int fd, size_t * sz); + +int flow_set_frct_rto_min(int fd, time_t rto_ns); + +int flow_get_frct_rto_min(int fd, time_t * rto_ns); + /* OUROBOROS FQUEUE.H */ enum fqtype { FLOW_PKT = ..., -- cgit v1.2.3