35 #ifndef __COMPOSITE_PROTOCOL_H__    36 #define __COMPOSITE_PROTOCOL_H__    49 #define BRP_MONITOR_DISABLED          0     50 #define BRP_MONITOR_ENABLED           1     52 #define BRP_MONITOR_PLAINTEXT 2          BRP_LIB brp_errcode brp_add_layer(brp_protocol composite_protocol, brp_layer_id layer_id)
Adds a protocol layer without assigning a protocol to it. 
 
int brp_layer_id
identifies the layer of a composite protocol stack (see brp_create() or brp_create_composite(). 
 
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions. 
 
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol. 
 
This file primarly defines the common part of all protocol's data structures (:brp_protocol_t) and AP...
 
BRP_LIB brp_protocol brp_create(void)
This is equivalent to the following call: 
 
BRP_LIB brp_errcode brp_set_crypto(brp_protocol composite_protocol, brp_protocol crypto_protocol)
Assigns a crypto protocol to a composite protocol (protocol stack). 
 
BRP_LIB brp_protocol brp_get_layer(brp_protocol composite_protocol, brp_layer_id layer_id)
Retrieves a protocol layer from a composite protocol. 
 
BRP_LIB brp_protocol brp_create_composite(void)
Creates an empty composite protocol. 
 
BRP_LIB brp_errcode brp_set_io(brp_protocol protocol, brp_protocol io_protocol)
Assigns an I/O protocol to a composite protocol (protocol stack). 
 
BRP_LIB brp_errcode brp_suppress_monitoring(brp_protocol protocol)
Disables the monitoring feature of this library. 
 
BRP_LIB brp_errcode brp_set_layer(brp_protocol composite_protocol, brp_layer_id layer_id, brp_protocol layer_protocol)
Adds/replaces a protocol layer to a composite protocol. 
 
BRP_LIB brp_protocol brp_detach_layer(brp_protocol composite_protocol, brp_layer_id layer_id)
Removes a protocol from a composite protocol stack without destroying. 
 
BRP_LIB brp_errcode brp_set_monitor(brp_protocol protocol, int mode)
When communicating encrypted (see brp_set_crypto()) the monitoring feature of this library logs the p...