*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> bitncmp (3)              
Title
Content
Arch
Section
 

BITNCMP(3)

Contents


NAME    [Toc]    [Back]

     bitncmp -- compare bit masks

SYNOPSIS    [Toc]    [Back]

     int
     bitncmp(const void *l, const void *r, int n);

DESCRIPTION    [Toc]    [Back]

     The function bitncmp() compares the ``n'' most-significant bits of the
     two masks pointed to by ``l'' and ``r'', and returns an integer less
     than, equal to, or greater than 0, according to whether or not ``l'' is
     lexicographically less than, equal to, or greater than ``r'' when taken
     to be unsigned characters (this behaviour is just like that of
     memcmp(3)).

     NOTE: Bitncmp() assumes network byte order; this means that the fourth
     octet of 192.5.5.240/28 0x11110000.

RETURN VALUES    [Toc]    [Back]

     Bitncmp() returns values in the manner of memcmp(3):

	   +1 if ``1'' is greater than ``r'';

	   -1 if ``l'' is less than ``r''; and

	   0 if ``l'' is equal to ``r'',

     where ``l'' and ``r'' are both interpreted as strings of unsigned characters
 (through bit ``n''.)

SEE ALSO    [Toc]    [Back]

      
      
     memcmp(3).

AUTHOR    [Toc]    [Back]

     Paul Vixie (ISC).

4th Berkeley Distribution	 June 1, 1996	     4th Berkeley Distribution
[ Back ]
 Similar pages
Name OS Title
auditmask Tru64 Gets or sets audit masks
sigemptyset Tru64 Create and manipulates signal masks
sigfillset Tru64 Create and manipulates signal masks
sigaddset Tru64 Create and manipulates signal masks
sigismember Tru64 Create and manipulates signal masks
sigdelset Tru64 Create and manipulates signal masks
cmp IRIX compare two files
pthread_equal OpenBSD compare thread IDs
cmp FreeBSD compare two files
rcsdiff FreeBSD compare RCS revisions
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service