summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-11-27 20:11:44 (GMT)
committerThomas Haller <thaller@redhat.com>2023-11-29 15:03:41 (GMT)
commit01bd8fb01fb0fe4a0132fad6edbe2ab62a57ae8d (patch)
tree329e891ab0c041e513223b6a2f869042abe0361c /include
parent49c20efaa783449dca424cc50e4ee4b2fc5351cc (diff)
downloadlibnl-01bd8fb01fb0fe4a0132fad6edbe2ab62a57ae8d.zip
libnl-01bd8fb01fb0fe4a0132fad6edbe2ab62a57ae8d.tar.gz
libnl-01bd8fb01fb0fe4a0132fad6edbe2ab62a57ae8d.tar.bz2
include: add "nl-aux-xfrm" helpers
Diffstat (limited to 'include')
-rw-r--r--include/nl-aux-xfrm/README.md18
-rw-r--r--include/nl-aux-xfrm/nl-xfrm.h26
2 files changed, 44 insertions, 0 deletions
diff --git a/include/nl-aux-xfrm/README.md b/include/nl-aux-xfrm/README.md
new file mode 100644
index 0000000..9a4b6e2
--- /dev/null
+++ b/include/nl-aux-xfrm/README.md
@@ -0,0 +1,18 @@
+include/nl-aux-xfrm
+===================
+
+This contains private/internal helpers that depend on the public libnl-3 (core)
+and libnl-xfrm-3.
+
+Itself, it must only rely on C, include/base/ and public headers of libnl-3 (core)
+and libnl-xfrm-3.
+
+They can be used by all internal code that uses the public API of both libnl-3 (core)
+and libnl-xfrm-3.
+
+It can also be used by lib/xfrm itself (that is, the implementation of
+libnl-xfrm-3).
+
+It must not be used in public headers, it's internal only.
+
+Currently this is header-only, it does not require any additional linking.
diff --git a/include/nl-aux-xfrm/nl-xfrm.h b/include/nl-aux-xfrm/nl-xfrm.h
new file mode 100644
index 0000000..0f7e7a7
--- /dev/null
+++ b/include/nl-aux-xfrm/nl-xfrm.h
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
+
+#ifndef __NETLINK_NL_AUX_XFRM_NL_XFRM_H__
+#define __NETLINK_NL_AUX_XFRM_NL_XFRM_H__
+
+#include "base/nl-base-utils.h"
+
+struct xfrmnl_sp;
+void xfrmnl_sp_put(struct xfrmnl_sp *sp);
+#define _nl_auto_xfrmnl_sp _nl_auto(_nl_auto_xfrmnl_sp_fcn)
+_NL_AUTO_DEFINE_FCN_TYPED0(struct xfrmnl_sp *, _nl_auto_xfrmnl_sp_fcn,
+ xfrmnl_sp_put);
+
+struct xfrmnl_sa;
+void xfrmnl_sa_put(struct xfrmnl_sa *sa);
+#define _nl_auto_xfrmnl_sa _nl_auto(_nl_auto_xfrmnl_sa_fcn)
+_NL_AUTO_DEFINE_FCN_TYPED0(struct xfrmnl_sa *, _nl_auto_xfrmnl_sa_fcn,
+ xfrmnl_sa_put);
+
+struct xfrmnl_ae;
+void xfrmnl_ae_put(struct xfrmnl_ae *ae);
+#define _nl_auto_xfrmnl_ae _nl_auto(_nl_auto_xfrmnl_ae_fcn)
+_NL_AUTO_DEFINE_FCN_TYPED0(struct xfrmnl_ae *, _nl_auto_xfrmnl_ae_fcn,
+ xfrmnl_ae_put);
+
+#endif /* __NETLINK_NL_AUX_XFRM_NL_XFRM_H__ */