aboutsummaryrefslogtreecommitdiff
path: root/ffi/fccntl_wrap.h
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2026-03-04 21:26:43 +0100
committerDimitri Staessens <dimitri@ouroboros.rocks>2026-03-07 15:27:04 +0100
commit7a4c37e8b673328dda59cec11ab9dce66c22a312 (patch)
treed2a05d2fa022d97ba79d8af2d32ec9e7cc3bd9e1 /ffi/fccntl_wrap.h
parent62924a033cb2a0130cc6a072e03590f8eec5ac72 (diff)
downloadpyouroboros-7a4c37e8b673328dda59cec11ab9dce66c22a312.tar.gz
pyouroboros-7a4c37e8b673328dda59cec11ab9dce66c22a312.zip
ouroboros: Add IRM wrapper
Add ouroboros.irm module wrapping the Ouroboros IRM C API, providing Python interfaces for IPCP lifecycle (create, destroy, bootstrap, enroll, connect), name management (create, destroy, register, list), and program/process binding. Split the monolithic CFFI build into separate _ouroboros_dev_cffi and _ouroboros_irm_cffi modules, each linking only its required library. Also includes: - ouroboros.cli module with higher-level wrappers mirroring CLI tools - FRCT flag support (set/get) in the Flow API - FlowPeer event type in FEventType - QoS defaults updated to match ouroboros source - Bug fixes: flow_set_snd_timeout typo, flow_set_flags calling convention, FlowSet name mangling, fqueue_type return type - .gitignore, copyright updates, version bump to 0.23.0
Diffstat (limited to 'ffi/fccntl_wrap.h')
-rw-r--r--ffi/fccntl_wrap.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/ffi/fccntl_wrap.h b/ffi/fccntl_wrap.h
index ab227ea..f9a137e 100644
--- a/ffi/fccntl_wrap.h
+++ b/ffi/fccntl_wrap.h
@@ -1,10 +1,10 @@
/*
- * Ouroboros - Copyright (C) 2016 - 2020
+ * Ouroboros - Copyright (C) 2016 - 2026
*
* An fccntl wrapper
*
- * Dimitri Staessens <dimitri.staessens@ugent.be>
- * Sander Vrijders <sander.vrijders@ugent.be>
+ * Dimitri Staessens <dimitri@ouroboros.rocks>
+ * Sander Vrijders <sander@ouroboros.rocks>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -71,3 +71,18 @@ int flow_get_flags(int fd)
return (int) flags;
}
+
+int flow_set_frct_flags(int fd, uint16_t flags)
+{
+ return fccntl(fd, FRCTSFLAGS, flags);
+}
+
+int flow_get_frct_flags(int fd)
+{
+ uint16_t flags;
+
+ if (fccntl(fd, FRCTGFLAGS, &flags))
+ return -EPERM;
+
+ return (int) flags;
+}