Commit | Line | Data |
---|---|---|
48435ab0 WJ |
1 | /* na2str.c - pretty-print NSAPaddr */ |
2 | ||
3 | #ifndef lint | |
4 | static char *rcsid = "$Header: /f/osi/compat/RCS/na2str.c,v 7.2 91/02/22 09:15:37 mrose Interim $"; | |
5 | #endif | |
6 | ||
7 | /* | |
8 | * $Header: /f/osi/compat/RCS/na2str.c,v 7.2 91/02/22 09:15:37 mrose Interim $ | |
9 | * | |
10 | * | |
11 | * $Log: na2str.c,v $ | |
12 | * Revision 7.2 91/02/22 09:15:37 mrose | |
13 | * Interim 6.8 | |
14 | * | |
15 | * Revision 7.1 90/07/09 14:32:05 mrose | |
16 | * sync | |
17 | * | |
18 | * Revision 7.0 89/11/23 21:23:19 mrose | |
19 | * Release 6.0 | |
20 | * | |
21 | */ | |
22 | ||
23 | /* | |
24 | * NOTICE | |
25 | * | |
26 | * Acquisition, use, and distribution of this module and related | |
27 | * materials are subject to the restrictions of a license agreement. | |
28 | * Consult the Preface in the User's Manual for the full terms of | |
29 | * this agreement. | |
30 | * | |
31 | */ | |
32 | ||
33 | ||
34 | /* LINTLIBRARY */ | |
35 | ||
36 | #include <stdio.h> | |
37 | #include "general.h" | |
38 | #include "manifest.h" | |
39 | #include "isoaddrs.h" | |
40 | ||
41 | /* \f Network Address to String */ | |
42 | ||
43 | char *na2str (na) | |
44 | register struct NSAPaddr *na; | |
45 | { | |
46 | switch (na -> na_stack) { | |
47 | case NA_TCP: | |
48 | return na -> na_domain; | |
49 | ||
50 | case NA_X25: | |
51 | case NA_BRG: | |
52 | return na -> na_dte; | |
53 | ||
54 | case NA_NSAP: | |
55 | default: | |
56 | return sel2str (na -> na_address, na -> na_addrlen, 0); | |
57 | } | |
58 | } |