dotpy/py-pf

FreeBSD support?

tykling opened this issue · 1 comments

Hello :)

I need a prometheus exporter for pf on FreeBSD and the first step is "how to talk to pf" and I stumbled upon this project.

Do you have any plans to add FreeBSD support, and if not, would you welcome a PR to include it?

It looks like you put a lot of work into this, it would be silly to duplicate it for the FreeBSD side if much of it can be reused.

Thanks!

dotpy commented

Hi @tykling ,

Thanks for your interest in this project, but unfortunately I don't have the time and resources to add FreeBSD support to it.

That's because py-pf re-creates, in pure Python, the C structures and syscalls used by pfctl to interact with Packet Filter; and since OpenBSD and FreeBSD PF code usually differ at some extent, that would mean almost duplicating the effort in keeping the Python code in sync with two (slightly different) versions of PF.

Best regards!