Analytical modeling of D2D communications over cellular networks