summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authordsl <dsl@NetBSD.org>2009-03-14 14:45:51 +0000
committerdsl <dsl@NetBSD.org>2009-03-14 14:45:51 +0000
commit02cdf4d2c869ecfa1ae5484cf77eefe2fbcc6d94 (patch)
tree9a02e625d403e5fcedfdc6be4803e2404356bf31 /sys/netinet6
parentdfbb3f921a23a1aba4463f31ef9233ac94ce606c (diff)
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball. i386 and amd64 GENERIC and sys still build.
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ah.h26
-rw-r--r--sys/netinet6/ah_aesxcbcmac.h14
-rw-r--r--sys/netinet6/ah_core.c124
-rw-r--r--sys/netinet6/ah_output.c6
-rw-r--r--sys/netinet6/esp.h50
-rw-r--r--sys/netinet6/esp_aesctr.h18
-rw-r--r--sys/netinet6/esp_core.c90
-rw-r--r--sys/netinet6/esp_output.c8
-rw-r--r--sys/netinet6/esp_rijndael.h16
-rw-r--r--sys/netinet6/in6_gif.c8
-rw-r--r--sys/netinet6/ipsec.c68
-rw-r--r--sys/netinet6/ipsec.h108
12 files changed, 268 insertions, 268 deletions
diff --git a/sys/netinet6/ah.h b/sys/netinet6/ah.h
index 3110198e258..24d51727471 100644
--- a/sys/netinet6/ah.h
+++ b/sys/netinet6/ah.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ah.h,v 1.25 2008/04/24 11:38:38 ad Exp $ */
+/* $NetBSD: ah.h,v 1.26 2009/03/14 14:46:10 dsl Exp $ */
/* $KAME: ah.h,v 1.16 2001/09/04 08:43:19 itojun Exp $ */
/*
@@ -67,28 +67,28 @@ struct ah_algorithm_state {
};
struct ah_algorithm {
- int (*sumsiz) __P((struct secasvar *));
- int (*mature) __P((struct secasvar *));
+ int (*sumsiz)(struct secasvar *);
+ int (*mature)(struct secasvar *);
int keymin; /* in bits */
int keymax; /* in bits */
const char *name;
- int (*init) __P((struct ah_algorithm_state *, struct secasvar *));
- void (*update) __P((struct ah_algorithm_state *, u_int8_t *, size_t));
- void (*result) __P((struct ah_algorithm_state *, u_int8_t *, size_t));
+ int (*init)(struct ah_algorithm_state *, struct secasvar *);
+ void (*update)(struct ah_algorithm_state *, u_int8_t *, size_t);
+ void (*result)(struct ah_algorithm_state *, u_int8_t *, size_t);
};
#define AH_MAXSUMSIZE (512 / 8)
-extern const struct ah_algorithm *ah_algorithm_lookup __P((int));
+extern const struct ah_algorithm *ah_algorithm_lookup(int);
/* cksum routines */
-extern int ah_hdrlen __P((struct secasvar *));
+extern int ah_hdrlen(struct secasvar *);
-extern size_t ah_hdrsiz __P((struct ipsecrequest *));
-extern void ah4_input __P((struct mbuf *, ...));
-extern int ah4_output __P((struct mbuf *, struct ipsecrequest *));
-extern int ah4_calccksum __P((struct mbuf *, u_int8_t *, size_t,
- const struct ah_algorithm *, struct secasvar *));
+extern size_t ah_hdrsiz(struct ipsecrequest *);
+extern void ah4_input(struct mbuf *, ...);
+extern int ah4_output(struct mbuf *, struct ipsecrequest *);
+extern int ah4_calccksum(struct mbuf *, u_int8_t *, size_t,
+ const struct ah_algorithm *, struct secasvar *);
extern void ah4_init(void);
extern void *ah4_ctlinput(int, const struct sockaddr *, void *);
diff --git a/sys/netinet6/ah_aesxcbcmac.h b/sys/netinet6/ah_aesxcbcmac.h
index d6b60a0e023..5600c0e84c1 100644
--- a/sys/netinet6/ah_aesxcbcmac.h
+++ b/sys/netinet6/ah_aesxcbcmac.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ah_aesxcbcmac.h,v 1.2 2005/12/10 23:39:56 elad Exp $ */
+/* $NetBSD: ah_aesxcbcmac.h,v 1.3 2009/03/14 14:46:10 dsl Exp $ */
/* $KAME: ah_aesxcbcmac.h,v 1.2 2003/07/20 00:29:37 itojun Exp $ */
/*
@@ -33,11 +33,11 @@
#ifndef _NETINET6_AH_AESXCBCMAC_H_
#define _NETINET6_AH_AESXCBCMAC_H_
-extern int ah_aes_xcbc_mac_init __P((struct ah_algorithm_state *,
- struct secasvar *));
-extern void ah_aes_xcbc_mac_loop __P((struct ah_algorithm_state *, u_int8_t *,
- size_t));
-extern void ah_aes_xcbc_mac_result __P((struct ah_algorithm_state *,
- u_int8_t *, size_t));
+extern int ah_aes_xcbc_mac_init(struct ah_algorithm_state *,
+ struct secasvar *);
+extern void ah_aes_xcbc_mac_loop(struct ah_algorithm_state *, u_int8_t *,
+ size_t);
+extern void ah_aes_xcbc_mac_result(struct ah_algorithm_state *,
+ u_int8_t *, size_t);
#endif /* !_NETINET6_AH_AESXCBCMAC_H_ */
diff --git a/sys/netinet6/ah_core.c b/sys/netinet6/ah_core.c
index 140ffb16c11..e24d9e1db79 100644
--- a/sys/netinet6/ah_core.c
+++ b/sys/netinet6/ah_core.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ah_core.c,v 1.44 2007/05/23 17:15:00 christos Exp $ */
+/* $NetBSD: ah_core.c,v 1.45 2009/03/14 14:46:10 dsl Exp $ */
/* $KAME: ah_core.c,v 1.57 2003/07/25 09:33:36 itojun Exp $ */
/*
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ah_core.c,v 1.44 2007/05/23 17:15:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ah_core.c,v 1.45 2009/03/14 14:46:10 dsl Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -86,66 +86,66 @@ __KERNEL_RCSID(0, "$NetBSD: ah_core.c,v 1.44 2007/05/23 17:15:00 christos Exp $"
#include <net/net_osdep.h>
-static int ah_sumsiz_1216 __P((struct secasvar *));
-static int ah_sumsiz_zero __P((struct secasvar *));
-static int ah_common_mature __P((struct secasvar *));
-static int ah_none_mature __P((struct secasvar *));
-static int ah_none_init __P((struct ah_algorithm_state *, struct secasvar *));
-static void ah_none_loop __P((struct ah_algorithm_state *, u_int8_t *, size_t));
-static void ah_none_result __P((struct ah_algorithm_state *,
- u_int8_t *, size_t));
-static int ah_keyed_md5_mature __P((struct secasvar *));
-static int ah_keyed_md5_init __P((struct ah_algorithm_state *,
- struct secasvar *));
-static void ah_keyed_md5_loop __P((struct ah_algorithm_state *, u_int8_t *,
- size_t));
-static void ah_keyed_md5_result __P((struct ah_algorithm_state *,
- u_int8_t *, size_t));
-static int ah_keyed_sha1_init __P((struct ah_algorithm_state *,
- struct secasvar *));
-static void ah_keyed_sha1_loop __P((struct ah_algorithm_state *, u_int8_t *,
- size_t));
-static void ah_keyed_sha1_result __P((struct ah_algorithm_state *, u_int8_t *,
- size_t));
-static int ah_hmac_md5_init __P((struct ah_algorithm_state *,
- struct secasvar *));
-static void ah_hmac_md5_loop __P((struct ah_algorithm_state *, u_int8_t *,
- size_t));
-static void ah_hmac_md5_result __P((struct ah_algorithm_state *,
- u_int8_t *, size_t));
-static int ah_hmac_sha1_init __P((struct ah_algorithm_state *,
- struct secasvar *));
-static void ah_hmac_sha1_loop __P((struct ah_algorithm_state *, u_int8_t *,
- size_t));
-static void ah_hmac_sha1_result __P((struct ah_algorithm_state *,
- u_int8_t *, size_t));
-static int ah_hmac_sha2_256_init __P((struct ah_algorithm_state *,
- struct secasvar *));
-static void ah_hmac_sha2_256_loop __P((struct ah_algorithm_state *, u_int8_t *,
- size_t));
-static void ah_hmac_sha2_256_result __P((struct ah_algorithm_state *,
- u_int8_t *, size_t));
-static int ah_hmac_sha2_384_init __P((struct ah_algorithm_state *,
- struct secasvar *));
-static void ah_hmac_sha2_384_loop __P((struct ah_algorithm_state *, u_int8_t *,
- size_t));
-static void ah_hmac_sha2_384_result __P((struct ah_algorithm_state *,
- u_int8_t *, size_t));
-static int ah_hmac_sha2_512_init __P((struct ah_algorithm_state *,
- struct secasvar *));
-static void ah_hmac_sha2_512_loop __P((struct ah_algorithm_state *, u_int8_t *,
- size_t));
-static void ah_hmac_sha2_512_result __P((struct ah_algorithm_state *,
- u_int8_t *, size_t));
-static int ah_hmac_ripemd160_init __P((struct ah_algorithm_state *,
- struct secasvar *));
-static void ah_hmac_ripemd160_loop __P((struct ah_algorithm_state *, u_int8_t *,
- size_t));
-static void ah_hmac_ripemd160_result __P((struct ah_algorithm_state *,
- u_int8_t *, size_t));
-
-static void ah_update_mbuf __P((struct mbuf *, int, int,
- const struct ah_algorithm *, struct ah_algorithm_state *));
+static int ah_sumsiz_1216(struct secasvar *);
+static int ah_sumsiz_zero(struct secasvar *);
+static int ah_common_mature(struct secasvar *);
+static int ah_none_mature(struct secasvar *);
+static int ah_none_init(struct ah_algorithm_state *, struct secasvar *);
+static void ah_none_loop(struct ah_algorithm_state *, u_int8_t *, size_t);
+static void ah_none_result(struct ah_algorithm_state *,
+ u_int8_t *, size_t);
+static int ah_keyed_md5_mature(struct secasvar *);
+static int ah_keyed_md5_init(struct ah_algorithm_state *,
+ struct secasvar *);
+static void ah_keyed_md5_loop(struct ah_algorithm_state *, u_int8_t *,
+ size_t);
+static void ah_keyed_md5_result(struct ah_algorithm_state *,
+ u_int8_t *, size_t);
+static int ah_keyed_sha1_init(struct ah_algorithm_state *,
+ struct secasvar *);
+static void ah_keyed_sha1_loop(struct ah_algorithm_state *, u_int8_t *,
+ size_t);
+static void ah_keyed_sha1_result(struct ah_algorithm_state *, u_int8_t *,
+ size_t);
+static int ah_hmac_md5_init(struct ah_algorithm_state *,
+ struct secasvar *);
+static void ah_hmac_md5_loop(struct ah_algorithm_state *, u_int8_t *,
+ size_t);
+static void ah_hmac_md5_result(struct ah_algorithm_state *,
+ u_int8_t *, size_t);
+static int ah_hmac_sha1_init(struct ah_algorithm_state *,
+ struct secasvar *);
+static void ah_hmac_sha1_loop(struct ah_algorithm_state *, u_int8_t *,
+ size_t);
+static void ah_hmac_sha1_result(struct ah_algorithm_state *,
+ u_int8_t *, size_t);
+static int ah_hmac_sha2_256_init(struct ah_algorithm_state *,
+ struct secasvar *);
+static void ah_hmac_sha2_256_loop(struct ah_algorithm_state *, u_int8_t *,
+ size_t);
+static void ah_hmac_sha2_256_result(struct ah_algorithm_state *,
+ u_int8_t *, size_t);
+static int ah_hmac_sha2_384_init(struct ah_algorithm_state *,
+ struct secasvar *);
+static void ah_hmac_sha2_384_loop(struct ah_algorithm_state *, u_int8_t *,
+ size_t);
+static void ah_hmac_sha2_384_result(struct ah_algorithm_state *,
+ u_int8_t *, size_t);
+static int ah_hmac_sha2_512_init(struct ah_algorithm_state *,
+ struct secasvar *);
+static void ah_hmac_sha2_512_loop(struct ah_algorithm_state *, u_int8_t *,
+ size_t);
+static void ah_hmac_sha2_512_result(struct ah_algorithm_state *,
+ u_int8_t *, size_t);
+static int ah_hmac_ripemd160_init(struct ah_algorithm_state *,
+ struct secasvar *);
+static void ah_hmac_ripemd160_loop(struct ah_algorithm_state *, u_int8_t *,
+ size_t);
+static void ah_hmac_ripemd160_result(struct ah_algorithm_state *,
+ u_int8_t *, size_t);
+
+static void ah_update_mbuf(struct mbuf *, int, int,
+ const struct ah_algorithm *, struct ah_algorithm_state *);
/* checksum algorithms */
static const struct ah_algorithm ah_algorithms[] = {
diff --git a/sys/netinet6/ah_output.c b/sys/netinet6/ah_output.c
index 5cdb746c52f..d594640c32d 100644
--- a/sys/netinet6/ah_output.c
+++ b/sys/netinet6/ah_output.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ah_output.c,v 1.31 2008/04/23 06:09:05 thorpej Exp $ */
+/* $NetBSD: ah_output.c,v 1.32 2009/03/14 14:46:10 dsl Exp $ */
/* $KAME: ah_output.c,v 1.31 2001/07/26 06:53:15 jinmei Exp $ */
/*
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ah_output.c,v 1.31 2008/04/23 06:09:05 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ah_output.c,v 1.32 2009/03/14 14:46:10 dsl Exp $");
#include "opt_inet.h"
@@ -76,7 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: ah_output.c,v 1.31 2008/04/23 06:09:05 thorpej Exp $
#include <net/net_osdep.h>
#ifdef INET
-static struct in_addr *ah4_finaldst __P((struct mbuf *));
+static struct in_addr *ah4_finaldst(struct mbuf *);
#endif
/*
diff --git a/sys/netinet6/esp.h b/sys/netinet6/esp.h
index 40657607dc2..c875827ceb0 100644
--- a/sys/netinet6/esp.h
+++ b/sys/netinet6/esp.h
@@ -1,4 +1,4 @@
-/* $NetBSD: esp.h,v 1.25 2008/04/24 11:38:38 ad Exp $ */
+/* $NetBSD: esp.h,v 1.26 2009/03/14 14:46:10 dsl Exp $ */
/* $KAME: esp.h,v 1.19 2001/09/04 08:43:19 itojun Exp $ */
/*
@@ -73,48 +73,48 @@ struct secasvar;
struct esp_algorithm {
size_t padbound; /* pad boundary, in byte */
int ivlenval; /* iv length, in byte */
- int (*mature) __P((struct secasvar *));
+ int (*mature)(struct secasvar *);
int keymin; /* in bits */
int keymax; /* in bits */
- size_t (*schedlen) __P((const struct esp_algorithm *));
+ size_t (*schedlen)(const struct esp_algorithm *);
const char *name;
- int (*ivlen) __P((const struct esp_algorithm *, struct secasvar *));
- int (*decrypt) __P((struct mbuf *, size_t,
- struct secasvar *, const struct esp_algorithm *, int));
- int (*encrypt) __P((struct mbuf *, size_t, size_t,
- struct secasvar *, const struct esp_algorithm *, int));
+ int (*ivlen)(const struct esp_algorithm *, struct secasvar *);
+ int (*decrypt)(struct mbuf *, size_t,
+ struct secasvar *, const struct esp_algorithm *, int);
+ int (*encrypt)(struct mbuf *, size_t, size_t,
+ struct secasvar *, const struct esp_algorithm *, int);
/* not supposed to be called directly */
- int (*schedule) __P((const struct esp_algorithm *, struct secasvar *));
- int (*blockdecrypt) __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
- int (*blockencrypt) __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
+ int (*schedule)(const struct esp_algorithm *, struct secasvar *);
+ int (*blockdecrypt)(const struct esp_algorithm *,
+ struct secasvar *, u_int8_t *, u_int8_t *);
+ int (*blockencrypt)(const struct esp_algorithm *,
+ struct secasvar *, u_int8_t *, u_int8_t *);
};
-extern const struct esp_algorithm *esp_algorithm_lookup __P((int));
-extern int esp_max_padbound __P((void));
-extern int esp_max_ivlen __P((void));
+extern const struct esp_algorithm *esp_algorithm_lookup(int);
+extern int esp_max_padbound(void);
+extern int esp_max_ivlen(void);
/* crypt routines */
-extern int esp4_output __P((struct mbuf *, struct ipsecrequest *));
-extern void esp4_input __P((struct mbuf *, ...));
-extern size_t esp_hdrsiz __P((struct ipsecrequest *));
+extern int esp4_output(struct mbuf *, struct ipsecrequest *);
+extern void esp4_input(struct mbuf *, ...);
+extern size_t esp_hdrsiz(struct ipsecrequest *);
extern void esp4_init(void);
extern void *esp4_ctlinput(int, const struct sockaddr *, void *);
#ifdef INET6
-extern int esp6_output __P((struct mbuf *, u_char *, struct mbuf *,
- struct ipsecrequest *));
-extern int esp6_input __P((struct mbuf **, int *, int));
+extern int esp6_output(struct mbuf *, u_char *, struct mbuf *,
+ struct ipsecrequest *);
+extern int esp6_input(struct mbuf **, int *, int);
extern void esp6_init(void);
extern void *esp6_ctlinput(int, const struct sockaddr *, void *);
#endif /* INET6 */
-extern int esp_schedule __P((const struct esp_algorithm *, struct secasvar *));
-extern int esp_auth __P((struct mbuf *, size_t, size_t,
- struct secasvar *, u_char *));
+extern int esp_schedule(const struct esp_algorithm *, struct secasvar *);
+extern int esp_auth(struct mbuf *, size_t, size_t,
+ struct secasvar *, u_char *);
#endif /* _KERNEL */
#endif /* !_NETINET6_ESP_H_ */
diff --git a/sys/netinet6/esp_aesctr.h b/sys/netinet6/esp_aesctr.h
index 642ea6ff834..1484ee9dc46 100644
--- a/sys/netinet6/esp_aesctr.h
+++ b/sys/netinet6/esp_aesctr.h
@@ -1,4 +1,4 @@
-/* $NetBSD: esp_aesctr.h,v 1.2 2005/12/10 23:39:56 elad Exp $ */
+/* $NetBSD: esp_aesctr.h,v 1.3 2009/03/14 14:46:10 dsl Exp $ */
/* $KAME: esp_aesctr.h,v 1.2 2003/07/20 00:29:38 itojun Exp $ */
/*
@@ -33,13 +33,13 @@
#ifndef _NETINET6_ESP_AESCTR_H_
#define _NETINET6_ESP_AESCTR_H_
-extern int esp_aesctr_mature __P((struct secasvar *));
-extern size_t esp_aesctr_schedlen __P((const struct esp_algorithm *));
-extern int esp_aesctr_schedule __P((const struct esp_algorithm *,
- struct secasvar *));
-extern int esp_aesctr_decrypt __P((struct mbuf *, size_t,
- struct secasvar *, const struct esp_algorithm *, int));
-extern int esp_aesctr_encrypt __P((struct mbuf *, size_t, size_t,
- struct secasvar *, const struct esp_algorithm *, int));
+extern int esp_aesctr_mature(struct secasvar *);
+extern size_t esp_aesctr_schedlen(const struct esp_algorithm *);
+extern int esp_aesctr_schedule(const struct esp_algorithm *,
+ struct secasvar *);
+extern int esp_aesctr_decrypt(struct mbuf *, size_t,
+ struct secasvar *, const struct esp_algorithm *, int);
+extern int esp_aesctr_encrypt(struct mbuf *, size_t, size_t,
+ struct secasvar *, const struct esp_algorithm *, int);
#endif /* !_NETINET6_ESP_AESCTR_H_ */
diff --git a/sys/netinet6/esp_core.c b/sys/netinet6/esp_core.c
index 95d72216c6c..69cd7ac6662 100644
--- a/sys/netinet6/esp_core.c
+++ b/sys/netinet6/esp_core.c
@@ -1,4 +1,4 @@
-/* $NetBSD: esp_core.c,v 1.40 2007/05/23 17:15:00 christos Exp $ */
+/* $NetBSD: esp_core.c,v 1.41 2009/03/14 14:46:10 dsl Exp $ */
/* $KAME: esp_core.c,v 1.53 2001/11/27 09:47:30 sakane Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp_core.c,v 1.40 2007/05/23 17:15:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp_core.c,v 1.41 2009/03/14 14:46:10 dsl Exp $");
#include "opt_inet.h"
@@ -66,49 +66,49 @@ __KERNEL_RCSID(0, "$NetBSD: esp_core.c,v 1.40 2007/05/23 17:15:00 christos Exp $
#include <net/net_osdep.h>
-static int esp_null_mature __P((struct secasvar *));
-static int esp_null_decrypt __P((struct mbuf *, size_t,
- struct secasvar *, const struct esp_algorithm *, int));
-static int esp_null_encrypt __P((struct mbuf *, size_t, size_t,
- struct secasvar *, const struct esp_algorithm *, int));
-static int esp_descbc_mature __P((struct secasvar *));
-static int esp_descbc_ivlen __P((const struct esp_algorithm *,
- struct secasvar *));
-static int esp_des_schedule __P((const struct esp_algorithm *,
- struct secasvar *));
-static size_t esp_des_schedlen __P((const struct esp_algorithm *));
-static int esp_des_blockdecrypt __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
-static int esp_des_blockencrypt __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
-static int esp_cbc_mature __P((struct secasvar *));
-static int esp_blowfish_schedule __P((const struct esp_algorithm *,
- struct secasvar *));
-static size_t esp_blowfish_schedlen __P((const struct esp_algorithm *));
-static int esp_blowfish_blockdecrypt __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
-static int esp_blowfish_blockencrypt __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
-static int esp_cast128_schedule __P((const struct esp_algorithm *,
- struct secasvar *));
-static size_t esp_cast128_schedlen __P((const struct esp_algorithm *));
-static int esp_cast128_blockdecrypt __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
-static int esp_cast128_blockencrypt __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
-static int esp_3des_schedule __P((const struct esp_algorithm *,
- struct secasvar *));
-static size_t esp_3des_schedlen __P((const struct esp_algorithm *));
-static int esp_3des_blockdecrypt __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
-static int esp_3des_blockencrypt __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
-static int esp_common_ivlen __P((const struct esp_algorithm *,
- struct secasvar *));
-static int esp_cbc_decrypt __P((struct mbuf *, size_t,
- struct secasvar *, const struct esp_algorithm *, int));
-static int esp_cbc_encrypt __P((struct mbuf *, size_t, size_t,
- struct secasvar *, const struct esp_algorithm *, int));
+static int esp_null_mature(struct secasvar *);
+static int esp_null_decrypt(struct mbuf *, size_t,
+ struct secasvar *, const struct esp_algorithm *, int);
+static int esp_null_encrypt(struct mbuf *, size_t, size_t,
+ struct secasvar *, const struct esp_algorithm *, int);
+static int esp_descbc_mature(struct secasvar *);
+static int esp_descbc_ivlen(const struct esp_algorithm *,
+ struct secasvar *);
+static int esp_des_schedule(const struct esp_algorithm *,
+ struct secasvar *);
+static size_t esp_des_schedlen(const struct esp_algorithm *);
+static int esp_des_blockdecrypt(const struct esp_algorithm *,
+ struct secasvar *, u_int8_t *, u_int8_t *);
+static int esp_des_blockencrypt(const struct esp_algorithm *,
+ struct secasvar *, u_int8_t *, u_int8_t *);
+static int esp_cbc_mature(struct secasvar *);
+static int esp_blowfish_schedule(const struct esp_algorithm *,
+ struct secasvar *);
+static size_t esp_blowfish_schedlen(const struct esp_algorithm *);
+static int esp_blowfish_blockdecrypt(const struct esp_algorithm *,
+ struct secasvar *, u_int8_t *, u_int8_t *);
+static int esp_blowfish_blockencrypt(const struct esp_algorithm *,
+ struct secasvar *, u_int8_t *, u_int8_t *);
+static int esp_cast128_schedule(const struct esp_algorithm *,
+ struct secasvar *);
+static size_t esp_cast128_schedlen(const struct esp_algorithm *);
+static int esp_cast128_blockdecrypt(const struct esp_algorithm *,
+ struct secasvar *, u_int8_t *, u_int8_t *);
+static int esp_cast128_blockencrypt(const struct esp_algorithm *,
+ struct secasvar *, u_int8_t *, u_int8_t *);
+static int esp_3des_schedule(const struct esp_algorithm *,
+ struct secasvar *);
+static size_t esp_3des_schedlen(const struct esp_algorithm *);
+static int esp_3des_blockdecrypt(const struct esp_algorithm *,
+ struct secasvar *, u_int8_t *, u_int8_t *);
+static int esp_3des_blockencrypt(const struct esp_algorithm *,
+ struct secasvar *, u_int8_t *, u_int8_t *);
+static int esp_common_ivlen(const struct esp_algorithm *,
+ struct secasvar *);
+static int esp_cbc_decrypt(struct mbuf *, size_t,
+ struct secasvar *, const struct esp_algorithm *, int);
+static int esp_cbc_encrypt(struct mbuf *, size_t, size_t,
+ struct secasvar *, const struct esp_algorithm *, int);
#define MAXIVLEN 16
diff --git a/sys/netinet6/esp_output.c b/sys/netinet6/esp_output.c
index aed83bd8675..f3eb0096565 100644
--- a/sys/netinet6/esp_output.c
+++ b/sys/netinet6/esp_output.c
@@ -1,4 +1,4 @@
-/* $NetBSD: esp_output.c,v 1.32 2008/04/23 06:09:05 thorpej Exp $ */
+/* $NetBSD: esp_output.c,v 1.33 2009/03/14 14:46:10 dsl Exp $ */
/* $KAME: esp_output.c,v 1.44 2001/07/26 06:53:15 jinmei Exp $ */
/*
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp_output.c,v 1.32 2008/04/23 06:09:05 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp_output.c,v 1.33 2009/03/14 14:46:10 dsl Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -79,8 +79,8 @@ __KERNEL_RCSID(0, "$NetBSD: esp_output.c,v 1.32 2008/04/23 06:09:05 thorpej Exp
#include <net/net_osdep.h>
-static int esp_output __P((struct mbuf *, u_char *, struct mbuf *,
- struct ipsecrequest *, int));
+static int esp_output(struct mbuf *, u_char *, struct mbuf *,
+ struct ipsecrequest *, int);
/*
* compute ESP header size.
diff --git a/sys/netinet6/esp_rijndael.h b/sys/netinet6/esp_rijndael.h
index 898c0edadff..417dd6784a0 100644
--- a/sys/netinet6/esp_rijndael.h
+++ b/sys/netinet6/esp_rijndael.h
@@ -1,4 +1,4 @@
-/* $NetBSD: esp_rijndael.h,v 1.3 2005/12/10 23:39:56 elad Exp $ */
+/* $NetBSD: esp_rijndael.h,v 1.4 2009/03/14 14:46:10 dsl Exp $ */
/* $KAME: esp_rijndael.h,v 1.1 2000/09/20 18:15:22 itojun Exp $ */
/*
@@ -33,12 +33,12 @@
#ifndef _NETINET6_ESP_RIJNDAEL_H_
#define _NETINET6_ESP_RIJNDAEL_H_
-size_t esp_rijndael_schedlen __P((const struct esp_algorithm *));
-int esp_rijndael_schedule __P((const struct esp_algorithm *,
- struct secasvar *));
-int esp_rijndael_blockdecrypt __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
-int esp_rijndael_blockencrypt __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
+size_t esp_rijndael_schedlen(const struct esp_algorithm *);
+int esp_rijndael_schedule(const struct esp_algorithm *,
+ struct secasvar *);
+int esp_rijndael_blockdecrypt(const struct esp_algorithm *,
+ struct secasvar *, u_int8_t *, u_int8_t *);
+int esp_rijndael_blockencrypt(const struct esp_algorithm *,
+ struct secasvar *, u_int8_t *, u_int8_t *);
#endif /* !_NETINET6_ESP_RIJNDAEL_H_ */
diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c
index d141410e8f2..649943ba75e 100644
--- a/sys/netinet6/in6_gif.c
+++ b/sys/netinet6/in6_gif.c
@@ -1,4 +1,4 @@
-/* $NetBSD: in6_gif.c,v 1.57 2008/11/07 00:20:18 dyoung Exp $ */
+/* $NetBSD: in6_gif.c,v 1.58 2009/03/14 14:46:10 dsl Exp $ */
/* $KAME: in6_gif.c,v 1.62 2001/07/29 04:27:25 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.57 2008/11/07 00:20:18 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.58 2009/03/14 14:46:10 dsl Exp $");
#include "opt_inet.h"
#include "opt_iso.h"
@@ -71,8 +71,8 @@ __KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.57 2008/11/07 00:20:18 dyoung Exp $");
#include <net/net_osdep.h>
-static int gif_validate6 __P((const struct ip6_hdr *, struct gif_softc *,
- struct ifnet *));
+static int gif_validate6(const struct ip6_hdr *, struct gif_softc *,
+ struct ifnet *);
int ip6_gif_hlim = GIF_HLIM;
diff --git a/sys/netinet6/ipsec.c b/sys/netinet6/ipsec.c
index 2dc8399b0a7..942c4df3bff 100644
--- a/sys/netinet6/ipsec.c
+++ b/sys/netinet6/ipsec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.c,v 1.133 2008/10/11 13:40:58 pooka Exp $ */
+/* $NetBSD: ipsec.c,v 1.134 2009/03/14 14:46:10 dsl Exp $ */
/* $KAME: ipsec.c,v 1.136 2002/05/19 00:36:39 itojun Exp $ */
/*
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.133 2008/10/11 13:40:58 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.134 2009/03/14 14:46:10 dsl Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -127,56 +127,56 @@ int ip6_ipsec_ecn = 0; /* ECN ignore(-1)/forbidden(0)/allowed(1) */
u_int ipsec_spdgen = 1; /* SPD generation # */
#ifdef SADB_X_EXT_TAG
-static struct pf_tag *ipsec_get_tag __P((struct mbuf *));
+static struct pf_tag *ipsec_get_tag(struct mbuf *);
#endif
-static struct secpolicy *ipsec_checkpcbcache __P((struct mbuf *,
- struct inpcbpolicy *, int));
-static int ipsec_fillpcbcache __P((struct inpcbpolicy *, struct mbuf *,
- struct secpolicy *, int));
-static int ipsec_invalpcbcache __P((struct inpcbpolicy *, int));
+static struct secpolicy *ipsec_checkpcbcache(struct mbuf *,
+ struct inpcbpolicy *, int);
+static int ipsec_fillpcbcache(struct inpcbpolicy *, struct mbuf *,
+ struct secpolicy *, int);
+static int ipsec_invalpcbcache(struct inpcbpolicy *, int);
static int ipsec_setspidx_mbuf
- __P((struct secpolicyindex *, int, struct mbuf *, int));
-static int ipsec_setspidx __P((struct mbuf *, struct secpolicyindex *, int));
-static void ipsec4_get_ulp __P((struct mbuf *, struct secpolicyindex *, int));
-static int ipsec4_setspidx_ipaddr __P((struct mbuf *, struct secpolicyindex *));
+(struct secpolicyindex *, int, struct mbuf *, int);
+static int ipsec_setspidx(struct mbuf *, struct secpolicyindex *, int);
+static void ipsec4_get_ulp(struct mbuf *, struct secpolicyindex *, int);
+static int ipsec4_setspidx_ipaddr(struct mbuf *, struct secpolicyindex *);
#ifdef INET6
-static void ipsec6_get_ulp __P((struct mbuf *, struct secpolicyindex *, int));
-static int ipsec6_setspidx_ipaddr __P((struct mbuf *, struct secpolicyindex *));
+static void ipsec6_get_ulp(struct mbuf *, struct secpolicyindex *, int);
+static int ipsec6_setspidx_ipaddr(struct mbuf *, struct secpolicyindex *);
#endif
-static struct inpcbpolicy *ipsec_newpcbpolicy __P((void));
-static void ipsec_delpcbpolicy __P((struct inpcbpolicy *));
+static struct inpcbpolicy *ipsec_newpcbpolicy(void);
+static void ipsec_delpcbpolicy(struct inpcbpolicy *);
#if 0
-static int ipsec_deepcopy_pcbpolicy __P((struct inpcbpolicy *));
+static int ipsec_deepcopy_pcbpolicy(struct inpcbpolicy *);
#endif
-static struct secpolicy *ipsec_deepcopy_policy __P((struct secpolicy *));
+static struct secpolicy *ipsec_deepcopy_policy(struct secpolicy *);
static int ipsec_set_policy
- __P((struct secpolicy **, int, void *, size_t, int));
-static int ipsec_get_policy __P((struct secpolicy *, struct mbuf **));
-static void vshiftl __P((unsigned char *, int, int));
-static int ipsec_in_reject __P((struct secpolicy *, struct mbuf *));
-static size_t ipsec_hdrsiz __P((struct secpolicy *));
+(struct secpolicy **, int, void *, size_t, int);
+static int ipsec_get_policy(struct secpolicy *, struct mbuf **);
+static void vshiftl(unsigned char *, int, int);
+static int ipsec_in_reject(struct secpolicy *, struct mbuf *);
+static size_t ipsec_hdrsiz(struct secpolicy *);
#ifdef INET
-static struct mbuf *ipsec4_splithdr __P((struct mbuf *));
+static struct mbuf *ipsec4_splithdr(struct mbuf *);
#endif
#ifdef INET6
-static struct mbuf *ipsec6_splithdr __P((struct mbuf *));
+static struct mbuf *ipsec6_splithdr(struct mbuf *);
#endif
#ifdef INET
-static int ipsec4_encapsulate __P((struct mbuf *, struct secasvar *));
+static int ipsec4_encapsulate(struct mbuf *, struct secasvar *);
#endif
#ifdef INET6
-static int ipsec6_encapsulate __P((struct mbuf *, struct secasvar *));
+static int ipsec6_encapsulate(struct mbuf *, struct secasvar *);
#endif
-static struct m_tag *ipsec_addaux __P((struct mbuf *));
-static struct m_tag *ipsec_findaux __P((struct mbuf *));
-static void ipsec_optaux __P((struct mbuf *, struct m_tag *));
+static struct m_tag *ipsec_addaux(struct mbuf *);
+static struct m_tag *ipsec_findaux(struct mbuf *);
+static void ipsec_optaux(struct mbuf *, struct m_tag *);
#ifdef INET
-static int ipsec4_checksa __P((struct ipsecrequest *,
- struct ipsec_output_state *));
+static int ipsec4_checksa(struct ipsecrequest *,
+ struct ipsec_output_state *);
#endif
#ifdef INET6
-static int ipsec6_checksa __P((struct ipsecrequest *,
- struct ipsec_output_state *, int));
+static int ipsec6_checksa(struct ipsecrequest *,
+ struct ipsec_output_state *, int);
#endif
#ifdef INET
diff --git a/sys/netinet6/ipsec.h b/sys/netinet6/ipsec.h
index fd7bc2e7ca3..e2924b761f8 100644
--- a/sys/netinet6/ipsec.h
+++ b/sys/netinet6/ipsec.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.h,v 1.49 2009/02/14 20:53:04 christos Exp $ */
+/* $NetBSD: ipsec.h,v 1.50 2009/03/14 14:46:10 dsl Exp $ */
/* $KAME: ipsec.h,v 1.51 2001/08/05 04:52:58 itojun Exp $ */
/*
@@ -350,108 +350,108 @@ extern int ip6_ipsec_ecn;
#define ipseclog(x) do { if (ipsec_debug) log x; } while (/*CONSTCOND*/ 0)
-extern int ipsec_pcbconn __P((struct inpcbpolicy *));
-extern int ipsec_pcbdisconn __P((struct inpcbpolicy *));
-extern void ipsec_invalpcbcacheall __P((void));
+extern int ipsec_pcbconn(struct inpcbpolicy *);
+extern int ipsec_pcbdisconn(struct inpcbpolicy *);
+extern void ipsec_invalpcbcacheall(void);
extern u_int ipsec_spdgen;
extern struct secpolicy *ipsec4_getpolicybysock
- __P((struct mbuf *, u_int, struct socket *, int *));
+(struct mbuf *, u_int, struct socket *, int *);
extern struct secpolicy *ipsec4_getpolicybyaddr
- __P((struct mbuf *, u_int, int, int *));
+(struct mbuf *, u_int, int, int *);
#ifdef INET6
extern struct secpolicy *ipsec6_getpolicybysock
- __P((struct mbuf *, u_int, struct socket *, int *));
+(struct mbuf *, u_int, struct socket *, int *);
extern struct secpolicy *ipsec6_getpolicybyaddr
- __P((struct mbuf *, u_int, int, int *));
+(struct mbuf *, u_int, int, int *);
#endif /* INET6 */
struct inpcb;
#ifdef INET6
struct in6pcb;
#endif
-extern int ipsec_init_pcbpolicy __P((struct socket *, struct inpcbpolicy **));
+extern int ipsec_init_pcbpolicy(struct socket *, struct inpcbpolicy **);
extern int ipsec_copy_pcbpolicy
- __P((struct inpcbpolicy *, struct inpcbpolicy *));
-extern u_int ipsec_get_reqlevel __P((struct ipsecrequest *, int));
+(struct inpcbpolicy *, struct inpcbpolicy *);
+extern u_int ipsec_get_reqlevel(struct ipsecrequest *, int);
-extern int ipsec4_set_policy __P((struct inpcb *, int, void *, size_t, int));
-extern int ipsec4_get_policy __P((struct inpcb *, void *, size_t,
- struct mbuf **));
-extern int ipsec4_delete_pcbpolicy __P((struct inpcb *));
-extern int ipsec4_in_reject_so __P((struct mbuf *, struct socket *));
-extern int ipsec4_in_reject __P((struct mbuf *, struct inpcb *));
+extern int ipsec4_set_policy(struct inpcb *, int, void *, size_t, int);
+extern int ipsec4_get_policy(struct inpcb *, void *, size_t,
+ struct mbuf **);
+extern int ipsec4_delete_pcbpolicy(struct inpcb *);
+extern int ipsec4_in_reject_so(struct mbuf *, struct socket *);
+extern int ipsec4_in_reject(struct mbuf *, struct inpcb *);
#ifdef INET6
-extern int ipsec6_in_reject_so __P((struct mbuf *, struct socket *));
-extern int ipsec6_delete_pcbpolicy __P((struct in6pcb *));
-extern int ipsec6_set_policy __P((struct in6pcb *, int, void *, size_t, int));
-extern int ipsec6_get_policy __P((struct in6pcb *, void *, size_t,
- struct mbuf **));
-extern int ipsec6_in_reject __P((struct mbuf *, struct in6pcb *));
+extern int ipsec6_in_reject_so(struct mbuf *, struct socket *);
+extern int ipsec6_delete_pcbpolicy(struct in6pcb *);
+extern int ipsec6_set_policy(struct in6pcb *, int, void *, size_t, int);
+extern int ipsec6_get_policy(struct in6pcb *, void *, size_t,
+ struct mbuf **);
+extern int ipsec6_in_reject(struct mbuf *, struct in6pcb *);
#endif /* INET6 */
struct secas;
struct tcpcb;
struct tcp6cb;
-extern int ipsec_chkreplay __P((u_int32_t, struct secasvar *));
-extern int ipsec_updatereplay __P((u_int32_t, struct secasvar *));
+extern int ipsec_chkreplay(u_int32_t, struct secasvar *);
+extern int ipsec_updatereplay(u_int32_t, struct secasvar *);
extern void ipsec4_init(void);
-extern size_t ipsec4_hdrsiz __P((struct mbuf *, u_int, struct inpcb *));
-extern size_t ipsec4_hdrsiz_tcp __P((struct tcpcb *));
+extern size_t ipsec4_hdrsiz(struct mbuf *, u_int, struct inpcb *);
+extern size_t ipsec4_hdrsiz_tcp(struct tcpcb *);
#ifdef INET6
extern void ipsec6_init(void);
-extern size_t ipsec6_hdrsiz __P((struct mbuf *, u_int, struct in6pcb *));
-extern size_t ipsec6_hdrsiz_tcp __P((struct tcpcb *));
+extern size_t ipsec6_hdrsiz(struct mbuf *, u_int, struct in6pcb *);
+extern size_t ipsec6_hdrsiz_tcp(struct tcpcb *);
#endif
struct ip;
#ifdef INET6
struct ip6_hdr;
#endif
-extern const char *ipsec4_logpacketstr __P((struct ip *, u_int32_t));
+extern const char *ipsec4_logpacketstr(struct ip *, u_int32_t);
#ifdef INET6
-extern const char *ipsec6_logpacketstr __P((struct ip6_hdr *, u_int32_t));
+extern const char *ipsec6_logpacketstr(struct ip6_hdr *, u_int32_t);
#endif
-extern const char *ipsec_logsastr __P((struct secasvar *));
+extern const char *ipsec_logsastr(struct secasvar *);
-extern void ipsec_dumpmbuf __P((struct mbuf *));
+extern void ipsec_dumpmbuf(struct mbuf *);
-extern int ipsec4_output __P((struct ipsec_output_state *, struct secpolicy *,
- int));
+extern int ipsec4_output(struct ipsec_output_state *, struct secpolicy *,
+ int);
#ifdef INET6
-extern int ipsec6_output_trans __P((struct ipsec_output_state *, u_char *,
- struct mbuf *, struct secpolicy *, int, int *));
-extern int ipsec6_output_tunnel __P((struct ipsec_output_state *,
- struct secpolicy *, int));
+extern int ipsec6_output_trans(struct ipsec_output_state *, u_char *,
+ struct mbuf *, struct secpolicy *, int, int *);
+extern int ipsec6_output_tunnel(struct ipsec_output_state *,
+ struct secpolicy *, int);
#endif
-extern int ipsec4_tunnel_validate __P((struct ip *, u_int, struct secasvar *));
+extern int ipsec4_tunnel_validate(struct ip *, u_int, struct secasvar *);
#ifdef INET6
-extern int ipsec6_tunnel_validate __P((struct ip6_hdr *, u_int,
- struct secasvar *));
+extern int ipsec6_tunnel_validate(struct ip6_hdr *, u_int,
+ struct secasvar *);
#endif
-extern struct mbuf *ipsec_copypkt __P((struct mbuf *));
-extern void ipsec_delaux __P((struct mbuf *));
-extern int ipsec_addhist __P((struct mbuf *, int, u_int32_t));
-extern int ipsec_getnhist __P((struct mbuf *));
-extern struct ipsec_history *ipsec_gethist __P((struct mbuf *, int *));
-extern void ipsec_clearhist __P((struct mbuf *));
+extern struct mbuf *ipsec_copypkt(struct mbuf *);
+extern void ipsec_delaux(struct mbuf *);
+extern int ipsec_addhist(struct mbuf *, int, u_int32_t);
+extern int ipsec_getnhist(struct mbuf *);
+extern struct ipsec_history *ipsec_gethist(struct mbuf *, int *);
+extern void ipsec_clearhist(struct mbuf *);
-extern int ipsec_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
-extern int ipsec6_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
+extern int ipsec_sysctl(int *, u_int, void *, size_t *, void *, size_t);
+extern int ipsec6_sysctl(int *, u_int, void *, size_t *, void *, size_t);
#endif /* _KERNEL */
#ifndef _KERNEL
typedef void *ipsec_policy_t;
-extern ipsec_policy_t ipsec_set_policy __P((const char *, int));
-extern int ipsec_get_policylen __P((ipsec_policy_t));
-extern char *ipsec_dump_policy __P((ipsec_policy_t, const char *));
+extern ipsec_policy_t ipsec_set_policy(const char *, int);
+extern int ipsec_get_policylen(ipsec_policy_t);
+extern char *ipsec_dump_policy(ipsec_policy_t, const char *);
-extern const char *ipsec_strerror __P((void));
+extern const char *ipsec_strerror(void);
#endif /* !_KERNEL */
#endif /* !_NETINET6_IPSEC_H_ */