Files
pf-linux-port/module/include/compat/net/rtable.h
T
lgcosta 1fcd7b3046 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
2026-11-11 13:35:53 -03:00

23 lines
652 B
C

/* PFLINUX compat: <net/rtable.h> — minimal view of OpenBSD's routing
* table API as used by PF. Linux has a single (policy-)routing FIB, so
* per-rtableid trees do not exist; the route-to path (pf.c: rtable_iterate)
* is replaced by the Linux FIB lookup in pfk_xmit.c (task T14). */
#ifndef _PFK_RTABLE_H
#define _PFK_RTABLE_H
#include <linux/types.h>
struct pf_rtentry {
void *rt_addr; /* destination */
unsigned int rt_ifidx; /* egress ifindex */
unsigned int rt_flags;
int rt_listid;
int rt_labelid;
void *rt_ifa;
};
int rtable_exists(unsigned int rtableid);
struct pf_rtentry *rtable_iterate(struct pf_rtentry *rt);
#endif