sync with OpenBSD -current
This commit is contained in:
parent
0f27a61c5c
commit
38dbdec412
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: evp_enc.c,v 1.73 2023/12/20 14:15:19 tb Exp $ */
|
/* $OpenBSD: evp_enc.c,v 1.74 2023/12/21 20:50:43 tb Exp $ */
|
||||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -601,7 +601,7 @@ EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen)
|
|||||||
keylen, NULL);
|
keylen, NULL);
|
||||||
if (c->key_len == keylen)
|
if (c->key_len == keylen)
|
||||||
return 1;
|
return 1;
|
||||||
if ((keylen > 0) && (c->cipher->flags & EVP_CIPH_VARIABLE_LENGTH)) {
|
if (keylen > 0 && (c->cipher->flags & EVP_CIPH_VARIABLE_LENGTH)) {
|
||||||
c->key_len = keylen;
|
c->key_len = keylen;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -654,7 +654,7 @@ EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key)
|
|||||||
int
|
int
|
||||||
EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in)
|
EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in)
|
||||||
{
|
{
|
||||||
if ((in == NULL) || (in->cipher == NULL)) {
|
if (in == NULL || in->cipher == NULL) {
|
||||||
EVPerror(EVP_R_INPUT_NOT_INITIALIZED);
|
EVPerror(EVP_R_INPUT_NOT_INITIALIZED);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: ASN1_STRING_TABLE_get.3,v 1.3 2023/12/16 19:14:56 tb Exp $
|
.\" $OpenBSD: ASN1_STRING_TABLE_get.3,v 1.4 2023/12/21 21:23:37 tb Exp $
|
||||||
.\" checked up to:
|
.\" checked up to:
|
||||||
.\" OpenSSL ASN1_STRING_TABLE_add.pod 7b608d08 Jul 27 01:18:50 2017 +0800
|
.\" OpenSSL ASN1_STRING_TABLE_add.pod 7b608d08 Jul 27 01:18:50 2017 +0800
|
||||||
.\"
|
.\"
|
||||||
@ -16,10 +16,14 @@
|
|||||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: December 16 2023 $
|
.Dd $Mdocdate: December 21 2023 $
|
||||||
.Dt ASN1_STRING_TABLE_GET 3
|
.Dt ASN1_STRING_TABLE_GET 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
.\" .Nm ASN1_STRING_TABLE_add0 and
|
||||||
|
.\" .Nm ASN1_STRING_TABLE_cleanup are intentionally undocumented
|
||||||
|
.\" because they will be removed in the next major bump
|
||||||
|
.\" .Dv STABLE_FLAGS_MALLOC is intentionally undocumented because it is unused
|
||||||
.Nm ASN1_STRING_TABLE_get
|
.Nm ASN1_STRING_TABLE_get
|
||||||
.Nd retrieve an entry from the global ASN.1 string table
|
.Nd retrieve an entry from the global ASN.1 string table
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: EVP_PKCS82PKEY.3,v 1.1 2021/10/25 13:48:12 schwarze Exp $
|
.\" $OpenBSD: EVP_PKCS82PKEY.3,v 1.2 2023/12/21 21:32:01 tb Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
|
.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
|
||||||
.\"
|
.\"
|
||||||
@ -14,7 +14,7 @@
|
|||||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: October 25 2021 $
|
.Dd $Mdocdate: December 21 2023 $
|
||||||
.Dt EVP_PKCS82PKEY 3
|
.Dt EVP_PKCS82PKEY 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -40,8 +40,6 @@ structure representing the private key contained in
|
|||||||
.Fa pkey .
|
.Fa pkey .
|
||||||
.Pp
|
.Pp
|
||||||
Supported algorithms include DH, DSA, EC, GOST2001, and RSA.
|
Supported algorithms include DH, DSA, EC, GOST2001, and RSA.
|
||||||
Application programs can add additional algorithms using
|
|
||||||
.Xr EVP_PKEY_asn1_add0 3 .
|
|
||||||
.Sh RETURN VALUES
|
.Sh RETURN VALUES
|
||||||
These functions return a newly allocated object or
|
These functions return a newly allocated object or
|
||||||
.Dv NULL
|
.Dv NULL
|
||||||
@ -51,7 +49,6 @@ or
|
|||||||
.Fa pkey
|
.Fa pkey
|
||||||
is unsupported or if memory allocation, decoding, or encoding fails.
|
is unsupported or if memory allocation, decoding, or encoding fails.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr EVP_PKEY_asn1_add0 3 ,
|
|
||||||
.Xr EVP_PKEY_base_id 3 ,
|
.Xr EVP_PKEY_base_id 3 ,
|
||||||
.Xr EVP_PKEY_new 3 ,
|
.Xr EVP_PKEY_new 3 ,
|
||||||
.Xr PKCS8_pkey_set0 3 ,
|
.Xr PKCS8_pkey_set0 3 ,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: EVP_PKEY_asn1_get_count.3,v 1.7 2023/09/13 13:55:50 schwarze Exp $
|
.\" $OpenBSD: EVP_PKEY_asn1_get_count.3,v 1.8 2023/12/21 21:32:01 tb Exp $
|
||||||
.\" full merge up to: OpenSSL 72a7a702 Feb 26 14:05:09 2019 +0000
|
.\" full merge up to: OpenSSL 72a7a702 Feb 26 14:05:09 2019 +0000
|
||||||
.\"
|
.\"
|
||||||
.\" This file is a derived work.
|
.\" This file is a derived work.
|
||||||
@ -65,7 +65,7 @@
|
|||||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||||
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
|
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: September 13 2023 $
|
.Dd $Mdocdate: December 21 2023 $
|
||||||
.Dt EVP_PKEY_ASN1_GET_COUNT 3
|
.Dt EVP_PKEY_ASN1_GET_COUNT 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -111,7 +111,6 @@
|
|||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
.Fn EVP_PKEY_asn1_get_count
|
.Fn EVP_PKEY_asn1_get_count
|
||||||
returns the number of public key ASN.1 methods available.
|
returns the number of public key ASN.1 methods available.
|
||||||
It includes standard methods and any methods added by the application.
|
|
||||||
.Pp
|
.Pp
|
||||||
.Fn EVP_PKEY_asn1_get0
|
.Fn EVP_PKEY_asn1_get0
|
||||||
returns the public key ASN.1 method
|
returns the public key ASN.1 method
|
||||||
@ -185,8 +184,6 @@ object and will never be returned from
|
|||||||
.Fn EVP_PKEY_asn1_find
|
.Fn EVP_PKEY_asn1_find
|
||||||
or
|
or
|
||||||
.Fn EVP_PKEY_asn1_find_str .
|
.Fn EVP_PKEY_asn1_find_str .
|
||||||
It is either an alias built into the library, or it was created with
|
|
||||||
.Xr EVP_PKEY_asn1_add_alias 3 .
|
|
||||||
.It Dv ASN1_PKEY_DYNAMIC
|
.It Dv ASN1_PKEY_DYNAMIC
|
||||||
This
|
This
|
||||||
.Fa ameth
|
.Fa ameth
|
||||||
@ -218,18 +215,6 @@ objects with
|
|||||||
In particular, this is used for
|
In particular, this is used for
|
||||||
.Dv EVP_PKEY_RSA .
|
.Dv EVP_PKEY_RSA .
|
||||||
.El
|
.El
|
||||||
.Pp
|
|
||||||
.Fn EVP_PKEY_asn1_get_count ,
|
|
||||||
.Fn EVP_PKEY_asn1_get0 ,
|
|
||||||
.Fn EVP_PKEY_asn1_find
|
|
||||||
and
|
|
||||||
.Fn EVP_PKEY_asn1_find_str
|
|
||||||
are not thread safe, but as long as all
|
|
||||||
.Vt EVP_PKEY_ASN1_METHOD
|
|
||||||
objects are added before the application gets threaded, using them is
|
|
||||||
safe.
|
|
||||||
See
|
|
||||||
.Xr EVP_PKEY_asn1_add0 3 .
|
|
||||||
.Sh RETURN VALUES
|
.Sh RETURN VALUES
|
||||||
.Fn EVP_PKEY_asn1_get_count
|
.Fn EVP_PKEY_asn1_get_count
|
||||||
returns the number of available public key methods.
|
returns the number of available public key methods.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: EVP_PKEY_asn1_new.3,v 1.10 2023/09/13 14:18:21 schwarze Exp $
|
.\" $OpenBSD: EVP_PKEY_asn1_new.3,v 1.11 2023/12/21 21:32:01 tb Exp $
|
||||||
.\" selective merge up to:
|
.\" selective merge up to:
|
||||||
.\" OpenSSL man3/EVP_PKEY_ASN1_METHOD b0004708 Nov 1 00:45:24 2017 +0800
|
.\" OpenSSL man3/EVP_PKEY_ASN1_METHOD b0004708 Nov 1 00:45:24 2017 +0800
|
||||||
.\"
|
.\"
|
||||||
@ -67,15 +67,16 @@
|
|||||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||||
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
|
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: September 13 2023 $
|
.Dd $Mdocdate: December 21 2023 $
|
||||||
.Dt EVP_PKEY_ASN1_NEW 3
|
.Dt EVP_PKEY_ASN1_NEW 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
.\" .Nm EVP_PKEY_asn1_add0 and
|
||||||
|
.\" .Nm EVP_PKEY_asn1_add_alias are intentionally undocumented
|
||||||
|
.\" because they will be removed in the next major bump
|
||||||
.Nm EVP_PKEY_asn1_new ,
|
.Nm EVP_PKEY_asn1_new ,
|
||||||
.Nm EVP_PKEY_asn1_copy ,
|
.Nm EVP_PKEY_asn1_copy ,
|
||||||
.Nm EVP_PKEY_asn1_free ,
|
.Nm EVP_PKEY_asn1_free ,
|
||||||
.Nm EVP_PKEY_asn1_add0 ,
|
|
||||||
.Nm EVP_PKEY_asn1_add_alias ,
|
|
||||||
.Nm EVP_PKEY_asn1_set_public ,
|
.Nm EVP_PKEY_asn1_set_public ,
|
||||||
.Nm EVP_PKEY_asn1_set_private ,
|
.Nm EVP_PKEY_asn1_set_private ,
|
||||||
.Nm EVP_PKEY_asn1_set_param ,
|
.Nm EVP_PKEY_asn1_set_param ,
|
||||||
@ -104,15 +105,6 @@
|
|||||||
.Fo EVP_PKEY_asn1_free
|
.Fo EVP_PKEY_asn1_free
|
||||||
.Fa "EVP_PKEY_ASN1_METHOD *ameth"
|
.Fa "EVP_PKEY_ASN1_METHOD *ameth"
|
||||||
.Fc
|
.Fc
|
||||||
.Ft int
|
|
||||||
.Fo EVP_PKEY_asn1_add0
|
|
||||||
.Fa "const EVP_PKEY_ASN1_METHOD *ameth"
|
|
||||||
.Fc
|
|
||||||
.Ft int
|
|
||||||
.Fo EVP_PKEY_asn1_add_alias
|
|
||||||
.Fa "int to"
|
|
||||||
.Fa "int from"
|
|
||||||
.Fc
|
|
||||||
.Ft void
|
.Ft void
|
||||||
.Fo EVP_PKEY_asn1_set_public
|
.Fo EVP_PKEY_asn1_set_public
|
||||||
.Fa "EVP_PKEY_ASN1_METHOD *ameth"
|
.Fa "EVP_PKEY_ASN1_METHOD *ameth"
|
||||||
@ -179,13 +171,10 @@
|
|||||||
is a structure which holds a set of ASN.1 conversion, printing and
|
is a structure which holds a set of ASN.1 conversion, printing and
|
||||||
information methods for a specific public key algorithm.
|
information methods for a specific public key algorithm.
|
||||||
.Pp
|
.Pp
|
||||||
There are two places where the
|
The built-in
|
||||||
.Vt EVP_PKEY_ASN1_METHOD
|
.Vt EVP_PKEY_ASN1_METHOD
|
||||||
objects are stored: one is a built-in array representing the standard
|
objects are stored in a table containing the standard
|
||||||
methods for different algorithms, and the other one is a stack of
|
methods for different algorithms.
|
||||||
user-defined application-specific methods, which can be manipulated by
|
|
||||||
using
|
|
||||||
.Fn EVP_PKEY_asn1_add0 .
|
|
||||||
.Ss Methods
|
.Ss Methods
|
||||||
The methods are the underlying implementations of a particular public
|
The methods are the underlying implementations of a particular public
|
||||||
key algorithm present by the
|
key algorithm present by the
|
||||||
@ -467,28 +456,6 @@ is
|
|||||||
.Dv NULL
|
.Dv NULL
|
||||||
of not marked as dynamically allocated, no action occurs.
|
of not marked as dynamically allocated, no action occurs.
|
||||||
.Pp
|
.Pp
|
||||||
.Fn EVP_PKEY_asn1_add0
|
|
||||||
adds
|
|
||||||
.Fa ameth
|
|
||||||
to the user defined stack of methods unless another
|
|
||||||
.Vt EVP_PKEY_ASN1_METHOD
|
|
||||||
with the same NID is already there.
|
|
||||||
This function is not thread safe, it is recommended to only use this when
|
|
||||||
initializing the application.
|
|
||||||
.Pp
|
|
||||||
.Fn EVP_PKEY_asn1_add_alias
|
|
||||||
creates an alias with the NID
|
|
||||||
.Fa to
|
|
||||||
for the
|
|
||||||
.Vt EVP_PKEY_ASN1_METHOD
|
|
||||||
with NID
|
|
||||||
.Fa from
|
|
||||||
unless another
|
|
||||||
.Vt EVP_PKEY_ASN1_METHOD
|
|
||||||
with the same NID is already added.
|
|
||||||
This function is not thread safe, it's recommended to only use this when
|
|
||||||
initializing the application.
|
|
||||||
.Pp
|
|
||||||
.Fn EVP_PKEY_asn1_set_public ,
|
.Fn EVP_PKEY_asn1_set_public ,
|
||||||
.Fn EVP_PKEY_asn1_set_private ,
|
.Fn EVP_PKEY_asn1_set_private ,
|
||||||
.Fn EVP_PKEY_asn1_set_param ,
|
.Fn EVP_PKEY_asn1_set_param ,
|
||||||
@ -509,11 +476,6 @@ returns a pointer to the new
|
|||||||
object or
|
object or
|
||||||
.Dv NULL
|
.Dv NULL
|
||||||
if memory allocation fails.
|
if memory allocation fails.
|
||||||
.Pp
|
|
||||||
.Fn EVP_PKEY_asn1_add0
|
|
||||||
and
|
|
||||||
.Fn EVP_PKEY_asn1_add_alias
|
|
||||||
return 0 on error or 1 on success.
|
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr EVP_PKEY_asn1_get_count 3 ,
|
.Xr EVP_PKEY_asn1_get_count 3 ,
|
||||||
.Xr EVP_PKEY_new 3 ,
|
.Xr EVP_PKEY_new 3 ,
|
||||||
@ -522,8 +484,6 @@ return 0 on error or 1 on success.
|
|||||||
.Fn EVP_PKEY_asn1_new ,
|
.Fn EVP_PKEY_asn1_new ,
|
||||||
.Fn EVP_PKEY_asn1_copy ,
|
.Fn EVP_PKEY_asn1_copy ,
|
||||||
.Fn EVP_PKEY_asn1_free ,
|
.Fn EVP_PKEY_asn1_free ,
|
||||||
.Fn EVP_PKEY_asn1_add0 ,
|
|
||||||
.Fn EVP_PKEY_asn1_add_alias ,
|
|
||||||
.Fn EVP_PKEY_asn1_set_public ,
|
.Fn EVP_PKEY_asn1_set_public ,
|
||||||
.Fn EVP_PKEY_asn1_set_private ,
|
.Fn EVP_PKEY_asn1_set_private ,
|
||||||
.Fn EVP_PKEY_asn1_set_param ,
|
.Fn EVP_PKEY_asn1_set_param ,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: EVP_PKEY_set1_RSA.3,v 1.20 2023/08/27 13:08:15 schwarze Exp $
|
.\" $OpenBSD: EVP_PKEY_set1_RSA.3,v 1.21 2023/12/21 21:32:01 tb Exp $
|
||||||
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
|
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
|
||||||
.\"
|
.\"
|
||||||
.\" This file is a derived work.
|
.\" This file is a derived work.
|
||||||
@ -65,7 +65,7 @@
|
|||||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||||
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
|
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: August 27 2023 $
|
.Dd $Mdocdate: December 21 2023 $
|
||||||
.Dt EVP_PKEY_SET1_RSA 3
|
.Dt EVP_PKEY_SET1_RSA 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -314,9 +314,6 @@ according to the following table:
|
|||||||
.It Dv EVP_PKEY_RSA_PSS Ta = Dv NID_rsassaPss Ta RSA-PSS
|
.It Dv EVP_PKEY_RSA_PSS Ta = Dv NID_rsassaPss Ta RSA-PSS
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
Application programs can support additional key types by calling
|
|
||||||
.Xr EVP_PKEY_asn1_add0 3 .
|
|
||||||
.Pp
|
|
||||||
.Fn EVP_PKEY_id
|
.Fn EVP_PKEY_id
|
||||||
returns the actual OID associated with
|
returns the actual OID associated with
|
||||||
.Fa pkey .
|
.Fa pkey .
|
||||||
@ -334,9 +331,6 @@ The following deprecated aliases are still supported:
|
|||||||
.It Dv EVP_PKEY_RSA2 Ta = Dv NID_rsa Ta RSA
|
.It Dv EVP_PKEY_RSA2 Ta = Dv NID_rsa Ta RSA
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
Application programs can support additional alternative OIDs by calling
|
|
||||||
.Xr EVP_PKEY_asn1_add_alias 3 .
|
|
||||||
.Pp
|
|
||||||
Most applications wishing to know a key type will simply call
|
Most applications wishing to know a key type will simply call
|
||||||
.Fn EVP_PKEY_base_id
|
.Fn EVP_PKEY_base_id
|
||||||
and will not care about the actual type,
|
and will not care about the actual type,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: dumprmt.c,v 1.32 2023/03/08 04:43:06 guenther Exp $ */
|
/* $OpenBSD: dumprmt.c,v 1.33 2023/12/21 08:01:21 otto Exp $ */
|
||||||
/* $NetBSD: dumprmt.c,v 1.17 1997/06/05 16:10:47 mrg Exp $ */
|
/* $NetBSD: dumprmt.c,v 1.17 1997/06/05 16:10:47 mrg Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -90,7 +90,7 @@ rmthost(char *host)
|
|||||||
if (rmtpeer)
|
if (rmtpeer)
|
||||||
strlcpy(rmtpeer, host, len);
|
strlcpy(rmtpeer, host, len);
|
||||||
else
|
else
|
||||||
rmtpeer = host;
|
return (0);
|
||||||
signal(SIGPIPE, rmtconnaborted);
|
signal(SIGPIPE, rmtconnaborted);
|
||||||
rmtgetconn();
|
rmtgetconn();
|
||||||
if (rmtape < 0)
|
if (rmtape < 0)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: itime.c,v 1.25 2021/01/21 00:16:36 mortimer Exp $ */
|
/* $OpenBSD: itime.c,v 1.26 2023/12/21 08:01:21 otto Exp $ */
|
||||||
/* $NetBSD: itime.c,v 1.4 1997/04/15 01:09:50 lukem Exp $ */
|
/* $NetBSD: itime.c,v 1.4 1997/04/15 01:09:50 lukem Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -99,6 +99,8 @@ readdumptimes(FILE *df)
|
|||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
dtwalk = calloc(1, sizeof(struct dumptime));
|
dtwalk = calloc(1, sizeof(struct dumptime));
|
||||||
|
if (dtwalk == NULL)
|
||||||
|
quit("allocation failed");
|
||||||
if (getrecord(df, &(dtwalk->dt_value)) < 0) {
|
if (getrecord(df, &(dtwalk->dt_value)) < 0) {
|
||||||
free(dtwalk);
|
free(dtwalk);
|
||||||
break;
|
break;
|
||||||
@ -114,6 +116,8 @@ readdumptimes(FILE *df)
|
|||||||
* record that we may have to add to the ddate structure
|
* record that we may have to add to the ddate structure
|
||||||
*/
|
*/
|
||||||
ddatev = calloc((unsigned) (nddates + 1), sizeof(struct dumpdates *));
|
ddatev = calloc((unsigned) (nddates + 1), sizeof(struct dumpdates *));
|
||||||
|
if (ddatev == NULL)
|
||||||
|
quit("allocation failed");
|
||||||
dtwalk = dthead;
|
dtwalk = dthead;
|
||||||
for (i = nddates - 1; i >= 0; i--, dtwalk = dtwalk->dt_next)
|
for (i = nddates - 1; i >= 0; i--, dtwalk = dtwalk->dt_next)
|
||||||
ddatev[i] = &dtwalk->dt_value;
|
ddatev[i] = &dtwalk->dt_value;
|
||||||
@ -192,6 +196,8 @@ putdumptime(void)
|
|||||||
* Enough room has been allocated.
|
* Enough room has been allocated.
|
||||||
*/
|
*/
|
||||||
dtwalk = ddatev[nddates] = calloc(1, sizeof(struct dumpdates));
|
dtwalk = ddatev[nddates] = calloc(1, sizeof(struct dumpdates));
|
||||||
|
if (dtwalk == NULL)
|
||||||
|
quit("allocation failed");
|
||||||
nddates += 1;
|
nddates += 1;
|
||||||
found:
|
found:
|
||||||
(void) strlcpy(dtwalk->dd_name, fname, sizeof(dtwalk->dd_name));
|
(void) strlcpy(dtwalk->dd_name, fname, sizeof(dtwalk->dd_name));
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: ugold.4,v 1.9 2023/12/08 06:33:48 miod Exp $
|
.\" $OpenBSD: ugold.4,v 1.10 2023/12/21 19:40:47 miod Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2013 Takayoshi SASANO <sasano@openbsd.org>
|
.\" Copyright (c) 2013 Takayoshi SASANO <sasano@openbsd.org>
|
||||||
.\" Copyright (c) 2013 Martin Pieuchot <mpi@openbsd.org>
|
.\" Copyright (c) 2013 Martin Pieuchot <mpi@openbsd.org>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: December 8 2023 $
|
.Dd $Mdocdate: December 21 2023 $
|
||||||
.Dt UGOLD 4
|
.Dt UGOLD 4
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -39,6 +39,7 @@ driver:
|
|||||||
.It Li "RDing TEMPer2_V4.1" Ta "2 Temperature (internal/external)"
|
.It Li "RDing TEMPer2_V4.1" Ta "2 Temperature (internal/external)"
|
||||||
.It Li "RDing TEMPerGold_V3.1" Ta "1 Temperature"
|
.It Li "RDing TEMPerGold_V3.1" Ta "1 Temperature"
|
||||||
.It Li "RDing TEMPerGold_V3.4" Ta "1 Temperature"
|
.It Li "RDing TEMPerGold_V3.4" Ta "1 Temperature"
|
||||||
|
.It Li "RDing TEMPerGold_V3.5" Ta "1 Temperature"
|
||||||
.It Li "RDing TEMPerHum1V1.0" Ta "1 Temperature and 1 Humidity"
|
.It Li "RDing TEMPerHum1V1.0" Ta "1 Temperature and 1 Humidity"
|
||||||
.It Li "RDing TEMPerHum1V1.2" Ta "1 Temperature and 1 Humidity"
|
.It Li "RDing TEMPerHum1V1.2" Ta "1 Temperature and 1 Humidity"
|
||||||
.It Li "RDing TEMPerHUM_V3.9" Ta "1 Temperature and 1 Humidity"
|
.It Li "RDing TEMPerHUM_V3.9" Ta "1 Temperature and 1 Humidity"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: Makefile,v 1.308 2022/11/05 19:29:45 cheloha Exp $
|
# $OpenBSD: Makefile,v 1.309 2023/12/21 02:57:14 jsg Exp $
|
||||||
# $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $
|
# $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $
|
||||||
|
|
||||||
# Makefile for section 9 (kernel function and variable) manual pages.
|
# Makefile for section 9 (kernel function and variable) manual pages.
|
||||||
@ -39,7 +39,8 @@ MAN= aml_evalnode.9 atomic_add_int.9 atomic_cas_uint.9 \
|
|||||||
sensor_attach.9 sigio_init.9 \
|
sensor_attach.9 sigio_init.9 \
|
||||||
SMR_LIST_INIT.9 SMR_PTR_GET.9 smr_call.9 \
|
SMR_LIST_INIT.9 SMR_PTR_GET.9 smr_call.9 \
|
||||||
spl.9 srp_enter.9 srpl_rc_init.9 startuphook_establish.9 socreate.9 \
|
spl.9 srp_enter.9 srpl_rc_init.9 startuphook_establish.9 socreate.9 \
|
||||||
sosplice.9 stoeplitz_to_key.9 strcmp.9 style.9 syscall.9 sysctl_int.9 \
|
sosplice.9 stoeplitz_to_key.9 strcmp.9 strnstr.9 \
|
||||||
|
style.9 syscall.9 sysctl_int.9 \
|
||||||
task_add.9 tc_init.9 tfind.9 thread_fork.9 \
|
task_add.9 tc_init.9 tfind.9 thread_fork.9 \
|
||||||
timeout.9 tsleep.9 tvtohz.9 \
|
timeout.9 tsleep.9 tvtohz.9 \
|
||||||
uiomove.9 \
|
uiomove.9 \
|
||||||
|
90
share/man/man9/strnstr.9
Normal file
90
share/man/man9/strnstr.9
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
.\" $OpenBSD: strnstr.9,v 1.1 2023/12/21 02:57:14 jsg Exp $
|
||||||
|
.\"
|
||||||
|
.\" Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>
|
||||||
|
.\" Copyright (c) 1990, 1991, 1993
|
||||||
|
.\" The Regents of the University of California. All rights reserved.
|
||||||
|
.\"
|
||||||
|
.\" This code is derived from software contributed to Berkeley by
|
||||||
|
.\" Chris Torek and the American National Standards Committee X3,
|
||||||
|
.\" on Information Processing Systems.
|
||||||
|
.\"
|
||||||
|
.\" Redistribution and use in source and binary forms, with or without
|
||||||
|
.\" modification, are permitted provided that the following conditions
|
||||||
|
.\" are met:
|
||||||
|
.\" 1. Redistributions of source code must retain the above copyright
|
||||||
|
.\" notice, this list of conditions and the following disclaimer.
|
||||||
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
.\" notice, this list of conditions and the following disclaimer in the
|
||||||
|
.\" documentation and/or other materials provided with the distribution.
|
||||||
|
.\" 3. Neither the name of the University nor the names of its contributors
|
||||||
|
.\" may be used to endorse or promote products derived from this software
|
||||||
|
.\" without specific prior written permission.
|
||||||
|
.\"
|
||||||
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||||
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
.\" SUCH DAMAGE.
|
||||||
|
.\"
|
||||||
|
.Dd $Mdocdate: December 21 2023 $
|
||||||
|
.Dt STRNSTR 9
|
||||||
|
.Os
|
||||||
|
.Sh NAME
|
||||||
|
.Nm strnstr
|
||||||
|
.Nd locate a substring in a string
|
||||||
|
.Sh SYNOPSIS
|
||||||
|
.In lib/libkern/libkern.h
|
||||||
|
.Ft char *
|
||||||
|
.Fn strnstr "const char *big" "const char *little" "size_t len"
|
||||||
|
.Sh DESCRIPTION
|
||||||
|
The
|
||||||
|
.Fn strnstr
|
||||||
|
function
|
||||||
|
locates the first occurrence of the null-terminated string
|
||||||
|
.Fa little
|
||||||
|
in the string
|
||||||
|
.Fa big ,
|
||||||
|
where not more than
|
||||||
|
.Fa len
|
||||||
|
characters are searched.
|
||||||
|
Characters that appear after a
|
||||||
|
.Ql \e0
|
||||||
|
character are not searched.
|
||||||
|
.Sh RETURN VALUES
|
||||||
|
If
|
||||||
|
.Fa little
|
||||||
|
is an empty string,
|
||||||
|
.Fa big
|
||||||
|
is returned;
|
||||||
|
if
|
||||||
|
.Fa little
|
||||||
|
occurs nowhere in
|
||||||
|
.Fa big ,
|
||||||
|
.Dv NULL
|
||||||
|
is returned;
|
||||||
|
otherwise a pointer to the first character of the first occurrence of
|
||||||
|
.Fa little
|
||||||
|
is returned.
|
||||||
|
.Sh EXAMPLES
|
||||||
|
The following sets the pointer
|
||||||
|
.Va ptr
|
||||||
|
to
|
||||||
|
.Dv NULL ,
|
||||||
|
because only the first 4 characters of
|
||||||
|
.Va largestring
|
||||||
|
are searched:
|
||||||
|
.Bd -literal -offset indent
|
||||||
|
const char *largestring = "Foo Bar Baz";
|
||||||
|
const char *smallstring = "Bar";
|
||||||
|
char *ptr;
|
||||||
|
|
||||||
|
ptr = strnstr(largestring, smallstring, 4);
|
||||||
|
.Ed
|
||||||
|
.Sh SEE ALSO
|
||||||
|
.Xr memchr 9
|
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: files,v 1.726 2023/11/21 14:00:13 bluhm Exp $
|
# $OpenBSD: files,v 1.727 2023/12/21 02:57:14 jsg Exp $
|
||||||
# $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $
|
# $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $
|
||||||
|
|
||||||
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
|
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
|
||||||
@ -1075,6 +1075,7 @@ file lib/libkern/arch/${MACHINE_ARCH}/strlen.S | lib/libkern/strlen.c
|
|||||||
file lib/libkern/arch/${MACHINE_ARCH}/strncmp.S | lib/libkern/strncmp.c
|
file lib/libkern/arch/${MACHINE_ARCH}/strncmp.S | lib/libkern/strncmp.c
|
||||||
file lib/libkern/arch/${MACHINE_ARCH}/strncpy.S | lib/libkern/strncpy.c
|
file lib/libkern/arch/${MACHINE_ARCH}/strncpy.S | lib/libkern/strncpy.c
|
||||||
file lib/libkern/arch/${MACHINE_ARCH}/strnlen.S | lib/libkern/strnlen.c
|
file lib/libkern/arch/${MACHINE_ARCH}/strnlen.S | lib/libkern/strnlen.c
|
||||||
|
file lib/libkern/arch/${MACHINE_ARCH}/strnstr.S | lib/libkern/strnstr.c
|
||||||
file lib/libkern/arch/${MACHINE_ARCH}/scanc.S | lib/libkern/scanc.c
|
file lib/libkern/arch/${MACHINE_ARCH}/scanc.S | lib/libkern/scanc.c
|
||||||
file lib/libkern/arch/${MACHINE_ARCH}/skpc.S | lib/libkern/skpc.c
|
file lib/libkern/arch/${MACHINE_ARCH}/skpc.S | lib/libkern/skpc.c
|
||||||
file lib/libkern/arch/${MACHINE_ARCH}/htonl.S | lib/libkern/htonl.c
|
file lib/libkern/arch/${MACHINE_ARCH}/htonl.S | lib/libkern/htonl.c
|
||||||
|
@ -53,7 +53,6 @@ static bool is_fru_eeprom_supported(struct amdgpu_device *adev)
|
|||||||
*/
|
*/
|
||||||
switch (adev->asic_type) {
|
switch (adev->asic_type) {
|
||||||
case CHIP_VEGA20:
|
case CHIP_VEGA20:
|
||||||
#ifdef notyet
|
|
||||||
/* D161 and D163 are the VG20 server SKUs */
|
/* D161 and D163 are the VG20 server SKUs */
|
||||||
if (strnstr(atom_ctx->vbios_version, "D161",
|
if (strnstr(atom_ctx->vbios_version, "D161",
|
||||||
sizeof(atom_ctx->vbios_version)) ||
|
sizeof(atom_ctx->vbios_version)) ||
|
||||||
@ -61,13 +60,11 @@ static bool is_fru_eeprom_supported(struct amdgpu_device *adev)
|
|||||||
sizeof(atom_ctx->vbios_version)))
|
sizeof(atom_ctx->vbios_version)))
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
return false;
|
return false;
|
||||||
case CHIP_ALDEBARAN:
|
case CHIP_ALDEBARAN:
|
||||||
/* All Aldebaran SKUs have the FRU */
|
/* All Aldebaran SKUs have the FRU */
|
||||||
return true;
|
return true;
|
||||||
case CHIP_SIENNA_CICHLID:
|
case CHIP_SIENNA_CICHLID:
|
||||||
#ifdef notyet
|
|
||||||
if (strnstr(atom_ctx->vbios_version, "D603",
|
if (strnstr(atom_ctx->vbios_version, "D603",
|
||||||
sizeof(atom_ctx->vbios_version))) {
|
sizeof(atom_ctx->vbios_version))) {
|
||||||
if (strnstr(atom_ctx->vbios_version, "D603GLXE",
|
if (strnstr(atom_ctx->vbios_version, "D603GLXE",
|
||||||
@ -78,9 +75,6 @@ static bool is_fru_eeprom_supported(struct amdgpu_device *adev)
|
|||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2327,13 +2327,11 @@ static void amdgpu_ras_get_quirks(struct amdgpu_device *adev)
|
|||||||
if (!ctx)
|
if (!ctx)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef notyet
|
|
||||||
if (strnstr(ctx->vbios_version, "D16406",
|
if (strnstr(ctx->vbios_version, "D16406",
|
||||||
sizeof(ctx->vbios_version)) ||
|
sizeof(ctx->vbios_version)) ||
|
||||||
strnstr(ctx->vbios_version, "D36002",
|
strnstr(ctx->vbios_version, "D36002",
|
||||||
sizeof(ctx->vbios_version)))
|
sizeof(ctx->vbios_version)))
|
||||||
adev->ras_hw_enabled |= (1 << AMDGPU_RAS_BLOCK__GFX);
|
adev->ras_hw_enabled |= (1 << AMDGPU_RAS_BLOCK__GFX);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -149,44 +149,29 @@ static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev,
|
|||||||
/* VEGA20 and ARCTURUS */
|
/* VEGA20 and ARCTURUS */
|
||||||
if (adev->asic_type == CHIP_VEGA20)
|
if (adev->asic_type == CHIP_VEGA20)
|
||||||
control->i2c_address = EEPROM_I2C_MADDR_0;
|
control->i2c_address = EEPROM_I2C_MADDR_0;
|
||||||
#ifdef notyet
|
|
||||||
else if (strnstr(atom_ctx->vbios_version,
|
else if (strnstr(atom_ctx->vbios_version,
|
||||||
"D342",
|
"D342",
|
||||||
sizeof(atom_ctx->vbios_version)))
|
sizeof(atom_ctx->vbios_version)))
|
||||||
control->i2c_address = EEPROM_I2C_MADDR_0;
|
control->i2c_address = EEPROM_I2C_MADDR_0;
|
||||||
else
|
else
|
||||||
control->i2c_address = EEPROM_I2C_MADDR_4;
|
control->i2c_address = EEPROM_I2C_MADDR_4;
|
||||||
#else
|
|
||||||
STUB();
|
|
||||||
control->i2c_address = EEPROM_I2C_MADDR_4;
|
|
||||||
#endif
|
|
||||||
return true;
|
return true;
|
||||||
case IP_VERSION(11, 0, 7):
|
case IP_VERSION(11, 0, 7):
|
||||||
control->i2c_address = EEPROM_I2C_MADDR_0;
|
control->i2c_address = EEPROM_I2C_MADDR_0;
|
||||||
return true;
|
return true;
|
||||||
case IP_VERSION(13, 0, 2):
|
case IP_VERSION(13, 0, 2):
|
||||||
#ifdef notyet
|
|
||||||
if (strnstr(atom_ctx->vbios_version, "D673",
|
if (strnstr(atom_ctx->vbios_version, "D673",
|
||||||
sizeof(atom_ctx->vbios_version)))
|
sizeof(atom_ctx->vbios_version)))
|
||||||
control->i2c_address = EEPROM_I2C_MADDR_4;
|
control->i2c_address = EEPROM_I2C_MADDR_4;
|
||||||
else
|
else
|
||||||
control->i2c_address = EEPROM_I2C_MADDR_0;
|
control->i2c_address = EEPROM_I2C_MADDR_0;
|
||||||
#else
|
|
||||||
STUB();
|
|
||||||
control->i2c_address = EEPROM_I2C_MADDR_0;
|
|
||||||
#endif
|
|
||||||
return true;
|
return true;
|
||||||
case IP_VERSION(13, 0, 0):
|
case IP_VERSION(13, 0, 0):
|
||||||
#ifdef notyet
|
|
||||||
if (strnstr(atom_ctx->vbios_pn, "D707",
|
if (strnstr(atom_ctx->vbios_pn, "D707",
|
||||||
sizeof(atom_ctx->vbios_pn)))
|
sizeof(atom_ctx->vbios_pn)))
|
||||||
control->i2c_address = EEPROM_I2C_MADDR_0;
|
control->i2c_address = EEPROM_I2C_MADDR_0;
|
||||||
else
|
else
|
||||||
control->i2c_address = EEPROM_I2C_MADDR_4;
|
control->i2c_address = EEPROM_I2C_MADDR_4;
|
||||||
#else
|
|
||||||
STUB();
|
|
||||||
control->i2c_address = EEPROM_I2C_MADDR_4;
|
|
||||||
#endif
|
|
||||||
return true;
|
return true;
|
||||||
case IP_VERSION(13, 0, 6):
|
case IP_VERSION(13, 0, 6):
|
||||||
case IP_VERSION(13, 0, 10):
|
case IP_VERSION(13, 0, 10):
|
||||||
|
@ -631,13 +631,14 @@ static void amdgpu_vm_pt_free(struct amdgpu_vm_bo_base *entry)
|
|||||||
|
|
||||||
if (!entry->bo)
|
if (!entry->bo)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
entry->bo->vm_bo = NULL;
|
||||||
shadow = amdgpu_bo_shadowed(entry->bo);
|
shadow = amdgpu_bo_shadowed(entry->bo);
|
||||||
if (shadow) {
|
if (shadow) {
|
||||||
ttm_bo_set_bulk_move(&shadow->tbo, NULL);
|
ttm_bo_set_bulk_move(&shadow->tbo, NULL);
|
||||||
amdgpu_bo_unref(&shadow);
|
amdgpu_bo_unref(&shadow);
|
||||||
}
|
}
|
||||||
ttm_bo_set_bulk_move(&entry->bo->tbo, NULL);
|
ttm_bo_set_bulk_move(&entry->bo->tbo, NULL);
|
||||||
entry->bo->vm_bo = NULL;
|
|
||||||
|
|
||||||
spin_lock(&entry->vm->status_lock);
|
spin_lock(&entry->vm->status_lock);
|
||||||
list_del(&entry->vm_status);
|
list_del(&entry->vm_status);
|
||||||
|
@ -1690,6 +1690,32 @@ static void sdma_v5_2_get_clockgating_state(void *handle, u64 *flags)
|
|||||||
*flags |= AMD_CG_SUPPORT_SDMA_LS;
|
*flags |= AMD_CG_SUPPORT_SDMA_LS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void sdma_v5_2_ring_begin_use(struct amdgpu_ring *ring)
|
||||||
|
{
|
||||||
|
struct amdgpu_device *adev = ring->adev;
|
||||||
|
|
||||||
|
/* SDMA 5.2.3 (RMB) FW doesn't seem to properly
|
||||||
|
* disallow GFXOFF in some cases leading to
|
||||||
|
* hangs in SDMA. Disallow GFXOFF while SDMA is active.
|
||||||
|
* We can probably just limit this to 5.2.3,
|
||||||
|
* but it shouldn't hurt for other parts since
|
||||||
|
* this GFXOFF will be disallowed anyway when SDMA is
|
||||||
|
* active, this just makes it explicit.
|
||||||
|
*/
|
||||||
|
amdgpu_gfx_off_ctrl(adev, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void sdma_v5_2_ring_end_use(struct amdgpu_ring *ring)
|
||||||
|
{
|
||||||
|
struct amdgpu_device *adev = ring->adev;
|
||||||
|
|
||||||
|
/* SDMA 5.2.3 (RMB) FW doesn't seem to properly
|
||||||
|
* disallow GFXOFF in some cases leading to
|
||||||
|
* hangs in SDMA. Allow GFXOFF when SDMA is complete.
|
||||||
|
*/
|
||||||
|
amdgpu_gfx_off_ctrl(adev, true);
|
||||||
|
}
|
||||||
|
|
||||||
const struct amd_ip_funcs sdma_v5_2_ip_funcs = {
|
const struct amd_ip_funcs sdma_v5_2_ip_funcs = {
|
||||||
.name = "sdma_v5_2",
|
.name = "sdma_v5_2",
|
||||||
.early_init = sdma_v5_2_early_init,
|
.early_init = sdma_v5_2_early_init,
|
||||||
@ -1738,6 +1764,8 @@ static const struct amdgpu_ring_funcs sdma_v5_2_ring_funcs = {
|
|||||||
.test_ib = sdma_v5_2_ring_test_ib,
|
.test_ib = sdma_v5_2_ring_test_ib,
|
||||||
.insert_nop = sdma_v5_2_ring_insert_nop,
|
.insert_nop = sdma_v5_2_ring_insert_nop,
|
||||||
.pad_ib = sdma_v5_2_ring_pad_ib,
|
.pad_ib = sdma_v5_2_ring_pad_ib,
|
||||||
|
.begin_use = sdma_v5_2_ring_begin_use,
|
||||||
|
.end_use = sdma_v5_2_ring_end_use,
|
||||||
.emit_wreg = sdma_v5_2_ring_emit_wreg,
|
.emit_wreg = sdma_v5_2_ring_emit_wreg,
|
||||||
.emit_reg_wait = sdma_v5_2_ring_emit_reg_wait,
|
.emit_reg_wait = sdma_v5_2_ring_emit_reg_wait,
|
||||||
.emit_reg_write_reg_wait = sdma_v5_2_ring_emit_reg_write_reg_wait,
|
.emit_reg_write_reg_wait = sdma_v5_2_ring_emit_reg_write_reg_wait,
|
||||||
|
@ -816,6 +816,8 @@ bool is_psr_su_specific_panel(struct dc_link *link)
|
|||||||
((dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x08) ||
|
((dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x08) ||
|
||||||
(dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x07)))
|
(dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x07)))
|
||||||
isPSRSUSupported = false;
|
isPSRSUSupported = false;
|
||||||
|
else if (dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x03)
|
||||||
|
isPSRSUSupported = false;
|
||||||
else if (dpcd_caps->psr_info.force_psrsu_cap == 0x1)
|
else if (dpcd_caps->psr_info.force_psrsu_cap == 0x1)
|
||||||
isPSRSUSupported = true;
|
isPSRSUSupported = true;
|
||||||
}
|
}
|
||||||
|
@ -1441,8 +1441,20 @@ static u32 calc_plane_remap_info(const struct intel_framebuffer *fb, int color_p
|
|||||||
|
|
||||||
size += remap_info->size;
|
size += remap_info->size;
|
||||||
} else {
|
} else {
|
||||||
unsigned int dst_stride = plane_view_dst_stride_tiles(fb, color_plane,
|
unsigned int dst_stride;
|
||||||
remap_info->width);
|
|
||||||
|
/*
|
||||||
|
* The hardware automagically calculates the CCS AUX surface
|
||||||
|
* stride from the main surface stride so can't really remap a
|
||||||
|
* smaller subset (unless we'd remap in whole AUX page units).
|
||||||
|
*/
|
||||||
|
if (intel_fb_needs_pot_stride_remap(fb) &&
|
||||||
|
intel_fb_is_ccs_modifier(fb->base.modifier))
|
||||||
|
dst_stride = remap_info->src_stride;
|
||||||
|
else
|
||||||
|
dst_stride = remap_info->width;
|
||||||
|
|
||||||
|
dst_stride = plane_view_dst_stride_tiles(fb, color_plane, dst_stride);
|
||||||
|
|
||||||
assign_chk_ovf(i915, remap_info->dst_stride, dst_stride);
|
assign_chk_ovf(i915, remap_info->dst_stride, dst_stride);
|
||||||
color_plane_info->mapping_stride = dst_stride *
|
color_plane_info->mapping_stride = dst_stride *
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: ugold.c,v 1.26 2023/12/10 19:03:37 miod Exp $ */
|
/* $OpenBSD: ugold.c,v 1.27 2023/12/21 19:40:47 miod Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013 Takayoshi SASANO <uaa@openbsd.org>
|
* Copyright (c) 2013 Takayoshi SASANO <uaa@openbsd.org>
|
||||||
@ -498,8 +498,14 @@ ugold_si700x_type(struct ugold_softc *sc)
|
|||||||
/* TEMPerGold prefix */
|
/* TEMPerGold prefix */
|
||||||
if (sc->sc_model_len >= 11 &&
|
if (sc->sc_model_len >= 11 &&
|
||||||
memcmp(sc->sc_model, "TEMPerGold_", 11) == 0) {
|
memcmp(sc->sc_model, "TEMPerGold_", 11) == 0) {
|
||||||
|
/*
|
||||||
|
* All V3.something models ought to work, but better be
|
||||||
|
* safe than sorry, and TEMPerHum models have been known
|
||||||
|
* to use slightly different sensors between models.
|
||||||
|
*/
|
||||||
if (memcmp(sc->sc_model + 11, "V3.1 ", 16 - 11) == 0 ||
|
if (memcmp(sc->sc_model + 11, "V3.1 ", 16 - 11) == 0 ||
|
||||||
memcmp(sc->sc_model + 11, "V3.4 ", 16 - 11) == 0) {
|
memcmp(sc->sc_model + 11, "V3.4 ", 16 - 11) == 0 ||
|
||||||
|
memcmp(sc->sc_model + 11, "V3.5 ", 16 - 11) == 0) {
|
||||||
sc->sc_type = UGOLD_TYPE_GOLD;
|
sc->sc_type = UGOLD_TYPE_GOLD;
|
||||||
sc->sc_num_sensors = 1;
|
sc->sc_num_sensors = 1;
|
||||||
descr = "gold (temperature only)";
|
descr = "gold (temperature only)";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#! /bin/sh -
|
#! /bin/sh -
|
||||||
# $OpenBSD: makesyscalls.sh,v 1.20 2023/04/07 09:43:38 tb Exp $
|
# $OpenBSD: makesyscalls.sh,v 1.21 2023/12/21 19:34:07 miod Exp $
|
||||||
# $NetBSD: makesyscalls.sh,v 1.26 1998/01/09 06:17:51 thorpej Exp $
|
# $NetBSD: makesyscalls.sh,v 1.26 1998/01/09 06:17:51 thorpej Exp $
|
||||||
#
|
#
|
||||||
# Copyright (c) 1994,1996 Christopher G. Demetriou
|
# Copyright (c) 1994,1996 Christopher G. Demetriou
|
||||||
@ -296,10 +296,6 @@ function parseline() {
|
|||||||
# arguments, they must still have arguments specified for
|
# arguments, they must still have arguments specified for
|
||||||
# the remaining argument "positions," because of the way the
|
# the remaining argument "positions," because of the way the
|
||||||
# kernel system call argument handling works.
|
# kernel system call argument handling works.
|
||||||
#
|
|
||||||
# Indirect system calls, e.g. syscall(), are exceptions to this
|
|
||||||
# rule, since they are handled entirely by machine-dependent code
|
|
||||||
# and do not need argument structures built.
|
|
||||||
|
|
||||||
isvarargs = 0;
|
isvarargs = 0;
|
||||||
while (f <= end) {
|
while (f <= end) {
|
||||||
@ -326,16 +322,13 @@ function parseline() {
|
|||||||
}
|
}
|
||||||
# must see another argument after varargs notice.
|
# must see another argument after varargs notice.
|
||||||
if (isvarargs) {
|
if (isvarargs) {
|
||||||
if (argc == varargc && $2 != "INDIR")
|
if (argc == varargc)
|
||||||
parserr($f, "argument definition")
|
parserr($f, "argument definition")
|
||||||
} else
|
} else
|
||||||
varargc = argc;
|
varargc = argc;
|
||||||
}
|
}
|
||||||
function putent(nodefs, compatwrap) {
|
function putent(nodefs, compatwrap) {
|
||||||
# output syscall declaration for switch table. INDIR functions
|
# output syscall declaration for switch table.
|
||||||
# get none, since they always have sys_nosys() for their table
|
|
||||||
# entries.
|
|
||||||
if (nodefs != "INDIR") {
|
|
||||||
prototype = "(struct proc *, void *, register_t *)"
|
prototype = "(struct proc *, void *, register_t *)"
|
||||||
if (compatwrap == "")
|
if (compatwrap == "")
|
||||||
printf("int\t%s%s;\n", funcname,
|
printf("int\t%s%s;\n", funcname,
|
||||||
@ -343,13 +336,8 @@ function putent(nodefs, compatwrap) {
|
|||||||
else
|
else
|
||||||
printf("int\t%s_%s%s;\n", compatwrap, funcname,
|
printf("int\t%s_%s%s;\n", compatwrap, funcname,
|
||||||
prototype) > sysprotos
|
prototype) > sysprotos
|
||||||
}
|
|
||||||
|
|
||||||
# output syscall switch entry
|
# output syscall switch entry
|
||||||
if (nodefs == "INDIR") {
|
|
||||||
printf("\t{ 0, 0, %s,\n\t sys_nosys },\t\t\t/* %d = %s (indir) */\n", \
|
|
||||||
sycall_flags, syscall, funcalias) > sysent
|
|
||||||
} else {
|
|
||||||
# printf("\t{ { %d", argc) > sysent
|
# printf("\t{ { %d", argc) > sysent
|
||||||
# for (i = 1; i <= argc; i++) {
|
# for (i = 1; i <= argc; i++) {
|
||||||
# if (i == 5) # wrap the line
|
# if (i == 5) # wrap the line
|
||||||
@ -378,7 +366,6 @@ function putent(nodefs, compatwrap) {
|
|||||||
else
|
else
|
||||||
printf("/* %d = %s %s */\n", syscall, compatwrap,
|
printf("/* %d = %s %s */\n", syscall, compatwrap,
|
||||||
funcalias) > sysent
|
funcalias) > sysent
|
||||||
}
|
|
||||||
|
|
||||||
# output syscall name for names table
|
# output syscall name for names table
|
||||||
if (compatwrap == "")
|
if (compatwrap == "")
|
||||||
@ -389,7 +376,7 @@ function putent(nodefs, compatwrap) {
|
|||||||
funcalias, syscall, compatwrap, funcalias) > sysnames
|
funcalias, syscall, compatwrap, funcalias) > sysnames
|
||||||
|
|
||||||
# output syscall number of header, if appropriate
|
# output syscall number of header, if appropriate
|
||||||
if (nodefs == "" || nodefs == "NOARGS" || nodefs == "INDIR") {
|
if (nodefs == "" || nodefs == "NOARGS") {
|
||||||
# output a prototype, to be used to generate lint stubs in
|
# output a prototype, to be used to generate lint stubs in
|
||||||
# libc.
|
# libc.
|
||||||
printf("/* syscall: \"%s\" ret: \"%s\" args:", funcalias,
|
printf("/* syscall: \"%s\" ret: \"%s\" args:", funcalias,
|
||||||
@ -410,7 +397,7 @@ function putent(nodefs, compatwrap) {
|
|||||||
compatwrap, funcalias) > sysnumhdr
|
compatwrap, funcalias) > sysnumhdr
|
||||||
|
|
||||||
# output syscall argument structure, if it has arguments
|
# output syscall argument structure, if it has arguments
|
||||||
if (argc != 0 && nodefs != "NOARGS" && nodefs != "INDIR") {
|
if (argc != 0 && nodefs != "NOARGS") {
|
||||||
if (compatwrap == "")
|
if (compatwrap == "")
|
||||||
printf("\nstruct %s_args {\n", funcname) > sysarghdr
|
printf("\nstruct %s_args {\n", funcname) > sysarghdr
|
||||||
else
|
else
|
||||||
@ -428,7 +415,7 @@ $2 == "STD" {
|
|||||||
syscall++
|
syscall++
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
$2 == "NODEF" || $2 == "NOARGS" || $2 == "INDIR" {
|
$2 == "NODEF" || $2 == "NOARGS" {
|
||||||
parseline()
|
parseline()
|
||||||
putent($2, "")
|
putent($2, "")
|
||||||
syscall++
|
syscall++
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; $OpenBSD: syscalls.master,v 1.255 2023/12/19 06:58:36 deraadt Exp $
|
; $OpenBSD: syscalls.master,v 1.256 2023/12/21 19:34:07 miod Exp $
|
||||||
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
|
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
|
||||||
|
|
||||||
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
|
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
|
||||||
@ -12,8 +12,6 @@
|
|||||||
; compatibility options defined in syscalls.conf
|
; compatibility options defined in syscalls.conf
|
||||||
;
|
;
|
||||||
; types:
|
; types:
|
||||||
; INDIR included, but don't define the syscall args structure,
|
|
||||||
; and allow it to be "really" varargs
|
|
||||||
; NOARGS included, but don't define the syscall args structure
|
; NOARGS included, but don't define the syscall args structure
|
||||||
; NODEF included, but don't define the syscall number
|
; NODEF included, but don't define the syscall number
|
||||||
; NOLOCK don't acquire the kernel lock when calling this syscall
|
; NOLOCK don't acquire the kernel lock when calling this syscall
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: libkern.h,v 1.36 2020/02/26 14:23:15 visa Exp $ */
|
/* $OpenBSD: libkern.h,v 1.37 2023/12/21 02:57:14 jsg Exp $ */
|
||||||
/* $NetBSD: libkern.h,v 1.7 1996/03/14 18:52:08 christos Exp $ */
|
/* $NetBSD: libkern.h,v 1.7 1996/03/14 18:52:08 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -167,5 +167,6 @@ size_t getsn(char *, size_t)
|
|||||||
char *strchr(const char *, int);
|
char *strchr(const char *, int);
|
||||||
char *strrchr(const char *, int);
|
char *strrchr(const char *, int);
|
||||||
int timingsafe_bcmp(const void *, const void *, size_t);
|
int timingsafe_bcmp(const void *, const void *, size_t);
|
||||||
|
char *strnstr(const char *, const char *, size_t);
|
||||||
|
|
||||||
#endif /* __LIBKERN_H__ */
|
#endif /* __LIBKERN_H__ */
|
||||||
|
62
sys/lib/libkern/strnstr.c
Normal file
62
sys/lib/libkern/strnstr.c
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
/* $OpenBSD: strnstr.c,v 1.1 2023/12/21 02:57:14 jsg Exp $ */
|
||||||
|
|
||||||
|
/*-
|
||||||
|
* Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>
|
||||||
|
* Copyright (c) 1990, 1993
|
||||||
|
* The Regents of the University of California. All rights reserved.
|
||||||
|
*
|
||||||
|
* This code is derived from software contributed to Berkeley by
|
||||||
|
* Chris Torek.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* 3. Neither the name of the University nor the names of its contributors
|
||||||
|
* may be used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
* SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <lib/libkern/libkern.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find the first occurrence of find in s, where the search is limited to the
|
||||||
|
* first slen characters of s.
|
||||||
|
*/
|
||||||
|
char *
|
||||||
|
strnstr(const char *s, const char *find, size_t slen)
|
||||||
|
{
|
||||||
|
char c, sc;
|
||||||
|
size_t len;
|
||||||
|
|
||||||
|
if ((c = *find++) != '\0') {
|
||||||
|
len = strlen(find);
|
||||||
|
do {
|
||||||
|
do {
|
||||||
|
if (slen-- < 1 || (sc = *s++) == '\0')
|
||||||
|
return (NULL);
|
||||||
|
} while (sc != c);
|
||||||
|
if (len > slen)
|
||||||
|
return (NULL);
|
||||||
|
} while (strncmp(s, find, len) != 0);
|
||||||
|
s--;
|
||||||
|
}
|
||||||
|
return ((char *)s);
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: cu.c,v 1.29 2023/10/02 14:48:11 krw Exp $ */
|
/* $OpenBSD: cu.c,v 1.30 2023/12/21 11:25:38 jca Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012 Nicholas Marriott <nicm@openbsd.org>
|
* Copyright (c) 2012 Nicholas Marriott <nicm@openbsd.org>
|
||||||
@ -507,7 +507,7 @@ find_ucom(const char *usbid, char *names)
|
|||||||
if (names == NULL)
|
if (names == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* names is a comma separated list of "ucom<unit#>-<usb id>". */
|
/* names is a comma separated list of "ucom<unit#>:<usb id>". */
|
||||||
cua = NULL;
|
cua = NULL;
|
||||||
for (ucom = strsep(&names, ","); ucom; ucom = strsep(&names, ",")) {
|
for (ucom = strsep(&names, ","); ucom; ucom = strsep(&names, ",")) {
|
||||||
if (*ucom == '\0' || strncasecmp(ucom, "ucom", 4))
|
if (*ucom == '\0' || strncasecmp(ucom, "ucom", 4))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: application.c,v 1.40 2023/11/16 14:35:25 martijn Exp $ */
|
/* $OpenBSD: application.c,v 1.41 2023/12/21 12:43:30 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Martijn van Duren <martijn@openbsd.org>
|
* Copyright (c) 2021 Martijn van Duren <martijn@openbsd.org>
|
||||||
@ -17,7 +17,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
|
#include <sys/time.h>
|
||||||
#include <sys/tree.h>
|
#include <sys/tree.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: application_agentx.c,v 1.14 2023/11/06 11:04:41 martijn Exp $ */
|
/* $OpenBSD: application_agentx.c,v 1.15 2023/12/21 12:43:30 martijn Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Martijn van Duren <martijn@openbsd.org>
|
* Copyright (c) 2022 Martijn van Duren <martijn@openbsd.org>
|
||||||
*
|
*
|
||||||
@ -18,15 +18,16 @@
|
|||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/time.h>
|
#include <sys/tree.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
|
||||||
|
#include <ber.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <event.h>
|
#include <event.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdlib.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: application_blocklist.c,v 1.1 2022/06/30 11:28:36 martijn Exp $ */
|
/* $OpenBSD: application_blocklist.c,v 1.2 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Martijn van Duren <martijn@openbsd.org>
|
* Copyright (c) 2022 Martijn van Duren <martijn@openbsd.org>
|
||||||
@ -16,10 +16,16 @@
|
|||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <event.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include <ber.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "application.h"
|
#include "application.h"
|
||||||
|
#include "log.h"
|
||||||
#include "snmpd.h"
|
#include "snmpd.h"
|
||||||
|
|
||||||
struct appl_varbind *appl_blocklist_response(size_t);
|
struct appl_varbind *appl_blocklist_response(size_t);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: application_internal.c,v 1.10 2023/12/18 09:42:57 martijn Exp $ */
|
/* $OpenBSD: application_internal.c,v 1.11 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023 Martijn van Duren <martijn@openbsd.org>
|
* Copyright (c) 2023 Martijn van Duren <martijn@openbsd.org>
|
||||||
@ -17,17 +17,21 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/tree.h>
|
#include <sys/tree.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include <ber.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <event.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include "application.h"
|
#include "application.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "mib.h"
|
#include "mib.h"
|
||||||
#include "smi.h"
|
#include "smi.h"
|
||||||
|
#include "snmp.h"
|
||||||
#include "snmpd.h"
|
#include "snmpd.h"
|
||||||
|
|
||||||
struct appl_internal_object {
|
struct appl_internal_object {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: ax.c,v 1.3 2023/10/24 08:54:52 martijn Exp $ */
|
/* $OpenBSD: ax.c,v 1.4 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019 Martijn van Duren <martijn@openbsd.org>
|
* Copyright (c) 2019 Martijn van Duren <martijn@openbsd.org>
|
||||||
*
|
*
|
||||||
@ -26,7 +26,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "ax.h"
|
#include "ax.h"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: ax.h,v 1.2 2023/10/24 08:54:52 martijn Exp $ */
|
/* $OpenBSD: ax.h,v 1.3 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019 Martijn van Duren <martijn@openbsd.org>
|
* Copyright (c) 2019 Martijn van Duren <martijn@openbsd.org>
|
||||||
*
|
*
|
||||||
@ -15,6 +15,9 @@
|
|||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#include <endian.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define AX_PDU_FLAG_INSTANCE_REGISTRATION (1 << 0)
|
#define AX_PDU_FLAG_INSTANCE_REGISTRATION (1 << 0)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: log.c,v 1.16 2017/03/21 12:06:56 bluhm Exp $ */
|
/* $OpenBSD: log.c,v 1.17 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
|
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
|
||||||
@ -16,6 +16,8 @@
|
|||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: mib.h,v 1.42 2023/11/08 19:43:29 martijn Exp $ */
|
/* $OpenBSD: mib.h,v 1.43 2023/12/21 13:54:05 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
|
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
|
||||||
@ -19,6 +19,10 @@
|
|||||||
#ifndef SNMPD_MIB_H
|
#ifndef SNMPD_MIB_H
|
||||||
#define SNMPD_MIB_H
|
#define SNMPD_MIB_H
|
||||||
|
|
||||||
|
#define MIBDECL(...) { { MIB_##__VA_ARGS__ }, \
|
||||||
|
(sizeof((uint32_t []) { MIB_##__VA_ARGS__ }) / sizeof(uint32_t))}, #__VA_ARGS__
|
||||||
|
#define MIBEND { { 0 } }, NULL
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Adding new MIBs:
|
* Adding new MIBs:
|
||||||
* - add the OID definitions below
|
* - add the OID definitions below
|
||||||
@ -1395,6 +1399,4 @@
|
|||||||
{ MIBEND } \
|
{ MIBEND } \
|
||||||
}
|
}
|
||||||
|
|
||||||
void mib_init(void);
|
|
||||||
|
|
||||||
#endif /* SNMPD_MIB_H */
|
#endif /* SNMPD_MIB_H */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: parse.y,v 1.85 2023/12/18 16:58:26 martijn Exp $ */
|
/* $OpenBSD: parse.y,v 1.86 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
|
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
|
||||||
@ -23,40 +23,41 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
#include <sys/tree.h>
|
#include <sys/socket.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/un.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <net/if.h>
|
|
||||||
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
|
|
||||||
|
#include <ber.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <event.h>
|
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <string.h>
|
#include <stdarg.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "application.h"
|
#include "application.h"
|
||||||
#include "snmpd.h"
|
#include "log.h"
|
||||||
#include "mib.h"
|
#include "mib.h"
|
||||||
|
#include "snmpd.h"
|
||||||
|
#include "snmp.h"
|
||||||
|
|
||||||
TAILQ_HEAD(files, file) files = TAILQ_HEAD_INITIALIZER(files);
|
TAILQ_HEAD(files, file) files = TAILQ_HEAD_INITIALIZER(files);
|
||||||
static struct file {
|
static struct file {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: proc.c,v 1.28 2023/02/15 20:44:01 tobhe Exp $ */
|
/* $OpenBSD: proc.c,v 1.29 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org>
|
* Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org>
|
||||||
@ -17,14 +17,13 @@
|
|||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/queue.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -34,6 +33,7 @@
|
|||||||
#include <event.h>
|
#include <event.h>
|
||||||
#include <imsg.h>
|
#include <imsg.h>
|
||||||
|
|
||||||
|
#include "log.h"
|
||||||
#include "snmpd.h"
|
#include "snmpd.h"
|
||||||
|
|
||||||
void proc_exec(struct privsep *, struct privsep_proc *, unsigned int, int,
|
void proc_exec(struct privsep *, struct privsep_proc *, unsigned int, int,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: smi.c,v 1.38 2023/11/12 20:14:39 martijn Exp $ */
|
/* $OpenBSD: smi.c,v 1.39 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
|
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
|
||||||
@ -16,37 +16,26 @@
|
|||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/queue.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
#include <sys/tree.h>
|
#include <sys/tree.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/time.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <net/if.h>
|
|
||||||
#include <net/if_dl.h>
|
|
||||||
#include <net/if_arp.h>
|
|
||||||
#include <net/if_media.h>
|
|
||||||
#include <net/route.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <netinet/if_ether.h>
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <ber.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <event.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <pwd.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <vis.h>
|
#include <vis.h>
|
||||||
|
|
||||||
#include "snmpd.h"
|
#include "log.h"
|
||||||
#include "mib.h"
|
#include "mib.h"
|
||||||
#include "application.h"
|
#include "smi.h"
|
||||||
|
#include "snmp.h"
|
||||||
|
#include "snmpd.h"
|
||||||
|
|
||||||
struct oid {
|
struct oid {
|
||||||
struct ber_oid o_id;
|
struct ber_oid o_id;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: smi.h,v 1.3 2023/11/08 20:02:52 martijn Exp $ */
|
/* $OpenBSD: smi.h,v 1.4 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Martijn van Duren <martijn@openbsd.org>
|
* Copyright (c) 2021 Martijn van Duren <martijn@openbsd.org>
|
||||||
@ -16,8 +16,10 @@
|
|||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ber.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
|
||||||
|
struct ber_element;
|
||||||
|
struct ber_oid;
|
||||||
|
|
||||||
char *smi_oid2string(struct ber_oid *, char *, size_t, size_t);
|
char *smi_oid2string(struct ber_oid *, char *, size_t, size_t);
|
||||||
u_long smi_getticks(void);
|
u_long smi_getticks(void);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: snmp.h,v 1.19 2022/06/30 09:42:19 martijn Exp $ */
|
/* $OpenBSD: snmp.h,v 1.20 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
|
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
|
||||||
@ -20,7 +20,6 @@
|
|||||||
#define SNMPD_SNMP_H
|
#define SNMPD_SNMP_H
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <endian.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SNMP IMSG interface
|
* SNMP IMSG interface
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: snmpd.c,v 1.48 2022/10/06 14:41:08 martijn Exp $ */
|
/* $OpenBSD: snmpd.c,v 1.49 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
|
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
|
||||||
@ -17,29 +17,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/queue.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/tree.h>
|
|
||||||
|
|
||||||
#include <net/if.h>
|
|
||||||
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <getopt.h>
|
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <event.h>
|
#include <pwd.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
|
|
||||||
|
#include "log.h"
|
||||||
#include "snmpd.h"
|
#include "snmpd.h"
|
||||||
#include "mib.h"
|
|
||||||
|
|
||||||
__dead void usage(void);
|
__dead void usage(void);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: snmpd.h,v 1.114 2023/11/13 15:05:14 martijn Exp $ */
|
/* $OpenBSD: snmpd.h,v 1.116 2023/12/21 13:54:05 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
|
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
|
||||||
@ -20,24 +20,22 @@
|
|||||||
#ifndef SNMPD_H
|
#ifndef SNMPD_H
|
||||||
#define SNMPD_H
|
#define SNMPD_H
|
||||||
|
|
||||||
|
#include <sys/queue.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/time.h>
|
||||||
#include <sys/tree.h>
|
#include <sys/tree.h>
|
||||||
|
#include <sys/types.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
|
||||||
#include <net/if.h>
|
|
||||||
#include <net/if_dl.h>
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <netinet/if_ether.h>
|
|
||||||
#include <netinet/ip.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <net/pfvar.h>
|
|
||||||
#include <net/route.h>
|
|
||||||
|
|
||||||
#include <ber.h>
|
#include <ber.h>
|
||||||
#include <stdio.h>
|
#include <event.h>
|
||||||
|
#include <limits.h>
|
||||||
#include <imsg.h>
|
#include <imsg.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "log.h"
|
|
||||||
#include "smi.h"
|
|
||||||
#include "snmp.h"
|
#include "snmp.h"
|
||||||
|
|
||||||
#ifndef nitems
|
#ifndef nitems
|
||||||
@ -176,10 +174,6 @@ struct privsep_fd {
|
|||||||
|
|
||||||
#define OID(...) (struct ber_oid){ { __VA_ARGS__ }, \
|
#define OID(...) (struct ber_oid){ { __VA_ARGS__ }, \
|
||||||
(sizeof((uint32_t []) { __VA_ARGS__ }) / sizeof(uint32_t)) }
|
(sizeof((uint32_t []) { __VA_ARGS__ }) / sizeof(uint32_t)) }
|
||||||
#define MIBDECL(...) { { MIB_##__VA_ARGS__ }, \
|
|
||||||
(sizeof((uint32_t []) { MIB_##__VA_ARGS__ }) / sizeof(uint32_t))}, #__VA_ARGS__
|
|
||||||
#define MIB(...) { { MIB_##__VA_ARGS__ } }, NULL
|
|
||||||
#define MIBEND { { 0 } }, NULL
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* daemon structures
|
* daemon structures
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: snmpe.c,v 1.92 2023/11/20 10:32:45 martijn Exp $ */
|
/* $OpenBSD: snmpe.c,v 1.93 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
|
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
|
||||||
@ -18,27 +18,27 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
#include <sys/time.h>
|
||||||
#include <sys/tree.h>
|
#include <sys/tree.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <net/if.h>
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
|
||||||
|
|
||||||
|
#include <ber.h>
|
||||||
|
#include <event.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <imsg.h>
|
||||||
|
#include <locale.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
|
||||||
#include <event.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <pwd.h>
|
|
||||||
|
|
||||||
#include "application.h"
|
#include "application.h"
|
||||||
|
#include "log.h"
|
||||||
#include "snmpd.h"
|
#include "snmpd.h"
|
||||||
#include "snmpe.h"
|
#include "snmpe.h"
|
||||||
#include "mib.h"
|
#include "mib.h"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: snmpe.h,v 1.2 2022/01/19 10:36:35 martijn Exp $ */
|
/* $OpenBSD: snmpe.h,v 1.3 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Martijn van Duren <martijn@openbsd.org>
|
* Copyright (c) 2021 Martijn van Duren <martijn@openbsd.org>
|
||||||
@ -16,9 +16,12 @@
|
|||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "snmp.h"
|
#include "snmp.h"
|
||||||
|
|
||||||
struct snmp_message;
|
struct snmp_message;
|
||||||
|
struct ber_element;
|
||||||
|
|
||||||
void snmpe_send(struct snmp_message *, enum snmp_pdutype, int32_t,
|
void snmpe_send(struct snmp_message *, enum snmp_pdutype, int32_t,
|
||||||
int32_t, uint32_t, struct ber_element *);
|
int32_t, uint32_t, struct ber_element *);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: trap.c,v 1.40 2023/12/12 20:18:39 martijn Exp $ */
|
/* $OpenBSD: trap.c,v 1.41 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008 Reyk Floeter <reyk@openbsd.org>
|
* Copyright (c) 2008 Reyk Floeter <reyk@openbsd.org>
|
||||||
@ -17,27 +17,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
|
||||||
#include <sys/tree.h>
|
|
||||||
|
|
||||||
#include <net/if.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
|
|
||||||
|
#include <ber.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <event.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
|
|
||||||
#include "snmpd.h"
|
#include "log.h"
|
||||||
#include "mib.h"
|
#include "mib.h"
|
||||||
|
#include "smi.h"
|
||||||
|
#include "snmp.h"
|
||||||
|
#include "snmpd.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
trap_init(void)
|
trap_init(void)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: traphandler.c,v 1.24 2022/12/28 21:30:19 jmc Exp $ */
|
/* $OpenBSD: traphandler.c,v 1.25 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014 Bret Stephen Lambert <blambert@openbsd.org>
|
* Copyright (c) 2014 Bret Stephen Lambert <blambert@openbsd.org>
|
||||||
@ -18,30 +18,25 @@
|
|||||||
|
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/tree.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/uio.h>
|
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
#include <net/if.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
|
|
||||||
#include <ber.h>
|
#include <ber.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <event.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <imsg.h>
|
#include <imsg.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
#include <pwd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <pwd.h>
|
|
||||||
|
|
||||||
|
#include "log.h"
|
||||||
|
#include "smi.h"
|
||||||
|
#include "snmp.h"
|
||||||
#include "snmpd.h"
|
#include "snmpd.h"
|
||||||
#include "mib.h"
|
|
||||||
|
|
||||||
int traphandler_priv_recvmsg(struct privsep_proc *, struct imsg *);
|
int traphandler_priv_recvmsg(struct privsep_proc *, struct imsg *);
|
||||||
int traphandler_fork_handler(struct privsep_proc *, struct imsg *);
|
int traphandler_fork_handler(struct privsep_proc *, struct imsg *);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: usm.c,v 1.28 2023/11/08 20:09:18 martijn Exp $ */
|
/* $OpenBSD: usm.c,v 1.29 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012 GeNUA mbH
|
* Copyright (c) 2012 GeNUA mbH
|
||||||
@ -18,30 +18,24 @@
|
|||||||
|
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
#include <sys/tree.h>
|
|
||||||
|
|
||||||
#include <net/if.h>
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <event.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#ifdef DEBUG
|
|
||||||
#include <assert.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/hmac.h>
|
#include <openssl/hmac.h>
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
#include <assert.h>
|
||||||
|
#endif
|
||||||
|
#include <ber.h>
|
||||||
|
#include <endian.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
|
|
||||||
#include "application.h"
|
#include "application.h"
|
||||||
#include "snmpd.h"
|
#include "log.h"
|
||||||
#include "mib.h"
|
#include "mib.h"
|
||||||
|
#include "snmp.h"
|
||||||
|
#include "snmpd.h"
|
||||||
|
|
||||||
SLIST_HEAD(, usmuser) usmuserlist;
|
SLIST_HEAD(, usmuser) usmuserlist;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: util.c,v 1.13 2022/10/06 14:41:08 martijn Exp $ */
|
/* $OpenBSD: util.c,v 1.14 2023/12/21 12:43:31 martijn Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014 Bret Stephen Lambert <blambert@openbsd.org>
|
* Copyright (c) 2014 Bret Stephen Lambert <blambert@openbsd.org>
|
||||||
*
|
*
|
||||||
@ -15,21 +15,17 @@
|
|||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/queue.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include <net/if.h>
|
#include <netinet/in.h>
|
||||||
|
|
||||||
#include <ber.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <event.h>
|
|
||||||
|
|
||||||
#include "snmp.h"
|
|
||||||
#include "snmpd.h"
|
#include "snmpd.h"
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
|
Loading…
Reference in New Issue
Block a user