|
|
1.1 ! root 1: /* servbyname.c - getisoserventbyname */ ! 2: ! 3: #ifndef lint ! 4: static char *rcsid = "$Header: /f/osi/compat/RCS/servbyname.c,v 7.0 89/11/23 21:23:26 mrose Rel $"; ! 5: #endif ! 6: ! 7: /* ! 8: * $Header: /f/osi/compat/RCS/servbyname.c,v 7.0 89/11/23 21:23:26 mrose Rel $ ! 9: * ! 10: * ! 11: * $Log: servbyname.c,v $ ! 12: * Revision 7.0 89/11/23 21:23:26 mrose ! 13: * Release 6.0 ! 14: * ! 15: */ ! 16: ! 17: /* ! 18: * NOTICE ! 19: * ! 20: * Acquisition, use, and distribution of this module and related ! 21: * materials are subject to the restrictions of a license agreement. ! 22: * Consult the Preface in the User's Manual for the full terms of ! 23: * this agreement. ! 24: * ! 25: */ ! 26: ! 27: ! 28: /* LINTLIBRARY */ ! 29: ! 30: #include <stdio.h> ! 31: #include "general.h" ! 32: #include "manifest.h" ! 33: #include "isoservent.h" ! 34: #include "tailor.h" ! 35: ! 36: /* */ ! 37: ! 38: struct isoservent *getisoserventbyname (entity, provider) ! 39: char *entity, ! 40: *provider; ! 41: { ! 42: register struct isoservent *is; ! 43: ! 44: isodetailor (NULLCP, 0); ! 45: DLOG (addr_log, LLOG_TRACE, ! 46: ("getisoserventbyname \"%s\" \"%s\"", entity, provider)); ! 47: ! 48: (void) setisoservent (0); ! 49: while (is = getisoservent ()) ! 50: if (strcmp (entity, is -> is_entity) == 0 ! 51: && strcmp (provider, is -> is_provider) == 0) ! 52: break; ! 53: (void) endisoservent (); ! 54: ! 55: if (is) { ! 56: #ifdef DEBUG ! 57: if (addr_log -> ll_events & LLOG_DEBUG) ! 58: _printsrv (is); ! 59: #endif ! 60: } ! 61: else ! 62: SLOG (addr_log, LLOG_EXCEPTIONS, NULLCP, ! 63: ("lookup of local service %s/%s failed", provider, entity)); ! 64: ! 65: return is; ! 66: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.