M1: pf.c compiles into pf.ko

This commit is contained in:
lgcosta committed 2026-11-11 14:55:20 -03:00
1 parent 1fcd7b3046
commit 0119e70960
54 files changed
+14853 -96

No files matched your search

+1
View File
@@ -13,4 +13,5 @@
#define IFT_PFLOG 0xf0
#define IFT_PFSYNC 0xf1
#define IFT_CARP 0xf8
#define IFT_ENC 0xf4 /* Encapsulation (OpenBSD net/if_types.h) */
#endif
+2 -2
View File
@@ -13,7 +13,7 @@
* pfk.h before this header. */
struct mbuf;
struct mbuf_list;
struct ifnet;
struct pfk_ifnet;
struct pfk_ifnet;
struct pf_queuespec;
@@ -60,7 +60,7 @@ extern const struct ifq_ops * const ifq_fqcodel_ops;
extern const struct pfq_ops * const pfq_hfsc_ops;
extern const struct pfq_ops * const pfq_fqcodel_ops;
void ifq_init(struct ifqueue *, struct ifnet *, unsigned int);
void ifq_init(struct ifqueue *, struct pfk_ifnet *, unsigned int);
void ifq_init_maxlen(struct ifqueue *, unsigned int);
void ifq_attach(struct ifqueue *, const struct ifq_ops *, void *);
void ifq_destroy(struct ifqueue *);
+4 -1
View File
@@ -11,9 +11,12 @@ struct pf_rtentry {
void *rt_addr; /* destination */
unsigned int rt_ifidx; /* egress ifindex */
unsigned int rt_flags;
#ifndef RTF_UP
#define RTF_UP 0x1 /* route usable (OpenBSD net/route.h) */
#endif
int rt_listid;
int rt_labelid;
void *rt_ifa;
void *rt_ifa; /* BSD in_ifaddr/in6_ifaddr view */
};
int rtable_exists(unsigned int rtableid);
+4
View File
@@ -3,6 +3,10 @@
#define _PFK_NETINET_IN_H
#include <linux/in.h>
#include <linux/in6.h>
/* BSD protocol number aliases (OpenBSD <netinet/in.h>) */
#ifndef IPPROTO_IPV4
#define IPPROTO_IPV4 IPPROTO_IPIP /* IP inside IP */
#endif
/* BSD IP-level option numbers (Linux uapi uses different values) */
#define PF_IP_OPTIONS 1
#define PF_IP_RECORD_ROUTE 7