An NLM must have initialization code, a main body of code, and termination code. The following figure shows the structure of an NLM.
Figure 2-1 NLM Structure