lint and interface cleanups
[unix-history] / usr / src / sys / netinet / in_systm.h
CommitLineData
f1b2fa5b 1/* in_systm.h 4.7 81/11/29 */
8e112dd4
BJ
2
3/*
4 * Miscellaneous internetwork
5 * definitions for kernel.
6 */
7
8e112dd4
BJ
8/*
9 * Network types.
10 *
11 * Internally the system keeps counters in the headers with the bytes
12 * swapped so that VAX instructions will work on them. It reverses
13 * the bytes before transmission at each protocol level. The n_ types
14 * represent the types with the bytes in ``high-ender'' order.
15 */
16typedef u_short n_short; /* short as received from the net */
17typedef u_long n_long; /* long as received from the net */
8e112dd4
BJ
18
19typedef u_long n_time; /* ms since 00:00 GMT, byte rev */
20
21/*
8a13b737
BJ
22 * The internet code runs off software interrupts.
23 * There is one software interrupt level for each IP layer protocol
24 * (e.g. IP, PUP, etc), and each such interrupt traps to the lowest
25 * level routine for that protocol.
26 *
8e112dd4
BJ
27 * You can switch into the network by doing splnet() and return by splx().
28 * The software interrupt level for the network is higher than the software
29 * level for the clock (so you can enter the network in routines called
30 * at timeout time). Splimp is an ipl high enough to block all imps.
2b4b57cd 31 * While manipulating the mbuf buffer pool you have to block imps.
8e112dd4
BJ
32 */
33#define splimp spl5
8a13b737 34#define setipintr() mtpr(SIRR, 12)
f1b2fa5b 35#define setrawintr() mtpr(SIRR, 13)
8e112dd4
BJ
36/* splnet is defined in ../sys/asm.sed */
37
8e112dd4 38#ifdef KERNEL
2b4b57cd 39n_time iptime();
8e112dd4
BJ
40#endif
41
42#ifdef KPROF
43#include "../inet/count.h"
44#define COUNT(i) nrcount[i]++
45int nrcount[NCOUNTERS+1];
46#else
47#define COUNT(i)
48#endif