Device-to-device (D2D) and machine-to-machine (M2M) type communications