1*61150Sbostic.\" Copyright (c) 1993 2*61150Sbostic.\" The Regents of the University of California. All rights reserved. 357740Ssklower.\" 457740Ssklower.\" %sccs.include.redist.man% 557740Ssklower.\" 6*61150Sbostic.\" @(#)iso_addr.3 8.1 (Berkeley) 06/04/93 757740Ssklower.\" 857740Ssklower.Dd 957740Ssklower.Dt ISO_ADDR 3 1058385Sbostic.Os 1157740Ssklower.Sh NAME 1257740Ssklower.Nm iso_addr , 1357740Ssklower.Nm iso_ntoa 1458385Sbostic.Nd "elementary network address conversion routines for Open System Interconnection 1557740Ssklower.Sh SYNOPSIS 1657740Ssklower.Fd #include <sys/types.h> 1757740Ssklower.Fd #include <netiso/iso.h> 1857740Ssklower.Ft struct iso_addr * 1957740Ssklower.Fn iso_addr "char *cp" 2057740Ssklower.Ft char * 2157740Ssklower.Fn iso_ntoa "struct iso_addr *isoa" 2257740Ssklower.Sh DESCRIPTION 2357740SsklowerThe routine 2457740Ssklower.Fn iso_addr 2557740Ssklowerinterprets character strings representing 2657740Ssklower.Tn OSI 2757740Sskloweraddresses, returning binary information suitable 2857740Ssklowerfor use in system calls. 2957740SsklowerThe routine 3057740Ssklower.Fn iso_ntoa 3157740Ssklowertakes 3257740Ssklower.Tn OSI 3357740Sskloweraddresses and returns 3457740Ssklower.Tn ASCII 3557740Ssklowerstrings representing NSAPs (network service 3657740Sskloweraccess points) in a 3757740Ssklowernotation inverse to that accepted by 3857740Ssklower.Fn iso_addr . 3957740Ssklower.Pp 4057740SsklowerUnfortunately, no universal standard exists for representing 4157740Ssklower.Tn OSI 4257740Ssklowernetwork addresses. 4357740Ssklower.Pp 4457740SsklowerThe format employed by 4557740Ssklower.Fn iso_addr 4657740Sskloweris a sequence of hexadecimal 4757740Ssklower.Dq digits 4857740Ssklower(optionally separated by periods), 4957740Ssklowerof the form: 5057740Ssklower.Bd -filled -offset indent 5157740Ssklower<hex digits>.<hex digits>.<hex digits> 5257740Ssklower.Ed 5357740Ssklower.Pp 5457740SsklowerEach pair of hexadecimal digits represents a byte 5557740Ssklowerwith the leading digit indicating the higher-ordered bits. 5657740SsklowerA period following an even number of bytes has no 5758385Sbosticeffect (but may be used to increase legibility). 5857740SsklowerA period following an odd number of bytes has the 5958385Sbosticeffect of causing the byte of address being translated 6057740Ssklowerto have its higher order bits filled with zeros. 6157740Ssklower.Sh RETURN VALUES 6257740Ssklower.Fn iso_ntoa 6357740Sskloweralways returns a null terminated string. 6457740Ssklower.Fn iso_addr 6557740Sskloweralways returns a pointer to a struct iso_addr. 6657740Ssklower(See 6757740Ssklower.Sx BUGS . ) 6857740Ssklower.Sh SEE ALSO 6958385Sbostic.Xr iso 4 7057740Ssklower.Sh HISTORY 7157740SsklowerThe 7257740Ssklower.Fn iso_addr 7357740Ssklowerand 7457742Ssklower.Fn iso_ntoa 7557740Ssklowerfunctions appeared in 7657740Ssklower.Bx 4.3 Reno . 7757740Ssklower.Sh BUGS 7857740SsklowerThe returned values 7957740Ssklowerreside in a static memory area. 8058385Sbostic.Pp 8157740SsklowerThe function 8257740Ssklower.Fn iso_addr 8357740Ssklowershould diagnose improperly formed input, and there should be an unambiguous 8457740Ssklowerway to recognize this. 85