#ifndef MODPERL_FLAGS_H
#define MODPERL_FLAGS_H

/*
 * *********** WARNING **************
 * This file generated by ModPerl::Code/0.01
 * Any changes made here will be lost
 * ***********************************
 * 01: lib/ModPerl/Code.pm:740
 * 02: lib/ModPerl/Code.pm:766
 * 03: Makefile.PL:391
 * 04: Makefile.PL:102
 */


#define MP_SYS_DL_DLOPEN 1

#define MpDirFLAGS(p) (p)->flags->opts

#define MpDirType 1

/* NONE */
#define MpDir_f_NONE 0x00000000
#define MpDirNONE(p)  (MpDirFLAGS(p) & MpDir_f_NONE)
#define MpDirNONE_On(p)  (MpDirFLAGS(p) |= MpDir_f_NONE)
#define MpDirNONE_Off(p) (MpDirFLAGS(p) &= ~MpDir_f_NONE)


/* PARSE_HEADERS */
#define MpDir_f_PARSE_HEADERS 0x00000001
#define MpDirPARSE_HEADERS(p)  (MpDirFLAGS(p) & MpDir_f_PARSE_HEADERS)
#define MpDirPARSE_HEADERS_On(p)  (MpDirFLAGS(p) |= MpDir_f_PARSE_HEADERS)
#define MpDirPARSE_HEADERS_Off(p) (MpDirFLAGS(p) &= ~MpDir_f_PARSE_HEADERS)


/* SETUP_ENV */
#define MpDir_f_SETUP_ENV 0x00000002
#define MpDirSETUP_ENV(p)  (MpDirFLAGS(p) & MpDir_f_SETUP_ENV)
#define MpDirSETUP_ENV_On(p)  (MpDirFLAGS(p) |= MpDir_f_SETUP_ENV)
#define MpDirSETUP_ENV_Off(p) (MpDirFLAGS(p) &= ~MpDir_f_SETUP_ENV)


/* MERGE_HANDLERS */
#define MpDir_f_MERGE_HANDLERS 0x00000004
#define MpDirMERGE_HANDLERS(p)  (MpDirFLAGS(p) & MpDir_f_MERGE_HANDLERS)
#define MpDirMERGE_HANDLERS_On(p)  (MpDirFLAGS(p) |= MpDir_f_MERGE_HANDLERS)
#define MpDirMERGE_HANDLERS_Off(p) (MpDirFLAGS(p) &= ~MpDir_f_MERGE_HANDLERS)


/* GLOBAL_REQUEST */
#define MpDir_f_GLOBAL_REQUEST 0x00000008
#define MpDirGLOBAL_REQUEST(p)  (MpDirFLAGS(p) & MpDir_f_GLOBAL_REQUEST)
#define MpDirGLOBAL_REQUEST_On(p)  (MpDirFLAGS(p) |= MpDir_f_GLOBAL_REQUEST)
#define MpDirGLOBAL_REQUEST_Off(p) (MpDirFLAGS(p) &= ~MpDir_f_GLOBAL_REQUEST)


/* UNSET */
#define MpDir_f_UNSET 0x00000010
#define MpDirUNSET(p)  (MpDirFLAGS(p) & MpDir_f_UNSET)
#define MpDirUNSET_On(p)  (MpDirFLAGS(p) |= MpDir_f_UNSET)
#define MpDirUNSET_Off(p) (MpDirFLAGS(p) &= ~MpDir_f_UNSET)

U32 modperl_flags_lookup_dir(const char *str);
#define MpDir_dump_flags(p, str) \
modperl_trace(NULL, "MpDir flags dump (%s):", str); \
modperl_trace(NULL, " GlobalRequest %s", \
                         (MpDirFLAGS(p) & 0x00000008) ? "On " : "Off"); \
modperl_trace(NULL, " MergeHandlers %s", \
                         (MpDirFLAGS(p) & 0x00000004) ? "On " : "Off"); \
modperl_trace(NULL, " ParseHeaders %s", \
                         (MpDirFLAGS(p) & 0x00000001) ? "On " : "Off"); \
modperl_trace(NULL, " SetupEnv %s", \
                         (MpDirFLAGS(p) & 0x00000002) ? "On " : "Off"); \
modperl_trace(NULL, " Unset %s", \
                         (MpDirFLAGS(p) & 0x00000010) ? "On " : "Off");
#define MpDirSeenFLAGS(p) (p)->flags->opts_seen

#define MpDirSeenType 2

/* NONE */
#define MpDirSeen_f_NONE 0x00000000
#define MpDirSeenNONE(p)  (MpDirSeenFLAGS(p) & MpDirSeen_f_NONE)
#define MpDirSeenNONE_On(p)  (MpDirSeenFLAGS(p) |= MpDirSeen_f_NONE)
#define MpDirSeenNONE_Off(p) (MpDirSeenFLAGS(p) &= ~MpDirSeen_f_NONE)


/* PARSE_HEADERS */
#define MpDirSeen_f_PARSE_HEADERS 0x00000001
#define MpDirSeenPARSE_HEADERS(p)  (MpDirSeenFLAGS(p) & MpDirSeen_f_PARSE_HEADERS)
#define MpDirSeenPARSE_HEADERS_On(p)  (MpDirSeenFLAGS(p) |= MpDirSeen_f_PARSE_HEADERS)
#define MpDirSeenPARSE_HEADERS_Off(p) (MpDirSeenFLAGS(p) &= ~MpDirSeen_f_PARSE_HEADERS)


/* SETUP_ENV */
#define MpDirSeen_f_SETUP_ENV 0x00000002
#define MpDirSeenSETUP_ENV(p)  (MpDirSeenFLAGS(p) & MpDirSeen_f_SETUP_ENV)
#define MpDirSeenSETUP_ENV_On(p)  (MpDirSeenFLAGS(p) |= MpDirSeen_f_SETUP_ENV)
#define MpDirSeenSETUP_ENV_Off(p) (MpDirSeenFLAGS(p) &= ~MpDirSeen_f_SETUP_ENV)


/* MERGE_HANDLERS */
#define MpDirSeen_f_MERGE_HANDLERS 0x00000004
#define MpDirSeenMERGE_HANDLERS(p)  (MpDirSeenFLAGS(p) & MpDirSeen_f_MERGE_HANDLERS)
#define MpDirSeenMERGE_HANDLERS_On(p)  (MpDirSeenFLAGS(p) |= MpDirSeen_f_MERGE_HANDLERS)
#define MpDirSeenMERGE_HANDLERS_Off(p) (MpDirSeenFLAGS(p) &= ~MpDirSeen_f_MERGE_HANDLERS)


/* GLOBAL_REQUEST */
#define MpDirSeen_f_GLOBAL_REQUEST 0x00000008
#define MpDirSeenGLOBAL_REQUEST(p)  (MpDirSeenFLAGS(p) & MpDirSeen_f_GLOBAL_REQUEST)
#define MpDirSeenGLOBAL_REQUEST_On(p)  (MpDirSeenFLAGS(p) |= MpDirSeen_f_GLOBAL_REQUEST)
#define MpDirSeenGLOBAL_REQUEST_Off(p) (MpDirSeenFLAGS(p) &= ~MpDirSeen_f_GLOBAL_REQUEST)


/* UNSET */
#define MpDirSeen_f_UNSET 0x00000010
#define MpDirSeenUNSET(p)  (MpDirSeenFLAGS(p) & MpDirSeen_f_UNSET)
#define MpDirSeenUNSET_On(p)  (MpDirSeenFLAGS(p) |= MpDirSeen_f_UNSET)
#define MpDirSeenUNSET_Off(p) (MpDirSeenFLAGS(p) &= ~MpDirSeen_f_UNSET)

#define MpDirSeen_dump_flags(p, str) \
modperl_trace(NULL, "MpDirSeen flags dump (%s):", str); \
modperl_trace(NULL, " GlobalRequest %s", \
                         (MpDirSeenFLAGS(p) & 0x00000008) ? "On " : "Off"); \
modperl_trace(NULL, " MergeHandlers %s", \
                         (MpDirSeenFLAGS(p) & 0x00000004) ? "On " : "Off"); \
modperl_trace(NULL, " ParseHeaders %s", \
                         (MpDirSeenFLAGS(p) & 0x00000001) ? "On " : "Off"); \
modperl_trace(NULL, " SetupEnv %s", \
                         (MpDirSeenFLAGS(p) & 0x00000002) ? "On " : "Off"); \
modperl_trace(NULL, " Unset %s", \
                         (MpDirSeenFLAGS(p) & 0x00000010) ? "On " : "Off");
#define MpHandlerFLAGS(p) (p)->flags

#define MpHandlerType 3

/* NONE */
#define MpHandler_f_NONE 0x00000000
#define MpHandlerNONE(p)  (MpHandlerFLAGS(p) & MpHandler_f_NONE)
#define MpHandlerNONE_On(p)  (MpHandlerFLAGS(p) |= MpHandler_f_NONE)
#define MpHandlerNONE_Off(p) (MpHandlerFLAGS(p) &= ~MpHandler_f_NONE)


/* PARSED */
#define MpHandler_f_PARSED 0x00000001
#define MpHandlerPARSED(p)  (MpHandlerFLAGS(p) & MpHandler_f_PARSED)
#define MpHandlerPARSED_On(p)  (MpHandlerFLAGS(p) |= MpHandler_f_PARSED)
#define MpHandlerPARSED_Off(p) (MpHandlerFLAGS(p) &= ~MpHandler_f_PARSED)


/* METHOD */
#define MpHandler_f_METHOD 0x00000002
#define MpHandlerMETHOD(p)  (MpHandlerFLAGS(p) & MpHandler_f_METHOD)
#define MpHandlerMETHOD_On(p)  (MpHandlerFLAGS(p) |= MpHandler_f_METHOD)
#define MpHandlerMETHOD_Off(p) (MpHandlerFLAGS(p) &= ~MpHandler_f_METHOD)


/* OBJECT */
#define MpHandler_f_OBJECT 0x00000004
#define MpHandlerOBJECT(p)  (MpHandlerFLAGS(p) & MpHandler_f_OBJECT)
#define MpHandlerOBJECT_On(p)  (MpHandlerFLAGS(p) |= MpHandler_f_OBJECT)
#define MpHandlerOBJECT_Off(p) (MpHandlerFLAGS(p) &= ~MpHandler_f_OBJECT)


/* ANON */
#define MpHandler_f_ANON 0x00000008
#define MpHandlerANON(p)  (MpHandlerFLAGS(p) & MpHandler_f_ANON)
#define MpHandlerANON_On(p)  (MpHandlerFLAGS(p) |= MpHandler_f_ANON)
#define MpHandlerANON_Off(p) (MpHandlerFLAGS(p) &= ~MpHandler_f_ANON)


/* AUTOLOAD */
#define MpHandler_f_AUTOLOAD 0x00000010
#define MpHandlerAUTOLOAD(p)  (MpHandlerFLAGS(p) & MpHandler_f_AUTOLOAD)
#define MpHandlerAUTOLOAD_On(p)  (MpHandlerFLAGS(p) |= MpHandler_f_AUTOLOAD)
#define MpHandlerAUTOLOAD_Off(p) (MpHandlerFLAGS(p) &= ~MpHandler_f_AUTOLOAD)


/* DYNAMIC */
#define MpHandler_f_DYNAMIC 0x00000020
#define MpHandlerDYNAMIC(p)  (MpHandlerFLAGS(p) & MpHandler_f_DYNAMIC)
#define MpHandlerDYNAMIC_On(p)  (MpHandlerFLAGS(p) |= MpHandler_f_DYNAMIC)
#define MpHandlerDYNAMIC_Off(p) (MpHandlerFLAGS(p) &= ~MpHandler_f_DYNAMIC)


/* FAKE */
#define MpHandler_f_FAKE 0x00000040
#define MpHandlerFAKE(p)  (MpHandlerFLAGS(p) & MpHandler_f_FAKE)
#define MpHandlerFAKE_On(p)  (MpHandlerFLAGS(p) |= MpHandler_f_FAKE)
#define MpHandlerFAKE_Off(p) (MpHandlerFLAGS(p) &= ~MpHandler_f_FAKE)

#define MpHandler_dump_flags(p, str) \
modperl_trace(NULL, "MpHandler flags dump (%s):", str); \
modperl_trace(NULL, " Anon %s", \
                         (MpHandlerFLAGS(p) & 0x00000008) ? "On " : "Off"); \
modperl_trace(NULL, " Autoload %s", \
                         (MpHandlerFLAGS(p) & 0x00000010) ? "On " : "Off"); \
modperl_trace(NULL, " Dynamic %s", \
                         (MpHandlerFLAGS(p) & 0x00000020) ? "On " : "Off"); \
modperl_trace(NULL, " Fake %s", \
                         (MpHandlerFLAGS(p) & 0x00000040) ? "On " : "Off"); \
modperl_trace(NULL, " Method %s", \
                         (MpHandlerFLAGS(p) & 0x00000002) ? "On " : "Off"); \
modperl_trace(NULL, " Object %s", \
                         (MpHandlerFLAGS(p) & 0x00000004) ? "On " : "Off"); \
modperl_trace(NULL, " Parsed %s", \
                         (MpHandlerFLAGS(p) & 0x00000001) ? "On " : "Off");
#define MpInterpFLAGS(p) (p)->flags

#define MpInterpType 4

/* NONE */
#define MpInterp_f_NONE 0x00000000
#define MpInterpNONE(p)  (MpInterpFLAGS(p) & MpInterp_f_NONE)
#define MpInterpNONE_On(p)  (MpInterpFLAGS(p) |= MpInterp_f_NONE)
#define MpInterpNONE_Off(p) (MpInterpFLAGS(p) &= ~MpInterp_f_NONE)


/* IN_USE */
#define MpInterp_f_IN_USE 0x00000001
#define MpInterpIN_USE(p)  (MpInterpFLAGS(p) & MpInterp_f_IN_USE)
#define MpInterpIN_USE_On(p)  (MpInterpFLAGS(p) |= MpInterp_f_IN_USE)
#define MpInterpIN_USE_Off(p) (MpInterpFLAGS(p) &= ~MpInterp_f_IN_USE)


/* CLONED */
#define MpInterp_f_CLONED 0x00000002
#define MpInterpCLONED(p)  (MpInterpFLAGS(p) & MpInterp_f_CLONED)
#define MpInterpCLONED_On(p)  (MpInterpFLAGS(p) |= MpInterp_f_CLONED)
#define MpInterpCLONED_Off(p) (MpInterpFLAGS(p) &= ~MpInterp_f_CLONED)


/* BASE */
#define MpInterp_f_BASE 0x00000004
#define MpInterpBASE(p)  (MpInterpFLAGS(p) & MpInterp_f_BASE)
#define MpInterpBASE_On(p)  (MpInterpFLAGS(p) |= MpInterp_f_BASE)
#define MpInterpBASE_Off(p) (MpInterpFLAGS(p) &= ~MpInterp_f_BASE)

#define MpInterp_dump_flags(p, str) \
modperl_trace(NULL, "MpInterp flags dump (%s):", str); \
modperl_trace(NULL, " Base %s", \
                         (MpInterpFLAGS(p) & 0x00000004) ? "On " : "Off"); \
modperl_trace(NULL, " Cloned %s", \
                         (MpInterpFLAGS(p) & 0x00000002) ? "On " : "Off"); \
modperl_trace(NULL, " InUse %s", \
                         (MpInterpFLAGS(p) & 0x00000001) ? "On " : "Off");
#define MpReqFLAGS(p) (p)->flags

#define MpReqType 5

/* NONE */
#define MpReq_f_NONE 0x00000000
#define MpReqNONE(p)  (MpReqFLAGS(p) & MpReq_f_NONE)
#define MpReqNONE_On(p)  (MpReqFLAGS(p) |= MpReq_f_NONE)
#define MpReqNONE_Off(p) (MpReqFLAGS(p) &= ~MpReq_f_NONE)


/* SET_GLOBAL_REQUEST */
#define MpReq_f_SET_GLOBAL_REQUEST 0x00000001
#define MpReqSET_GLOBAL_REQUEST(p)  (MpReqFLAGS(p) & MpReq_f_SET_GLOBAL_REQUEST)
#define MpReqSET_GLOBAL_REQUEST_On(p)  (MpReqFLAGS(p) |= MpReq_f_SET_GLOBAL_REQUEST)
#define MpReqSET_GLOBAL_REQUEST_Off(p) (MpReqFLAGS(p) &= ~MpReq_f_SET_GLOBAL_REQUEST)


/* PARSE_HEADERS */
#define MpReq_f_PARSE_HEADERS 0x00000002
#define MpReqPARSE_HEADERS(p)  (MpReqFLAGS(p) & MpReq_f_PARSE_HEADERS)
#define MpReqPARSE_HEADERS_On(p)  (MpReqFLAGS(p) |= MpReq_f_PARSE_HEADERS)
#define MpReqPARSE_HEADERS_Off(p) (MpReqFLAGS(p) &= ~MpReq_f_PARSE_HEADERS)


/* SETUP_ENV */
#define MpReq_f_SETUP_ENV 0x00000004
#define MpReqSETUP_ENV(p)  (MpReqFLAGS(p) & MpReq_f_SETUP_ENV)
#define MpReqSETUP_ENV_On(p)  (MpReqFLAGS(p) |= MpReq_f_SETUP_ENV)
#define MpReqSETUP_ENV_Off(p) (MpReqFLAGS(p) &= ~MpReq_f_SETUP_ENV)


/* CLEANUP_REGISTERED */
#define MpReq_f_CLEANUP_REGISTERED 0x00000008
#define MpReqCLEANUP_REGISTERED(p)  (MpReqFLAGS(p) & MpReq_f_CLEANUP_REGISTERED)
#define MpReqCLEANUP_REGISTERED_On(p)  (MpReqFLAGS(p) |= MpReq_f_CLEANUP_REGISTERED)
#define MpReqCLEANUP_REGISTERED_Off(p) (MpReqFLAGS(p) &= ~MpReq_f_CLEANUP_REGISTERED)


/* PERL_SET_ENV_DIR */
#define MpReq_f_PERL_SET_ENV_DIR 0x00000010
#define MpReqPERL_SET_ENV_DIR(p)  (MpReqFLAGS(p) & MpReq_f_PERL_SET_ENV_DIR)
#define MpReqPERL_SET_ENV_DIR_On(p)  (MpReqFLAGS(p) |= MpReq_f_PERL_SET_ENV_DIR)
#define MpReqPERL_SET_ENV_DIR_Off(p) (MpReqFLAGS(p) &= ~MpReq_f_PERL_SET_ENV_DIR)


/* PERL_SET_ENV_SRV */
#define MpReq_f_PERL_SET_ENV_SRV 0x00000020
#define MpReqPERL_SET_ENV_SRV(p)  (MpReqFLAGS(p) & MpReq_f_PERL_SET_ENV_SRV)
#define MpReqPERL_SET_ENV_SRV_On(p)  (MpReqFLAGS(p) |= MpReq_f_PERL_SET_ENV_SRV)
#define MpReqPERL_SET_ENV_SRV_Off(p) (MpReqFLAGS(p) &= ~MpReq_f_PERL_SET_ENV_SRV)

#define MpReq_dump_flags(p, str) \
modperl_trace(NULL, "MpReq flags dump (%s):", str); \
modperl_trace(NULL, " CleanupRegistered %s", \
                         (MpReqFLAGS(p) & 0x00000008) ? "On " : "Off"); \
modperl_trace(NULL, " ParseHeaders %s", \
                         (MpReqFLAGS(p) & 0x00000002) ? "On " : "Off"); \
modperl_trace(NULL, " PerlSetEnvDir %s", \
                         (MpReqFLAGS(p) & 0x00000010) ? "On " : "Off"); \
modperl_trace(NULL, " PerlSetEnvSrv %s", \
                         (MpReqFLAGS(p) & 0x00000020) ? "On " : "Off"); \
modperl_trace(NULL, " SetGlobalRequest %s", \
                         (MpReqFLAGS(p) & 0x00000001) ? "On " : "Off"); \
modperl_trace(NULL, " SetupEnv %s", \
                         (MpReqFLAGS(p) & 0x00000004) ? "On " : "Off");
#define MpSrvFLAGS(p) (p)->flags->opts

#define MpSrvType 6

/* NONE */
#define MpSrv_f_NONE 0x00000000
#define MpSrvNONE(p)  (MpSrvFLAGS(p) & MpSrv_f_NONE)
#define MpSrvNONE_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_NONE)
#define MpSrvNONE_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_NONE)


/* CLONE */
#define MpSrv_f_CLONE 0x00000001
#define MpSrvCLONE(p)  (MpSrvFLAGS(p) & MpSrv_f_CLONE)
#define MpSrvCLONE_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_CLONE)
#define MpSrvCLONE_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_CLONE)


/* PARENT */
#define MpSrv_f_PARENT 0x00000002
#define MpSrvPARENT(p)  (MpSrvFLAGS(p) & MpSrv_f_PARENT)
#define MpSrvPARENT_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_PARENT)
#define MpSrvPARENT_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_PARENT)


/* ENABLE */
#define MpSrv_f_ENABLE 0x00000004
#define MpSrvENABLE(p)  (MpSrvFLAGS(p) & MpSrv_f_ENABLE)
#define MpSrvENABLE_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_ENABLE)
#define MpSrvENABLE_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_ENABLE)


/* AUTOLOAD */
#define MpSrv_f_AUTOLOAD 0x00000008
#define MpSrvAUTOLOAD(p)  (MpSrvFLAGS(p) & MpSrv_f_AUTOLOAD)
#define MpSrvAUTOLOAD_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_AUTOLOAD)
#define MpSrvAUTOLOAD_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_AUTOLOAD)


/* MERGE_HANDLERS */
#define MpSrv_f_MERGE_HANDLERS 0x00000010
#define MpSrvMERGE_HANDLERS(p)  (MpSrvFLAGS(p) & MpSrv_f_MERGE_HANDLERS)
#define MpSrvMERGE_HANDLERS_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_MERGE_HANDLERS)
#define MpSrvMERGE_HANDLERS_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_MERGE_HANDLERS)


/* ACCESS */
#define MpSrv_f_ACCESS 0x00000020
#define MpSrvACCESS(p)  (MpSrvFLAGS(p) & MpSrv_f_ACCESS)
#define MpSrvACCESS_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_ACCESS)
#define MpSrvACCESS_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_ACCESS)


/* AUTHEN */
#define MpSrv_f_AUTHEN 0x00000040
#define MpSrvAUTHEN(p)  (MpSrvFLAGS(p) & MpSrv_f_AUTHEN)
#define MpSrvAUTHEN_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_AUTHEN)
#define MpSrvAUTHEN_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_AUTHEN)


/* AUTHZ */
#define MpSrv_f_AUTHZ 0x00000080
#define MpSrvAUTHZ(p)  (MpSrvFLAGS(p) & MpSrv_f_AUTHZ)
#define MpSrvAUTHZ_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_AUTHZ)
#define MpSrvAUTHZ_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_AUTHZ)


/* CHILD_EXIT */
#define MpSrv_f_CHILD_EXIT 0x00000100
#define MpSrvCHILD_EXIT(p)  (MpSrvFLAGS(p) & MpSrv_f_CHILD_EXIT)
#define MpSrvCHILD_EXIT_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_CHILD_EXIT)
#define MpSrvCHILD_EXIT_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_CHILD_EXIT)


/* CHILD_INIT */
#define MpSrv_f_CHILD_INIT 0x00000200
#define MpSrvCHILD_INIT(p)  (MpSrvFLAGS(p) & MpSrv_f_CHILD_INIT)
#define MpSrvCHILD_INIT_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_CHILD_INIT)
#define MpSrvCHILD_INIT_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_CHILD_INIT)


/* CLEANUP */
#define MpSrv_f_CLEANUP 0x00000400
#define MpSrvCLEANUP(p)  (MpSrvFLAGS(p) & MpSrv_f_CLEANUP)
#define MpSrvCLEANUP_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_CLEANUP)
#define MpSrvCLEANUP_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_CLEANUP)


/* FIXUP */
#define MpSrv_f_FIXUP 0x00000800
#define MpSrvFIXUP(p)  (MpSrvFLAGS(p) & MpSrv_f_FIXUP)
#define MpSrvFIXUP_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_FIXUP)
#define MpSrvFIXUP_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_FIXUP)


/* HEADER_PARSER */
#define MpSrv_f_HEADER_PARSER 0x00001000
#define MpSrvHEADER_PARSER(p)  (MpSrvFLAGS(p) & MpSrv_f_HEADER_PARSER)
#define MpSrvHEADER_PARSER_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_HEADER_PARSER)
#define MpSrvHEADER_PARSER_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_HEADER_PARSER)


/* INPUT_FILTER */
#define MpSrv_f_INPUT_FILTER 0x00002000
#define MpSrvINPUT_FILTER(p)  (MpSrvFLAGS(p) & MpSrv_f_INPUT_FILTER)
#define MpSrvINPUT_FILTER_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_INPUT_FILTER)
#define MpSrvINPUT_FILTER_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_INPUT_FILTER)


/* LOG */
#define MpSrv_f_LOG 0x00004000
#define MpSrvLOG(p)  (MpSrvFLAGS(p) & MpSrv_f_LOG)
#define MpSrvLOG_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_LOG)
#define MpSrvLOG_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_LOG)


/* MAP_TO_STORAGE */
#define MpSrv_f_MAP_TO_STORAGE 0x00008000
#define MpSrvMAP_TO_STORAGE(p)  (MpSrvFLAGS(p) & MpSrv_f_MAP_TO_STORAGE)
#define MpSrvMAP_TO_STORAGE_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_MAP_TO_STORAGE)
#define MpSrvMAP_TO_STORAGE_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_MAP_TO_STORAGE)


/* OPEN_LOGS */
#define MpSrv_f_OPEN_LOGS 0x00010000
#define MpSrvOPEN_LOGS(p)  (MpSrvFLAGS(p) & MpSrv_f_OPEN_LOGS)
#define MpSrvOPEN_LOGS_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_OPEN_LOGS)
#define MpSrvOPEN_LOGS_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_OPEN_LOGS)


/* OUTPUT_FILTER */
#define MpSrv_f_OUTPUT_FILTER 0x00020000
#define MpSrvOUTPUT_FILTER(p)  (MpSrvFLAGS(p) & MpSrv_f_OUTPUT_FILTER)
#define MpSrvOUTPUT_FILTER_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_OUTPUT_FILTER)
#define MpSrvOUTPUT_FILTER_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_OUTPUT_FILTER)


/* POST_CONFIG */
#define MpSrv_f_POST_CONFIG 0x00040000
#define MpSrvPOST_CONFIG(p)  (MpSrvFLAGS(p) & MpSrv_f_POST_CONFIG)
#define MpSrvPOST_CONFIG_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_POST_CONFIG)
#define MpSrvPOST_CONFIG_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_POST_CONFIG)


/* POST_READ_REQUEST */
#define MpSrv_f_POST_READ_REQUEST 0x00080000
#define MpSrvPOST_READ_REQUEST(p)  (MpSrvFLAGS(p) & MpSrv_f_POST_READ_REQUEST)
#define MpSrvPOST_READ_REQUEST_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_POST_READ_REQUEST)
#define MpSrvPOST_READ_REQUEST_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_POST_READ_REQUEST)


/* PRE_CONNECTION */
#define MpSrv_f_PRE_CONNECTION 0x00100000
#define MpSrvPRE_CONNECTION(p)  (MpSrvFLAGS(p) & MpSrv_f_PRE_CONNECTION)
#define MpSrvPRE_CONNECTION_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_PRE_CONNECTION)
#define MpSrvPRE_CONNECTION_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_PRE_CONNECTION)


/* PROCESS_CONNECTION */
#define MpSrv_f_PROCESS_CONNECTION 0x00200000
#define MpSrvPROCESS_CONNECTION(p)  (MpSrvFLAGS(p) & MpSrv_f_PROCESS_CONNECTION)
#define MpSrvPROCESS_CONNECTION_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_PROCESS_CONNECTION)
#define MpSrvPROCESS_CONNECTION_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_PROCESS_CONNECTION)


/* RESPONSE */
#define MpSrv_f_RESPONSE 0x00400000
#define MpSrvRESPONSE(p)  (MpSrvFLAGS(p) & MpSrv_f_RESPONSE)
#define MpSrvRESPONSE_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_RESPONSE)
#define MpSrvRESPONSE_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_RESPONSE)


/* TRANS */
#define MpSrv_f_TRANS 0x00800000
#define MpSrvTRANS(p)  (MpSrvFLAGS(p) & MpSrv_f_TRANS)
#define MpSrvTRANS_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_TRANS)
#define MpSrvTRANS_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_TRANS)


/* TYPE */
#define MpSrv_f_TYPE 0x01000000
#define MpSrvTYPE(p)  (MpSrvFLAGS(p) & MpSrv_f_TYPE)
#define MpSrvTYPE_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_TYPE)
#define MpSrvTYPE_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_TYPE)


/* UNSET */
#define MpSrv_f_UNSET 0x02000000
#define MpSrvUNSET(p)  (MpSrvFLAGS(p) & MpSrv_f_UNSET)
#define MpSrvUNSET_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_UNSET)
#define MpSrvUNSET_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_UNSET)


/* INHERIT_SWITCHES */
#define MpSrv_f_INHERIT_SWITCHES 0x04000000
#define MpSrvINHERIT_SWITCHES(p)  (MpSrvFLAGS(p) & MpSrv_f_INHERIT_SWITCHES)
#define MpSrvINHERIT_SWITCHES_On(p)  (MpSrvFLAGS(p) |= MpSrv_f_INHERIT_SWITCHES)
#define MpSrvINHERIT_SWITCHES_Off(p) (MpSrvFLAGS(p) &= ~MpSrv_f_INHERIT_SWITCHES)

U32 modperl_flags_lookup_srv(const char *str);
#define MpSrv_dump_flags(p, str) \
modperl_trace(NULL, "MpSrv flags dump (%s):", str); \
modperl_trace(NULL, " Access %s", \
                         (MpSrvFLAGS(p) & 0x00000020) ? "On " : "Off"); \
modperl_trace(NULL, " Authen %s", \
                         (MpSrvFLAGS(p) & 0x00000040) ? "On " : "Off"); \
modperl_trace(NULL, " Authz %s", \
                         (MpSrvFLAGS(p) & 0x00000080) ? "On " : "Off"); \
modperl_trace(NULL, " Autoload %s", \
                         (MpSrvFLAGS(p) & 0x00000008) ? "On " : "Off"); \
modperl_trace(NULL, " ChildExit %s", \
                         (MpSrvFLAGS(p) & 0x00000100) ? "On " : "Off"); \
modperl_trace(NULL, " ChildInit %s", \
                         (MpSrvFLAGS(p) & 0x00000200) ? "On " : "Off"); \
modperl_trace(NULL, " Cleanup %s", \
                         (MpSrvFLAGS(p) & 0x00000400) ? "On " : "Off"); \
modperl_trace(NULL, " Clone %s", \
                         (MpSrvFLAGS(p) & 0x00000001) ? "On " : "Off"); \
modperl_trace(NULL, " Enable %s", \
                         (MpSrvFLAGS(p) & 0x00000004) ? "On " : "Off"); \
modperl_trace(NULL, " Fixup %s", \
                         (MpSrvFLAGS(p) & 0x00000800) ? "On " : "Off"); \
modperl_trace(NULL, " HeaderParser %s", \
                         (MpSrvFLAGS(p) & 0x00001000) ? "On " : "Off"); \
modperl_trace(NULL, " InheritSwitches %s", \
                         (MpSrvFLAGS(p) & 0x04000000) ? "On " : "Off"); \
modperl_trace(NULL, " InputFilter %s", \
                         (MpSrvFLAGS(p) & 0x00002000) ? "On " : "Off"); \
modperl_trace(NULL, " Log %s", \
                         (MpSrvFLAGS(p) & 0x00004000) ? "On " : "Off"); \
modperl_trace(NULL, " MapToStorage %s", \
                         (MpSrvFLAGS(p) & 0x00008000) ? "On " : "Off"); \
modperl_trace(NULL, " MergeHandlers %s", \
                         (MpSrvFLAGS(p) & 0x00000010) ? "On " : "Off"); \
modperl_trace(NULL, " OpenLogs %s", \
                         (MpSrvFLAGS(p) & 0x00010000) ? "On " : "Off"); \
modperl_trace(NULL, " OutputFilter %s", \
                         (MpSrvFLAGS(p) & 0x00020000) ? "On " : "Off"); \
modperl_trace(NULL, " Parent %s", \
                         (MpSrvFLAGS(p) & 0x00000002) ? "On " : "Off"); \
modperl_trace(NULL, " PostConfig %s", \
                         (MpSrvFLAGS(p) & 0x00040000) ? "On " : "Off"); \
modperl_trace(NULL, " PostReadRequest %s", \
                         (MpSrvFLAGS(p) & 0x00080000) ? "On " : "Off"); \
modperl_trace(NULL, " PreConnection %s", \
                         (MpSrvFLAGS(p) & 0x00100000) ? "On " : "Off"); \
modperl_trace(NULL, " ProcessConnection %s", \
                         (MpSrvFLAGS(p) & 0x00200000) ? "On " : "Off"); \
modperl_trace(NULL, " Response %s", \
                         (MpSrvFLAGS(p) & 0x00400000) ? "On " : "Off"); \
modperl_trace(NULL, " Trans %s", \
                         (MpSrvFLAGS(p) & 0x00800000) ? "On " : "Off"); \
modperl_trace(NULL, " Type %s", \
                         (MpSrvFLAGS(p) & 0x01000000) ? "On " : "Off"); \
modperl_trace(NULL, " Unset %s", \
                         (MpSrvFLAGS(p) & 0x02000000) ? "On " : "Off");
#define MpSrvHOOKS_ALL_On(p) MpSrvFLAGS(p) |= (MpSrv_f_ACCESS|MpSrv_f_AUTHEN|MpSrv_f_AUTHZ|MpSrv_f_CHILD_EXIT|MpSrv_f_CHILD_INIT|MpSrv_f_CLEANUP|MpSrv_f_FIXUP|MpSrv_f_HEADER_PARSER|MpSrv_f_INPUT_FILTER|MpSrv_f_LOG|MpSrv_f_MAP_TO_STORAGE|MpSrv_f_OPEN_LOGS|MpSrv_f_OUTPUT_FILTER|MpSrv_f_POST_CONFIG|MpSrv_f_POST_READ_REQUEST|MpSrv_f_PRE_CONNECTION|MpSrv_f_PROCESS_CONNECTION|MpSrv_f_RESPONSE|MpSrv_f_TRANS|MpSrv_f_TYPE)

#define MpSrvOPT_ITHREAD_ONLY(o) \
(o == MpSrv_f_CLONE) || (o == MpSrv_f_PARENT)

#endif /* MODPERL_FLAGS_H */
