A mathematical model is presented for the transmission of a microparasite where the hosts occupy one of two states, uninfected or infected. In each state, the hosts are distributed over a continuous range of immunity. The immune levels vary within hosts due to the processes of waning of immunity (when uninfected), and increasing immunity (when infected), eventually resulting in recovery. Immunity level also influences the host's ability to infect or be infected. Thus the proposed model incorporates both inter– and intra–host dynamics. It is shown from equilibrium results that this model is a general form of the susceptible–infected–resistant (SIR) and susceptible–infected–susceptible (SIS) family of models, a development that is useful for exploring multistrain pathogen transmission and use of vaccines which confer temporary protection.