diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2020-06-21 05:12:07 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2020-06-21 05:12:07 +0000 |
commit | dd782ec31501c837b0adb1f98b4d5f1fed0f84e3 (patch) | |
tree | aa863fc9f1e287bd3b920fae25c0cd622bc52371 | |
parent | 226f9283cc54188550a295eb784aa699ae65d699 (diff) |
add a inp_upcall function pointer and inp_upcall_arg to struct in_pcb.
this is so protocols (eg, udp) can let things (eg, kernel support
for wireguard or vxlan or geneve) look at and possibly steal packets
before they get added to a socket buffer.
i wrote the original version of this, but it was tweaked by Matt
Dunwoodie and Jason A. Donenfeld for use with wireguard.
-rw-r--r-- | sys/netinet/in_pcb.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 7a27b3f45e9..36212bd332a 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in_pcb.h,v 1.118 2019/11/13 17:36:02 deraadt Exp $ */ +/* $OpenBSD: in_pcb.h,v 1.119 2020/06/21 05:12:06 dlg Exp $ */ /* $NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $ */ /* @@ -143,6 +143,8 @@ struct inpcb { #endif struct icmp6_filter *inp_icmp6filt; struct pf_state_key *inp_pf_sk; + struct mbuf *(*inp_upcall)(void *, struct mbuf *, struct ip *, struct ip6_hdr *, void *, int); + void *inp_upcall_arg; u_int inp_rtableid; int inp_pipex; /* pipex indication */ }; |