GEOFENCE check before ARMING

Hello,
I want to check whether the plane is inside the GEOFENCE, and if not inside the geofence then it should not ARM at all. ANY suggestions on how to achieve that? Basically I want to know whether is there any inbuilt function to check whether the plane is inside the geofence or not which we can send from GCS to know the status.

Thank you.
Sripad