From 3a2abc58e86cdb78712bf9594f3b18ef6c3e5f19 Mon Sep 17 00:00:00 2001 From: xfnw Date: Fri, 18 Feb 2022 20:13:36 -0500 Subject: [PATCH] support ipv6 --- fbflut.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fbflut.c b/fbflut.c index ad56c1e..cfb3dd2 100644 --- a/fbflut.c +++ b/fbflut.c @@ -129,13 +129,13 @@ int main(int argc, char *argv[]) { int socket_desc, client_sock, c; - struct sockaddr_in server, client; + struct sockaddr_in6 server, client; - socket_desc = socket(AF_INET, SOCK_STREAM, 0); + socket_desc = socket(AF_INET6, SOCK_STREAM, 0); - server.sin_family = AF_INET; - server.sin_addr.s_addr = INADDR_ANY; - server.sin_port = htons(port); + server.sin6_family = AF_INET6; + server.sin6_addr = in6addr_any; + server.sin6_port = htons(port); struct timeval tv; tv.tv_sec = 60;