=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/nc/netcat.c,v retrieving revision 1.220 retrieving revision 1.221 diff -c -r1.220 -r1.221 *** src/usr.bin/nc/netcat.c 2022/12/18 12:45:34 1.220 --- src/usr.bin/nc/netcat.c 2022/12/18 12:47:31 1.221 *************** *** 1,4 **** ! /* $OpenBSD: netcat.c,v 1.220 2022/12/18 12:45:34 tb Exp $ */ /* * Copyright (c) 2001 Eric Jackson * Copyright (c) 2015 Bob Beck. All rights reserved. --- 1,4 ---- ! /* $OpenBSD: netcat.c,v 1.221 2022/12/18 12:47:31 tb Exp $ */ /* * Copyright (c) 2001 Eric Jackson * Copyright (c) 2015 Bob Beck. All rights reserved. *************** *** 131,137 **** int socks_connect(const char *, const char *, struct addrinfo, const char *, const char *, struct addrinfo, int, const char *); int udptest(int); ! void connection_info(const char *, const char *, const char *); int unix_bind(char *, int); int unix_connect(char *); int unix_listen(char *); --- 131,137 ---- int socks_connect(const char *, const char *, struct addrinfo, const char *, const char *, struct addrinfo, int, const char *); int udptest(int); ! void connection_info(const char *, const char *, const char *, const char *); int unix_bind(char *, int); int unix_connect(char *); int unix_listen(char *); *************** *** 708,714 **** } } ! connection_info(host, portlist[i], ipaddr); } if (Fflag) fdpass(s); --- 708,715 ---- } } ! connection_info(host, portlist[i], ! uflag ? "udp" : "tcp", ipaddr); } if (Fflag) fdpass(s); *************** *** 1519,1525 **** } void ! connection_info(const char *host, const char *port, const char *ipaddr) { struct servent *sv; --- 1520,1527 ---- } void ! connection_info(const char *host, const char *port, const char *proto, ! const char *ipaddr) { struct servent *sv; *************** *** 1527,1533 **** if (nflag) sv = NULL; else { ! sv = getservbyport(ntohs(atoi(port)), uflag ? "udp" : "tcp"); } fprintf(stderr, "Connection to %s", host); --- 1529,1535 ---- if (nflag) sv = NULL; else { ! sv = getservbyport(ntohs(atoi(port)), proto); } fprintf(stderr, "Connection to %s", host); *************** *** 1539,1546 **** if (!nflag && !xflag && strcmp(host, ipaddr) != 0) fprintf(stderr, " (%s)", ipaddr); ! fprintf(stderr, " %s port [%s/%s] succeeded!\n", ! port, uflag ? "udp" : "tcp", sv ? sv->s_name : "*"); } void --- 1541,1548 ---- if (!nflag && !xflag && strcmp(host, ipaddr) != 0) fprintf(stderr, " (%s)", ipaddr); ! fprintf(stderr, " %s port [%s/%s] succeeded!\n", port, proto, ! sv ? sv->s_name : "*"); } void