Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netipsec Remove unused 'mp' argument from a...
details: https://anonhg.NetBSD.org/src/rev/1a24e30b6fd7
branches: trunk
changeset: 318851:1a24e30b6fd7
user: maxv <maxv%NetBSD.org@localhost>
date: Mon May 07 09:16:46 2018 +0000
description:
Remove unused 'mp' argument from all the xf_output functions. Also clean
up xform.h a bit.
diffstat:
sys/netipsec/ipsec_output.c | 8 ++++----
sys/netipsec/xform.h | 36 +++++++++++++++++-------------------
sys/netipsec/xform_ah.c | 6 +++---
sys/netipsec/xform_esp.c | 6 +++---
sys/netipsec/xform_ipcomp.c | 6 +++---
sys/netipsec/xform_ipip.c | 6 +++---
sys/netipsec/xform_tcp.c | 6 +++---
7 files changed, 36 insertions(+), 38 deletions(-)
diffs (244 lines):
diff -r d9a92cca17df -r 1a24e30b6fd7 sys/netipsec/ipsec_output.c
--- a/sys/netipsec/ipsec_output.c Mon May 07 09:08:06 2018 +0000
+++ b/sys/netipsec/ipsec_output.c Mon May 07 09:16:46 2018 +0000
@@ -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 @@
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 @@
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;
diff -r d9a92cca17df -r 1a24e30b6fd7 sys/netipsec/xform.h
--- a/sys/netipsec/xform.h Mon May 07 09:08:06 2018 +0000
+++ b/sys/netipsec/xform.h Mon May 07 09:16:46 2018 +0000
@@ -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 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 @@
/* 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_ */
diff -r d9a92cca17df -r 1a24e30b6fd7 sys/netipsec/xform_ah.c
--- a/sys/netipsec/xform_ah.c Mon May 07 09:08:06 2018 +0000
+++ b/sys/netipsec/xform_ah.c Mon May 07 09:16:46 2018 +0000
@@ -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 @@
*/
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;
diff -r d9a92cca17df -r 1a24e30b6fd7 sys/netipsec/xform_esp.c
--- a/sys/netipsec/xform_esp.c Mon May 07 09:08:06 2018 +0000
+++ b/sys/netipsec/xform_esp.c Mon May 07 09:16:46 2018 +0000
@@ -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 @@
*/
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;
diff -r d9a92cca17df -r 1a24e30b6fd7 sys/netipsec/xform_ipcomp.c
--- a/sys/netipsec/xform_ipcomp.c Mon May 07 09:08:06 2018 +0000
+++ b/sys/netipsec/xform_ipcomp.c Mon May 07 09:16:46 2018 +0000
@@ -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 @@
*/
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;
diff -r d9a92cca17df -r 1a24e30b6fd7 sys/netipsec/xform_ipip.c
--- a/sys/netipsec/xform_ipip.c Mon May 07 09:08:06 2018 +0000
+++ b/sys/netipsec/xform_ipip.c Mon May 07 09:16:46 2018 +0000
@@ -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 @@
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__);
}
diff -r d9a92cca17df -r 1a24e30b6fd7 sys/netipsec/xform_tcp.c
--- a/sys/netipsec/xform_tcp.c Mon May 07 09:08:06 2018 +0000
+++ b/sys/netipsec/xform_tcp.c Mon May 07 09:16:46 2018 +0000
@@ -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 @@
*/
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);
Home |
Main Index |
Thread Index |
Old Index