--------------------- PatchSet 1671 Date: 2001/02/26 22:19:58 Author: hno Branch: eventio Tag: (none) Log: Slowly fitting pieces together again... Members: src/Makefile.in:1.7.8.4->1.7.8.5 src/client_side.c:1.19.2.2->1.19.2.3 src/fd.c:1.5->1.5.12.1 src/ncomm.c:1.1.2.12->1.1.2.13 src/ncomm_test.c:1.1.2.5->1.1.2.6 src/protos.h:1.18.8.9->1.18.8.10 src/structs.h:1.24.8.9->1.24.8.10 Index: squid/src/Makefile.in =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/Makefile.in,v retrieving revision 1.7.8.4 retrieving revision 1.7.8.5 diff -u -r1.7.8.4 -r1.7.8.5 --- squid/src/Makefile.in 24 Feb 2001 23:48:43 -0000 1.7.8.4 +++ squid/src/Makefile.in 26 Feb 2001 22:19:58 -0000 1.7.8.5 @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.in,v 1.7.8.4 2001/02/24 23:48:43 hno Exp $ +# $Id: Makefile.in,v 1.7.8.5 2001/02/26 22:19:58 hno Exp $ # # Uncomment and customize the following to suit your needs: # @@ -103,12 +103,11 @@ client_side.o \ comm.o \ comm_select.o \ - ncomm.o \ - ncomm_poll.o \ debug.o \ @DELAY_OBJS@ \ disk.o \ @DNS_OBJS@ \ + dlink.o \ errorpage.o \ ETag.o \ event.o \ @@ -147,6 +146,8 @@ MemBuf.o \ mime.o \ multicast.o \ + ncomm.o \ + ncomm_poll.o \ neighbors.o \ net_db.o \ Packer.o \ @@ -185,6 +186,7 @@ wais.o \ wccp.o \ whois.o \ + wordlist.o \ $(XTRA_OBJS) SNMP_OBJS = \ @@ -208,8 +210,21 @@ done @$(MAKE) $(MFLAGS) $(PROGS) $(UTILS) $(SUID_UTILS) $(CGIPROGS) -NOBJS = ncomm_test.o ncomm.o ncomm_poll.o cbdata.o debug.o \ - MemPool.o MemBuf.o globals.o wordlist.o dlink.o mem.o +NOBJS = \ + cbdata.o \ + client_side.o \ + debug.o \ + dlink.o \ + fd.o \ + globals.o \ + MemBuf.o \ + mem.o \ + MemPool.o \ + ncomm.o \ + ncomm_poll.o \ + ncomm_test.o \ + string_arrays.o \ + wordlist.o \ ncomm_test: $(NOBJS) $(CC) -o $@ $(LDFLAGS) $(NOBJS) $(SQUID_LIBS) Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.19.2.2 retrieving revision 1.19.2.3 diff -u -r1.19.2.2 -r1.19.2.3 --- squid/src/client_side.c 24 Feb 2001 12:52:42 -0000 1.19.2.2 +++ squid/src/client_side.c 26 Feb 2001 22:19:59 -0000 1.19.2.3 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.19.2.2 2001/02/24 12:52:42 hno Exp $ + * $Id: client_side.c,v 1.19.2.3 2001/02/26 22:19:59 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -62,11 +62,14 @@ #endif #endif + #if LINUX_NETFILTER #include #endif +#if NOT_YET_PORTED + #if LINGERING_CLOSE #define comm_close comm_lingering_close #endif @@ -80,9 +83,11 @@ static CWCB clientWriteComplete; static CWCB clientWriteBodyComplete; static PF clientReadRequest; +#if NOT_YET_PORTED static PF connStateFree; static PF requestTimeout; static PF clientLifetimeTimeout; +#endif static int clientCheckTransferDone(clientHttpRequest *); static int clientGotNotEnough(clientHttpRequest *); static void checkFailureRatio(err_type, hier_code); @@ -324,7 +329,7 @@ #if HEADERS_LOG headersLog(0, 1, request->method, request); #endif - fd_note(http->conn->fd, http->uri); + ncomm_note(http->conn->fh, http->uri); clientCheckNoCache(http); } @@ -388,7 +393,7 @@ debug(33, 5) ("clientProcessExpired: lastmod %d\n", (int) entry->lastmod); http->entry = entry; http->out.offset = 0; - fwdStart(http->conn->fd, http->entry, http->request); + fwdStart(http->conn->fh, http->entry, http->request); /* Register with storage manager to receive updates when data comes in. */ if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) debug(33, 0) ("clientProcessExpired: found ENTRY_ABORTED object\n"); @@ -807,11 +812,11 @@ /* This is a handler normally called by comm_close() */ static void -connStateFree(int fd, void *data) +connStateFree(filehandle *fh, void *data) { ConnStateData *connState = data; clientHttpRequest *http; - debug(33, 3) ("connStateFree: FD %d\n", fd); + debug(33, 3) ("connStateFree: FH %p\n", fd); assert(connState != NULL); authenticateOnCloseConnection(connState); clientdbEstablished(connState->peer.sin_addr, -1); /* decrement */ @@ -1733,7 +1738,6 @@ clientHttpRequest *http = data; StoreEntry *entry = http->entry; ConnStateData *conn = http->conn; - int fd = conn->fd; HttpReply *rep = NULL; const char *body_buf = buf; ssize_t body_size = size; @@ -1744,8 +1748,8 @@ assert(http->request != NULL); dlinkDelete(&http->active, &ClientActiveRequests); dlinkAdd(http, &http->active, &ClientActiveRequests); - debug(33, 5) ("clientSendMoreData: FD %d '%s', out.offset=%d \n", - fd, storeUrl(entry), (int) http->out.offset); + debug(33, 5) ("clientSendMoreData: FH %p '%s', out.offset=%d \n", + conn->fh, storeUrl(entry), (int) http->out.offset); if (conn->chr != http) { /* there is another object in progress, defer this one */ debug(33, 1) ("clientSendMoreData: Deferring %s\n", storeUrl(entry)); @@ -1918,28 +1922,17 @@ { ConnStateData *conn = http->conn; StoreEntry *entry; - debug(33, 3) ("clientKeepaliveNextRequest: FD %d\n", conn->fd); - conn->defer.until = 0; /* Kick it to read a new request */ + debug(33, 3) ("clientKeepaliveNextRequest: FH %p\n", conn->fh->fd); httpRequestFree(http); if ((http = conn->chr) == NULL) { - debug(33, 5) ("clientKeepaliveNextRequest: FD %d reading next req\n", - conn->fd); - fd_note(conn->fd, "Waiting for next request"); + debug(33, 5) ("clientKeepaliveNextRequest: FH %p reading next req\n", + conn->fh->fd); + ncomm_note(conn->fh, "Waiting for next request"); /* * Set the timeout BEFORE calling clientReadRequest(). */ - commSetTimeout(conn->fd, Config.Timeout.pconn, requestTimeout, conn); - /* - * CYGWIN has a problem and is blocking on read() requests when there - * is no data present. - * This hack may hit performance a little, but it's better than - * blocking!. - */ -#ifdef _SQUID_CYGWIN_ - commSetSelect(conn->fd, COMM_SELECT_READ, clientReadRequest, conn, 0); -#else - clientReadRequest(conn->fd, conn); /* Read next request */ -#endif + commSetTimeout(conn->fh, Config.Timeout.pconn, requestTimeout, conn); + clientReadRequest(conn->fh, conn); /* Read next request */ /* * Note, the FD may be closed at this point. */ @@ -1949,8 +1942,8 @@ * execution will resume after the operation completes. */ } else { - debug(33, 1) ("clientKeepaliveNextRequest: FD %d Sending next\n", - conn->fd); + debug(33, 1) ("clientKeepaliveNextRequest: FH %p Sending next\n", + conn->fh); assert(entry); if (0 == storeClientCopyPending(http->sc, entry, http)) { if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) @@ -1973,7 +1966,7 @@ StoreEntry *entry = http->entry; int done; http->out.size += size; - debug(33, 5) ("clientWriteComplete: FD %d, sz %d, err %d, off %d, len %d\n", + debug(33, 5) ("clientWriteComplete: FH %p, sz %d, err %d, off %d, len %d\n", fd, size, errflag, (int) http->out.offset, entry ? objectLen(entry) : 0); if (size > 0) { kb_incr(&statCounter.client_http.kbytes_out, size); @@ -1990,7 +1983,7 @@ } else if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) { comm_close(fd); } else if ((done = clientCheckTransferDone(http)) != 0 || size == 0) { - debug(33, 5) ("clientWriteComplete: FD %d transfer is DONE\n", fd); + debug(33, 5) ("clientWriteComplete: FH %p transfer is DONE\n", fd); /* We're finished case */ if (httpReplyBodySize(http->request->method, entry->mem_obj->reply) < 0) { debug(33, 5) ("clientWriteComplete: closing, content_length < 0\n"); @@ -2002,7 +1995,7 @@ debug(33, 5) ("clientWriteComplete: client didn't get all it expected\n"); comm_close(fd); } else if (http->request->flags.proxy_keepalive) { - debug(33, 5) ("clientWriteComplete: FD %d Keeping Alive\n", fd); + debug(33, 5) ("clientWriteComplete: FH %p Keeping Alive\n", fd); clientKeepaliveNextRequest(http); } else { comm_close(fd); @@ -2176,7 +2169,7 @@ { char *url = http->uri; request_t *r = http->request; - int fd = http->conn->fd; + int fd = http->conn->fh; HttpReply *rep; http_version_t version; debug(33, 4) ("clientProcessRequest: %s '%s'\n", @@ -2292,7 +2285,7 @@ } if (http->flags.internal) r->protocol = PROTO_INTERNAL; - fwdStart(http->conn->fd, http->entry, r); + fwdStart(http->conn->fh, http->entry, r); } static clientHttpRequest * @@ -2543,7 +2536,7 @@ #else #if LINUX_NETFILTER /* If the call fails the address structure will be unchanged */ - getsockopt(conn->fd, SOL_IP, SO_ORIGINAL_DST, &conn->me, &sock_sz); + getsockopt(conn->fh, SOL_IP, SO_ORIGINAL_DST, &conn->me, &sock_sz); debug(33, 5) ("parseHttpRequest: addr = %s", inet_ntoa(conn->me.sin_addr)); if (vport_mode) vport = (int) ntohs(http->conn->me.sin_port); @@ -2603,7 +2596,7 @@ ErrorState *err = NULL; fde *F = &fd_table[fd]; int len = conn->in.size - conn->in.offset - 1; - debug(33, 4) ("clientReadRequest: FD %d: reading request...\n", fd); + debug(33, 4) ("clientReadRequest: FH %p: reading request...\n", fd); statCounter.syscalls.sock.reads++; size = read(fd, conn->in.buf + conn->in.offset, len); if (size > 0) { @@ -2623,17 +2616,17 @@ } else if (size == 0 && len > 0) { if (conn->chr == NULL && conn->in.offset == 0) { /* no current or pending requests */ - debug(33, 4) ("clientReadRequest: FD %d closed\n", fd); + debug(33, 4) ("clientReadRequest: FH %p closed\n", fd); comm_close(fd); return; } else if (!Config.onoff.half_closed_clients) { /* admin doesn't want to support half-closed client sockets */ - debug(33, 3) ("clientReadRequest: FD %d aborted (half_closed_clients disabled)\n", fd); + debug(33, 3) ("clientReadRequest: FH %p aborted (half_closed_clients disabled)\n", fd); comm_close(fd); return; } /* It might be half-closed, we can't tell */ - debug(33, 5) ("clientReadRequest: FD %d closed?\n", fd); + debug(33, 5) ("clientReadRequest: FH %p closed?\n", fd); F->flags.socket_eof = 1; conn->defer.until = squid_curtime + 1; conn->defer.n++; @@ -2645,11 +2638,11 @@ /* Continue to process previously read data */ } else if (size < 0) { if (!ignoreErrno(errno)) { - debug(50, 2) ("clientReadRequest: FD %d: %s\n", fd, xstrerror()); + debug(50, 2) ("clientReadRequest: FH %p: %s\n", fd, xstrerror()); comm_close(fd); return; } else if (conn->in.offset == 0) { - debug(50, 2) ("clientReadRequest: FD %d: no data to process (%s)\n", fd, xstrerror()); + debug(50, 2) ("clientReadRequest: FH %p: no data to process (%s)\n", fd, xstrerror()); return; } /* Continue to process previously read data */ @@ -2673,14 +2666,14 @@ /* Limit the number of concurrent requests to 2 */ for (H = &conn->chr, nrequests = 0; *H; H = &(*H)->next, nrequests++); if (nrequests >= (Config.onoff.pipeline_prefetch ? 2 : 1)) { - debug(33, 3) ("clientReadRequest: FD %d max concurrent requests reached\n", fd); - debug(33, 5) ("clientReadRequest: FD %d defering new request until one is done\n", fd); + debug(33, 3) ("clientReadRequest: FH %p max concurrent requests reached\n", fd); + debug(33, 5) ("clientReadRequest: FH %p defering new request until one is done\n", fd); conn->defer.until = squid_curtime + 100; /* Reset when a request is complete */ break; } conn->in.buf[conn->in.offset] = '\0'; /* Terminate the string */ if (nrequests == 0) - fd_note(conn->fd, "Reading next request"); + fd_note(conn->fh, "Reading next request"); /* Process request */ http = parseHttpRequest(conn, &method, @@ -2713,7 +2706,7 @@ */ commSetTimeout(fd, Config.Timeout.lifetime, clientLifetimeTimeout, http); if (parser_return_code < 0) { - debug(33, 1) ("clientReadRequest: FD %d Invalid Request\n", fd); + debug(33, 1) ("clientReadRequest: FH %p Invalid Request\n", fd); err = errorCon(ERR_INVALID_REQ, HTTP_BAD_REQUEST); err->request_hdrs = xstrdup(conn->in.buf); http->entry = clientCreateStoreEntry(http, method, null_request_flags); @@ -2845,7 +2838,7 @@ if (F->flags.socket_eof) { if (conn->in.offset != conn->body.size_left) { /* != 0 when no request body */ /* Partial request received. Abort client connection! */ - debug(33, 3) ("clientReadRequest: FD %d aborted\n", fd); + debug(33, 3) ("clientReadRequest: FH %p aborted\n", fd); comm_close(fd); return; } @@ -2862,7 +2855,7 @@ callback(buf, 0, cbdata); /* Signal end of body */ return; } - debug(33, 2) ("clientReadBody: start fd=%d body_size=%d in.offset=%d cb=%p req=%p\n", conn->fd, conn->body.size_left, conn->in.offset, callback, request); + debug(33, 2) ("clientReadBody: start fh=%p body_size=%d in.offset=%d cb=%p req=%p\n", conn->fh, conn->body.size_left, conn->in.offset, callback, request); conn->body.callback = callback; conn->body.cbdata = cbdata; conn->body.buf = buf; @@ -2872,7 +2865,7 @@ /* Data available */ clientProcessBody(conn); } else { - debug(33, 2) ("clientReadBody: fd %d wait for clientReadRequest\n", conn->fd); + debug(33, 2) ("clientReadBody: fh %p wait for clientReadRequest\n", conn->fh); } } @@ -2886,7 +2879,7 @@ CBCB *callback = conn->body.callback; request_t *request = conn->body.request; /* Note: request is null while eating "aborted" transfers */ - debug(33, 2) ("clientProcessBody: start fd=%d body_size=%d in.offset=%d cb=%p req=%p\n", conn->fd, conn->body.size_left, conn->in.offset, callback, request); + debug(33, 2) ("clientProcessBody: start fh=%p body_size=%d in.offset=%d cb=%p req=%p\n", conn->fh, conn->body.size_left, conn->in.offset, callback, request); /* Some sanity checks... */ assert(conn->body.size_left > 0); assert(conn->in.offset > 0); @@ -2920,7 +2913,7 @@ callback(buf, size, cbdata); if (request != NULL) requestUnlink(request); /* Linked in clientReadBody */ - debug(33, 2) ("clientProcessBody: end fd=%d size=%d body_size=%d in.offset=%d cb=%p req=%p\n", conn->fd, size, conn->body.size_left, conn->in.offset, callback, request); + debug(33, 2) ("clientProcessBody: end fh=%p size=%d body_size=%d in.offset=%d cb=%p req=%p\n", conn->fh, size, conn->body.size_left, conn->in.offset, callback, request); return; } @@ -2930,9 +2923,9 @@ clientReadBodyAbortHandler(char *buf, size_t size, void *data) { ConnStateData *conn = (ConnStateData *) data; - debug(33, 2) ("clientReadBodyAbortHandler: fd=%d body_size=%d in.offset=%d\n", conn->fd, conn->body.size_left, conn->in.offset); + debug(33, 2) ("clientReadBodyAbortHandler: fh=%p body_size=%d in.offset=%d\n", conn->fh, conn->body.size_left, conn->in.offset); if (size != 0 && conn->body.size_left != 0) { - debug(33, 3) ("clientReadBodyAbortHandler: fd=%d shedule next read\n", conn->fd); + debug(33, 3) ("clientReadBodyAbortHandler: fh=%p shedule next read\n", conn->fh); conn->body.callback = clientReadBodyAbortHandler; conn->body.buf = bodyAbortBuf; conn->body.bufsize = sizeof(bodyAbortBuf); @@ -2975,7 +2968,7 @@ #if THIS_CONFUSES_PERSISTENT_CONNECTION_AWARE_BROWSERS_AND_USERS ConnStateData *conn = data; ErrorState *err; - debug(33, 3) ("requestTimeout: FD %d: lifetime is expired.\n", fd); + debug(33, 3) ("requestTimeout: FH %p: lifetime is expired.\n", fd); if (fd_table[fd].rwstate) { /* * Some data has been sent to the client, just close the FD @@ -3018,7 +3011,7 @@ * the open has already been completed on another * connection) */ - debug(33, 3) ("requestTimeout: FD %d: lifetime is expired.\n", fd); + debug(33, 3) ("requestTimeout: FH %p: lifetime is expired.\n", fd); comm_close(fd); #endif } @@ -3066,11 +3059,11 @@ memset(&me, '\0', sizeof(struct sockaddr_in)); if ((fd = comm_accept(sock, &peer, &me)) < 0) { if (!ignoreErrno(errno)) - debug(50, 1) ("httpAccept: FD %d: accept failure: %s\n", + debug(50, 1) ("httpAccept: FH %p: accept failure: %s\n", sock, xstrerror()); break; } - debug(33, 4) ("httpAccept: FD %d: accepted\n", fd); + debug(33, 4) ("httpAccept: FH %p: accepted\n", fd); connState = cbdataAlloc(ConnStateData); connState->peer = peer; connState->log_addr = peer.sin_addr; @@ -3222,19 +3215,18 @@ hit_only_mode_until = squid_curtime + FAILURE_MODE_TIME; request_failure_ratio = 0.8; /* reset to something less than 1.0 */ } +#endif /* NOT_YET_PORTED */ void clientHttpConnectionsOpen(void) { +#if NOT_YET_PORTED sockaddr_in_list *s; + filehandle *fh; int fd; for (s = Config.Sockaddr.http; s; s = s->next) { - if (MAXHTTPPORTS == NHttpSockets) { - debug(1, 1) ("WARNING: You have too many 'http_port' lines.\n"); - debug(1, 1) (" The limit is %d\n", MAXHTTPPORTS); - continue; - } enter_suid(); + fh = ncomm_listen(SOCK_STREAM, 0, &s->s, sizeof(s->s), fd = comm_open(SOCK_STREAM, 0, s->s.sin_addr, @@ -3246,31 +3238,28 @@ continue; comm_listen(fd); commSetSelect(fd, COMM_SELECT_READ, httpAccept, NULL, 0); - /* - * We need to set a defer handler here so that we don't - * peg the CPU with select() when we hit the FD limit. - */ - commSetDefer(fd, httpAcceptDefer, NULL); - debug(1, 1) ("Accepting HTTP connections at %s, port %d, FD %d.\n", + debug(1, 1) ("Accepting HTTP connections at %s, port %d, FH %p.\n", inet_ntoa(s->s.sin_addr), (int) ntohs(s->s.sin_port), fd); - HttpSockets[NHttpSockets++] = fd; } if (NHttpSockets < 1) fatal("Cannot open HTTP Port"); +#endif /* NOT_YET_PORTED */ } +#if NOT_YET_PORTED void clientHttpConnectionsClose(void) { int i; for (i = 0; i < NHttpSockets; i++) { if (HttpSockets[i] >= 0) { - debug(1, 1) ("FD %d Closing HTTP connection\n", HttpSockets[i]); + debug(1, 1) ("FH %p Closing HTTP connection\n", HttpSockets[i]); comm_close(HttpSockets[i]); HttpSockets[i] = -1; } } NHttpSockets = 0; } +#endif /* NOT_YET_PORTED */ Index: squid/src/fd.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fd.c,v retrieving revision 1.5 retrieving revision 1.5.12.1 diff -u -r1.5 -r1.5.12.1 --- squid/src/fd.c 12 Jan 2001 08:20:32 -0000 1.5 +++ squid/src/fd.c 26 Feb 2001 22:19:59 -0000 1.5.12.1 @@ -1,6 +1,6 @@ /* - * $Id: fd.c,v 1.5 2001/01/12 08:20:32 hno Exp $ + * $Id: fd.c,v 1.5.12.1 2001/02/26 22:19:59 hno Exp $ * * DEBUG: section 51 Filedescriptor Functions * AUTHOR: Duane Wessels @@ -81,13 +81,9 @@ assert(F->write_handler == NULL); } debug(51, 3) ("fd_close FD %d %s\n", fd, F->desc); - F->flags.open = 0; + memset(F, '\0', sizeof(fde)); fdUpdateBiggest(fd, 0); Number_FD--; - commUpdateReadBits(fd, NULL); - commUpdateWriteBits(fd, NULL); - memset(F, '\0', sizeof(fde)); - F->timeout = 0; } void Index: squid/src/ncomm.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/ncomm.c,v retrieving revision 1.1.2.12 retrieving revision 1.1.2.13 diff -u -r1.1.2.12 -r1.1.2.13 --- squid/src/ncomm.c 25 Feb 2001 22:01:33 -0000 1.1.2.12 +++ squid/src/ncomm.c 26 Feb 2001 22:19:59 -0000 1.1.2.13 @@ -654,3 +654,8 @@ return 1; } +void +ncomm_note(filehandle *fh, const char *note) +{ + fd_note(fh->fd, note); +} Index: squid/src/ncomm_test.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/ncomm_test.c,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- squid/src/ncomm_test.c 25 Feb 2001 20:55:22 -0000 1.1.2.5 +++ squid/src/ncomm_test.c 26 Feb 2001 22:19:59 -0000 1.1.2.6 @@ -1,10 +1,5 @@ #include "squid.h" -/* DUMMY while testing */ -void peerDestroy(void *data) -{ -} - typedef struct { filehandle *client; filehandle *server; @@ -104,6 +99,8 @@ memBuf_module_init(); ncomm_module_init(); + clientHttpConnectionsOpen(); + CBDATA_INIT_TYPE_FREECB(connection, destroy_connection); memset(&me, 0, sizeof(me)); @@ -118,3 +115,57 @@ return 0; } + + + + +/* DUMMY while testing */ + +void peerDestroy(void *data) +{ +} + +int authenticateSchemeCount(void) +{ + return 0; +} + +int authenticateActiveSchemeCount(void) +{ + return 0; +} + +const ipcache_addrs *ipcache_gethostbyname(const char *host, int flags) +{ + return NULL; +} + +void ipcache_nbgethostbyname(const char *name, IPH *handler, void *cbdata) +{ + handler(NULL, cbdata); +} + +ipcache_addrs *ipcacheCheckNumeric(const char *name) +{ + return NULL; +} + +const char *fqdncache_gethostbyaddr(struct in_addr saddr, int flags) +{ + return NULL; +} + +void fqdncache_nbgethostbyaddr(struct in_addr saddr, FQDNH *handler, void *cbdata) +{ + handler(NULL, cbdata); +} + +int clientdbEstablished(struct in_addr saddr, int something) +{ + return 0; +} + +int asnMatchIp(void *data, struct in_addr saddr) +{ + return 0; +} Index: squid/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/protos.h,v retrieving revision 1.18.8.9 retrieving revision 1.18.8.10 diff -u -r1.18.8.9 -r1.18.8.10 --- squid/src/protos.h 25 Feb 2001 20:55:22 -0000 1.18.8.9 +++ squid/src/protos.h 26 Feb 2001 22:19:59 -0000 1.18.8.10 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.18.8.9 2001/02/25 20:55:22 hno Exp $ + * $Id: protos.h,v 1.18.8.10 2001/02/26 22:19:59 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -212,6 +212,7 @@ /* packs, then prints an object using debug() */ extern void debugObj(int section, int level, const char *label, void *obj, ObjPackMethod pm); +#if NOT_YET_PORTED /* disk.c */ extern int file_open(const char *path, int mode); extern void file_close(int fd); @@ -219,6 +220,7 @@ extern void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void *handler_data); extern void file_read(int, char *, int, off_t, DRCB *, void *); extern void disk_init(void); +#endif /* diskd.c */ extern diskd_queue *afile_create_queue(void); @@ -1316,4 +1318,5 @@ IOBuf *IOBufAlloc(size_t size); IOBuf *IOBufCreate(void *data, size_t size); IOBuf *IOBufCreateFromMemBuf(MemBuf *mb); +extern void ncomm_note(filehandle *fh, const char *); Index: squid/src/structs.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/structs.h,v retrieving revision 1.24.8.9 retrieving revision 1.24.8.10 diff -u -r1.24.8.9 -r1.24.8.10 --- squid/src/structs.h 24 Feb 2001 23:48:43 -0000 1.24.8.9 +++ squid/src/structs.h 26 Feb 2001 22:19:59 -0000 1.24.8.10 @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.24.8.9 2001/02/24 23:48:43 hno Exp $ + * $Id: structs.h,v 1.24.8.10 2001/02/26 22:19:59 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -1020,7 +1020,7 @@ }; struct _ConnStateData { - int fd; + filehandle *fh; struct { char *buf; off_t offset;