diff options
author | jcid <devnull@localhost> | 2007-12-06 18:12:02 +0100 |
---|---|---|
committer | jcid <devnull@localhost> | 2007-12-06 18:12:02 +0100 |
commit | 30995b73e26311c3d2f3a4e646254181020e1e6a (patch) | |
tree | 533b2e4539e80e81c37b342a500b880329d8774b /dpid/dpid.h | |
parent | 128f4f70c67071351e7d1312bc762978fc2d0bcb (diff) |
- * 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!
Diffstat (limited to 'dpid/dpid.h')
-rw-r--r-- | dpid/dpid.h | 16 |
1 files changed, 16 insertions, 0 deletions
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 |