@@ -195,6 +195,12 @@ int start_server_addr(const struct sockaddr *addr, socklen_t addrlen, int type)
return __start_server(type, 0, addr, addrlen, 0, NULL, 0);
}
+int start_server_setsockopt(const struct sockaddr *addr, socklen_t addrlen, int type,
+ int *(*setsockopt)(int fd, int val), int val)
+{
+ return __start_server(type, 0, addr, addrlen, 0, setsockopt, val);
+}
+
void free_fds(int *fds, unsigned int nr_close_fds)
{
if (fds) {
@@ -55,6 +55,8 @@ int *start_reuseport_server(int family, int type, const char *addr_str,
__u16 port, int timeout_ms,
unsigned int nr_listens);
int start_server_addr(const struct sockaddr *addr, socklen_t addrlen, int type);
+int start_server_setsockopt(const struct sockaddr *addr, socklen_t addrlen, int type,
+ int *(*setsockopt)(int fd, int val), int val);
void free_fds(int *fds, unsigned int nr_close_fds);
int connect_to_addr(const struct sockaddr_storage *addr, socklen_t len, int type);
int connect_to_fd(int server_fd, int timeout_ms);