pfkeyv2 and route can call their output functions directly.
OK mvs@
-/* $OpenBSD: pfkeyv2.c,v 1.244 2022/08/28 18:44:16 mvs Exp $ */
+/* $OpenBSD: pfkeyv2.c,v 1.245 2022/08/28 20:32:01 bluhm Exp $ */
/*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
int pfkeyv2_abort(struct socket *);
int pfkeyv2_usrreq(struct socket *, int, struct mbuf *, struct mbuf *,
struct mbuf *, struct proc *);
-int pfkeyv2_output(struct mbuf *, struct socket *, struct sockaddr *,
- struct mbuf *);
+int pfkeyv2_output(struct mbuf *, struct socket *);
int pfkey_sendup(struct pkpcb *, struct mbuf *, int);
int pfkeyv2_sa_flush(struct tdb *, void *, int);
int pfkeyv2_policy_flush(struct ipsec_policy *, void *, unsigned int);
.pr_domain = &pfkeydomain,
.pr_protocol = PF_KEY_V2,
.pr_flags = PR_ATOMIC | PR_ADDR,
- .pr_output = pfkeyv2_output,
.pr_usrreqs = &pfkeyv2_usrreqs,
.pr_sysctl = pfkeyv2_sysctl,
}
goto out;
}
- error = (*so->so_proto->pr_output)(m, so, NULL, NULL);
+ error = pfkeyv2_output(m, so);
m = NULL;
out:
}
int
-pfkeyv2_output(struct mbuf *mbuf, struct socket *so,
- struct sockaddr *dstaddr, struct mbuf *control)
+pfkeyv2_output(struct mbuf *mbuf, struct socket *so)
{
void *message;
int error = 0;
-/* $OpenBSD: rtsock.c,v 1.344 2022/08/28 18:44:16 mvs Exp $ */
+/* $OpenBSD: rtsock.c,v 1.345 2022/08/28 20:32:01 bluhm Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
void route_prinit(void);
void rcb_ref(void *, void *);
void rcb_unref(void *, void *);
-int route_output(struct mbuf *, struct socket *, struct sockaddr *,
- struct mbuf *);
+int route_output(struct mbuf *, struct socket *);
int route_ctloutput(int, struct socket *, int, int, struct mbuf *);
int route_usrreq(struct socket *, int, struct mbuf *, struct mbuf *,
struct mbuf *, struct proc *);
goto out;
}
- error = (*so->so_proto->pr_output)(m, so, NULL, NULL);
+ error = route_output(m, so);
m = NULL;
out:
}
int
-route_output(struct mbuf *m, struct socket *so, struct sockaddr *dstaddr,
- struct mbuf *control)
+route_output(struct mbuf *m, struct socket *so)
{
struct rt_msghdr *rtm = NULL;
struct rtentry *rt = NULL;
.pr_type = SOCK_RAW,
.pr_domain = &routedomain,
.pr_flags = PR_ATOMIC|PR_ADDR|PR_WANTRCVD,
- .pr_output = route_output,
.pr_ctloutput = route_ctloutput,
.pr_usrreqs = &route_usrreqs,
.pr_init = route_prinit,
-/* $OpenBSD: protosw.h,v 1.46 2022/08/28 18:44:17 mvs Exp $ */
+/* $OpenBSD: protosw.h,v 1.47 2022/08/28 20:32:02 bluhm Exp $ */
/* $NetBSD: protosw.h,v 1.10 1996/04/09 20:55:32 cgd Exp $ */
/*-
* every 500ms through the pr_slowtimo for timer based actions.
*
* Protocols pass data between themselves as chains of mbufs using
- * the pr_input and pr_output hooks. Pr_input passes data up (towards
- * UNIX) and pr_output passes it down (towards the imps); control
+ * the pr_input and pr_send hooks. Pr_input passes data up (towards
+ * UNIX) and pr_send passes it down (towards the imps); control
* information passes up and down on pr_ctlinput and pr_ctloutput.
* The protocol is responsible for the space occupied by any the
* arguments to these entries and must dispose it.
/* protocol-protocol hooks */
/* input to protocol (from below) */
int (*pr_input)(struct mbuf **, int *, int, int);
- /* output to protocol (from above) */
- int (*pr_output)(struct mbuf *, struct socket *, struct sockaddr *,
- struct mbuf *);
/* control input (from below) */
void (*pr_ctlinput)(int, struct sockaddr *, u_int, void *);
/* control output (from above) */