/* inet_netof.c 4.2 82/10/07 */
* Return the network number from an internet
* address; handles class a/b/c network #'s.
if ((in
.s_addr
&IN_CLASSA
) == 0)
return (in
.s_addr
& IN_CLASSA_NET
);
if ((in
.s_addr
&IN_CLASSB
) == 0)
return ((int)htons((u_short
)(in
.s_addr
& IN_CLASSB_NET
)));
net
= htonl((u_long
)(in
.s_addr
& IN_CLASSC_NET
));