'\" te .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved .TH bcmp 9F "16 Jan 2006" "SunOS 5.11" "Kernel Functions for Drivers" .SH NAME bcmp \- compare two byte arrays .SH SYNOPSIS .LP .nf #include #include \fBint\fR \fBbcmp\fR(\fBconst void *\fR\fIs1\fR, \fBconst void *\fR\fIs2\fR, \fBsize_t\fR \fIlen\fR); .fi .SH INTERFACE LEVEL .sp .LP Architecture independent level 1 (DDI/DKI). .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIs1\fR\fR .ad .RS 7n .rt Pointer to the first character string. .RE .sp .ne 2 .mk .na \fB\fIs2\fR\fR .ad .RS 7n .rt Pointer to the second character string. .RE .sp .ne 2 .mk .na \fB\fIlen\fR\fR .ad .RS 7n .rt Number of bytes to be compared. .RE .SH DESCRIPTION .sp .LP The \fBbcmp()\fR function compares two byte arrays of length \fIlen\fR. .SH RETURN VALUES .sp .LP The \fBbcmp()\fR function returns \fB0\fR if the arrays are identical, or \fB1\fR if they are not. .SH CONTEXT .sp .LP The \fBbcmp()\fR function can be called from user, interrupt, or kernel context. .SH SEE ALSO .sp .LP \fBstrcmp\fR(9F) .sp .LP \fIWriting Device Drivers for Oracle Solaris 11.2\fR .SH NOTES .sp .LP Unlike \fBstrcmp\fR(9F), \fBbcmp()\fR does not terminate when it encounters a null byte.