-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PF_KEY portability #4
Comments
If we really need to deal with platform-specific code, we can use cppo https://github.com/mjambon/cppo/ similar to the C preprocessor (but we should avoid it if possible)... |
we will need platform-specific numbers; looking at the extension header defines for kernels with PF_KEY support:
|
thanks for this extensive survey... any chance we can find magics for android? conduit uses cppo, include, code and build -- looks like we've to manually extract and define the platform (by calling out to |
there are similar incompatibilities with the command enum. Until 10 (maybe 11, PROMISC) all is the same, but then: illumos (no policies):
Linux (same as FreeBSD <= 22):
MacOSX (same as FreeBSD <= 22):
NetBSD (same as FreeBSD <= 22):
OpenBSD (no policies):
|
another approach is used in ocaml-unix-errno which provides a I'm wondering how illumos/OpenBSD communicate policies to and from the kernel... |
OpenBSD uses their FLOW concept for SPD. regarding OS selection/detection: i would prefer to be able to target any supported PF_KEY interface regardless of the platform intended to run the ocaml ike (but default to one platform, detected by calling |
maybe no preprocessor then, and instead use a runtime configuration option |
functor. no need to dispatch. |
sure, I assume all modules in the pfkey directory will need to live under the functor.. |
extension_type enum
inpfkey/pfkey_wire.ml
FreeBSD specific (on OpenBSD decodingsadb_register
response fails because of unknown extension type 30 -- this issupported_comp
in OpenBSD)we will need platform specific pfkey_wire code (enum values at least) in order to support more
than FreeBSD.
The text was updated successfully, but these errors were encountered: