C API for BALTECH SDK
composite_protocol.h
Go to the documentation of this file.
1 
35 #ifndef __COMPOSITE_PROTOCOL_H__
36 #define __COMPOSITE_PROTOCOL_H__
37 
38 
39 #include "protocol.h"
40 
41 
50 
51 
63 BRP_LIB brp_protocol brp_create(void);
64 
65 
76 (
77  brp_protocol composite_protocol,
78  brp_layer_id layer_id
80 );
83 
84 
112 (
113  brp_protocol composite_protocol,
114  brp_layer_id layer_id,
115  brp_protocol layer_protocol
118 );
119 
120 
128 (
129  brp_protocol composite_protocol,
130  brp_layer_id layer_id
132 );
135 
136 
156 (
157  brp_protocol composite_protocol,
158  brp_layer_id layer_id
160 );
164 
165 
177 BRP_LIB brp_errcode brp_set_io
178 (
179  brp_protocol protocol,
180  brp_protocol io_protocol
182 );
183 
184 
197 (
198  brp_protocol composite_protocol,
199  brp_protocol crypto_protocol
200 );
202 
203 
218 
219 
229 brp_protocol require_protocol
230 (
231  brp_protocol protocol,
232  int protocol_id,
233  brp_layer_id layer_id
234 );
235 
236 
242 #endif
243  // end of defgroup brp_lib
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().
Definition: protocol.h:42
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
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.