Apache HTTPD
Classes | Macros | Typedefs | Enumerations | Functions
mod_lua.h File Reference
module lua_module
#include <stdio.h>
#include "httpd.h"
#include "http_core.h"
#include "http_config.h"
#include "http_request.h"
#include "http_log.h"
#include "http_protocol.h"
#include "http_ssl.h"
#include "ap_regex.h"
#include "ap_config.h"
#include "util_filter.h"
#include "apr_thread_rwlock.h"
#include "apr_strings.h"
#include "apr_tables.h"
#include "apr_hash.h"
#include "apr_buckets.h"
#include "apr_file_info.h"
#include "apr_time.h"
#include "apr_hooks.h"
#include "apr_reslist.h"
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#include "lua_request.h"
#include "lua_vmprep.h"

Go to the source code of this file.

Classes

struct  ap_lua_dir_cfg
 
struct  ap_lua_server_cfg
 
struct  mapped_request_details
 
struct  ap_lua_request_cfg
 
struct  ap_lua_filter_ctx
 
struct  ap_lua_LINK_lua_open_t
 
struct  ap_lua_LINK_lua_request_t
 

Macros

#define lua_rawlen(L, i)   lua_objlen(L, (i))
 
#define luaL_setfuncs_compat(a, b)   luaL_register(a,NULL,b)
 
#define lua_resume(a, b, c)   (*(c) = 1, lua_resume(a, b))
 
#define AP_LUA_DECLARE(type)   type
 
#define AP_LUA_DECLARE_NONSTD(type)   type
 
#define AP_LUA_DECLARE_DATA
 

Typedefs

typedef int ap_lua_HOOK_lua_open_t(lua_State *L, apr_pool_t *p)
 
typedef struct ap_lua_LINK_lua_open_t ap_lua_LINK_lua_open_t
 
typedef int ap_lua_HOOK_lua_request_t(lua_State *L, request_rec *r)
 
typedef struct ap_lua_LINK_lua_request_t ap_lua_LINK_lua_request_t
 

Enumerations

enum  ap_lua_inherit_t { AP_LUA_INHERIT_UNSET = -1 , AP_LUA_INHERIT_NONE = 0 , AP_LUA_INHERIT_PARENT_FIRST = 1 , AP_LUA_INHERIT_PARENT_LAST = 2 }
 

Functions

void ap_lua_rstack_dump (lua_State *L, request_rec *r, const char *msg)
 
void ap_lua_hook_lua_open (ap_lua_HOOK_lua_open_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
 
int ap_lua_run_lua_open (lua_State *L, apr_pool_t *p)
 
apr_array_header_tap_lua_hook_get_lua_open (void)
 
void ap_lua_hook_lua_request (ap_lua_HOOK_lua_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
 
int ap_lua_run_lua_request (lua_State *L, request_rec *r)
 
apr_array_header_tap_lua_hook_get_lua_request (void)
 
const charap_lua_ssl_val (apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, const char *var)
 
int ap_lua_ssl_is_https (conn_rec *c)
 

Macro Definition Documentation

◆ AP_LUA_DECLARE

#define AP_LUA_DECLARE (   type)    type

Definition at line 75 of file mod_lua.h.

◆ AP_LUA_DECLARE_DATA

#define AP_LUA_DECLARE_DATA

Definition at line 77 of file mod_lua.h.

◆ AP_LUA_DECLARE_NONSTD

#define AP_LUA_DECLARE_NONSTD (   type)    type

Definition at line 76 of file mod_lua.h.

◆ lua_rawlen

#define lua_rawlen (   L,
  i 
)    lua_objlen(L, (i))

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 63 of file mod_lua.h.

◆ lua_resume

#define lua_resume (   a,
  b,
  c 
)    (*(c) = 1, lua_resume(a, b))

Definition at line 65 of file mod_lua.h.

◆ luaL_setfuncs_compat

#define luaL_setfuncs_compat (   a,
  b 
)    luaL_register(a,NULL,b)

Definition at line 64 of file mod_lua.h.

Typedef Documentation

◆ ap_lua_HOOK_lua_open_t

typedef int ap_lua_HOOK_lua_open_t(lua_State *L, apr_pool_t *p)

Definition at line 177 of file mod_lua.h.

◆ ap_lua_HOOK_lua_request_t

typedef int ap_lua_HOOK_lua_request_t(lua_State *L, request_rec *r)

Definition at line 180 of file mod_lua.h.

◆ ap_lua_LINK_lua_open_t

◆ ap_lua_LINK_lua_request_t

Enumeration Type Documentation

◆ ap_lua_inherit_t

Enumerator
AP_LUA_INHERIT_UNSET 
AP_LUA_INHERIT_NONE 
AP_LUA_INHERIT_PARENT_FIRST 
AP_LUA_INHERIT_PARENT_LAST 

Definition at line 96 of file mod_lua.h.

Function Documentation

◆ ap_lua_hook_get_lua_open()

apr_array_header_t * ap_lua_hook_get_lua_open ( void  )

◆ ap_lua_hook_get_lua_request()

apr_array_header_t * ap_lua_hook_get_lua_request ( void  )

◆ ap_lua_hook_lua_open()

void ap_lua_hook_lua_open ( ap_lua_HOOK_lua_open_t pf,
const char *const aszPre,
const char *const aszSucc,
int  nOrder 
)

◆ ap_lua_hook_lua_request()

void ap_lua_hook_lua_request ( ap_lua_HOOK_lua_request_t pf,
const char *const aszPre,
const char *const aszSucc,
int  nOrder 
)

◆ ap_lua_rstack_dump()

void ap_lua_rstack_dump ( lua_State L,
request_rec r,
const char msg 
)

make a userdata out of a C pointer, and vice versa instead of using lightuserdata

Definition at line 50 of file lua_request.c.

◆ ap_lua_run_lua_open()

int ap_lua_run_lua_open ( lua_State L,
apr_pool_t p 
)

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

< Module has handled this stage.

< Module has handled this stage.

< Module declines to handle

< Module has handled this stage.

Definition at line 50 of file mod_lua.c.

◆ ap_lua_run_lua_request()

int ap_lua_run_lua_request ( lua_State L,
request_rec r 
)

< Module has handled this stage.

< Module has handled this stage.

< Module declines to handle

< Module has handled this stage.

Definition at line 54 of file mod_lua.c.

◆ ap_lua_ssl_is_https()

int ap_lua_ssl_is_https ( conn_rec c)

Definition at line 1711 of file mod_lua.c.

◆ ap_lua_ssl_val()

const char * ap_lua_ssl_val ( apr_pool_t p,
server_rec s,
conn_rec c,
request_rec r,
const char var 
)

Definition at line 1705 of file mod_lua.c.