firewall_demo.c 545 B

12345678910111213141516171819202122
  1. #include "ql_firewall.h"
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include <stdlib.h>
  5. #include "ql_api_osi.h"
  6. #include "ql_api_nw.h"
  7. #include "ql_log.h"
  8. #define QL_SOCKET_LOG_LEVEL QL_LOG_LEVEL_INFO
  9. #define QL_FIREWALL_LOG(msg, ...) QL_LOG(QL_SOCKET_LOG_LEVEL, "firewall ", msg, ##__VA_ARGS__)
  10. void ql_firewall_app_init(void)
  11. {
  12. #ifdef QL_APP_FEATURE_FRIEWALL
  13. int value = 0;
  14. ql_firewall_enable(1); //开启IDS检测功能
  15. value = ql_firewall_get_config(QL_FIREWALL_ENABLE);
  16. QL_FIREWALL_LOG("firewall enable=%d",value);
  17. #endif
  18. }