From 1249e72d92be71fd05846e9cdd3cc2523cd58816 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 12 Mar 2013 08:33:16 +0100 Subject: util: bind/connect: log which protocol is used --- util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util.c b/util.c index cedcc72..fc0630e 100644 --- a/util.c +++ b/util.c @@ -139,7 +139,8 @@ bind_socket(int socktype, const char *host, const char *port) hints.ai_family = AF_INET; hints.ai_socktype = socktype; - printf("bind to host: %s, port: %s\n", host, port); + printf("bind to host: %s, %s.port: %s\n", + host, socktype == SOCK_STREAM ? "tcp" : "udp", port); s = getaddrinfo(host, port, &hints, &result); if (s != 0) { @@ -186,7 +187,8 @@ connect_to_host(int socktype, const char *host, const char *port) hints.ai_family = AF_INET; hints.ai_socktype = socktype; - printf("connect to host: %s, port: %s\n", host, port); + printf("connect to host: %s, %s.port: %s\n", + host, socktype == SOCK_STREAM ? "tcp" : "udp", port); s = getaddrinfo(host, port, &hints, &result); if (s != 0) { -- cgit