BALTECH SDK wrapper functions reference
composite_protocol.h
Go to the documentation of this file.
1 
27 #ifndef __COMPOSITE_PROTOCOL_H__
28 #define __COMPOSITE_PROTOCOL_H__
29 
30 
31 #include "protocol.h"
32 
33 
41 #define BRP_MONITOR_DISABLED 0
42 #define BRP_MONITOR_ENABLED 1
44 #define BRP_MONITOR_PLAINTEXT 2
46 
48 
61 
62 
79 BRP_LIB brp_protocol brp_create_custom(int custom_index);
80 
81 
93 BRP_LIB brp_protocol brp_create(void);
94 
95 
106 (
107  brp_protocol composite_protocol,
108  brp_layer_id layer_id
110 );
113 
114 
146 (
147  brp_protocol composite_protocol,
148  brp_layer_id layer_id,
149  brp_protocol layer_protocol
152 );
153 
154 
162 (
163  brp_protocol composite_protocol,
164  brp_layer_id layer_id
166 );
169 
170 
190 (
191  brp_protocol composite_protocol,
192  brp_layer_id layer_id
194 );
198 
199 
211 BRP_LIB brp_errcode brp_set_io
212 (
213  brp_protocol protocol,
214  brp_protocol io_protocol
216 );
217 
218 
231 (
232  brp_protocol composite_protocol,
233  brp_protocol crypto_protocol
234 );
236 
237 
247 
248 
259  brp_protocol protocol,
260  int mode
261 );
262 
263 
264 
274 brp_protocol require_protocol
275 (
276  brp_protocol protocol,
277  int protocol_id,
278  brp_layer_id layer_id
279 );
280 
281 
287 #endif
288  // 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
BRP_LIB brp_protocol brp_create_custom(int custom_index)
Creates a bare custom protocol whose callbacks are meant to be filled in by the caller (e...
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...