about module constants values.

Peter Leonov gojpeg at gmail.com
Wed Jan 20 08:58:02 MSK 2010

Hi, langwan,

On 20.01.2010, at 8:36, langwan wrote:
> i find these constants, i would like to know the laws of the definition of what these values.
> because i want to add a core module, like NGX_HTTP_MODULE.
> #define NGX_CORE_MODULE        0x45524F43  /* "CORE" */
> #define NGX_CONF_MODULE        0x464E4F43  /* "CONF" */
> #define NGX_EVENT_MODULE      0x544E5645  /* "EVNT" */
> #define NGX_HTTP_MODULE        0x50545448   /* "HTTP" */
> #define NGX_MAIL_MODULE         0x4C49414D     /* "MAIL" */

The question got the answer:
> 0x45524F43  /* "CORE" */

0x45524F43 is a 32-bit integer consists of thees four bytes: 0x45, 0x52, 0x4F and 0x43 for thees characters 'E' 'R' 'O' 'C' (reversed CORE). The comment tells what's encoded in integer ;) This means that one can define four chars long module type identifier. I think that's enough ;)

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100120/1ee310ed/attachment.html>

More information about the nginx mailing list