Article View: news.software.nntp
Article #61501Re: Did someone's peering break?
From: Anne Wilson
Date: Wed, 16 Oct 2002 23:17
Date: Wed, 16 Oct 2002 23:17
158 lines
6121 bytes
6121 bytes
Having been away for a week, I've finally read/skimmed with interest the
postings regarding our relaying of data. Let me start with this:
I'm very, very sorry that:
1. "binaries" did not appear in my hierarchy,
2. I did not announce beforehand that I would be running this test,
3. I interfered with people's text reception,
4. ... (probably something else should go here...)
I apologize from the bottom of my heart for these transgressions.
Please understand that they came from ignorance. It is not my goal to
upset people or break things or thumb my nose at cultural conventions.
On the contrary, I want to do things the right way. This was an
experiment. As soon as I was contacted I shut off the stream. It was
not my goal to flood the world with this data.
The data is not proprietary. Anyway who wants it may have it. I tried
a home grown encoding scheme in the interests of saving space (thanks to
Forrest J. Cavalier III). The code for the encoding is below.
I will be doing more testing. But, I will not do any more testing until
I have gotten "binaries" into the group names. Also, Russ contacted me
about helping with avoiding feeding articles to sites that don't want
them, and I will take him up on that. And, I will announce tests ahead
of time.
If you have other problems with this project or suggestions to make
things better please let me know. I will try to address any concerns
anyone may have.
Sincerely,
Anne
***************************************************
Anne Wilson UCAR Unidata Program
anne@unidata.ucar.edu P.O. Box 3000
Boulder, CO 80307
----------------------------------------------------
Unidata WWW server http://www.unidata.ucar.edu/
****************************************************
static int
DOTNULCRLF_Escape(char *buf, int len)
{
int encodedCnt = 0;
int lineCharCnt = 0;
int i = 0;
const int ART_LINE_LENGTH = 1000;
while(i < len) {
if (i >= sizeof(encodedData)) {
printf("Encoded buffer not large enough. Bye!\n");
return -1;
}
switch(buf[i]) {
case '\0':
encodedData[encodedCnt++] = '\\';
encodedData[encodedCnt++] = '0';
lineCharCnt += 2;
break;
case '\r':
encodedData[encodedCnt++] = '\\';
encodedData[encodedCnt++] = 'r';
lineCharCnt += 2;
break;
case '\n':
encodedData[encodedCnt++] = '\\';
encodedData[encodedCnt++] = 'n';
lineCharCnt += 2;
break;
case '\\': /* Just need to prefix */
encodedData[encodedCnt++] = '\\';
encodedData[encodedCnt++] = '\\';
lineCharCnt += 2;
break;
case '.':
encodedData[encodedCnt++] = '\\';
encodedData[encodedCnt++] = '.';
lineCharCnt += 2;
break;
default:
encodedData[encodedCnt++] = buf[i];
lineCharCnt++;
break;
}
i++;
if (lineCharCnt > ART_LINE_LENGTH - 5)
{
encodedData[encodedCnt++] = '\n';
encodedData[encodedCnt++] = '\r';
lineCharCnt = 0;
}
}
encodedData[encodedCnt++] = '\n';
encodedData[encodedCnt++] = '\r';
//gatherEncodingStats(len, encodedCnt);
return encodedCnt;
} /* DOTNULCRLF_Escape */
void DOTNULCRLF_Unescape(char *buf,
long len,
void (*fnout)(void *id,char *buf,int len),
void *id)
{
int cOut = 0;
char outbuf[1024];
int bPrefix = 0;
int i = 0;
while(i < len) {
if (cOut+1 >= sizeof(outbuf)) {
(*fnout)(id,outbuf,cOut);
cOut = 0;
}
if (buf[i] == '\\') {
i++;
charsProcessed++;
switch(buf[i]) {
case '0':
outbuf[cOut++] = '\0';
break;
case 'r':
outbuf[cOut++] = '\r';
break;
case 'n':
outbuf[cOut++] = '\n';
break;
case '\\':
outbuf[cOut++] = '\\';
break;
case '.':
outbuf[cOut++] = '.';
break;
default:
/* error */
break;
}
} else if (buf[i]== '\r') {
/* ignore */
} else if (buf[i]== '\n') {
/* ignore */
} else {
outbuf[cOut++] = buf[i];
}
i++;
charsProcessed++;
}
if (cOut) {
(*fnout)(id,outbuf,cOut);
}
} /* DOTNULCRLF_Unescape */
Technical Details
Message-ID:
<3DADF394.79B78B10@unidata.ucar.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!nntp.wetware.com!attdv1!ip.att.net!frgp!ucar!not-for-mailReferences:
<anssll$n3$1@lust.ihug.co.nz> <yln0pncnex.fsf@windlord.stanford.edu> <1034200519.445767@ok-corral.gunslinger.net> <ylu1jvb6x5.fsf@windlord.stanford.edu> <1034203123.821537@ok-corral.gunslinger.net> <yld6qj9jkg.fsf@windlord.stanford.edu> <slrnaq9p4a.ci3.andrew+nonews@trinity.supernews.net> <ylr8evy3gd.fsf@windlord.stanford.edu> <slrnaqhua6.ci3.andrew+nonews@trinity.supernews.net> <ylwuomyl14.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <3DADF394.79B78B10@unidata.ucar.edu> Subject: Re: Did someone's peering break? Date: Wed, 16 Oct 2002 17:17:40 -0600 From: Anne Wilson <anne@unidata.ucar.edu> References: <anssll$n3$1@lust.ihug.co.nz> <yln0pncnex.fsf@windlord.stanford.edu> <1034200519.445767@ok-corral.gunslinger.net> <ylu1jvb6x5.fsf@windlord.stanford.edu> <1034203123.821537@ok-corral.gunslinger.net> <yld6qj9jkg.fsf@windlord.stanford.edu> <slrnaq9p4a.ci3.andrew+nonews@trinity.supernews.net> <ylr8evy3gd.fsf@windlord.stanford.edu> <slrnaqhua6.ci3.andrew+nonews@trinity.supernews.net> <ylwuomyl14.fsf@windlord.stanford.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!nntp.wetware.com!attdv1!ip.att.net!frgp!ucar!not-for-mail Newsgroups: news.software.nntp Organization: UCAR Lines: 157 NNTP-Posting-Host: imogene.unidata.ucar.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.ucar.edu 1034810260 12330 128.117.140.28 (16 Oct 2002 23:17:40 GMT) X-Complaints-To: news@news.ucar.edu NNTP-Posting-Date: Wed, 16 Oct 2002 23:17:40 +0000 (UTC) X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.2-2smp i686) X-Accept-Language: en