You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.1 KiB

  1. From ba72865f23cd0d52f373573308e0e05c5bd37ba8 Mon Sep 17 00:00:00 2001
  2. From: Luca Deri <deri@ntop.org>
  3. Date: Wed, 19 Sep 2018 11:11:15 +0200
  4. Subject: [PATCH 4/9] Added missing ndpi_protocol2id() prototype Fixed error
  5. when crearing symlink in Makefile
  6. ---
  7. src/include/ndpi_api.h | 15 ++++++++++++++-
  8. src/lib/Makefile.in | 2 +-
  9. 2 files changed, 15 insertions(+), 2 deletions(-)
  10. diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
  11. index 3fefc8e..56c5436 100644
  12. --- a/src/include/ndpi_api.h
  13. +++ b/src/include/ndpi_api.h
  14. @@ -420,7 +420,7 @@ extern "C" {
  15. char *bigram_to_match);
  16. /**
  17. - * Write the protocol name in the buffer -buf- as master_protocol.protocol
  18. + * Write the protocol name in the buffer -buf- as master_protocol.protocol (string)
  19. *
  20. * @par ndpi_mod = the detection module
  21. * @par proto = the struct ndpi_protocol contain the protocols name
  22. @@ -432,6 +432,19 @@ extern "C" {
  23. char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod,
  24. ndpi_protocol proto, char *buf, u_int buf_len);
  25. + /**
  26. + * Write the protocol name in the buffer -buf- as master_protocol.protocol (number)
  27. + *
  28. + * @par ndpi_mod = the detection module
  29. + * @par proto = the struct ndpi_protocol contain the protocols name
  30. + * @par buf = the buffer to write the name of the protocols
  31. + * @par buf_len = the length of the buffer
  32. + * @return the buffer contains the master_protocol and protocol name
  33. + *
  34. + */
  35. + char* ndpi_protocol2id(struct ndpi_detection_module_struct *ndpi_mod,
  36. + ndpi_protocol proto, char *buf, u_int buf_len);
  37. +
  38. /**
  39. * Find out if a given category is custom/user-defined
  40. *
  41. diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
  42. index ca29001..cbbc54b 100644
  43. --- a/src/lib/Makefile.in
  44. +++ b/src/lib/Makefile.in
  45. @@ -38,7 +38,7 @@ $(NDPI_LIB_STATIC): $(OBJECTS)
  46. $(NDPI_LIB_SHARED): $(OBJECTS)
  47. $(CC) -shared -fPIC -o $@ $(OBJECTS)
  48. - ln -Fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
  49. + ln -fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
  50. %.o: %.c $(HEADERS) Makefile
  51. $(CC) $(CFLAGS) -c $< -o $@
  52. --
  53. 2.19.1