ftp.nice.ch/pub/next/developer/resources/libraries/eni.a.tar.gz#/doc/addr_to_hex.man

This is addr_to_hex.man in view mode; [Download] [Up]

.\" @(#)addr_to_hex.l 1.0 22Sep91 McGill SOCS
.TH ADDR_TO_HEX L "22 September 1991"
.SH NAME
addr_to_hex, hex_to_addr \- convert between hexadecimal\-string and binary
representations of Ethernet addresses.
.SH SYNOPSIS
.nf
.B "#include <eniutils.h>
.PP
.B char *addr_to_hex(eaddr, str)
.B unsigned char *eaddr ;
.B char str[ADDR_STR_LEN] ;
.PP
.B int hex_to_addr(str, eaddr)
.B char *str ;
.B unsigned char *eaddr ;
.fi
.SH DESCRIPTION
.I addr_to_hex
converts a six byte Ethernet address to a printable string.  The constant,
.BR ADDR_STR_LEN ,
defined in
.BR eniutils.h,
is the size of the character array required to hold the resulting string.
.PP
.I hex_to_addr
performs the reverse transformation, converting a hexadecimal string to a six
byte Ethernet address.
.SH "RETURN VALUES"
.I addr_to_hex
is always successful and returns a pointer to the argument,
.IR str .
.PP
.I hex_to_addr
returns 1 if the conversion is successful, otherwise 0.  The conversion can
fail if
.I str
is not a valid 12 digit hexadecimal number.
.SH AUTHOR
Bill Heelan, McGill University SOCS

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.