Move binpac code into the main Zeek repository

This is based on commit 48f75b5f6415fe9d597e3e991cec635b1bc400dc from
the binpac repository.
This commit is contained in:
Tim Wojtulewicz 2025-08-04 13:49:52 -07:00
parent a2680d5eca
commit ff26835976
112 changed files with 14586 additions and 8 deletions

View file

@ -0,0 +1,40 @@
#ifndef pac_output_h
#define pac_output_h
#include <stdarg.h>
#include <stdio.h>
#include <string>
using namespace std;
class OutputException {
public:
OutputException(const char* arg_msg);
~OutputException();
const char* errmsg() const { return msg.c_str(); }
protected:
string msg;
};
class Output {
public:
Output(string filename);
~Output();
int println(const char* fmt, ...);
int print(const char* fmt, ...);
int indent() const { return indent_; }
void inc_indent() { ++indent_; }
void dec_indent() { --indent_; }
protected:
int print(const char* fmt, va_list ap);
FILE* fp;
int indent_;
};
#endif /* pac_output_h */