2024-08-07 14:25:26 +03:00
|
|
|
#ifndef EXTEND_H
|
|
|
|
#define EXTEND_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
#include "proxy.h"
|
|
|
|
|
2024-11-09 18:07:27 +03:00
|
|
|
int socket_mod(int fd);
|
2024-08-14 15:20:35 +03:00
|
|
|
|
2024-04-23 08:47:27 +03:00
|
|
|
int connect_hook(struct poolhd *pool, struct eval *val,
|
2025-01-29 17:51:54 +03:00
|
|
|
const union sockaddr_u *dst, evcb_t next);
|
2024-04-23 08:47:27 +03:00
|
|
|
|
2025-01-29 01:13:55 +03:00
|
|
|
ssize_t tcp_send_hook(struct poolhd *pool,
|
2025-02-06 17:44:40 +03:00
|
|
|
struct eval *remote, struct buffer *buff, ssize_t *n);
|
2024-10-20 18:50:08 +03:00
|
|
|
|
2025-01-29 01:13:55 +03:00
|
|
|
ssize_t tcp_recv_hook(struct poolhd *pool,
|
|
|
|
struct eval *val, struct buffer *buff);
|
2024-10-20 18:50:08 +03:00
|
|
|
|
2024-07-29 12:26:42 +03:00
|
|
|
ssize_t udp_hook(struct eval *val,
|
2025-01-12 13:56:24 +03:00
|
|
|
char *buffer, ssize_t n, const union sockaddr_u *dst);
|
2025-02-06 17:44:40 +03:00
|
|
|
|
2024-04-28 02:50:46 +03:00
|
|
|
#ifdef __linux__
|
2024-11-09 18:07:27 +03:00
|
|
|
static int protect(int conn_fd, const char *path);
|
2024-04-28 02:50:46 +03:00
|
|
|
#else
|
|
|
|
#define protect(fd, path) 0
|
2024-08-07 14:25:26 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|