Aaron Stone wrote:
> In pool.h, we have this definition:
> 
> typedef struct {
>         pid_t pid;
>         time_t ctime;
>         unsigned char status;
>         unsigned long count;
>         char * client;
> } child_state_t;
> 
> These are the structures that fill up the shared memory segment. I've made
> some changes in my tree, replacing "char *client" with "char client[128]".
> There's no way that this pointer can work because the parent process
> prints the state files, but the child process would own the memory the
> pointer points to!
> 
> I'm also sizing the shared memory segment as sizeof(child_state_t) *
> HARD_MAX_CHILDREN, rather than the 100kb it had been hardcoded as.
> 
> I've added some code in serverchild.c and pool.c to copy either the
> hostname or the ip address of the current connection into the structure
> (depending on the pre-existing config item for resolving hostnames in the
> log files). The name also gets printed to the
> /var/run/dbmail-<daemon>.state files.
> 
> First, any objections? Second, any additional information that I should
> add?

No objections here.

Most of that struct was simply stubbed as a todo. It would be nice if we could
track some key information per client:

- total traffic send and recieved
- total number of concurrent connections opened (so we can limit the number of
connections a single client has opened, maybe)
- cumulative number of connections per remote ip


-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to