# Specify when the protocol is called. HEURISTIC_FUNCTION function bool8 heuristic_fct () { # The function must read few data and decide if data match the protocol. # If there is not enough data, packet will be rejected. byte_order big_endian; uint16{byte_order=little_endian} type; if (type != 9) { # this is NOT my protocol return bool8::false; } uint16 packetbuf_addr_receiver; uint16 packetbuf_addr_sender; if (packetbuf_addr_receiver == packetbuf_addr_sender) { # this is NOT my protocol return bool8::false; } # this is my protocol return bool8::true; }