You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by moh bad <mo...@sysnode.net> on 2007/04/17 16:56:00 UTC

where to find vhost+port in scoreboard

Hi,

I'm writing an apache2 module to handle a new protocol,
I need to have a limit in simultaneous connexions.

so, I read source code of mod_vhosts_limit, who uses
scoreboard to count number of active threads.

but in the scoreboard structures
( global_score, process_score, worker_score ), we don't have any information
about the ip and port on the worker. In that case
the only values i can have is the number of active threads for a vhosts
based on le vhost hostname.

So, by using scoreboard i can't have information about vhosts
based on ip:port ?

In that case, is there any other solution to count the number
of active threads for a vhost using ip + port.

Did I said something wrong ?
thank you.

Re: new protocols [was Re: where to find vhost+port in scoreboard]

Posted by Arturo 'Buanzo' Busleiman <bu...@buanzo.com.ar>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

moh bad wrote:
> see mod_echo in apache source tree, in that module you will find
> all informations you need.

EXCELLENT!

Of course, I tried mod_dav instead of mod_echo, and couldn't get the hand of it at that time. Now
that I'm a little bit more experienced, I'll check out mod_echo and follow your hints!

Thanks!

- --
Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad Informatica
Foros GNU/Buanzo: Respeto, Soluciones y Buena Onda: http://foros.buanzo.com.ar
Consulting and Secure Mail Hosting: http://www.buanzo.com.ar/pro/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGJOUkAlpOsGhXcE0RCtQyAJ9ekLGG3U2rPt/TrEKzGDA74FKM6wCfXupu
k+PYtvGMjqwz/0eESeigdKA=
=+aE0
-----END PGP SIGNATURE-----

Re: new protocols [was Re: where to find vhost+port in scoreboard]

Posted by moh bad <mo...@sysnode.net>.
I used the ap_hook_process_connection() hook.
and define a function to handle any new connection, like :

   static int process_my_connection(conn_rec *src_con)

see mod_echo in apache source tree, in that module you will find
all informations you need.

2007/4/17, Arturo 'Buanzo' Busleiman <bu...@buanzo.com.ar>:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> moh bad wrote:
> > Hi,
> >
> > I'm writing an apache2 module to handle a new protocol,
>
> I've always been interested in that aspect of modules programming. In the
> beginning, I thought about
> writing PGP-enabled version of the http verbs GET, POST, etc, but couldn't
> get to it, so I developed
> the firefox extension by adding headers (much more clean and backwards
> compatible), but now that the
> subject arises... Can you give me any pointers?
>
>
> - --
> Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad
> Informatica
> Foros GNU/Buanzo: Respeto, Soluciones y Buena Onda:
> http://foros.buanzo.com.ar
> Consulting and Secure Mail Hosting: http://www.buanzo.com.ar/pro/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGJOKZAlpOsGhXcE0RCsSKAJ9mlQGFKEkoILO/BxkMy04mGFng3QCdHF49
> 024+vfmSTdeyALWluME+rhI=
> =uAQg
> -----END PGP SIGNATURE-----
>

new protocols [was Re: where to find vhost+port in scoreboard]

Posted by Arturo 'Buanzo' Busleiman <bu...@buanzo.com.ar>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

moh bad wrote:
> Hi,
> 
> I'm writing an apache2 module to handle a new protocol,

I've always been interested in that aspect of modules programming. In the beginning, I thought about
writing PGP-enabled version of the http verbs GET, POST, etc, but couldn't get to it, so I developed
the firefox extension by adding headers (much more clean and backwards compatible), but now that the
subject arises... Can you give me any pointers?


- --
Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad Informatica
Foros GNU/Buanzo: Respeto, Soluciones y Buena Onda: http://foros.buanzo.com.ar
Consulting and Secure Mail Hosting: http://www.buanzo.com.ar/pro/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGJOKZAlpOsGhXcE0RCsSKAJ9mlQGFKEkoILO/BxkMy04mGFng3QCdHF49
024+vfmSTdeyALWluME+rhI=
=uAQg
-----END PGP SIGNATURE-----