Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ netnum(3) — Purdue Xinu

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getaddr(2)

getnet(2)

NETNUM(3)

NAME

netnum − compute the network portion of a given Internet (IP) address

SYNOPSIS

#include <network.h>

int netnum(netpart, address)
IPaddr netpart;
IPaddr address;

DESCRIPTION

Netnum extracts the network portion of the Internet address specified by argument address, and places the result in argument netpart.  It operates by using the IP class of argument address to determine whether the network part of the address occupies 1, 2, or 3 bytes, and it zeros the remaining bytes.  Netnum always returns OK. 

SEE ALSO

getaddr(2), getnet(2)

BUGS

Netnum does not understand subnets or subnet masks. 

December 01, 1986  —  Xinu Programmer’s Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026