<HTML ><HEAD ><TITLE >plugin-detect</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ "><LINK REL="HOME" TITLE="Prelude API Reference Manual" HREF="book1.html"><LINK REL="UP" TITLE="Plugins API" HREF="prelude-plugin.html"><LINK REL="PREVIOUS" TITLE="Plugins API" HREF="prelude-plugin.html"><LINK REL="NEXT" TITLE="detect-plugins-api" HREF="prelude-detect-plugins-api.html"></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0" ><TR ><TH COLSPAN="4" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="5" >Prelude API Reference Manual</FONT ></TH ></TR ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="prelude-plugin.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="book1.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Home</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="prelude-plugin.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="prelude-detect-plugins-api.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ></TABLE ></DIV ><H1 ><A NAME="PRELUDE-PLUGIN-DETECT">plugin-detect</H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN11" ></A ><H2 >Name</H2 >plugin-detect -- </DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN14"><H2 >Synopsis</H2 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="SYNOPSIS" > typedef <A HREF="prelude-plugin-detect.html#SUBSCRIBTION-T" >subscribtion_t</A >; typedef <A HREF="prelude-plugin-detect.html#PLUGIN-DETECT-T" >plugin_detect_t</A >; #define <A HREF="prelude-plugin-detect.html#PLUGIN-SUBSCRIBTION" >plugin_subscribtion</A > (p) #define <A HREF="prelude-plugin-detect.html#PLUGIN-RUN-FUNC" >plugin_run_func</A > (p) #define <A HREF="prelude-plugin-detect.html#PLUGIN-SET-SUBSCRIBTION" >plugin_set_subscribtion</A > (p, s) #define <A HREF="prelude-plugin-detect.html#PLUGIN-SET-RUNNING-FUNC" >plugin_set_running_func</A > (p, func) int <A HREF="prelude-plugin-detect.html#PLUGIN-INIT" >plugin_init</A > (unsigned int id);</PRE ></TD ></TR ></TABLE ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN24" ></A ><H2 >Description</H2 ><P ></P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN27" ></A ><H2 >Details</H2 ><DIV CLASS="REFSECT2" ><A NAME="AEN29" ></A ><H3 ><A NAME="SUBSCRIBTION-T" ></A >subscribtion_t</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >typedef struct { proto_enum_t type; /* protocol the plugin want */ const char *filter; /* PF rule */ } subscribtion_t;</PRE ></TD ></TR ></TABLE ><P ></P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN34" ></A ><H3 ><A NAME="PLUGIN-DETECT-T" ></A >plugin_detect_t</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >typedef struct { PLUGIN_GENERIC; int (*opt)(int argc, char **argv); void (*run)(Packet_t *packet, int depth); subscribtion_t *subscribtion; /* * entry filled by Prelude. */ unsigned int id; } plugin_detect_t;</PRE ></TD ></TR ></TABLE ><P ></P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN39" ></A ><H3 ><A NAME="PLUGIN-SUBSCRIBTION" ></A >plugin_subscribtion()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >#define plugin_subscribtion(p) (p)->subscribtion</PRE ></TD ></TR ></TABLE ><P ></P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN44"><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >p</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN53" ></A ><H3 ><A NAME="PLUGIN-RUN-FUNC" ></A >plugin_run_func()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >#define plugin_run_func(p) (p)->run</PRE ></TD ></TR ></TABLE ><P ></P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN58"><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >p</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN67" ></A ><H3 ><A NAME="PLUGIN-SET-SUBSCRIBTION" ></A >plugin_set_subscribtion()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >#define plugin_set_subscribtion(p, s) plugin_subscribtion(p) = (s)</PRE ></TD ></TR ></TABLE ><P ></P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN72"><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >p</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >s</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN85" ></A ><H3 ><A NAME="PLUGIN-SET-RUNNING-FUNC" ></A >plugin_set_running_func()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >#define plugin_set_running_func(p, func) plugin_run_func(p) = (func)</PRE ></TD ></TR ></TABLE ><P ></P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN90"><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >p</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >func</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN103" ></A ><H3 ><A NAME="PLUGIN-INIT" ></A >plugin_init ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >int plugin_init (unsigned int id);</PRE ></TD ></TR ></TABLE ><P ></P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN108"><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >id</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >Returns</I ></SPAN > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><BR CLEAR="all"><BR><TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0" ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="prelude-plugin.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="book1.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Home</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="prelude-plugin.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="prelude-detect-plugins-api.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ><TR ><TD COLSPAN="2" ALIGN="left" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Plugins API</B ></FONT ></TD ><TD COLSPAN="2" ALIGN="right" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >detect-plugins-api</B ></FONT ></TD ></TR ></TABLE ></DIV ></BODY ></HTML >