From 30995b73e26311c3d2f3a4e646254181020e1e6a Mon Sep 17 00:00:00 2001 From: jcid Date: Thu, 6 Dec 2007 18:12:02 +0100 Subject: - * Improved the dpi framework. Now dpi-programs can be specified in dpidrc, and there's no need to touch dillo's sources to add new dpi services. Just make your dpi program, add a dpidrc line and play with it! --- dpid/dpid.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'dpid/dpid.h') diff --git a/dpid/dpid.h b/dpid/dpid.h index 2a41f538..0a80dfdc 100644 --- a/dpid/dpid.h +++ b/dpid/dpid.h @@ -45,6 +45,13 @@ struct dp { int filter; }; +/*! bind dpi with service + */ +struct service { + char *name; + int dp_index; +}; + /*! Number of available plugins */ int numdpis; @@ -54,6 +61,9 @@ int numsocks; /*! State information for each plugin. */ struct dp *dpi_attr_list; +/*! service served for each plugin */ +Dlist *services_list; + /*! Set of sockets watched for connections */ fd_set sock_set; @@ -70,6 +80,8 @@ void free_dpi_attr(struct dp *dpi_attr); void free_plugin_list(struct dp **dpi_attr_list_ptr, int numdpis); +void free_services_list(Dlist *s_list); + enum file_type get_file_type(char *file_name); int get_dpi_attr(char *dpi_dir, char *service, struct dp *dpi_attr); @@ -78,6 +90,8 @@ int register_service(struct dp *dpi_attr, char *service); int register_all(struct dp **attlist); +int fill_services_list(struct dp *attlist, int numdpis, Dlist **services_list); + int init_srs_socket(char *sockdir); int init_dpi_socket(struct dp *dpi_attr, char *sockdir); @@ -98,6 +112,8 @@ int register_all_cmd(char *sockdir); char *get_message(int sock, char *dpi_tag); +int service_match(const struct service *A, const char *B); + void send_sockpath(int sock, char * dpi_tag, struct dp *dpi_attr_list); #endif -- cgit v1.2.3