404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.138.105.176: ~ $
.lf 1 stdin
.TH LBER_SOCKBUF 3 "2018/03/22" "OpenLDAP 2.4.46"
.\" $OpenLDAP$
.\" Copyright 1998-2018 The OpenLDAP Foundation All Rights Reserved.
.\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
.SH NAME
ber_sockbuf_alloc, ber_sockbuf_free, ber_sockbuf_ctrl, ber_sockbuf_add_io, ber_sockbuf_remove_io, Sockbuf_IO \- OpenLDAP LBER I/O infrastructure
.SH LIBRARY
OpenLDAP LBER (liblber, \-llber)
.SH SYNOPSIS
.B #include <lber.h>
.LP
.B Sockbuf *ber_sockbuf_alloc( void );
.LP
.BI "void ber_sockbuf_free(Sockbuf *" sb ");"
.LP
.BI "int ber_sockbuf_ctrl(Sockbuf *" sb ", int " opt ", void *" arg ");"
.LP
.BI "int ber_sockbuf_add_io(Sockbuf *" sb ", Sockbuf_IO *" sbio ", int " layer ", void *" arg ");"
.LP
.BI "int ber_sockbuf_remove_io(Sockbuf *" sb ", Sockbuf_IO *" sbio ", int " layer ");"
.LP
.nf
.B typedef struct sockbuf_io_desc {
.BI "int " sbiod_level ";"
.BI "Sockbuf *" sbiod_sb ";"
.BI "Sockbuf_IO *" sbiod_io ";"
.BI "void *" sbiod_pvt ";"
.BI "struct sockbuf_io_desc *" sbiod_next ";"
.B } Sockbuf_IO_Desc;
.LP
.B typedef struct sockbuf_io {
.BI "int (*" sbi_setup ")(Sockbuf_IO_Desc *" sbiod ", void *" arg ");"
.BI "int (*" sbi_remove ")(Sockbuf_IO_Desc *" sbiod ");"
.BI "int (*" sbi_ctrl ")(Sockbuf_IO_Desc *" sbiod ", int " opt ", void *" arg ");"
.BI "ber_slen_t (*" sbi_read ")(Sockbuf_IO_Desc *" sbiod ", void *" buf ", ber_len_t " len ");"
.BI "ber_slen_t (*" sbi_write ")(Sockbuf_IO_Desc *" sbiod ", void *" buf ", ber_len_t " len ");"
.BI "int (*" sbi_close ")(Sockbuf_IO_Desc *" sbiod ");"
.B } Sockbuf_IO;

.SH DESCRIPTION
.LP
These routines are used to manage the low level I/O operations performed
by the Lightweight BER library. They are called implicitly by the other
libraries and usually do not need to be called directly from applications.
The I/O framework is modularized and new transport layers can be supported
by appropriately defining a
.B Sockbuf_IO
structure and installing it onto an existing
.BR Sockbuf .
.B Sockbuf
structures are allocated and freed by
.BR ber_sockbuf_alloc ()
and
.BR ber_sockbuf_free (),
respectively. The
.BR ber_sockbuf_ctrl ()
function is used to get and set options related to a
.B Sockbuf
or to a specific I/O layer of the
.BR Sockbuf .
The
.BR ber_sockbuf_add_io ()
and
.BR ber_sockbuf_remove_io ()
functions are used to add and remove specific I/O layers on a
.BR Sockbuf .

Options for
.BR ber_sockbuf_ctrl ()
include:
.TP
.B LBER_SB_OPT_HAS_IO
Takes a
.B Sockbuf_IO *
argument and returns 1 if the given handler is installed
on the
.BR Sockbuf ,
otherwise returns 0.
.TP
.B LBER_SB_OPT_GET_FD
Retrieves the file descriptor associated to the
.BR Sockbuf ;
.B arg
must be a
.BR "ber_socket_t *" .
The return value will be 1 if a valid descriptor was present, \-1 otherwise.
.TP
.B LBER_SB_OPT_SET_FD
Sets the file descriptor of the
.B Sockbuf
to the descriptor pointed to by
.BR arg ;
.B arg
must be a
.BR "ber_socket_t *" .
The return value will always be 1.
.TP
.B LBER_SB_OPT_SET_NONBLOCK
Toggles the non-blocking state of the file descriptor associated to
the
.BR Sockbuf .
.B arg
should be NULL to disable and non-NULL to enable the non-blocking state.
The return value will be 1 for success, \-1 otherwise.
.TP
.B LBER_SB_OPT_DRAIN
Flush (read and discard) all available input on the
.BR Sockbuf .
The return value will be 1.
.TP
.B LBER_SB_OPT_NEEDS_READ
Returns non-zero if input is waiting to be read.
.TP
.B LBER_SB_OPT_NEEDS_WRITE
Returns non-zero if the
.B Sockbuf
is ready to be written.
.TP
.B LBER_SB_OPT_GET_MAX_INCOMING
Returns the maximum allowed size of an incoming message;
.B arg
must be a
.BR "ber_len_t *" .
The return value will be 1.
.TP
.B LBER_SB_OPT_SET_MAX_INCOMING
Sets the maximum allowed size of an incoming message;
.B arg
must be a
.BR "ber_len_t *" .
The return value will be 1.

.LP
Options not in this list will be passed down to each
.B Sockbuf_IO
handler in turn until one of them processes it. If the option is not handled
.BR ber_sockbuf_ctrl ()
will return 0.

.LP
Multiple
.B Sockbuf_IO
handlers can be stacked in multiple layers to provide various functionality.
Currently defined layers include
.TP
.B LBER_SBIOD_LEVEL_PROVIDER
the lowest layer, talking directly to a network 
.TP
.B LBER_SBIOD_LEVEL_TRANSPORT
an intermediate layer
.TP
.B LBER_SBIOD_LEVEL_APPLICATION
a higher layer
.LP
Currently defined
.B Sockbuf_IO
handlers in liblber include
.TP
.B ber_sockbuf_io_tcp
The default stream-oriented provider
.TP
.B ber_sockbuf_io_fd
A stream-oriented provider for local IPC sockets
.TP
.B ber_sockbuf_io_dgram
A datagram-oriented provider. This handler is only present if the liblber
library was built with LDAP_CONNECTIONLESS defined.
.TP
.B ber_sockbuf_io_readahead
A buffering layer, usually used with a datagram provider to hide the
datagram semantics from upper layers.
.TP
.B ber_sockbuf_io_debug
A generic handler that outputs hex dumps of all traffic. This handler
may be inserted multiple times at arbitrary layers to show the flow
of data between other handlers.
.LP
Additional handlers may be present in libldap if support for them was
enabled:
.TP
.B ldap_pvt_sockbuf_io_sasl
An application layer handler for SASL encoding/decoding.
.TP
.B sb_tls_sbio
A transport layer handler for SSL/TLS encoding/decoding. Note that this
handler is private to the library and is not exposed in the API.
.LP
The provided handlers are all instantiated implicitly by libldap, and
applications generally will not need to directly manipulate them.

.SH SEE ALSO
.BR lber-decode (3),
.BR lber-encode (3),
.BR lber-types (3),
.BR ldap_get_option (3)

.LP
.SH ACKNOWLEDGEMENTS
.lf 1 ./../Project
.\" Shared Project Acknowledgement Text
.B "OpenLDAP Software"
is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>.
.B "OpenLDAP Software"
is derived from the University of Michigan LDAP 3.3 Release.  
.lf 200 stdin

Filemanager

Name Type Size Permission Actions
ber_alloc_t.3 File 9.07 KB 0644
ber_bvarray_add.3 File 6.38 KB 0644
ber_bvarray_free.3 File 6.38 KB 0644
ber_bvdup.3 File 6.38 KB 0644
ber_bvecadd.3 File 6.38 KB 0644
ber_bvecfree.3 File 6.38 KB 0644
ber_bvfree.3 File 6.38 KB 0644
ber_bvstr.3 File 6.38 KB 0644
ber_bvstrdup.3 File 6.38 KB 0644
ber_dupbv.3 File 6.38 KB 0644
ber_first_element.3 File 12.37 KB 0644
ber_flush.3 File 9.07 KB 0644
ber_free.3 File 6.38 KB 0644
ber_get_bitstring.3 File 12.37 KB 0644
ber_get_boolean.3 File 12.37 KB 0644
ber_get_enum.3 File 12.37 KB 0644
ber_get_int.3 File 12.37 KB 0644
ber_get_next.3 File 12.37 KB 0644
ber_get_null.3 File 12.37 KB 0644
ber_get_stringa.3 File 12.37 KB 0644
ber_get_stringb.3 File 12.37 KB 0644
ber_next_element.3 File 12.37 KB 0644
ber_peek_tag.3 File 12.37 KB 0644
ber_printf.3 File 9.07 KB 0644
ber_put_enum.3 File 9.07 KB 0644
ber_put_int.3 File 9.07 KB 0644
ber_put_null.3 File 9.07 KB 0644
ber_put_ostring.3 File 9.07 KB 0644
ber_put_seq.3 File 9.07 KB 0644
ber_put_set.3 File 9.07 KB 0644
ber_put_string.3 File 9.07 KB 0644
ber_scanf.3 File 12.37 KB 0644
ber_skip_tag.3 File 12.37 KB 0644
ber_start_set.3 File 9.07 KB 0644
ber_str2bv.3 File 6.38 KB 0644
lber-decode.3 File 12.37 KB 0644
lber-encode.3 File 9.07 KB 0644
lber-memory.3 File 1.53 KB 0644
lber-sockbuf.3 File 5.72 KB 0644
lber-types.3 File 6.38 KB 0644
ld_errno.3 File 6.54 KB 0644
ldap.3 File 8.83 KB 0644
ldap_abandon.3 File 2.29 KB 0644
ldap_abandon_ext.3 File 2.29 KB 0644
ldap_add.3 File 2.65 KB 0644
ldap_add_ext.3 File 2.65 KB 0644
ldap_add_ext_s.3 File 2.65 KB 0644
ldap_add_s.3 File 2.65 KB 0644
ldap_attributetype2name.3 File 8.78 KB 0644
ldap_attributetype2str.3 File 8.78 KB 0644
ldap_attributetype_free.3 File 8.78 KB 0644
ldap_bind.3 File 11.75 KB 0644
ldap_bind_s.3 File 11.75 KB 0644
ldap_compare.3 File 2.72 KB 0644
ldap_compare_ext.3 File 2.72 KB 0644
ldap_compare_ext_s.3 File 2.72 KB 0644
ldap_compare_s.3 File 2.72 KB 0644
ldap_control_create.3 File 2.93 KB 0644
ldap_control_dup.3 File 2.93 KB 0644
ldap_control_find.3 File 2.93 KB 0644
ldap_control_free.3 File 2.93 KB 0644
ldap_controls.3 File 2.93 KB 0644
ldap_controls_dup.3 File 2.93 KB 0644
ldap_controls_free.3 File 2.93 KB 0644
ldap_count_entries.3 File 2.35 KB 0644
ldap_count_messages.3 File 2.58 KB 0644
ldap_count_references.3 File 2.29 KB 0644
ldap_count_values.3 File 2.73 KB 0644
ldap_count_values_len.3 File 2.73 KB 0644
ldap_dcedn2dn.3 File 6.61 KB 0644
ldap_delete.3 File 2.49 KB 0644
ldap_delete_ext.3 File 2.49 KB 0644
ldap_delete_ext_s.3 File 2.49 KB 0644
ldap_delete_s.3 File 2.49 KB 0644
ldap_destroy.3 File 3.54 KB 0644
ldap_dn2ad_canonical.3 File 6.61 KB 0644
ldap_dn2dcedn.3 File 6.61 KB 0644
ldap_dn2str.3 File 6.61 KB 0644
ldap_dn2ufn.3 File 6.61 KB 0644
ldap_dnfree.3 File 6.61 KB 0644
ldap_dup.3 File 3.54 KB 0644
ldap_err2string.3 File 6.54 KB 0644
ldap_errlist.3 File 6.54 KB 0644
ldap_error.3 File 6.54 KB 0644
ldap_explode_dn.3 File 6.61 KB 0644
ldap_explode_rdn.3 File 6.61 KB 0644
ldap_extended_operation.3 File 2.47 KB 0644
ldap_extended_operation_s.3 File 2.47 KB 0644
ldap_first_attribute.3 File 2.3 KB 0644
ldap_first_entry.3 File 2.35 KB 0644
ldap_first_message.3 File 2.58 KB 0644
ldap_first_reference.3 File 2.29 KB 0644
ldap_free_urldesc.3 File 3.02 KB 0644
ldap_get_dn.3 File 6.61 KB 0644
ldap_get_option.3 File 19.06 KB 0644
ldap_get_values.3 File 2.73 KB 0644
ldap_get_values_len.3 File 2.73 KB 0644
ldap_init.3 File 5.96 KB 0644
ldap_init_fd.3 File 5.96 KB 0644
ldap_initialize.3 File 5.96 KB 0644
ldap_install_tls.3 File 1.66 KB 0644
ldap_is_ldap_url.3 File 3.02 KB 0644
ldap_matchingrule2name.3 File 8.78 KB 0644
ldap_matchingrule2str.3 File 8.78 KB 0644
ldap_matchingrule_free.3 File 8.78 KB 0644
ldap_memalloc.3 File 1.55 KB 0644
ldap_memcalloc.3 File 1.55 KB 0644
ldap_memfree.3 File 1.55 KB 0644
ldap_memory.3 File 1.55 KB 0644
ldap_memrealloc.3 File 1.55 KB 0644
ldap_memvfree.3 File 1.55 KB 0644
ldap_modify.3 File 4.45 KB 0644
ldap_modify_ext.3 File 4.45 KB 0644
ldap_modify_ext_s.3 File 4.45 KB 0644
ldap_modify_s.3 File 4.45 KB 0644
ldap_modrdn.3 File 2.27 KB 0644
ldap_modrdn2.3 File 2.27 KB 0644
ldap_modrdn2_s.3 File 2.27 KB 0644
ldap_modrdn_s.3 File 2.27 KB 0644
ldap_mods_free.3 File 4.45 KB 0644
ldap_msgfree.3 File 4.41 KB 0644
ldap_msgid.3 File 4.41 KB 0644
ldap_msgtype.3 File 4.41 KB 0644
ldap_next_attribute.3 File 2.3 KB 0644
ldap_next_entry.3 File 2.35 KB 0644
ldap_next_message.3 File 2.58 KB 0644
ldap_next_reference.3 File 2.29 KB 0644
ldap_objectclass2name.3 File 8.78 KB 0644
ldap_objectclass2str.3 File 8.78 KB 0644
ldap_objectclass_free.3 File 8.78 KB 0644
ldap_open.3 File 5.96 KB 0644
ldap_parse_extended_result.3 File 3.94 KB 0644
ldap_parse_reference.3 File 2.3 KB 0644
ldap_parse_result.3 File 3.94 KB 0644
ldap_parse_sasl_bind_result.3 File 3.94 KB 0644
ldap_parse_sort_control.3 File 1.64 KB 0644
ldap_parse_vlv_control.3 File 2.29 KB 0644
ldap_perror.3 File 6.54 KB 0644
ldap_rename.3 File 2.63 KB 0644
ldap_rename_s.3 File 2.63 KB 0644
ldap_result.3 File 4.41 KB 0644
ldap_result2error.3 File 6.54 KB 0644
ldap_sasl_bind.3 File 11.75 KB 0644
ldap_sasl_bind_s.3 File 11.75 KB 0644
ldap_schema.3 File 8.78 KB 0644
ldap_scherr2str.3 File 8.78 KB 0644
ldap_search.3 File 5.11 KB 0644
ldap_search_ext.3 File 5.11 KB 0644
ldap_search_ext_s.3 File 5.11 KB 0644
ldap_search_s.3 File 5.11 KB 0644
ldap_search_st.3 File 5.11 KB 0644
ldap_set_option.3 File 19.06 KB 0644
ldap_set_rebind_proc.3 File 11.75 KB 0644
ldap_set_urllist_proc.3 File 5.96 KB 0644
ldap_simple_bind.3 File 11.75 KB 0644
ldap_simple_bind_s.3 File 11.75 KB 0644
ldap_sort.3 File 1.23 KB 0644
ldap_sort_entries.3 File 1.23 KB 0644
ldap_sort_strcasecmp.3 File 1.23 KB 0644
ldap_sort_values.3 File 1.23 KB 0644
ldap_start_tls.3 File 1.66 KB 0644
ldap_start_tls_s.3 File 1.66 KB 0644
ldap_str2attributetype.3 File 8.78 KB 0644
ldap_str2dn.3 File 6.61 KB 0644
ldap_str2matchingrule.3 File 8.78 KB 0644
ldap_str2objectclass.3 File 8.78 KB 0644
ldap_str2syntax.3 File 8.78 KB 0644
ldap_strdup.3 File 1.55 KB 0644
ldap_sync.3 File 9.51 KB 0644
ldap_syntax2name.3 File 8.78 KB 0644
ldap_syntax2str.3 File 8.78 KB 0644
ldap_syntax_free.3 File 8.78 KB 0644
ldap_tls.3 File 1.66 KB 0644
ldap_tls_inplace.3 File 1.66 KB 0644
ldap_unbind.3 File 11.75 KB 0644
ldap_unbind_ext.3 File 11.75 KB 0644
ldap_unbind_ext_s.3 File 11.75 KB 0644
ldap_unbind_s.3 File 11.75 KB 0644
ldap_url.3 File 3.02 KB 0644
ldap_url_parse.3 File 3.02 KB 0644
ldap_value_free.3 File 2.73 KB 0644
ldap_value_free_len.3 File 2.73 KB 0644