  The structure of Gamma Ray Burst (GRB) jets impacts on their prompt and
afterglow emission properties. The jet of GRBs could be uniform, with constant
energy per unit solid angle within the jet aperture, or it could instead be
structured, namely with energy and velocity that depend on the angular distance
from the axis of the jet. We try to get some insight about the still unknown
structure of GRBs by studying their luminosity function. We show that low
(1e46-1e48 erg/s) and high (i.e. with L > 1e50 erg/s) luminosity GRBs can be
described by a unique luminosity function, which is also consistent with
current lower limits in the intermediate luminosity range (1e48-1e50} erg/s).
We derive analytical expressions for the luminosity function of GRBs in uniform
and structured jet models and compare them with the data. Uniform jets can
reproduce the entire luminosity function with reasonable values of the free
parameters. A structured jet can also fit adequately the current data, provided
that the energy within the jet is relatively strongly structured, i.e. E propto
theta^{-k} with k > 4. The classical E propto theta^{-2} structured jet model
is excluded by the current data.
