nginx_sys/http.rs
1use core::mem::offset_of;
2
3use crate::bindings::ngx_http_conf_ctx_t;
4
5/// The offset of the `main_conf` field in the `ngx_http_conf_ctx_t` struct.
6///
7/// This is used to access the main configuration context for an HTTP module.
8pub const NGX_HTTP_MAIN_CONF_OFFSET: usize = offset_of!(ngx_http_conf_ctx_t, main_conf);
9
10/// The offset of the `srv_conf` field in the `ngx_http_conf_ctx_t` struct.
11///
12/// This is used to access the server configuration context for an HTTP module.
13pub const NGX_HTTP_SRV_CONF_OFFSET: usize = offset_of!(ngx_http_conf_ctx_t, srv_conf);
14
15/// The offset of the `loc_conf` field in the `ngx_http_conf_ctx_t` struct.
16///
17/// This is used to access the location configuration context for an HTTP module.
18pub const NGX_HTTP_LOC_CONF_OFFSET: usize = offset_of!(ngx_http_conf_ctx_t, loc_conf);