Module private headers moved to modules
This commit is contained in:
@ -32,7 +32,7 @@
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#include <httpd.h>
|
||||
#include "httpd.h"
|
||||
#include <maxscale/alloc.h>
|
||||
#include <maxscale/gw_protocol.h>
|
||||
#include <maxscale/gw.h>
|
||||
|
61
server/modules/protocol/HTTPD/httpd.h
Normal file
61
server/modules/protocol/HTTPD/httpd.h
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
* Use of this software is governed by the Business Source License included
|
||||
* in the LICENSE.TXT file and at www.mariadb.com/bsl.
|
||||
*
|
||||
* Change Date: 2019-07-01
|
||||
*
|
||||
* On the date above, in accordance with the Business Source License, use
|
||||
* of this software will be governed by version 2 or later of the General
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Revision History
|
||||
*
|
||||
* Date Who Description
|
||||
* 08-07-2013 Massimiliano Pinto Added HTTPD protocol header file
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <maxscale/dcb.h>
|
||||
#include <maxscale/buffer.h>
|
||||
#include <maxscale/service.h>
|
||||
#include <maxscale/session.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <maxscale/router.h>
|
||||
#include <maxscale/poll.h>
|
||||
#include <maxscale/atomic.h>
|
||||
#include <maxscale/gw.h>
|
||||
|
||||
#define HTTPD_SMALL_BUFFER 1024
|
||||
#define HTTPD_METHOD_MAXLEN 128
|
||||
#define HTTPD_USER_MAXLEN 128
|
||||
#define HTTPD_HOSTNAME_MAXLEN 512
|
||||
#define HTTPD_USERAGENT_MAXLEN 1024
|
||||
#define HTTPD_FIELD_MAXLEN 8192
|
||||
#define HTTPD_REQUESTLINE_MAXLEN 8192
|
||||
|
||||
/**
|
||||
* HTTPD session specific data
|
||||
*
|
||||
*/
|
||||
typedef struct httpd_session
|
||||
{
|
||||
char user[HTTPD_USER_MAXLEN]; /*< username for authentication*/
|
||||
char *cookies; /*< all input cookies */
|
||||
char hostname[HTTPD_HOSTNAME_MAXLEN]; /*< The hostname */
|
||||
char useragent[HTTPD_USERAGENT_MAXLEN]; /*< The useragent */
|
||||
char method[HTTPD_METHOD_MAXLEN]; /*< The HTTPD Method */
|
||||
char *url; /*< the URL in the request */
|
||||
char *path_info; /*< the Pathinfo, starts with /, is the extra path segments after the document name */
|
||||
char *query_string; /*< the Query string, starts with ?, after path_info and document name */
|
||||
int headers_received; /*< All the headers has been received, if 1 */
|
||||
} HTTPD_session;
|
@ -33,8 +33,8 @@
|
||||
#include <maxscale/skygw_utils.h>
|
||||
#include <maxscale/log_manager.h>
|
||||
#include <maxscale/modinfo.h>
|
||||
#include <maxscaled.h>
|
||||
#include <maxadmin.h>
|
||||
#include "maxscaled.h"
|
||||
#include <maxscale/maxadmin.h>
|
||||
#include <maxscale/alloc.h>
|
||||
|
||||
/* @see function load_module in load_utils.c for explanation of the following
|
||||
|
44
server/modules/protocol/maxscaled/maxscaled.h
Normal file
44
server/modules/protocol/maxscaled/maxscaled.h
Normal file
@ -0,0 +1,44 @@
|
||||
#ifndef _MAXSCALED_H
|
||||
#define _MAXSCALED_H
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
* Use of this software is governed by the Business Source License included
|
||||
* in the LICENSE.TXT file and at www.mariadb.com/bsl.
|
||||
*
|
||||
* Change Date: 2019-07-01
|
||||
*
|
||||
* On the date above, in accordance with the Business Source License, use
|
||||
* of this software will be governed by version 2 or later of the General
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file maxscaled.h The maxscaled protocol module header file
|
||||
*
|
||||
* @verbatim
|
||||
* Revision History
|
||||
*
|
||||
* Date Who Description
|
||||
* 13/06/14 Mark Riddoch Initial implementation
|
||||
*
|
||||
* @endverbatim
|
||||
*/
|
||||
#include <maxscale/dcb.h>
|
||||
#include <maxscale/spinlock.h>
|
||||
#include <maxscale/housekeeper.h>
|
||||
/**
|
||||
* The maxscaled specific protocol structure to put in the DCB.
|
||||
*/
|
||||
typedef struct maxscaled
|
||||
{
|
||||
SPINLOCK lock; /**< Protocol structure lock */
|
||||
int state; /**< The connection state */
|
||||
char *username; /**< The login name of the user */
|
||||
} MAXSCALED;
|
||||
|
||||
#define MAXSCALED_STATE_LOGIN 1 /**< Waiting for user */
|
||||
#define MAXSCALED_STATE_PASSWD 2 /**< Waiting for password */
|
||||
#define MAXSCALED_STATE_DATA 3 /**< User logged in */
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user