Under the 2008 NEC, a main can be part of the panel or in the supply to the panel.
Is this for a service, or a feeder panel in a separate building?
Whats a subpanel? Is that on a sub? (Sorry - thats a surface navy guy talking). The NEC does not use the term subpanel.