[strongSwan-dev] intra-kernel-plugin access.

Christian Hopps chopps at chopps.org
Sun Feb 23 02:46:44 CET 2020


I am working to get strongswan VPP integration working. I started with some code I found on github.

I need to be able to get the VPP sw interface index while inside my VPP "kernel-ipsec" code. I have a list of interfaces gathered inside the VPP "kernel-net" code. The code currently replicates the functionality from "net" in "ipsec" to reget the interface index which is silly.

I started to add a "get_sw_if_index" method to my kernel_vpp_net_t object; however, I soon discovered I had no way of getting to that "kernel-net" created object from inside my "kernel-ipsec" methods.

What, if any, is the best way to get access to my "kernel-net" object from inside my "kernel-ipsec" plugin code?

It's very tempting to just store a pointer to my private "net" interfaces in a global variable and use that rather than replicating code between the "ipsec" and "net". :)

Thanks,
Chris.


More information about the Dev mailing list