Gnuradio send and receive

Hi!

Is there any way to implement a protocol which could do this following
work:

1, first send out some packets ,
2, then listen the channel, waiting for incoming packets,
3, after receiving several packets, transmit back several packets

I think this should be built upon physical layer, but most examples I
found in Gnuradio are phy layer codes. So anyone has any idea how to
implement this controlling layer above physical layer?

Thank you!