|
|
1.1 root 1: /* is2saddr.c - old-style S-ADDR lookup */
2:
3: #ifndef lint
4: static char *rcsid = "$Header: /f/osi/acsap/RCS/is2saddr.c,v 7.1 90/03/05 23:02:21 mrose Exp $";
5: #endif
6:
7: /*
8: * $Header: /f/osi/acsap/RCS/is2saddr.c,v 7.1 90/03/05 23:02:21 mrose Exp $
9: *
10: *
11: * $Log: is2saddr.c,v $
12: * Revision 7.1 90/03/05 23:02:21 mrose
13: * touch-up
14: *
15: * Revision 7.0 89/11/23 21:22:10 mrose
16: * Release 6.0
17: *
18: */
19:
20: /*
21: * NOTICE
22: *
23: * Acquisition, use, and distribution of this module and related
24: * materials are subject to the restrictions of a license agreement.
25: * Consult the Preface in the User's Manual for the full terms of
26: * this agreement.
27: *
28: */
29:
30:
31: /* LINTLIBRARY */
32:
33: #include <stdio.h>
34: #include "psap.h"
35: #include "isoaddrs.h"
36: #include "isoservent.h"
37:
38: /* */
39:
40: struct SSAPaddr *is2saddr (host, service, is)
41: char *host,
42: *service;
43: struct isoservent *is;
44: {
45: AEI aei;
46: struct PSAPaddr *pa;
47: struct SSAPaddr *sa;
48:
49: if ((aei = str2aei (host, service)) == NULLAEI
50: || (pa = aei2addr (aei)) == NULLPA)
51: return NULLSA;
52:
53: sa = &pa -> pa_addr;
54: if (is && strcmp (is -> is_provider, "ssap") == 0) {
55: if (is -> is_selectlen > SSSIZE) /* XXX */
56: return NULLSA;
57:
58: bcopy (is -> is_selector, sa -> sa_selector,
59: sa -> sa_selectlen = is -> is_selectlen);
60: }
61:
62: return sa;
63: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.