M1 progress: engine port compiles except pf.c; AF_DIVERT socket family; ifq framework

- compat layer extended through the full BSD API surface pf_ioctl/pf_lb/
  pf_if/pf_norm/pf_table/pf_ruleset/radix/md5/sha2 need (all compile):
  cpumem/counters model, ifaddr/ifg groups, cred view, endian+in6 names,
  NAT46/64, SipHash24, mbuf_list, frag6 helpers, ip6 forward/checksum,
  tcp options/FSM names, taskqueue & sysctl shims (documented in
  docs/porting-notes.md)
- pfsrc/divert_sock.c: real BSD divert(4) as runtime-registered PF_DIVERT=32
  socket family inside the module (sock_register; NPROTO=AF_MAX=45 -> zero
  core patches); divert_packet/divert6_packet wired for pf.c
- compat/pfk_ifq.c: OpenBSD 8.0 ifq framework with priq back end; hfsc and
  fq_codel aliases pending M5 (recorded in feature matrix as pending)
- design + plan updated for the divert decision (user-requested)
- stage-port.sh: single deterministic rename program for headers and .c
This commit is contained in:
lgcosta committed 2026-11-11 13:35:53 -03:00
1 parent a84b2c91f3
commit 1fcd7b3046
77 files changed
+28002 -1114

No files matched your search

+4 -3
View File
@@ -15,6 +15,7 @@
#include <linux/skbuff.h>
struct pfk_ifnet; /* forward (pfk_if.h) */
struct mbuf_list; /* BSD mbuf list (pfk_if.h defines it) */
struct pf_state_key;
struct inpcb;
struct pf_tag;
@@ -61,7 +62,7 @@ struct pkthdr_pf {
u_int8_t dir;
u_int8_t reason;
u_int16_t ruleset;
struct pfk_tag *tag;
u_int tag; /* OpenBSD: bitmask */
};
struct pkthdr {
@@ -130,9 +131,9 @@ struct mbuf *m_dup(struct mbuf *m, int wait); /* full dup + headroom */
void m_adj(struct mbuf *m, int dlen);
void m_trim(struct mbuf *m, int dlen);
int m_cat(struct mbuf *to, struct mbuf *from); /* copies+consumes from */
caddr_t m_copyback(struct mbuf *m, int off, int len, const void *copied);
int m_copyback(struct mbuf *m, int off, int len, const void *copied, int type);
void m_copydata(const struct mbuf *m, int off, int len, caddr_t dest);
caddr_t m_getptr(struct mbuf *m, int loc, int *off);
struct mbuf *m_getptr(struct mbuf *m, int loc, int *off);
int m_clump(struct mbuf **m0p, int len, int *mp_off, int *mp_len, caddr_t *doff);
void m_free_ext(struct mbuf *m);
struct mbuf *m_free(struct mbuf *m); /* returns next */