1

I have looked here: https://github.com/apple/darwin-xnu

But all i can find is the 'back end' for the pfctl tool, but i am interested in the command-line pfctl tool itself, the option parser and so on.

Has Apple released source code for this or documented it in a manual page for 10.14.1?

  • 1
    Is the version of macOS you want this source listed here? opensource.apple.com – bmike Jun 2 at 18:31
  • @bmike yes (10.14.1) :) but i still can't find the source for pfctl CLI tool there... – horseyguy Jun 2 at 18:39
  • 1
    Searching that site is a PITA and the tool might not even be open sourced. Have you checked bsd sources? That might get you a file name or header name to latch on to and confirm if it’s released by Apple or not. – bmike Jun 2 at 21:12
1

A path name embedded in the pfctl executable on my Mojave system:

/BuildRoot/Library/Caches/com.apple.xbs/Sources/PacketFilter/PacketFilter-85/pfctl/pfctl_optimize.c

suggests that it's part of a "PacketFilter" package which Apple hasn't released.

However, this filename suggests that the tool is very similar (if not identical) to the OpenBSD utility of the same name.

  • Thanks! But i would have thought they'd be required by law to release it - as it's based on the openbsd pfctl code afaict – horseyguy Jun 3 at 7:57
  • The BSD license doesn't require source to be released. You may be thinking of GPL, which is more common for Linux software. – duskwuff Jun 3 at 9:11
  • ah, good point, you are correct! woe is me... – horseyguy Jun 3 at 11:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .