Module Name:    src
Committed By:   maxv
Date:           Mon May  7 09:16:46 UTC 2018

Modified Files:
        src/sys/netipsec: ipsec_output.c xform.h xform_ah.c xform_esp.c
            xform_ipcomp.c xform_ipip.c xform_tcp.c

Log Message:
Remove unused 'mp' argument from all the xf_output functions. Also clean
up xform.h a bit.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/netipsec/ipsec_output.c
cvs rdiff -u -r1.17 -r1.18 src/sys/netipsec/xform.h
cvs rdiff -u -r1.97 -r1.98 src/sys/netipsec/xform_ah.c
cvs rdiff -u -r1.85 -r1.86 src/sys/netipsec/xform_esp.c
cvs rdiff -u -r1.64 -r1.65 src/sys/netipsec/xform_ipcomp.c
cvs rdiff -u -r1.71 -r1.72 src/sys/netipsec/xform_ipip.c
cvs rdiff -u -r1.18 -r1.19 src/sys/netipsec/xform_tcp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netipsec/ipsec_output.c
diff -u src/sys/netipsec/ipsec_output.c:1.75 src/sys/netipsec/ipsec_output.c:1.76
--- src/sys/netipsec/ipsec_output.c:1.75	Tue May  1 05:42:26 2018
+++ src/sys/netipsec/ipsec_output.c	Mon May  7 09:16:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_output.c,v 1.75 2018/05/01 05:42:26 maxv Exp $	*/
+/*	$NetBSD: ipsec_output.c,v 1.76 2018/05/07 09:16:46 maxv Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.75 2018/05/01 05:42:26 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.76 2018/05/07 09:16:46 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -604,7 +604,7 @@ noneed:
 			i = sizeof(struct ip6_hdr);
 			off = offsetof(struct ip6_hdr, ip6_nxt);
 		}
-		error = (*sav->tdb_xform->xf_output)(m, isr, sav, NULL, i, off);
+		error = (*sav->tdb_xform->xf_output)(m, isr, sav, i, off);
 	} else {
 		error = ipsec_process_done(m, isr, sav);
 	}
@@ -794,7 +794,7 @@ ipsec6_process_packet(struct mbuf *m, co
 		if (error)
 			goto unrefsav;
 	}
-	error = (*sav->tdb_xform->xf_output)(m, isr, sav, NULL, i, off);
+	error = (*sav->tdb_xform->xf_output)(m, isr, sav, i, off);
 	KEY_SA_UNREF(&sav);
 	splx(s);
 	return error;

Index: src/sys/netipsec/xform.h
diff -u src/sys/netipsec/xform.h:1.17 src/sys/netipsec/xform.h:1.18
--- src/sys/netipsec/xform.h:1.17	Mon May  7 09:08:06 2018
+++ src/sys/netipsec/xform.h	Mon May  7 09:16:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform.h,v 1.17 2018/05/07 09:08:06 maxv Exp $	*/
+/*	$NetBSD: xform.h,v 1.18 2018/05/07 09:16:46 maxv Exp $	*/
 /*	$FreeBSD: xform.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_ipsp.h,v 1.119 2002/03/14 01:27:11 millert Exp $	*/
 /*
@@ -64,30 +64,28 @@ struct tdb_crypto {
 struct ipescrequest;
 
 struct xformsw {
-	u_short	xf_type;		/* xform ID */
+	u_short xf_type;
 #define	XF_IP4		1	/* IP inside IP */
 #define	XF_AH		2	/* AH */
 #define	XF_ESP		3	/* ESP */
 #define	XF_TCPSIGNATURE	5	/* TCP MD5 Signature option, RFC 2358 */
 #define	XF_IPCOMP	6	/* IPCOMP */
-	u_short	xf_flags;
+	u_short xf_flags;
 #define	XFT_AUTH	0x0001
 #define	XFT_CONF	0x0100
 #define	XFT_COMP	0x1000
-	const char	*xf_name;		/* human-readable name */
-	int	(*xf_init)(struct secasvar*, const struct xformsw*);/* setup */
-	int	(*xf_zeroize)(struct secasvar*);		/* cleanup */
-	int	(*xf_input)(struct mbuf*, struct secasvar*, /* input */
-			int, int);
-	int	(*xf_output)(struct mbuf*,	       		/* output */
-			const struct ipsecrequest *, struct secasvar *,
-			struct mbuf **, int, int);
-	struct xformsw *xf_next;		/* list of registered xforms */
+	const char *xf_name;
+	int (*xf_init)(struct secasvar *, const struct xformsw *);
+	int (*xf_zeroize)(struct secasvar *);
+	int (*xf_input)(struct mbuf *, struct secasvar *, int, int);
+	int (*xf_output)(struct mbuf *, const struct ipsecrequest *,
+	    struct secasvar *, int, int);
+	struct xformsw *xf_next;	/* list of registered xforms */
 };
 
 #ifdef _KERNEL
-extern void xform_register(struct xformsw*);
-extern int xform_init(struct secasvar *sav, int xftype);
+void xform_register(struct xformsw *);
+int xform_init(struct secasvar *sav, int);
 
 struct cryptoini;
 
@@ -97,16 +95,16 @@ int ipip_output(struct mbuf *, const str
 
 /* XF_AH */
 int ah_init0(struct secasvar *, const struct xformsw *, struct cryptoini *);
-int ah_zeroize(struct secasvar *sav);
-const struct auth_hash *ah_algorithm_lookup(int alg);
+int ah_zeroize(struct secasvar *);
+const struct auth_hash *ah_algorithm_lookup(int);
 size_t ah_hdrsiz(const struct secasvar *);
 
 /* XF_ESP */
-const struct enc_xform *esp_algorithm_lookup(int alg);
-size_t esp_hdrsiz(const struct secasvar *sav);
+const struct enc_xform *esp_algorithm_lookup(int);
+size_t esp_hdrsiz(const struct secasvar *);
 
 /* XF_COMP */
-const struct comp_algo *ipcomp_algorithm_lookup(int alg);
+const struct comp_algo *ipcomp_algorithm_lookup(int);
 
 #endif /* _KERNEL */
 #endif /* !_NETIPSEC_XFORM_H_ */

Index: src/sys/netipsec/xform_ah.c
diff -u src/sys/netipsec/xform_ah.c:1.97 src/sys/netipsec/xform_ah.c:1.98
--- src/sys/netipsec/xform_ah.c:1.97	Tue May  1 08:27:13 2018
+++ src/sys/netipsec/xform_ah.c	Mon May  7 09:16:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_ah.c,v 1.97 2018/05/01 08:27:13 maxv Exp $	*/
+/*	$NetBSD: xform_ah.c,v 1.98 2018/05/07 09:16:46 maxv Exp $	*/
 /*	$FreeBSD: xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */
 /*
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.97 2018/05/01 08:27:13 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.98 2018/05/07 09:16:46 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -883,7 +883,7 @@ bad:
  */
 static int
 ah_output(struct mbuf *m, const struct ipsecrequest *isr, struct secasvar *sav,
-    struct mbuf **mp, int skip, int protoff)
+    int skip, int protoff)
 {
 	char buf[IPSEC_ADDRSTRLEN];
 	const struct auth_hash *ahx;

Index: src/sys/netipsec/xform_esp.c
diff -u src/sys/netipsec/xform_esp.c:1.85 src/sys/netipsec/xform_esp.c:1.86
--- src/sys/netipsec/xform_esp.c:1.85	Tue May  1 08:27:13 2018
+++ src/sys/netipsec/xform_esp.c	Mon May  7 09:16:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_esp.c,v 1.85 2018/05/01 08:27:13 maxv Exp $	*/
+/*	$NetBSD: xform_esp.c,v 1.86 2018/05/07 09:16:46 maxv Exp $	*/
 /*	$FreeBSD: xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */
 
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.85 2018/05/01 08:27:13 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.86 2018/05/07 09:16:46 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -687,7 +687,7 @@ bad:
  */
 static int
 esp_output(struct mbuf *m, const struct ipsecrequest *isr, struct secasvar *sav,
-    struct mbuf **mp, int skip, int protoff)
+    int skip, int protoff)
 {
 	char buf[IPSEC_ADDRSTRLEN];
 	const struct enc_xform *espx;

Index: src/sys/netipsec/xform_ipcomp.c
diff -u src/sys/netipsec/xform_ipcomp.c:1.64 src/sys/netipsec/xform_ipcomp.c:1.65
--- src/sys/netipsec/xform_ipcomp.c:1.64	Tue May  1 08:13:37 2018
+++ src/sys/netipsec/xform_ipcomp.c	Mon May  7 09:16:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_ipcomp.c,v 1.64 2018/05/01 08:13:37 maxv Exp $	*/
+/*	$NetBSD: xform_ipcomp.c,v 1.65 2018/05/07 09:16:46 maxv Exp $	*/
 /*	$FreeBSD: xform_ipcomp.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /* $OpenBSD: ip_ipcomp.c,v 1.1 2001/07/05 12:08:52 jjbg Exp $ */
 
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_ipcomp.c,v 1.64 2018/05/01 08:13:37 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ipcomp.c,v 1.65 2018/05/07 09:16:46 maxv Exp $");
 
 /* IP payload compression protocol (IPComp), see RFC 2393 */
 #if defined(_KERNEL_OPT)
@@ -371,7 +371,7 @@ bad:
  */
 static int
 ipcomp_output(struct mbuf *m, const struct ipsecrequest *isr,
-    struct secasvar *sav, struct mbuf **mp, int skip, int protoff)
+    struct secasvar *sav, int skip, int protoff)
 {
 	char buf[IPSEC_ADDRSTRLEN];
 	const struct comp_algo *ipcompx;

Index: src/sys/netipsec/xform_ipip.c
diff -u src/sys/netipsec/xform_ipip.c:1.71 src/sys/netipsec/xform_ipip.c:1.72
--- src/sys/netipsec/xform_ipip.c:1.71	Mon May  7 09:08:06 2018
+++ src/sys/netipsec/xform_ipip.c	Mon May  7 09:16:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_ipip.c,v 1.71 2018/05/07 09:08:06 maxv Exp $	*/
+/*	$NetBSD: xform_ipip.c,v 1.72 2018/05/07 09:16:46 maxv Exp $	*/
 /*	$FreeBSD: xform_ipip.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_ipip.c,v 1.25 2002/06/10 18:04:55 itojun Exp $ */
 
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.71 2018/05/07 09:08:06 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.72 2018/05/07 09:16:46 maxv Exp $");
 
 /*
  * IP-inside-IP processing
@@ -575,7 +575,7 @@ ipe4_input(struct mbuf *m, struct secasv
 
 static int
 ipe4_output(struct mbuf *m, const struct ipsecrequest *isr,
-    struct secasvar *sav, struct mbuf **mp, int skip, int protoff)
+    struct secasvar *sav, int skip, int protoff)
 {
 	panic("%s: should not have been called", __func__);
 }

Index: src/sys/netipsec/xform_tcp.c
diff -u src/sys/netipsec/xform_tcp.c:1.18 src/sys/netipsec/xform_tcp.c:1.19
--- src/sys/netipsec/xform_tcp.c:1.18	Thu Apr 19 08:27:39 2018
+++ src/sys/netipsec/xform_tcp.c	Mon May  7 09:16:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_tcp.c,v 1.18 2018/04/19 08:27:39 maxv Exp $ */
+/*	$NetBSD: xform_tcp.c,v 1.19 2018/05/07 09:16:46 maxv Exp $ */
 /*	$FreeBSD: xform_tcp.c,v 1.1.2.1 2004/02/14 22:24:09 bms Exp $ */
 
 /*
@@ -31,7 +31,7 @@
 /* TCP MD5 Signature Option (RFC2385) */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_tcp.c,v 1.18 2018/04/19 08:27:39 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_tcp.c,v 1.19 2018/05/07 09:16:46 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -155,7 +155,7 @@ tcpsignature_input(struct mbuf *m, struc
  */
 static int
 tcpsignature_output(struct mbuf *m, const struct ipsecrequest *isr,
-    struct secasvar *sav, struct mbuf **mp, int skip, int protoff)
+    struct secasvar *sav, int skip, int protoff)
 {
 
 	return (EINVAL);

Reply via email to