006.c 708 B

12345678910111213141516171819202122232425262728293031
  1. static void
  2. handle_fix (void *cls, const struct MyMessage *msg)
  3. {
  4. // process 'msg'
  5. }
  6. static int
  7. check_var (void *cls, const struct MyVarMessage *msg)
  8. {
  9. // check 'msg' is well-formed
  10. return GNUNET_OK;
  11. }
  12. static void
  13. handle_var (void *cls, const struct MyVarMessage *msg)
  14. {
  15. // process 'msg'
  16. }
  17. struct GNUNET_MQ_MessageHandler handlers[] = {
  18. GNUNET_MQ_hd_fixed_size (fix,
  19. GNUNET_MESSAGE_TYPE_MY_FIX,
  20. struct MyMessage,
  21. NULL),
  22. GNUNET_MQ_hd_fixed_size (var,
  23. GNUNET_MESSAGE_TYPE_MY_VAR,
  24. struct MyVarMessage,
  25. NULL),
  26. GNUNET_MQ_handler_end ()
  27. };