#include "../config.h"
#include "parse_config.h"
#include "../packets/packet.h"
#include "../routes/route.h"
#include "../actions/action.h"
#include "../engine/message.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Go to the source code of this file.
Functions | |
int | GetLine (FILE *fp, char *buff, int buff_len) |
int | ParseList (FILE *fp, char *Name, int ListType) |
int | ParseAction (FILE *fp, char *Name) |
int | ParseSystem (FILE *fp) |
int | ParseInterface (FILE *fp, char *Name) |
int | ParseRouting (FILE *fp) |
int | ParseConfig () |
Variables | |
GlobalVars | Globals |
int GetLine | ( | FILE * | fp, | |
char * | buff, | |||
int | buff_len | |||
) |
Definition at line 23 of file parse_config.c.
Referenced by ParseAction(), ParseConfig(), ParseInterface(), ParseList(), ParseRouting(), ParseRule(), ParseRules(), ParseSystem(), TCPListContentAddNode(), and TCPListNoCaseAddNode().
int ParseAction | ( | FILE * | fp, | |
char * | Name | |||
) |
Definition at line 160 of file parse_config.c.
References ACTION_NONE, action_rec::ActionItemData, global_vars::ActionItems, action_rec::ActionItems, global_vars::Actions, FALSE, GetActionByName(), GetLine(), Globals, action_rec::ID, MAX_NAME_LEN, action_rec::Name, global_vars::NumActions, action_rec::NumItems, action_item::ParseArgs, and TRUE.
Referenced by ParseConfig().
int ParseConfig | ( | ) |
Definition at line 431 of file parse_config.c.
References global_vars::ConfigFilename, FALSE, fp, GetLine(), Globals, LIST_TYPE_IP, ParseAction(), ParseInterface(), ParseList(), ParseRouting(), ParseSystem(), TRUE, and global_vars::UseThreads.
Referenced by main().
int ParseInterface | ( | FILE * | fp, | |
char * | Name | |||
) |
Definition at line 309 of file parse_config.c.
References FALSE, interface_rec::FD, GetLine(), GetPacketProtoByName(), GetPacketRoleByName(), GetPacketTypeByName(), Globals, interface_rec::ID, global_vars::Interfaces, MAX_INTERFACE_NAME_LEN, MAX_INTERFACES, interface_rec::MTU, interface_rec::Name, global_vars::NumInterfaces, PACKET_PROTO_ETHERNET, PACKET_TYPE_NONE, interface_rec::Proto, interface_rec::Role, TRUE, and interface_rec::Type.
Referenced by ParseConfig().
int ParseList | ( | FILE * | fp, | |
char * | Name, | |||
int | ListType | |||
) |
Definition at line 96 of file parse_config.c.
References AddIPRanges(), FALSE, GetLine(), GetListByName(), Globals, InitNumList(), global_list::List, LIST_NONE, LIST_TYPE_IP, LIST_TYPE_NORMAL, global_vars::Lists, MAX_NAME_LEN, global_list::Name, global_vars::NumLists, and TRUE.
Referenced by ParseConfig().
int ParseRouting | ( | FILE * | fp | ) |
Definition at line 373 of file parse_config.c.
References route_rec::Active, FALSE, GetLine(), GetRouteByName(), Globals, NULL, ROUTE_NONE, RouteAdd(), global_vars::Routes, and TRUE.
Referenced by ParseConfig().
int ParseSystem | ( | FILE * | fp | ) |
Definition at line 233 of file parse_config.c.
References global_vars::AlertHeader, DEFAULT_SENSOR_NAME, FALSE, GetLine(), Globals, ParseMessageString(), global_vars::SensorID, global_vars::SensorName, TRUE, and global_vars::UseThreads.
Referenced by ParseConfig().