9 date 92.12.15.00.20.22; author jromine; state Exp;
14 date 92.12.14.17.47.34; author jromine; state Exp;
19 date 92.12.14.17.44.38; author jromine; state Exp;
33 @/* hosts.c - use MMDF to get hostname information */
35 static char ident[] = "@@(#)$Id: hosts.c,v 1.2 1992/12/14 17:47:34 jromine Exp jromine $";
40 #include "../h/strings.h"
47 #include "../zotnet/mts.h"
50 * We really should be careful with the number of fd's that this routine
51 * opens: the ch_seq ch_table.c module likes to keep 6 (yes, SIX) fds around
52 * to speed-up host lookups in the channel table. Unfortunately, after all
53 * of them get opened, six are always open (ch_table may close one to open
54 * another). The bottom line is that if repl calls post, then we get 12
55 * (yes, TWELVE) fds open, with only six usable.
57 * send will close all fds >= 3 prior to invoking post. It would be nice
58 * if one could control ch_seq's use of fds for table lookups, but such is
64 char *OfficialName (name)
68 static char buffer[BUFSIZ];
70 return ((ch = ch_h2chan (name, buffer)) == (Chan *) (-1) ? NULL
71 : ch == (Chan *) NULL ? LocalName ()
76 extern char *invo_name;
78 extern short ch_yloc; /* ok to intercept local names */
80 static int inited = 0;
82 char *OfficialName (name)
86 static char buffer[BUFSIZ];
89 mmdf_init (invo_name);
92 switch (dm_v2route (name, buffer, &route)) {
95 return ((ch_yloc && lexequ (name, LocalName ())) ? LocalName ()
113 static char ident[] = "@@(#)$Id: pidwait.c,v 1.9 1992/12/14 17:10:58 jromine Exp $";