|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T t
Length: 1634 (0x662) Types: TextFile Names: »tb_1148gate.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z« └─⟦e5a54fb17⟧ └─⟦this⟧ »pp-5.0/Lib/table/tb_1148gate.c«
/* tb_1148gate: look up domain in table of 1148 gateways */ # ifndef lint static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Lib/table/RCS/tb_1148gate.c,v 5.0 90/09/20 16:14:56 pp Exp Locker: pp $"; # endif /* * $Header: /cs/research/pp/hubris/pp-beta/Lib/table/RCS/tb_1148gate.c,v 5.0 90/09/20 16:14:56 pp Exp Locker: pp $ * * $Log: tb_1148gate.c,v $ * Revision 5.0 90/09/20 16:14:56 pp * rcsforce : 5.0 public release * */ #include "or.h" #include "util.h" #include "table.h" static Table *tb_1148gateways = NULLTBL; extern char *rfc1148gateway_tbl, *loc_or, or_error[]; int tb_get1148gate (domain, or) char *domain; OR_ptr *or; { char *p, buf[LINESIZE]; PP_DBG (("Lib/tb_get1148gate (%s)", domain)); if (tb_1148gateways == NULLTBL) { if ((tb_1148gateways = tb_nm2struct (rfc1148gateway_tbl)) == NULLTBL) { PP_LOG (LLOG_EXCEPTIONS, ("Lib/tb_get1148gate: rfc1148gateway table NULL!")); return NOTOK; } } for (p = domain; *p != '\0';) { if (tb_k2val (tb_1148gateways, p, buf) == OK) break; p = index (p, '.'); if (p == NULLCP) break; else p++; } if (p == NULLCP || *p == '\0') { sprintf(or_error, "Unable to find rfc1148 gateway for '%s'", domain); return NOTOK; } else { if (lexequ (buf, "local") == 0) *or = or_std2or (loc_or); else { *or = or_dmn2or (buf); if (*or == NULLOR) { PP_LOG (LLOG_EXCEPTIONS, ("Lib/or_rbits2or: fmt err '%s':'%s'", p, buf)); sprintf(or_error, "format error '%s':'%s'", p, buf); return NOTOK; } /* --- end of if --- */ } /* --- end of else --- */ } return OK; }