diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-06-25 09:01:50 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-06-25 09:01:50 +0000 |
| commit | 7c5d186df1f7f00567660354905435cedffc3e20 (patch) | |
| tree | 2911cf6d75a5be2a62fd493f2ad1a05ffc7c6bb3 /src/include | |
| parent | 51ff1577ce59449b36a86f21a90101bc2750943f (diff) | |
| download | tipidee-7c5d186df1f7f00567660354905435cedffc3e20.tar.gz | |
Implement fastcgi, except the protocol itself
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/tipidee/conf.h | 10 | ||||
| -rw-r--r-- | src/include/tipidee/redirection.h | 38 | ||||
| -rw-r--r-- | src/include/tipidee/tipidee.h | 1 |
3 files changed, 40 insertions, 9 deletions
diff --git a/src/include/tipidee/conf.h b/src/include/tipidee/conf.h index a173d6a..95273d6 100644 --- a/src/include/tipidee/conf.h +++ b/src/include/tipidee/conf.h @@ -10,6 +10,7 @@ #include <skalibs/uint32.h> #include <skalibs/cdb.h> +#include <tipidee/redirection.h> #include <tipidee/resattr.h> #include <tipidee/uri.h> @@ -22,15 +23,6 @@ struct tipidee_conf_s } ; #define TIPIDEE_CONF_ZERO { .c = CDB_ZERO } -typedef struct tipidee_redirection_s tipidee_redirection, *tipidee_redirection_ref ; -struct tipidee_redirection_s -{ - char const *sub ; - char const *location ; - uint8_t type ; -} ; -#define TIPIDEE_REDIRECTION_ZERO { .sub = 0, .location = 0, .type = 0 } - extern void tipidee_conf_free (tipidee_conf *) ; extern int tipidee_conf_init (tipidee_conf *, char const *) ; diff --git a/src/include/tipidee/redirection.h b/src/include/tipidee/redirection.h new file mode 100644 index 0000000..6c8d7d1 --- /dev/null +++ b/src/include/tipidee/redirection.h @@ -0,0 +1,38 @@ +/* ISC license. */ + +#ifndef TIPIDEE_REDIRECTION_H +#define TIPIDEE_REDIRECTION_H + +#include <stdint.h> + +enum tipidee_redir_type_e +{ + TIPIDEE_REDIR_NONE, + TIPIDEE_REDIR_REDIRECT, + TIPIDEE_REDIR_RPROXY, + TIPIDEE_REDIR_FASTCGI +} ; + + + /* for redirect */ +#define TIPIDEE_REDIR_307 0x0 +#define TIPIDEE_REDIR_308 0x1 +#define TIPIDEE_REDIR_302 0x2 +#define TIPIDEE_REDIR_301 0x3 + + /* for rproxy or fastcgi */ +#define TIPIDEE_REDIR_ISINET 0x1 +#define TIPIDEE_REDIR_ISV6 0x2 + +typedef struct tipidee_redirection_s tipidee_redirection, *tipidee_redirection_ref ; +struct tipidee_redirection_s +{ + char const *sub ; + char const *addr ; + uint16_t port ; + uint8_t type : 4 ; + uint8_t flags : 4 ; +} ; +#define TIPIDEE_REDIRECTION_ZERO { .sub = 0, .addr = 0, .port = 0, .type = TIPIDEE_REDIR_NONE, .flags = 0 } + +#endif diff --git a/src/include/tipidee/tipidee.h b/src/include/tipidee/tipidee.h index 7c5154c..50ee7bf 100644 --- a/src/include/tipidee/tipidee.h +++ b/src/include/tipidee/tipidee.h @@ -8,6 +8,7 @@ #include <tipidee/headers.h> #include <tipidee/log.h> #include <tipidee/method.h> +#include <tipidee/redirection.h> #include <tipidee/resattr.h> #include <tipidee/response.h> #include <tipidee/rql.h> |
