0
0
mirror of https://github.com/hufrea/byedpi.git synced 2025-06-30 18:43:04 +00:00
byedpi/extend.h
2025-02-06 17:44:40 +03:00

29 lines
656 B
C

#ifndef EXTEND_H
#define EXTEND_H
#include <stddef.h>
#include "proxy.h"
int socket_mod(int fd);
int connect_hook(struct poolhd *pool, struct eval *val,
const union sockaddr_u *dst, evcb_t next);
ssize_t tcp_send_hook(struct poolhd *pool,
struct eval *remote, struct buffer *buff, ssize_t *n);
ssize_t tcp_recv_hook(struct poolhd *pool,
struct eval *val, struct buffer *buff);
ssize_t udp_hook(struct eval *val,
char *buffer, ssize_t n, const union sockaddr_u *dst);
#ifdef __linux__
static int protect(int conn_fd, const char *path);
#else
#define protect(fd, path) 0
#endif
#endif