Print this page
11622 clean up rarer mandoc lint warnings

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3nsl/netdir.3nsl
          +++ new/usr/src/man/man3nsl/netdir.3nsl
↓ open down ↓ 3 lines elided ↑ open up ↑
   4    4  .\" Copyright (C) 2005, Sun Microsystems, Inc. All Rights Reserved
   5    5  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   6    6  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   7    7  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   8    8  .TH NETDIR 3NSL "Feb 14, 2015"
   9    9  .SH NAME
  10   10  netdir, netdir_getbyname, netdir_getbyaddr, netdir_free, netdir_options,
  11   11  taddr2uaddr, uaddr2taddr, netdir_perror, netdir_sperror, netdir_mergeaddr \-
  12   12  generic transport name-to-address translation
  13   13  .SH SYNOPSIS
  14      -.LP
  15   14  .nf
  16   15  \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lnsl\fR [ \fIlibrary\fR...]
  17   16  #include <netdir.h>
  18   17  
  19   18  \fBint\fR \fBnetdir_getbyname\fR(\fBstruct netconfig  *\fR\fIconfig\fR,
  20   19       \fBstruct nd_hostserv *\fR\fIservice\fR, \fBstruct nd_addrlist **\fR\fIaddrs\fR);
  21   20  .fi
  22   21  
  23   22  .LP
  24   23  .nf
↓ open down ↓ 26 lines elided ↑ open up ↑
  51   50  .nf
  52   51  \fBvoid\fR \fBnetdir_perror\fR(\fBchar *\fR\fIs\fR);
  53   52  .fi
  54   53  
  55   54  .LP
  56   55  .nf
  57   56  \fBchar *\fR\fBnetdir_sperror\fR(\fBvoid\fR);
  58   57  .fi
  59   58  
  60   59  .SH DESCRIPTION
  61      -.LP
  62   60  The \fBnetdir\fR functions provide a generic interface for name-to-address
  63   61  mapping that will work with all transport protocols. This interface provides a
  64   62  generic way for programs to convert transport specific addresses into common
  65   63  structures and back again. The \fBnetconfig\fR structure, described on the
  66   64  \fBnetconfig\fR(4) manual page, identifies the transport.
  67   65  .sp
  68   66  .LP
  69   67  The \fBnetdir_getbyname()\fR function maps the machine name and service name in
  70   68  the \fBnd_hostserv\fR structure to a collection of addresses of the type
  71   69  understood by the transport identified in the \fBnetconfig\fR structure. This
↓ open down ↓ 106 lines elided ↑ open up ↑
 178  176  .fi
 179  177  .in -2
 180  178  
 181  179  .sp
 182  180  .LP
 183  181  The \fBnetdir_options()\fR function is used to do all transport-specific setups
 184  182  and option management. \fIfildes\fR is the associated file descriptor.
 185  183  \fIoption\fR, \fIfildes\fR, and \fIpointer_to_args\fR are passed to the
 186  184  \fBnetdir_options()\fR function for the transport specified in \fIconfig\fR.
 187  185  Currently four values are defined for \fIoption\fR:
 188      -.br
 189  186  
 190  187  .in +2
 191  188  \fBND_SET_BROADCAST\fR
 192  189  .in -2
 193  190  .br
 194  191  .in +2
 195  192  \fBND_SET_RESERVEDPORT\fR
 196  193  .in -2
 197  194  .br
 198  195  .in +2
↓ open down ↓ 97 lines elided ↑ open up ↑
 296  293  .LP
 297  294  The \fBnetdir_perror()\fR function prints an error message in standard output
 298  295  that states the cause of a name-to-address mapping failure. The error message
 299  296  is preceded by the string given as an argument.
 300  297  .sp
 301  298  .LP
 302  299  The \fBnetdir_sperror()\fR function returns a string with an error message that
 303  300  states the cause of a name-to-address mapping failure.
 304  301  
 305  302  .SH RETURN VALUES
 306      -.LP
 307  303  The \fBnetdir_sperror()\fR function returns a pointer to a buffer which
 308  304  contains the error message string. The buffer is overwritten on each call. In
 309  305  multithreaded applications, this buffer is implemented as thread-specific
 310  306  data.
 311  307  .sp
 312  308  .LP
 313  309  The \fBnetdir_getbyname()\fR, \fBnetdir_getbyaddr()\fR, and \fBnetdir_options()\fR
 314  310  functions return \fB0\fR on success and a non-zero value on failure.
 315  311  .SH ATTRIBUTES
 316      -.LP
 317  312  See \fBattributes\fR(5) for descriptions of the following attributes:
 318  313  .sp
 319  314  
 320  315  .sp
 321  316  .TS
 322  317  box;
 323  318  c | c
 324  319  l | l .
 325  320  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 326  321  _
 327  322  MT-Level        Safe
 328  323  .TE
 329  324  
 330  325  .SH SEE ALSO
 331      -.LP
 332  326  \fBgethostname\fR(3C), \fBgetnetconfig\fR(3NSL), \fBgetnetpath\fR(3NSL),
 333  327  \fBnetconfig\fR(4), \fBattributes\fR(5)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX