make ipsec_strerror(3) to return const char *, not char *. sync with kame.
This commit is contained in:
parent
f96e3b36f6
commit
5e8b5a35e4
|
@ -1,7 +1,7 @@
|
|||
.\" Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
|
||||
.\" $NetBSD: ipsec_strerror.3,v 1.7 2000/06/12 10:40:52 itojun Exp $
|
||||
.\" $KAME: ipsec_strerror.3,v 1.6 2000/05/07 05:25:03 itojun Exp $
|
||||
.\" $NetBSD: ipsec_strerror.3,v 1.8 2000/07/30 02:38:36 itojun Exp $
|
||||
.\" $KAME: ipsec_strerror.3,v 1.7 2000/07/30 00:45:45 itojun Exp $
|
||||
.\"
|
||||
.\" Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
|
@ -41,7 +41,7 @@
|
|||
.\"
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <netinet6/ipsec.h>
|
||||
.Ft "char *"
|
||||
.Ft "const char *"
|
||||
.Fn ipsec_strerror
|
||||
.\"
|
||||
.Sh DESCRIPTION
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* $NetBSD: ipsec_strerror.c,v 1.6 2000/06/12 10:40:52 itojun Exp $ */
|
||||
/* $KAME: ipsec_strerror.c,v 1.6 2000/05/07 05:25:03 itojun Exp $ */
|
||||
/* $NetBSD: ipsec_strerror.c,v 1.7 2000/07/30 02:38:36 itojun Exp $ */
|
||||
/* $KAME: ipsec_strerror.c,v 1.7 2000/07/30 00:45:12 itojun Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
int __ipsec_errcode;
|
||||
|
||||
static char *ipsec_errlist[] = {
|
||||
static const char *ipsec_errlist[] = {
|
||||
"Success", /*EIPSEC_NO_ERROR*/
|
||||
"Not supported", /*EIPSEC_NOT_SUPPORTED*/
|
||||
"Invalid argument", /*EIPSEC_INVAL_ARGUMENT*/
|
||||
|
@ -71,7 +71,7 @@ NULL, /*EIPSEC_SYSTEM_ERROR*/
|
|||
"Unknown error", /*EIPSEC_MAX*/
|
||||
};
|
||||
|
||||
char *ipsec_strerror(void)
|
||||
const char *ipsec_strerror(void)
|
||||
{
|
||||
if (__ipsec_errcode < 0 || __ipsec_errcode > EIPSEC_MAX)
|
||||
__ipsec_errcode = EIPSEC_MAX;
|
||||
|
@ -79,7 +79,7 @@ char *ipsec_strerror(void)
|
|||
return ipsec_errlist[__ipsec_errcode];
|
||||
}
|
||||
|
||||
void __ipsec_set_strerror(char *str)
|
||||
void __ipsec_set_strerror(const char *str)
|
||||
{
|
||||
__ipsec_errcode = EIPSEC_SYSTEM_ERROR;
|
||||
ipsec_errlist[EIPSEC_SYSTEM_ERROR] = str;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* $NetBSD: ipsec_strerror.h,v 1.6 2000/06/12 10:40:52 itojun Exp $ */
|
||||
/* $KAME: ipsec_strerror.h,v 1.7 2000/05/07 05:25:03 itojun Exp $ */
|
||||
/* $NetBSD: ipsec_strerror.h,v 1.7 2000/07/30 02:38:36 itojun Exp $ */
|
||||
/* $KAME: ipsec_strerror.h,v 1.8 2000/07/30 00:45:12 itojun Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
extern int __ipsec_errcode;
|
||||
extern void __ipsec_set_strerror __P((char *));
|
||||
extern void __ipsec_set_strerror __P((const char *));
|
||||
|
||||
#define EIPSEC_NO_ERROR 0 /*success*/
|
||||
#define EIPSEC_NOT_SUPPORTED 1 /*not supported*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* $NetBSD: ipsec.h,v 1.14 2000/06/15 05:01:08 itojun Exp $ */
|
||||
/* $KAME: ipsec.h,v 1.32 2000/06/15 04:08:54 itojun Exp $ */
|
||||
/* $NetBSD: ipsec.h,v 1.15 2000/07/30 02:38:35 itojun Exp $ */
|
||||
/* $KAME: ipsec.h,v 1.35 2000/07/30 00:45:11 itojun Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -48,7 +48,7 @@
|
|||
|
||||
/*
|
||||
* Security Policy Index
|
||||
* NOTE: Encure to be same address family and upper layer protocol.
|
||||
* NOTE: Ensure to be same address family and upper layer protocol.
|
||||
* NOTE: ul_proto, port number, uid, gid:
|
||||
* ANY: reserved for waldcard.
|
||||
* 0 to (~0 - 1): is one of the number of each value.
|
||||
|
@ -384,7 +384,7 @@ extern caddr_t ipsec_set_policy __P((char *, int));
|
|||
extern int ipsec_get_policylen __P((caddr_t));
|
||||
extern char *ipsec_dump_policy __P((caddr_t, char *));
|
||||
|
||||
extern char *ipsec_strerror __P((void));
|
||||
extern const char *ipsec_strerror __P((void));
|
||||
#endif /*!_KERNEL*/
|
||||
|
||||
#endif /*_NETINET6_IPSEC_H_*/
|
||||
|
|
Loading…
Reference in New Issue