Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netipsec Apply C99-style struct initialization to xformsw



details:   https://anonhg.NetBSD.org/src/rev/9f6521a1c18c
branches:  trunk
changeset: 354769:9f6521a1c18c
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Jun 29 07:13:41 2017 +0000

description:
Apply C99-style struct initialization to xformsw

diffstat:

 sys/netipsec/xform_ah.c     |  15 ++++++++++-----
 sys/netipsec/xform_esp.c    |  16 ++++++++++------
 sys/netipsec/xform_ipcomp.c |  16 ++++++++++------
 sys/netipsec/xform_ipip.c   |  15 ++++++++++-----
 sys/netipsec/xform_tcp.c    |  16 ++++++++++------
 5 files changed, 50 insertions(+), 28 deletions(-)

diffs (183 lines):

diff -r b409e3494237 -r 9f6521a1c18c sys/netipsec/xform_ah.c
--- a/sys/netipsec/xform_ah.c   Thu Jun 29 02:54:40 2017 +0000
+++ b/sys/netipsec/xform_ah.c   Thu Jun 29 07:13:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_ah.c,v 1.54 2017/05/11 05:55:14 ryo Exp $        */
+/*     $NetBSD: xform_ah.c,v 1.55 2017/06/29 07:13:41 ozaki-r Exp $    */
 /*     $FreeBSD: src/sys/netipsec/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.54 2017/05/11 05:55:14 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.55 2017/06/29 07:13:41 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1291,9 +1291,14 @@
 }
 
 static struct xformsw ah_xformsw = {
-       XF_AH,          XFT_AUTH,       "IPsec AH",
-       ah_init,        ah_zeroize,     ah_input,       ah_output,
-       NULL,
+       .xf_type        = XF_AH,
+       .xf_flags       = XFT_AUTH,
+       .xf_name        = "IPsec AH",
+       .xf_init        = ah_init,
+       .xf_zeroize     = ah_zeroize,
+       .xf_input       = ah_input,
+       .xf_output      = ah_output,
+       .xf_next        = NULL,
 };
 
 void
diff -r b409e3494237 -r 9f6521a1c18c sys/netipsec/xform_esp.c
--- a/sys/netipsec/xform_esp.c  Thu Jun 29 02:54:40 2017 +0000
+++ b/sys/netipsec/xform_esp.c  Thu Jun 29 07:13:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_esp.c,v 1.55 2017/05/11 05:55:14 ryo Exp $       */
+/*     $NetBSD: xform_esp.c,v 1.56 2017/06/29 07:13:41 ozaki-r Exp $   */
 /*     $FreeBSD: src/sys/netipsec/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.55 2017/05/11 05:55:14 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.56 2017/06/29 07:13:41 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1063,10 +1063,14 @@
 }
 
 static struct xformsw esp_xformsw = {
-       XF_ESP,         XFT_CONF|XFT_AUTH,      "IPsec ESP",
-       esp_init,       esp_zeroize,            esp_input,
-       esp_output,
-       NULL,
+       .xf_type        = XF_ESP,
+       .xf_flags       = XFT_CONF|XFT_AUTH,
+       .xf_name        = "IPsec ESP",
+       .xf_init        = esp_init,
+       .xf_zeroize     = esp_zeroize,
+       .xf_input       = esp_input,
+       .xf_output      = esp_output,
+       .xf_next        = NULL,
 };
 
 void
diff -r b409e3494237 -r 9f6521a1c18c sys/netipsec/xform_ipcomp.c
--- a/sys/netipsec/xform_ipcomp.c       Thu Jun 29 02:54:40 2017 +0000
+++ b/sys/netipsec/xform_ipcomp.c       Thu Jun 29 07:13:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_ipcomp.c,v 1.38 2017/05/11 05:55:14 ryo Exp $    */
+/*     $NetBSD: xform_ipcomp.c,v 1.39 2017/06/29 07:13:41 ozaki-r Exp $        */
 /*     $FreeBSD: src/sys/netipsec/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.38 2017/05/11 05:55:14 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ipcomp.c,v 1.39 2017/06/29 07:13:41 ozaki-r Exp $");
 
 /* IP payload compression protocol (IPComp), see RFC 2393 */
 #if defined(_KERNEL_OPT)
@@ -658,10 +658,14 @@
 }
 
 static struct xformsw ipcomp_xformsw = {
-       XF_IPCOMP,              XFT_COMP,               "IPcomp",
-       ipcomp_init,            ipcomp_zeroize,         ipcomp_input,
-       ipcomp_output,
-       NULL,
+       .xf_type        = XF_IPCOMP,
+       .xf_flags       = XFT_COMP,
+       .xf_name        = "IPcomp",
+       .xf_init        = ipcomp_init,
+       .xf_zeroize     = ipcomp_zeroize,
+       .xf_input       = ipcomp_input,
+       .xf_output      = ipcomp_output,
+       .xf_next        = NULL,
 };
 
 void
diff -r b409e3494237 -r 9f6521a1c18c sys/netipsec/xform_ipip.c
--- a/sys/netipsec/xform_ipip.c Thu Jun 29 02:54:40 2017 +0000
+++ b/sys/netipsec/xform_ipip.c Thu Jun 29 07:13:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_ipip.c,v 1.49 2017/05/11 05:55:14 ryo Exp $      */
+/*     $NetBSD: xform_ipip.c,v 1.50 2017/06/29 07:13:41 ozaki-r Exp $  */
 /*     $FreeBSD: src/sys/netipsec/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.49 2017/05/11 05:55:14 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.50 2017/06/29 07:13:41 ozaki-r Exp $");
 
 /*
  * IP-inside-IP processing
@@ -652,9 +652,14 @@
 }
 
 static struct xformsw ipe4_xformsw = {
-       XF_IP4,         0,              "IPv4 Simple Encapsulation",
-       ipe4_init,      ipe4_zeroize,   ipe4_input,     ipip_output,
-       NULL,
+       .xf_type        = XF_IP4,
+       .xf_flags       = 0,
+       .xf_name        = "IPv4 Simple Encapsulation",
+       .xf_init        = ipe4_init,
+       .xf_zeroize     = ipe4_zeroize,
+       .xf_input       = ipe4_input,
+       .xf_output      = ipip_output,
+       .xf_next        = NULL,
 };
 
 #ifdef INET
diff -r b409e3494237 -r 9f6521a1c18c sys/netipsec/xform_tcp.c
--- a/sys/netipsec/xform_tcp.c  Thu Jun 29 02:54:40 2017 +0000
+++ b/sys/netipsec/xform_tcp.c  Thu Jun 29 07:13:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_tcp.c,v 1.11 2017/04/19 03:39:14 ozaki-r Exp $ */
+/*     $NetBSD: xform_tcp.c,v 1.12 2017/06/29 07:13:41 ozaki-r Exp $ */
 /*     $FreeBSD: sys/netipsec/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.11 2017/04/19 03:39:14 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_tcp.c,v 1.12 2017/06/29 07:13:41 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -160,10 +160,14 @@
 }
 
 static struct xformsw tcpsignature_xformsw = {
-       XF_TCPSIGNATURE,        XFT_AUTH,               "TCPMD5",
-       tcpsignature_init,      tcpsignature_zeroize,
-       tcpsignature_input,     tcpsignature_output,
-       NULL
+       .xf_type        = XF_TCPSIGNATURE,
+       .xf_flags       = XFT_AUTH,
+       .xf_name        = "TCPMD5",
+       .xf_init        = tcpsignature_init,
+       .xf_zeroize     = tcpsignature_zeroize,
+       .xf_input       = tcpsignature_input,
+       .xf_output      = tcpsignature_output,
+       .xf_next        = NULL,
 };
 
 void



Home | Main Index | Thread Index | Old Index