ListKeywords(suri->keyword_info);
return TM_ECODE_DONE;
case RUNMODE_LIST_APP_LAYERS:
- ListAppLayerProtocols();
+ if (suri->conf_filename != NULL) {
+ ListAppLayerProtocols(suri->conf_filename);
+ } else {
+ ListAppLayerProtocols(DEFAULT_CONF_FILE);
+ }
return TM_ECODE_DONE;
case RUNMODE_PRINT_VERSION:
PrintVersion();
exit(EXIT_SUCCESS);
}
-int ListAppLayerProtocols()
+int ListAppLayerProtocols(const char *conf_filename)
{
- if (ConfYamlLoadFile(DEFAULT_CONF_FILE) != -1)
+ if (ConfYamlLoadFile(conf_filename) != -1)
SCLogLoadConfig(0, 0);
MpmTableSetup();
SpmTableSetup();
#define __UTIL_RUNNING_MODES_H__
int ListKeywords(const char *keyword_info);
-int ListAppLayerProtocols(void);
+int ListAppLayerProtocols(const char *conf_filename);
#endif /* __UTIL_RUNNING_MODES_H__ */