http_main.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* Licensed to the Apache Software Foundation (ASF) under one or more
  2. * contributor license agreements. See the NOTICE file distributed with
  3. * this work for additional information regarding copyright ownership.
  4. * The ASF licenses this file to You under the Apache License, Version 2.0
  5. * (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /**
  17. * @file http_main.h
  18. * @brief Command line options
  19. *
  20. * @defgroup APACHE_CORE_MAIN Command line options
  21. * @ingroup APACHE_CORE
  22. * @{
  23. */
  24. #ifndef APACHE_HTTP_MAIN_H
  25. #define APACHE_HTTP_MAIN_H
  26. #include "httpd.h"
  27. #include "apr_optional.h"
  28. /** AP_SERVER_BASEARGS is the command argument list parsed by http_main.c
  29. * in apr_getopt() format. Use this for default'ing args that the MPM
  30. * can safely ignore and pass on from its rewrite_args() handler.
  31. */
  32. #define AP_SERVER_BASEARGS "C:c:D:d:E:e:f:vVlLtTSMh?X"
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. /** The name of the Apache executable */
  37. AP_DECLARE_DATA extern const char *ap_server_argv0;
  38. /** The global server's ServerRoot */
  39. AP_DECLARE_DATA extern const char *ap_server_root;
  40. /** The global server's DefaultRuntimeDir
  41. * This is not usable directly in the general case; use
  42. * ap_runtime_dir_relative() instead.
  43. */
  44. AP_DECLARE_DATA extern const char *ap_runtime_dir;
  45. /** The global server's server_rec */
  46. AP_DECLARE_DATA extern server_rec *ap_server_conf;
  47. /** global pool, for access prior to creation of server_rec */
  48. AP_DECLARE_DATA extern apr_pool_t *ap_pglobal;
  49. /** state of the server (startup, exiting, ...) */
  50. AP_DECLARE_DATA extern int ap_main_state;
  51. /** run mode (normal, config test, config dump, ...) */
  52. AP_DECLARE_DATA extern int ap_run_mode;
  53. /** run mode (normal, config test, config dump, ...) */
  54. AP_DECLARE_DATA extern int ap_config_generation;
  55. /* for -C, -c and -D switches */
  56. /** An array of all -C directives. These are processed before the server's
  57. * config file */
  58. AP_DECLARE_DATA extern apr_array_header_t *ap_server_pre_read_config;
  59. /** An array of all -c directives. These are processed after the server's
  60. * config file */
  61. AP_DECLARE_DATA extern apr_array_header_t *ap_server_post_read_config;
  62. /** An array of all -D defines on the command line. This allows people to
  63. * effect the server based on command line options */
  64. AP_DECLARE_DATA extern apr_array_header_t *ap_server_config_defines;
  65. /** Available integer for using the -T switch */
  66. AP_DECLARE_DATA extern int ap_document_root_check;
  67. /**
  68. * An optional function to send signal to server on presence of '-k'
  69. * command line argument.
  70. * @param status The exit status after sending signal
  71. * @param pool Memory pool to allocate from
  72. */
  73. APR_DECLARE_OPTIONAL_FN(int, ap_signal_server, (int *status, apr_pool_t *pool));
  74. #ifdef __cplusplus
  75. }
  76. #endif
  77. #endif /* !APACHE_HTTP_MAIN_H */
  78. /** @} */