public synchronized void onFrameReceived(ByteBuffer frame, ILayer2 srcInterface, int srcMacAddress){
try {
Layer3Packet packet = Layer3Packet.buildFromByteArray(frame);
if(packet instanceof DataToBase){
DataToBase dataToBase = (DataToBase) packet;
// verify hmac? (now it doesn't have hmac)
onDataToBase(dataToBase);
} else if(packet instanceof BeaconChildResponse){
BeaconChildResponse beaconChildResponse = (BeaconChildResponse) packet;
System.out.println("ricevuto BeaconChildResponse childNonce:"+beaconChildResponse.getChildNonce());