mirror of
https://github.com/nmap/nmap.git
synced 2025-12-20 22:49:01 +00:00
Removed per-node information structures as well as data encoding/decoding
interface. These were unused and I think won't be required by any proxy type (HTTP and SOCKS).
This commit is contained in:
@@ -69,11 +69,7 @@ struct http_proxy_info {
|
||||
/* ---- PROTOTYPES ---- */
|
||||
static int proxy_http_node_new(struct proxy_node **node, const struct uri *uri);
|
||||
static void proxy_http_node_delete(struct proxy_node *node);
|
||||
static int proxy_http_info_new(void **info);
|
||||
static void proxy_http_info_delete(void *info);
|
||||
static void proxy_http_handler(nsock_pool nspool, nsock_event nsevent, void *udata);
|
||||
static char *proxy_http_encode(const char *src, size_t len, size_t *dlen);
|
||||
static char *proxy_http_decode(const char *src, size_t len, size_t *dlen);
|
||||
|
||||
|
||||
/* ---- PROXY DEFINITION ---- */
|
||||
@@ -82,11 +78,7 @@ const struct proxy_op proxy_http_ops = {
|
||||
.type = PROXY_TYPE_HTTP,
|
||||
.node_new = proxy_http_node_new,
|
||||
.node_delete = proxy_http_node_delete,
|
||||
.info_new = proxy_http_info_new,
|
||||
.info_delete = proxy_http_info_delete,
|
||||
.handler = proxy_http_handler,
|
||||
.encode = proxy_http_encode,
|
||||
.decode = proxy_http_decode
|
||||
};
|
||||
|
||||
|
||||
@@ -118,22 +110,6 @@ void proxy_http_node_delete(struct proxy_node *node) {
|
||||
free(node);
|
||||
}
|
||||
|
||||
int proxy_http_info_new(void **info) {
|
||||
struct http_proxy_info *pxi;
|
||||
|
||||
pxi = (struct http_proxy_info *)safe_zalloc(sizeof(struct http_proxy_info));
|
||||
pxi->dummy = NULL; // TODO
|
||||
|
||||
*info = pxi;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void proxy_http_info_delete(void *info) {
|
||||
if (info)
|
||||
free(info);
|
||||
}
|
||||
|
||||
void proxy_http_handler(nsock_pool nspool, nsock_event nsevent, void *udata) {
|
||||
mspool *nsp = (mspool *)nspool;
|
||||
msevent *nse = (msevent *)nsevent;
|
||||
@@ -180,7 +156,6 @@ void proxy_http_handler(nsock_pool nspool, nsock_event nsevent, void *udata) {
|
||||
} else {
|
||||
nse->iod->px_ctx->px_current = nse->iod->px_ctx->px_current->next;
|
||||
nse->iod->px_ctx->px_state = PROXY_STATE_INITIAL;
|
||||
|
||||
nsock_proxy_ev_dispatch(nsp, nse, udata);
|
||||
}
|
||||
}
|
||||
@@ -195,13 +170,3 @@ void proxy_http_handler(nsock_pool nspool, nsock_event nsevent, void *udata) {
|
||||
}
|
||||
}
|
||||
|
||||
char *proxy_http_encode(const char *src, size_t len, size_t *dlen) {
|
||||
// TODO
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *proxy_http_decode(const char *src, size_t len, size_t *dlen) {
|
||||
// TODO
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user