Print this page
6282 ONBLD man pages not pbchk clean
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Josef Sipek <jeffpc@josefsipek.net>
@@ -20,21 +20,20 @@
.\"
.\" Copyright 2007 Sun Microsystems, Inc. All rights reserved.
.\" Use is subject to license terms.
.\"
'\" te
-.TH ndrgen 1ONBLD "22 October 2007" "SunOS 5.11" "User Commands"
+.TH NDRGEN 1ONBLD "Oct 22, 2007"
.SH NAME
ndrgen \- NDL RPC protocol compiler
.SH SYNOPSIS
.LP
.nf
\fBndrgen\fR [ -Y \fIcpp-path\fR ] \fIfile\fR [ \fIfile\fR ] \&.\|.\|.
.fi
.SH DESCRIPTION
-.sp
.LP
The \fBndrgen\fR utility is a tool that generates C code to implement a DCERPC/MSRPC Network Data Representation (NDR) protocol. The input to \fBndrgen\fR is a language similar to C known as Network Data Language (NDL).
.sp
.LP
The \fBndrgen\fR utility takes an input protocol definition file and generates an output C source file that contains the marshalling routines to implement the RPC protocol. If the input file is named \fBproto.ndl\fR, \fBndrgen\fR generates NDR routines in \fBproto_ndr.c\fR. Applications must define the service definition and server-side stub table for use with the RPC protocol.
@@ -130,11 +129,10 @@
.sp
.LP
The following terminology is used in the subsequent discussion of NDR.
.sp
.ne 2
-.mk
.na
\fBSize\fR
.ad
.sp .6
.RS 4n
@@ -141,11 +139,10 @@
The size of an array in elements, such as the amount to \fBmalloc()\fR.
.RE
.sp
.ne 2
-.mk
.na
\fBLength\fR
.ad
.sp .6
.RS 4n
@@ -152,11 +149,10 @@
The number of significant elements of an array.
.RE
.sp
.ne 2
-.mk
.na
\fBKnown\fR
.ad
.sp .6
.RS 4n
@@ -163,11 +159,10 @@
Size or Length is known at build time.
.RE
.sp
.ne 2
-.mk
.na
\fBDetermined\fR
.ad
.sp .6
.RS 4n
@@ -174,11 +169,10 @@
Size or Length is determined at run time.
.RE
.sp
.ne 2
-.mk
.na
\fBFixed\fR
.ad
.sp .6
.RS 4n
@@ -195,24 +189,22 @@
.sp
.LP
The following DCE RPC terminology is used in the subsequent discussion.
.sp
.ne 2
-.mk
.na
\fBConformant\fR
.ad
.sp .6
.RS 4n
The Size is Determined. The Length is the same as Size.
.sp
.RE
-
.sp
.ne 2
-.mk
+
.na
\fBVarying\fR
.ad
.sp .6
.RS 4n
@@ -227,11 +219,10 @@
.RE
.sp
.ne 2
-.mk
.na
\fBVarying and Conformant\fR
.ad
.sp .6
.RS 4n
@@ -245,11 +236,10 @@
.in -2
.RE
.SS "Strings"
-.sp
.LP
DCE RPC strings are represented as varying or varying and conformant one-dimensional arrays. Characters can be single-byte or multi-byte as long as all characters conform to a fixed element size. For instance, UCS-2 is valid, but UTF-8 is not a valid DCE RPC string format. The string is terminated by a null character of the appropriate element size.
.sp
.LP
MSRPC strings are always varying and conformant format and not null terminated. This format uses the \fIsize_is\fR, \fIfirst_is\fR, and \fIlength_is\fR attributes:
@@ -303,11 +293,10 @@
.sp
.LP
Here, \fIlength\fR is the array length in bytes excluding any terminating null bytes and \fImaxlen\fR is the array length in bytes including the terminating null bytes.
.SS "NDL Syntax"
-.sp
.LP
The \fBndrgen\fR input must be a valid C header file. Thus, NDL is defined by using macros to map to DCE RPC IDL. The following shows the mappings:
.sp
.in +2
.nf
@@ -348,26 +337,22 @@
LPDWORD unsigned long *
.fi
.in -2
.SH OPTIONS
-.sp
.LP
The \fBsmbutil\fR command supports the following global option:
.sp
.ne 2
-.mk
.na
\fB\fB-Y\fR\fR
.ad
.RS 13n
-.rt
Specifies the path to the \fBcpp\fR program.
.RE
.SH EXAMPLES
-.sp
.LP
The following is an example NDL header file:
.sp
.in +2
.nf
@@ -459,55 +444,45 @@
#endif /* _SVC_NDL_ */
.fi
.in -2
.SH EXIT STATUS
-.sp
.LP
The following exit values are returned:
.sp
.ne 2
-.mk
.na
\fB0\fR
.ad
.RS 13n
-.rt
Successful operation.
.RE
.sp
.ne 2
-.mk
.na
\fB>0\fR
.ad
.RS 13n
-.rt
An error occurred.
.RE
.SH ATTRIBUTES
-.sp
-.LP
See the \fBattributes\fR(5) man page for descriptions of the following attributes:
.sp
.sp
.TS
-tab() box;
-cw(2.75i) |cw(2.75i)
-lw(2.75i) |lw(2.75i)
-.
-ATTRIBUTE TYPEATTRIBUTE VALUE
+box;
+cw | cw
+lw | lw .
+ATTRIBUTE TYPE ATTRIBUTE VALUE
_
-AvailabilitySUNWbtool
+Availability SUNWbtool
.TE
.SH SEE ALSO
-.sp
.LP
\fBcpp\fR(1), \fBrpcgen\fR(1), \fBcc\fR(1B), \fBattributes\fR(5)
.SH BUGS
-.sp
.LP
Some \fBcpp\fR(1) macros used by \fBndrgen\fR are not understood by \fB/usr/bin/cpp\fR or \fB/usr/sfw/bin/cpp\fR. Simple NDL files generally do not pose a problem. If problems occur, for example, when using unions, use \fB/usr/libexec/cpp\fR or \fBcw\fR.