aboutsummaryrefslogtreecommitdiff
path: root/src/pies.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-11-25 10:08:33 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-11-25 10:08:33 +0200
commit849e60108f8df449367f4a05eb489017bea35281 (patch)
treecd54057a69e19b9adc1364639a4dac9a37088a6b /src/pies.h
parent534098c3d35f36ab9d333fb0ee800c7ffaf0dcbd (diff)
downloadpies-849e60108f8df449367f4a05eb489017bea35281.tar.gz
pies-849e60108f8df449367f4a05eb489017bea35281.tar.bz2
Implement TCPMUX internal service.
* src/pies.h (CF_TCPMUX, CF_TCPMUXPLUS): New flags. (struct component): New member: service. (progman_lookup_service, progman_run_comp) (progman_iterate_comp): New protos. * src/progman.c (progman_iterate_comp) (prog_lookup_by_service) (progman_lookup_service): New functions (prog_start_prologue, prog_execute): New functions, extracted from prog_start. (progman_run_comp): New function. (prog_start): Replace extracted parts of code with calls to prog_start_prologue and prog_execute. * src/inetd-bi.c: Implement TCPMUX * src/inetd.c (inetd_conf_file): Handle tcpmux extries.
Diffstat (limited to 'src/pies.h')
-rw-r--r--src/pies.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pies.h b/src/pies.h
index d9c1a3c..9ec1410 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -140,6 +140,8 @@ enum pies_comp_mode
#define CF_PRECIOUS 0x02 /* The component is precious (should not
be disabled) */
#define CF_WAIT 0x04
+#define CF_TCPMUX 0x08
+#define CF_TCPMUXPLUS 0x10
struct component
{
@@ -159,6 +161,7 @@ struct component
(inetd) */
int socket_type; /* Socket type */
struct inetd_builtin *builtin; /* Builtin function (inetd) */
+ char *service;
char *rmfile; /* Try to remove this file before starting */
struct pies_privs privs; /* UID/GIDS+groups to run under */
mode_t umask; /* Umask to install before starting */
@@ -205,6 +208,12 @@ int progman_accept (int socket);
int progman_build_depmap (void);
void progman_create_sockets (void);
struct component *progman_lookup_component (const char *tag);
+struct component *progman_lookup_service (const char *service);
+void progman_run_comp (struct component *comp, int fd);
+
+void progman_iterate_comp (int (*fun) (struct component *, void *),
+ void *data);
+
void log_setup (int want_stderr);
void signal_setup (RETSIGTYPE (*sf)(int));
@@ -232,6 +241,7 @@ int assert_grecs_value_type (grecs_locus_t *locus,
int str_to_socket_type (const char *str, int *pret);
struct component *component_create (const char *name);
+
void component_finish (struct component *comp, grecs_locus_t *locus);
struct grecs_keyword *find_component_keyword (const char *ident);

Return to:

Send suggestions and report system problems to the System administrator.