Module Name:    src
Committed By:   drochner
Date:           Fri Feb 18 19:56:02 UTC 2011

Modified Files:
        src/sys/opencrypto: cryptodev.c cryptosoft_xform.c

Log Message:
more "const"


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/opencrypto/cryptodev.c
cvs rdiff -u -r1.12 -r1.13 src/sys/opencrypto/cryptosoft_xform.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/opencrypto/cryptodev.c
diff -u src/sys/opencrypto/cryptodev.c:1.53 src/sys/opencrypto/cryptodev.c:1.54
--- src/sys/opencrypto/cryptodev.c:1.53	Mon Aug  2 19:59:35 2010
+++ src/sys/opencrypto/cryptodev.c	Fri Feb 18 19:56:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptodev.c,v 1.53 2010/08/02 19:59:35 jakllsch Exp $ */
+/*	$NetBSD: cryptodev.c,v 1.54 2011/02/18 19:56:01 drochner Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $	*/
 /*	$OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $	*/
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.53 2010/08/02 19:59:35 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.54 2011/02/18 19:56:01 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -97,11 +97,11 @@
 	u_int32_t	ses;
 
 	u_int32_t	cipher;		/* note: shares name space in crd_alg */
-	struct enc_xform *txform;
+	const struct enc_xform *txform;
 	u_int32_t	mac;		/* note: shares name space in crd_alg */
-	struct auth_hash *thash;
+	const struct auth_hash *thash;
 	u_int32_t	comp_alg;	/* note: shares name space in crd_alg */
-	struct comp_algo *tcomp;
+	const struct comp_algo *tcomp;
 
 	void *		key;
 	int		keylen;
@@ -166,7 +166,8 @@
 static struct	csession *cseadd(struct fcrypt *, struct csession *);
 static struct	csession *csecreate(struct fcrypt *, u_int64_t, void *,
     u_int64_t, void *, u_int64_t, u_int32_t, u_int32_t, u_int32_t,
-    struct enc_xform *, struct auth_hash *, struct comp_algo *);
+    const struct enc_xform *, const struct auth_hash *,
+    const struct comp_algo *);
 static int	csefree(struct csession *);
 
 static int	cryptodev_key(struct crypt_kop *);
@@ -977,8 +978,8 @@
 static struct csession *
 csecreate(struct fcrypt *fcr, u_int64_t sid, void *key, u_int64_t keylen,
     void *mackey, u_int64_t mackeylen, u_int32_t cipher, u_int32_t mac,
-    u_int32_t comp_alg, struct enc_xform *txform, struct auth_hash *thash,
-    struct comp_algo *tcomp)
+    u_int32_t comp_alg, const struct enc_xform *txform,
+    const struct auth_hash *thash, const struct comp_algo *tcomp)
 {
 	struct csession *cse;
 
@@ -1475,9 +1476,9 @@
 	struct cryptoini cria, crie;
 	struct cryptoini cric;		/* compressor */
 	struct cryptoini *crihead = NULL;
-	struct enc_xform *txform = NULL;
-	struct auth_hash *thash = NULL;
-	struct comp_algo *tcomp = NULL;
+	const struct enc_xform *txform = NULL;
+	const struct auth_hash *thash = NULL;
+	const struct comp_algo *tcomp = NULL;
 	struct csession *cse;
 	u_int64_t sid;
 	int error = 0;

Index: src/sys/opencrypto/cryptosoft_xform.c
diff -u src/sys/opencrypto/cryptosoft_xform.c:1.12 src/sys/opencrypto/cryptosoft_xform.c:1.13
--- src/sys/opencrypto/cryptosoft_xform.c:1.12	Wed Mar 25 01:26:13 2009
+++ src/sys/opencrypto/cryptosoft_xform.c	Fri Feb 18 19:56:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptosoft_xform.c,v 1.12 2009/03/25 01:26:13 darran Exp $ */
+/*	$NetBSD: cryptosoft_xform.c,v 1.13 2011/02/18 19:56:02 drochner Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/xform.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $	*/
 /*	$OpenBSD: xform.c,v 1.19 2002/08/16 22:47:25 dhartmei Exp $	*/
 
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.12 2009/03/25 01:26:13 darran Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.13 2011/02/18 19:56:02 drochner Exp $");
 
 #include <crypto/blowfish/blowfish.h>
 #include <crypto/cast128/cast128.h>
@@ -55,14 +55,14 @@
 #include <sys/sha1.h>
 
 struct swcr_auth_hash {
-	struct auth_hash *auth_hash;
+	const struct auth_hash *auth_hash;
 	void (*Init)(void *);
 	int  (*Update)(void *, const uint8_t *, uint16_t);
 	void (*Final)(uint8_t *, void *);
 };
 
 struct swcr_enc_xform {
-	struct enc_xform *enc_xform;
+	const struct enc_xform *enc_xform;
 	void (*encrypt)(void *, uint8_t *);
 	void (*decrypt)(void *, uint8_t *);
 	int  (*setkey)(uint8_t **, const uint8_t *, int len);
@@ -70,7 +70,7 @@
 };
 
 struct swcr_comp_algo {
-	struct comp_algo *comp_algo;
+	const struct comp_algo *comp_algo;
 	uint32_t (*compress)(uint8_t *, uint32_t, uint8_t **);
 	uint32_t (*decompress)(uint8_t *, uint32_t, uint8_t **);
 };

Reply via email to