mirror of
https://github.com/lgcosta/pf-linux-port.git
synced 2026-11-13 02:58:03 -03:00
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:
1 parent
a84b2c91f3
commit
1fcd7b3046
77 files changed
+28002
-1114
No files matched your search
@@ -1,5 +1,48 @@
|
||||
/* PFLINUX compat: <net/if_var.h> — ifnet view comes from pfk_if.h */
|
||||
/* PFLINUX compat: <net/if_var.h> — the ifnet view comes from pfk_if.h;
|
||||
* the BSD interface-group types are reproduced here (they need the BSD
|
||||
* queue macros and the refcnt type). */
|
||||
#ifndef _PFK_IF_VAR_H
|
||||
#define _PFK_IF_VAR_H
|
||||
/* intentionally minimal; struct pfk_ifnet is the ifnet */
|
||||
|
||||
#include "compat/sys/queue.h"
|
||||
#include "compat/sys/refcnt.h"
|
||||
|
||||
struct ifg_member {
|
||||
TAILQ_ENTRY(ifg_member) ifgm_next; /* [N] all members are chained */
|
||||
struct pfk_ifnet *ifgm_ifp; /* [I] member interface */
|
||||
};
|
||||
|
||||
struct ifg_group {
|
||||
char ifg_group[IFNAMSIZ];
|
||||
u_int ifg_refcnt;
|
||||
caddr_t ifg_pf_kif;
|
||||
int ifg_carp_demoted;
|
||||
TAILQ_HEAD(, ifg_member) ifg_members;
|
||||
TAILQ_ENTRY(ifg_group) ifg_next;
|
||||
struct refcnt ifg_tmprefcnt;
|
||||
TAILQ_ENTRY(ifg_group) ifg_tmplist;
|
||||
};
|
||||
|
||||
/* BSD struct ifaddr (net/if_var.h) — the ported PF code walks interface
|
||||
* addresses through this type. */
|
||||
struct pfk_ifnet;
|
||||
|
||||
struct ifaddr {
|
||||
struct sockaddr *ifa_addr; /* address of interface */
|
||||
struct sockaddr *ifa_dstaddr; /* other end of p-to-p link */
|
||||
#define ifa_broadaddr ifa_dstaddr
|
||||
struct sockaddr *ifa_netmask; /* used to determine subnet */
|
||||
struct pfk_ifnet *ifa_ifp; /* back-pointer to interface */
|
||||
TAILQ_ENTRY(ifaddr) ifa_list; /* [N] list of addresses */
|
||||
TAILQ_ENTRY(ifaddr) ifa_tmplist;/* [T] temporary list */
|
||||
u_int ifa_flags;
|
||||
struct refcnt ifa_refcnt;
|
||||
int ifa_metric;
|
||||
};
|
||||
|
||||
struct ifg_list {
|
||||
struct ifg_group *ifgl_group; /* [I] interface group */
|
||||
TAILQ_ENTRY(ifg_list) ifgl_next; /* [N] all groups are chained */
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user