A scheme for investigating linear electrostatic waves in general magnetically confined plasmas is presented. The scheme is a generalization of the low-frequency (less than the cyclotron frequency) gyrokinetic formalism of Rutherford and Frieman as well as Taylor and Hastie to arbitrary frequencies. Governing integral wave equations for slab plasmas with magnetic shear as well as axisymmetric tokamaks are then derived to illustrate the applications.