📄 bitncmp.mdoc
字号:
.\" $Id: bitncmp.mdoc,v 1.1.2.1.10.1 2004/03/09 08:33:39 marka Exp $.\".\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC").\" Copyright (c) 1996,1999 by Internet Software Consortium..\".\" Permission to use, copy, modify, and distribute this software for any.\" purpose with or without fee is hereby granted, provided that the above.\" copyright notice and this permission notice appear in all copies..\".\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE..\".Dd June 1, 1996.Dt BITNCMP 3.Os BSD 4.Sh NAME.Nm bitncmp .Nd compare bit masks.Sh SYNOPSIS.Ft int.Fn bitncmp "const void *l" "const void *r" "int n".Sh DESCRIPTIONThe function.Fn bitncmpcompares the.Dq Fa nmost-significant bits of the two masks pointed to by.Dq Fa land.Dq Fa r ,and returns an integer less than, equal to, or greater than 0, according towhether or not.Dq Fa lis lexicographically less than, equal to, or greater than.Dq Fa rwhen taken to be unsigned characters (this behaviour is just like that of.Xr memcmp 3 ) ..Pp.Sy NOTE :.Fn Bitncmp assumes .Sy network byte order ;this means that the fourth octet of .Li 192.5.5.240/28 .Li 0x11110000 ..Sh RETURN VALUES.Fn Bitncmpreturns values in the manner of.Xr memcmp 3 :.Bd -ragged -offset indent+1 if .Dq Fa 1is greater than .Dq Fa r ;.Pp-1 if .Dq Fa lis less than .Dq Fa r ; and.Pp0 if .Dq Fa lis equal to.Dq Fa r ,.Ed.Ppwhere .Dq Fa land .Dq Fa rare both interpreted as strings of unsigned characters (through bit .Dq Fa n . ).Sh SEE ALSO.Xr memcmp 3 ..Sh AUTHORPaul Vixie (ISC).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -