Article View: news.software.nntp
Article #79667Re: A pair of small patches I'd like to see in the mainstream.
From: Julien ÉLIE
Date: Tue, 18 Nov 2008 11:57
Date: Tue, 18 Nov 2008 11:57
77 lines
3511 bytes
3511 bytes
Hi D. Stussy,
> - Innfeed: A similar patch, showing all addresses that Innfeed thinks the
> peer has. I listed this before in the bug thread.
>
> Comments?
Here is a suggestion for INN 2.5.
Seems to work fine:
news.cyber-rezo.net
Address 1 : IPv6 2001:41d0:1:7ae4::1
Address 2 : IPv4 91.121.71.228
seconds: 90 art. timeout: 600 ip name: news.cyber-rezo.net
offered: 4 resp. timeout: 300 port: 119
accepted: 1 want streaming: yes active cxns: 1
[...]
Index: host.c
===================================================================
--- host.c (révision 8156)
+++ host.c (copie de travail)
@@ -3312,6 +3312,7 @@
* format of the output is:
*
* sitename
+ * Address 1: IPv4 12.0.0.42
* seconds: 351 art. timeout: 400 ip name: foo.bar
* offered: 1194 resp. timeout: 240 port: 119
* accepted: 178 want streaming: yes active cxns: 6
@@ -3358,6 +3359,32 @@
fputc ('\n',fp) ;
+ if (host->ipAddrs) {
+ int i;
+ char ip_addr[INET6_ADDRSTRLEN];
+ char *family;
+
+ for(i = 0; host->ipAddrs[i] != NULL; i++) {
+ switch(host->ipAddrs[i]->sa_family) {
+ case AF_INET:
+ family = xstrdup("IPv4");
+ break;
+#ifdef HAVE_INET6
+ case AF_INET6:
+ family = xstrdup("IPv6");
+ break;
+#endif
+ default:
+ family = xstrdup("????");
+ break;
+ }
+
+ network_sockaddr_sprint(ip_addr, sizeof(ip_addr),
+ host->ipAddrs[i]);
+ fprintf(fp, "Address %-2u: %-4.4s %s\n", i+1, family, ip_addr);
+ }
+ }
+
fprintf (fp, " seconds: %-7ld art. timeout: %-5d ip name: %s\n",
host->firstConnectTime > 0 ? (long)(now - host->firstConnectTime) : 0,
host->params->articleTimeout, host->params->ipName) ;
Does it sound good to you?
--
Julien ÉLIE
« -- Il ne doit pas être loin et à pied, on va aussi vite que les bœufs !
-- Bien sûr ! Les bœufs sont à pied eux aussi ! » (Astérix)
Technical Details
Message-ID:
<gfuain$ee9$1@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!proxad.net!feeder1-2.proxad.net!fdn.fr!gegeweb.org!news.trigofacile.com!not-for-mailReferences:
<gdb2rs$7av$1@snarked.org>Show Full Headers
Complete Article Headers
Message-ID: <gfuain$ee9$1@news.trigofacile.com> Subject: Re: A pair of small patches I'd like to see in the mainstream. Date: Tue, 18 Nov 2008 12:57:00 +0100 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <gdb2rs$7av$1@snarked.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!proxad.net!feeder1-2.proxad.net!fdn.fr!gegeweb.org!news.trigofacile.com!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 77 NNTP-Posting-Host: amontpellier-152-1-44-70.w81-251.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: news.trigofacile.com 1227009432 14793 81.251.189.70 (18 Nov 2008 X-Complaints-To: abuse@trigofacile.com NNTP-Posting-Date: Tue, 18 Nov 2008 11:57:12 +0000 (UTC) In-Reply-To: <gdb2rs$7av$1@snarked.org> X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049