/*
* one per protocol module
*/
struct Proto
{
char* name;
void (*compile)(Filter*);
int (*filter)(Filter*, Msg*);
int (*seprint)(Msg*);
Mux* mux;
char* valfmt;
Field* field;
int (*framer)(int, uchar*, int);
};
extern Proto *protos[];
/*
* one per protocol module, pointed to by Proto.mux
*/
struct Mux
{
char* name;
ulong val;
Proto* pr;
};
/*
* a field defining a comparison filter
*/
struct Field
{
char* name;
int ftype;
int subop;
char* help;
};
/*
* the status of the current message walk
*/
struct Msg
{
uchar *ps; /* packet ptr */
uchar *pe; /* packet end */