|
|
1.1 root 1: /* netnum.c - netnum */
2:
3: #include <conf.h>
4: #include <kernel.h>
5: #include <network.h>
6:
7: /*------------------------------------------------------------------------
8: * netnum - obtain the network portion of a given IP address
9: *------------------------------------------------------------------------
10: */
11: netnum(netpart, address)
12: IPaddr netpart;
13: IPaddr address;
14: {
15: blkcopy(netpart, address, IPLEN);
16: switch (netpart[0] & IPTMASK) {
17: case IPATYP: netpart[1] = '\0'; /* fall through */
18: case IPBTYP: netpart[2] = '\0'; /* fall through */
19: case IPCTYP: netpart[3] = '\0';
20: }
21: return(OK);
22: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.