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 
49 #define BRP_MONITOR_DISABLED 0
50 #define BRP_MONITOR_ENABLED 1
52 #define BRP_MONITOR_PLAINTEXT 2
54 
56 
69 
70 
82 BRP_LIB brp_protocol brp_create(void);
83 
84 
95 (
96  brp_protocol composite_protocol,
97  brp_layer_id layer_id
99 );
102 
103 
131 (
132  brp_protocol composite_protocol,
133  brp_layer_id layer_id,
134  brp_protocol layer_protocol
137 );
138 
139 
147 (
148  brp_protocol composite_protocol,
149  brp_layer_id layer_id
151 );
154 
155 
175 (
176  brp_protocol composite_protocol,
177  brp_layer_id layer_id
179 );
183 
184 
196 BRP_LIB brp_errcode brp_set_io
197 (
198  brp_protocol protocol,
199  brp_protocol io_protocol
201 );
202 
203 
216 (
217  brp_protocol composite_protocol,
218  brp_protocol crypto_protocol
219 );
221 
222 
232 
233 
244  brp_protocol protocol,
245  int mode
246 );
247 
248 
249 
259 brp_protocol require_protocol
260 (
261  brp_protocol protocol,
262  int protocol_id,
263  brp_layer_id layer_id
264 );
265 
266 
272 #endif
273  // 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.
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...