[225] in Hesiod

home help back first fref pref prev next nref lref last post

Re: huge printcap entries

daemon@ATHENA.MIT.EDU (Dan Walsh)
Fri Jul 29 08:26:45 1994

To: "Derrick J. Brashear" <db74+@andrew.cmu.edu>
Cc: hesiod@MIT.EDU
In-Reply-To: Your message of "Thu, 28 Jul 94 15:04:33 EDT."
             <QiC051y00UoQ0iAHNJ@andrew.cmu.edu> 
Date: Fri, 29 Jul 94 08:17:40 EDT
From: Dan Walsh <walsh@athena.tay.dec.com>

There are two places where you need to change the limit.  

First you need to change hesiod to use a tcp connection. 

 diff resolve.c
===================================================================
RCS file: /newsource/repository/hesiod/resolve.c,v
retrieving revision 14.1
diff -r14.1 resolve.c
17a18
> 
57,58c58,59
<     static char bigmess[sizeof(nsmsg_t) + sizeof(rr_t)*((PACKETSZ-sizeof(HEADER))/RRFIXEDSZ)];
<     static char datmess[PACKETSZ-sizeof(HEADER)];
---
>     static char bigmess[sizeof(nsmsg_t) + sizeof(rr_t)*((16 * PACKETSZ-sizeof(HEADER))/RRFIXEDSZ)];
>     static char datmess[16 * PACKETSZ-sizeof(HEADER)];
96a98
> /*        printf("%s\n",rp->data);*/
141c143
<     static char qbuf[PACKETSZ], abuf[PACKETSZ];
---
>     static char qbuf[PACKETSZ], abuf[16 * PACKETSZ];
161a164
>     _res.options |= RES_USEVC;
172c175
<     n = res_send(qbuf, n, abuf, PACKETSZ);
---
>     n = res_send(qbuf, n, abuf, 16 * PACKETSZ);

You also need to change bind ns_main.c.  Sorry about the lack of
  diffs.  I sent this change to Paul Vixie and he said it looked
  reasonalble, so it could be in a future release of named.
  This give me queries that will return arount 8000 bytes.  

  if ((sp->s_bufp - (u_char *)&sp->s_tempsize) ==
      sizeof(u_int16_t)) {
    sp->s_size = htons(sp->s_tempsize);
    if (sp->s_bufsize == 0) {
      if ( (sp->s_buf = (u_char *)
	    malloc(8 * BUFSIZ))
	  == NULL) {
	sp->s_buf = buf;
	sp->s_size  = sizeof(buf);
      } else {
	sp->s_bufsize = 8 * BUFSIZ;
      }
    }

home help back first fref pref prev next nref lref last post