diff src/syslogconfig.h @ 2:6e88da080f08

initial coding
author carl
date Thu, 24 Nov 2005 10:31:09 -0800
parents 551433a01cab
children 8fe310e5cd44
line wrap: on
line diff
--- a/src/syslogconfig.h	Wed Nov 23 19:29:14 2005 -0800
+++ b/src/syslogconfig.h	Thu Nov 24 10:31:09 2005 -0800
@@ -30,14 +30,21 @@
 typedef SYSLOGCONFIG *			SYSLOGCONFIGP;
 typedef list<SYSLOGCONFIGP> 	syslogconfig_list;
 enum parser_style {cisco, ssh};
+const int buflen = 1024;
 
 class SYSLOGCONFIG {
 	char *			file_name;	// name of the syslog file
 	parser_style	parser;
+	int 			fd;
+	int 			len;		// bytes in the buffer
+	char			buf[buflen];
 public:
-	SYSLOGCONFIG(char *file_name_, parser_style parser_);
+	SYSLOGCONFIG(TOKEN &tok, char *file_name_, parser_style parser_);
 	~SYSLOGCONFIG();
 	void	dump(int level);
+	bool	failed()	{ return (fd == -1); };
+	void	read();
+	void	process();
 };
 
 struct CONFIG {
@@ -53,6 +60,7 @@
 	~CONFIG();
 	void		add_syslogconfig(SYSLOGCONFIGP con);
 	void		dump();
+	void	read();
 };
 
 void discard(string_set &s);