Remove trailing whitespace; new sentence, new line; mark up

NULL with Dv; fix Dd argument.
This commit is contained in:
wiz 2011-01-29 23:38:34 +00:00
parent 6b63829157
commit c147060a75

View File

@ -1,5 +1,6 @@
.\" $NetBSD: libsaslc.3,v 1.3 2011/01/29 23:38:34 wiz Exp $
.\" Draft of the SASL Client library API. .\" Draft of the SASL Client library API.
.Dd 10 August, 2010 .Dd August 10, 2010
.Dt LIBSASLC 3 .Dt LIBSASLC 3
.Os .Os
.Sh NAME .Sh NAME
@ -11,7 +12,7 @@
.In saslc.h .In saslc.h
.Ft saslc_t * .Ft saslc_t *
.Fo saslc_alloc .Fo saslc_alloc
.Fa "void" .Fa "void"
.Fc .Fc
.Ft int .Ft int
.Fo saslc_end .Fo saslc_end
@ -19,31 +20,31 @@
.Fc .Fc
.Ft int .Ft int
.Fo saslc_init .Fo saslc_init
.Fa "saslc_t *ctx" "const char *appname" .Fa "saslc_t *ctx" "const char *appname"
.Fc .Fc
.Ft int .Ft int
.Fo saslc_sess_cont .Fo saslc_sess_cont
.Fa "saslc_sess_t *sess" "const void *in" "size_t inlen" "void* *out" "size_t *outlen" .Fa "saslc_sess_t *sess" "const void *in" "size_t inlen" "void* *out" "size_t *outlen"
.Fc .Fc
.Ft int .Ft int
.Fo saslc_sess_decode .Fo saslc_sess_decode
.Fa "saslc_sess_t *sess" "const void *in" "size_t inlen" "void* *out" "size_t *outlen" .Fa "saslc_sess_t *sess" "const void *in" "size_t inlen" "void* *out" "size_t *outlen"
.Fc .Fc
.Ft int .Ft int
.Fo saslc_sess_encode .Fo saslc_sess_encode
.Fa "saslc_sess_t *sess" "const void *in" "size_t inlen" "void* *out" "size_t *outlen" .Fa "saslc_sess_t *sess" "const void *in" "size_t inlen" "void* *out" "size_t *outlen"
.Fc .Fc
.Ft void .Ft void
.Fo saslc_sess_end .Fo saslc_sess_end
.Fa "saslc_sess_t *sess" .Fa "saslc_sess_t *sess"
.Fc .Fc
.Ft const char * .Ft const char *
.Fo saslc_sess_getprop .Fo saslc_sess_getprop
.Fa "saslc_sess_t *sess" "const char *name" .Fa "saslc_sess_t *sess" "const char *name"
.Fc .Fc
.Ft saslc_sess_t * .Ft saslc_sess_t *
.Fo saslc_sess_init .Fo saslc_sess_init
.Fa "saslc_t *ctx" "const char *mechs" .Fa "saslc_t *ctx" "const char *mechs"
.Fc .Fc
.Ft int .Ft int
.Fo saslc_sess_setprop .Fo saslc_sess_setprop
@ -51,15 +52,15 @@
.Fc .Fc
.Ft const char * .Ft const char *
.Fo saslc_sess_strerror .Fo saslc_sess_strerror
.Fa "saslc_sess_t *sess" .Fa "saslc_sess_t *sess"
.Fc .Fc
.Ft const char * .Ft const char *
.Fo saslc_sess_strmech .Fo saslc_sess_strmech
.Fa "saslc_sess_t *sess" .Fa "saslc_sess_t *sess"
.Fc .Fc
.Ft const char * .Ft const char *
.Fo saslc_strerror .Fo saslc_strerror
.Fa "saslc_t *ctx" .Fa "saslc_t *ctx"
.Fc .Fc
.Sh DESCRIPTION .Sh DESCRIPTION
The The
@ -74,14 +75,15 @@ mechanism list for the context.
.Pp .Pp
The The
.Fn saslc_end .Fn saslc_end
function destroys and deallocate resources used by the context. Context function destroys and deallocate resources used by the context.
shouldn't have got any sessions assigned to it. Context shouldn't have got any sessions assigned to it.
.Pp .Pp
The The
.Fn saslc_sess_init .Fn saslc_sess_init
function creates new session assigned to the function creates new session assigned to the
.Ar ctx .Ar ctx
context. Function chooses best mechanism which can be used for an authentication context.
Function chooses best mechanism which can be used for an authentication
from the from the
.Ar mechs .Ar mechs
list. list.
@ -96,7 +98,8 @@ function gets property from the session.
.Pp .Pp
The The
.Fn saslc_sess_setprop .Fn saslc_sess_setprop
function sets property for the session. If property already exists in the function sets property for the session.
If property already exists in the
session, then previous value is replaced by the new value. session, then previous value is replaced by the new value.
.Pp .Pp
.Fn saslc_strerror .Fn saslc_strerror
@ -111,16 +114,18 @@ function gets mechanism name used in sasl session.
.Pp .Pp
The The
.Fn saslc_sess_cont .Fn saslc_sess_cont
performs one step of the sasl authentication. Input data of length performs one step of the sasl authentication.
Input data of length
.Ar inlen .Ar inlen
is passed in the is passed in the
.Ar in .Ar in
argument. Function stores output of length argument.
Function stores output of length
.Ar outlen .Ar outlen
in the in the
.Ar out. .Ar out .
Note that user is responsible for freeing resources allocated for the Note that user is responsible for freeing resources allocated for the
.Ar out. .Ar out .
.Pp .Pp
.Fn saslc_sess_encode .Fn saslc_sess_encode
and and
@ -129,8 +134,7 @@ encode and decode data using method established during the authentication.
Functions store output of length Functions store output of length
.Ar outlen .Ar outlen
in the in the
.Ar out. .Ar out .
.Pp
.Sh RETURN VALUES .Sh RETURN VALUES
Functions Functions
.Fn saslc_init .Fn saslc_init
@ -143,18 +147,25 @@ and
.Fn saslc_sess_decode .Fn saslc_sess_decode
return 0 on success and -1 on failure, additionally return 0 on success and -1 on failure, additionally
.Fn saslc_cont .Fn saslc_cont
returns 1 if more SASL authentication steps are needed. The returns 1 if more SASL authentication steps are needed.
The
.Fn saslc_sess_getprop .Fn saslc_sess_getprop
function returns the property on success, or NULL on failure. The function returns the property on success, or
.Dv NULL
on failure.
The
.Fn saslc_alloc .Fn saslc_alloc
function returns new context on success, or NULL on failure. Function function returns new context on success, or
.Dv NULL
on failure.
Function
.Fn saslc_strmech .Fn saslc_strmech
returns mechanism name. returns mechanism name.
Finally, Finally,
.Fn saslc_strerror .Fn saslc_strerror
and and
.Fn saslc_sess_strerror .Fn saslc_sess_strerror
return pointer to the error description string on success and pointer return pointer to the error description string on success and pointer
to the "unknown error" string on failure. to the "unknown error" string on failure.
.Sh STANDARDS .Sh STANDARDS
RFC 2195, RFC 2222, RFC 2245, RFC 2595, RFC 2831 RFC 2195, RFC 2222, RFC 2245, RFC 2595, RFC 2831