From owner-p4-projects@FreeBSD.ORG Mon Aug 29 21:28:01 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B099E16A421; Mon, 29 Aug 2005 21:28:00 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8787916A41F for ; Mon, 29 Aug 2005 21:28:00 +0000 (GMT) (envelope-from soc-victor@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6253F43D58 for ; Mon, 29 Aug 2005 21:27:58 +0000 (GMT) (envelope-from soc-victor@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j7TLRwWt004012 for ; Mon, 29 Aug 2005 21:27:58 GMT (envelope-from soc-victor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j7TLRvkm004009 for perforce@freebsd.org; Mon, 29 Aug 2005 21:27:58 GMT (envelope-from soc-victor@freebsd.org) Date: Mon, 29 Aug 2005 21:27:58 GMT Message-Id: <200508292127.j7TLRvkm004009@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-victor@freebsd.org using -f From: Victor Cruceru To: Perforce Change Reviews Cc: Subject: PERFORCE change 82805 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2005 21:28:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=82805 Change 82805 by soc-victor@soc-victor_82.76.158.176 on 2005/08/29 21:27:13 Renamed a macro. Affected files ... .. //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_tcp_udp46/tcp46_snmp.c#6 edit .. //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_tcp_udp46/tcp_udp46.h#4 edit .. //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_tcp_udp46/tcp_udp46_common.c#4 edit .. //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_tcp_udp46/udp46_snmp.c#6 edit Differences ... ==== //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_tcp_udp46/tcp46_snmp.c#6 (text+ko) ==== @@ -269,11 +269,11 @@ return 0; } if ( tp->xt_inp.inp_laddr.s_addr != INADDR_ANY ) { - TCP46_DPRINTF((stderr, "V4 [%s] Skipped one listener (not an INADDR_ANY v4).\n ", + L4_DPRINTF((stderr, "V4 [%s] Skipped one listener (not an INADDR_ANY v4).\n ", __func__)); return 0; } - TCP46_DPRINTF((stderr, "V4: [%s] Adding INADDR_ANY v4 listener with port %d.\n ", + L4_DPRINTF((stderr, "V4: [%s] Adding INADDR_ANY v4 listener with port %d.\n ", __func__, ntohs(tp->xt_inp.inp_lport))); @@ -285,7 +285,7 @@ if ( _oid->index.subs[0] == IAT_ipv6 ) { if ( _oid->index.subs[17] == ntohs(tp->xt_inp.inp_lport) && listener_oid->so_pgid == _oid->so_pgid) { - TCP46_DPRINTF((stderr, "V4: [%s] Got listener with port %d.\n ", + L4_DPRINTF((stderr, "V4: [%s] Got listener with port %d.\n ", __func__, _oid->index.subs[5])); @@ -322,11 +322,11 @@ return 0; } if ( !IN6_IS_ADDR_UNSPECIFIED(&tp->xt_inp.in6p_laddr) ) { - TCP46_DPRINTF((stderr, "[%s] Skipped one listener (not an UNSPECIFIED v6).\n ", + L4_DPRINTF((stderr, "[%s] Skipped one listener (not an UNSPECIFIED v6).\n ", __func__)); return 0; } - TCP46_DPRINTF((stderr, "[%s] Adding UNSPECIFIED v6 listener with port %d.\n ", + L4_DPRINTF((stderr, "[%s] Adding UNSPECIFIED v6 listener with port %d.\n ", __func__, ntohs(tp->xt_inp.in6p_lport))); @@ -337,7 +337,7 @@ if ( _oid->index.subs[0] == IAT_ipv4 ) { if ( _oid->index.subs[5] == ntohs(tp->xt_inp.in6p_lport) && listener_oid->so_pgid == _oid->so_pgid ) { - TCP46_DPRINTF((stderr, "[%s] Got listener with port %d.\n ", + L4_DPRINTF((stderr, "[%s] Got listener with port %d.\n ", __func__, _oid->index.subs[5])); @@ -510,7 +510,7 @@ tcp_udp46_state_g.listen_tcp_total = 0; if (fetch_xfiles() != 0) { - TCP46_DPRINTF((stderr, "[%s] Failed to fetch the xfiles\n ", __func__ )); + L4_DPRINTF((stderr, "[%s] Failed to fetch the xfiles\n ", __func__ )); } /*First count the endpoints*/ @@ -522,7 +522,7 @@ /* Ignore sockets for protocols other than the desired one. */ if ((( struct xtcpcb *)ptr)->xt_socket.xso_protocol != IPPROTO_TCP) { - TCP46_DPRINTF((stderr, "[%s] One tcp4 conn. ignored (protocol missmatch: %d)\n ", + L4_DPRINTF((stderr, "[%s] One tcp4 conn. ignored (protocol missmatch: %d)\n ", __func__, ((struct xinpcb *)ptr)->xi_socket.xso_protocol )); @@ -532,7 +532,7 @@ /* Ignore PCBs which were freed during copyout. */ if (tp->xt_inp.inp_gencnt > tcp_udp46_state_g.tcp_xinpgen->xig_gen ) { - TCP46_DPRINTF((stderr, "[%s] One tcp4 conn. ignored (freed during copyout)\n ", + L4_DPRINTF((stderr, "[%s] One tcp4 conn. ignored (freed during copyout)\n ", __func__ )); @@ -558,7 +558,7 @@ } } - TCP46_DPRINTF((stderr, "[%s] Got %d tcp4 connections, %d tcp{4,6} connections, %d tcp{4,6} listeners.\n ", + L4_DPRINTF((stderr, "[%s] Got %d tcp4 connections, %d tcp{4,6} connections, %d tcp{4,6} listeners.\n ", __func__, tcp_udp46_state_g.tcp4_total, tcp_udp46_state_g.all_tcp_total, @@ -681,7 +681,7 @@ } } - TCP46_DPRINTF((stderr, "[%s] Got %d tcp{4,6} DISTINCT listeners.\n ", + L4_DPRINTF((stderr, "[%s] Got %d tcp{4,6} DISTINCT listeners.\n ", __func__, tcp_udp46_state_g.listen_tcp_total)); @@ -909,7 +909,7 @@ syslog(LOG_ERR, "%s: failed to delete the specified tcp connection: %m", __func__); return -1; } else { - TCP46_DPRINTF((stderr, "[%s] one tcp connection deleted\n ", + L4_DPRINTF((stderr, "[%s] one tcp connection deleted\n ", __func__)); syslog(LOG_INFO, "%s: one tcp connection deleted.", __func__); ==== //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_tcp_udp46/tcp_udp46.h#4 (text+ko) ==== @@ -49,12 +49,12 @@ /*a debug macro*/ #ifndef NDEBUG -#define TCP46_DPRINTF(ARGS) do { \ - fprintf(stderr, "TCP46_DEBUG: "); \ - fprintf ARGS; \ +#define L4_DPRINTF(ARGS) do { \ + fprintf(stderr, "TCP46_DEBUG: "); \ + fprintf ARGS; \ } while (0) #else -#define TCP46_DPRINTF(ARGS) +#define L4_DPRINTF(ARGS) #endif /*NDEBUG*/ enum InetAddressType { ==== //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_tcp_udp46/tcp_udp46_common.c#4 (text+ko) ==== @@ -81,7 +81,7 @@ syslog(LOG_ERR, "kern.clockrate: wrong size"); return (-1); } - TCP46_DPRINTF((stderr, "[%s] done.\n", __func__)); + L4_DPRINTF((stderr, "[%s] done.\n", __func__)); return (0); } @@ -153,7 +153,7 @@ } - TCP46_DPRINTF((stderr, "[%s] done.\n", __func__)); + L4_DPRINTF((stderr, "[%s] done.\n", __func__)); return (0); } @@ -165,7 +165,7 @@ static void tcp_udp46_dump_v(void) { /*nothing iteresting here for the time being*/ - TCP46_DPRINTF((stderr, "[%s] done.\n ", __func__)); + L4_DPRINTF((stderr, "[%s] done.\n ", __func__)); } /* @@ -175,7 +175,7 @@ static void tcp_udp46_config_v(void) { /*nothing iteresting here for the time being*/ - TCP46_DPRINTF((stderr, "[%s] done.\n ", __func__)); + L4_DPRINTF((stderr, "[%s] done.\n ", __func__)); } @@ -188,7 +188,7 @@ goto LABEL_RETURN; } LABEL_RETURN:; - TCP46_DPRINTF((stderr,"[%s] done.\n ", __func__)); + L4_DPRINTF((stderr,"[%s] done.\n ", __func__)); } @@ -222,7 +222,7 @@ syslog(LOG_ERR, "Failed to fetch the UDP data in tcp_udp46 module." ); } - TCP46_DPRINTF((stderr, "[%s] done.\n ", __func__)); + L4_DPRINTF((stderr, "[%s] done.\n ", __func__)); } /* ==== //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_tcp_udp46/udp46_snmp.c#6 (text+ko) ==== @@ -374,7 +374,7 @@ return (-1); } - TCP46_DPRINTF((stderr, "[%s] Got %d len at net.inet.udp.pcblist .\n", __func__, len)); + L4_DPRINTF((stderr, "[%s] Got %d len at net.inet.udp.pcblist .\n", __func__, len)); if (len > tcp_udp46_state_g.udp_xinpgen_len) { if ((ptr = realloc(tcp_udp46_state_g.udp_xinpgen, len)) == NULL) { @@ -396,7 +396,7 @@ tcp_udp46_state_g.all_udp_total = 0; if (fetch_xfiles() != 0) { - TCP46_DPRINTF((stderr, "[%s] Failed to fetch the xfiles\n ", __func__ )); + L4_DPRINTF((stderr, "[%s] Failed to fetch the xfiles\n ", __func__ )); } @@ -454,7 +454,7 @@ } - TCP46_DPRINTF((stderr, + L4_DPRINTF((stderr, "[%s] Got %d udp4 endpoints, %d udp{4,6} endpoints.\n", __func__, tcp_udp46_state_g.udp4_total,