Xinu7/man/man3/netnum.3

.TH NETNUM 3
.SH NAME
netnum \- compute the network portion of a given Internet (IP) address
.SH SYNOPSIS
.B #include <network.h>
.PP
.B int netnum(netpart, address)
.br
.B IPaddr netpart;
.br
.B IPaddr address;
.br
.SH DESCRIPTION
.I Netnum
extracts the network portion of the Internet address specified by
argument \f2address\f1, and places the result in argument \f2netpart\f1.
It operates by using the IP class of argument \f2address\f1
to determine whether the
network part of the address occupies 1, 2, or 3 bytes, and it zeros the
remaining bytes.
\f2Netnum\f1 always returns OK.
.SH "SEE ALSO"
getaddr(2), getnet(2)
.SH BUGS
.I Netnum
does not understand subnets or subnet masks.