@@ -71,7 +71,7 @@ const csp_conf_t * csp_get_conf(void);
71
71
/**
72
72
* Copy csp id fields from source to target object
73
73
*/
74
- void csp_id_copy (csp_id_t * target , csp_id_t * source );
74
+ void csp_id_copy (csp_id_t * target , const csp_id_t * source );
75
75
76
76
/**
77
77
* Clear csp id fields after creating new buffer
@@ -135,7 +135,7 @@ void csp_send_prio(uint8_t prio, csp_conn_t *conn, csp_packet_t *packet);
135
135
* Returns:
136
136
* int: 1 or reply size on success, 0 on failure (error, incoming length does not match, timeout)
137
137
*/
138
- int csp_transaction_w_opts (uint8_t prio , uint16_t dst , uint8_t dst_port , uint32_t timeout , void * outbuf , int outlen , void * inbuf , int inlen , uint32_t opts );
138
+ int csp_transaction_w_opts (uint8_t prio , uint16_t dst , uint8_t dst_port , uint32_t timeout , const void * outbuf , int outlen , void * inbuf , int inlen , uint32_t opts );
139
139
140
140
/**
141
141
* Perform an entire request & reply transaction.
@@ -151,7 +151,7 @@ int csp_transaction_w_opts(uint8_t prio, uint16_t dst, uint8_t dst_port, uint32_
151
151
* @param[in] inlen length of expected reply, -1 for unknown size (inbuf MUST be large enough), 0 for no reply.
152
152
* @return 1 or reply size on success, 0 on failure (error, incoming length does not match, timeout)
153
153
*/
154
- static inline int csp_transaction (uint8_t prio , uint16_t dest , uint8_t port , uint32_t timeout , void * outbuf , int outlen , void * inbuf , int inlen ) {
154
+ static inline int csp_transaction (uint8_t prio , uint16_t dest , uint8_t port , uint32_t timeout , const void * outbuf , int outlen , void * inbuf , int inlen ) {
155
155
return csp_transaction_w_opts (prio , dest , port , timeout , outbuf , outlen , inbuf , inlen , 0 );
156
156
}
157
157
@@ -167,7 +167,7 @@ static inline int csp_transaction(uint8_t prio, uint16_t dest, uint8_t port, uin
167
167
* @param[in] inlen length of expected reply, -1 for unknown size (inbuf MUST be large enough), 0 for no reply.
168
168
* @return 1 or reply size on success, 0 on failure (error, incoming length does not match, timeout)
169
169
*/
170
- int csp_transaction_persistent (csp_conn_t * conn , uint32_t timeout , void * outbuf , int outlen , void * inbuf , int inlen );
170
+ int csp_transaction_persistent (csp_conn_t * conn , uint32_t timeout , const void * outbuf , int outlen , void * inbuf , int inlen );
171
171
172
172
/**
173
173
* Read data from a connection-less server socket.
@@ -238,39 +238,39 @@ int csp_socket_close(csp_socket_t* sock);
238
238
* @param[in] conn connection
239
239
* @return destination port of an incoming connection
240
240
*/
241
- int csp_conn_dport (csp_conn_t * conn );
241
+ int csp_conn_dport (const csp_conn_t * conn );
242
242
243
243
/**
244
244
* Return source port of connection.
245
245
*
246
246
* @param[in] conn connection
247
247
* @return source port of an incoming connection
248
248
*/
249
- int csp_conn_sport (csp_conn_t * conn );
249
+ int csp_conn_sport (const csp_conn_t * conn );
250
250
251
251
/**
252
252
* Return destination address of connection.
253
253
*
254
254
* @param[in] conn connection
255
255
* @return destination address of an incoming connection
256
256
*/
257
- int csp_conn_dst (csp_conn_t * conn );
257
+ int csp_conn_dst (const csp_conn_t * conn );
258
258
259
259
/**
260
260
* Return source address of connection.
261
261
*
262
262
* @param[in] conn connection
263
263
* @return source address of an incoming connection
264
264
*/
265
- int csp_conn_src (csp_conn_t * conn );
265
+ int csp_conn_src (const csp_conn_t * conn );
266
266
267
267
/**
268
268
* Return flags of connection.
269
269
*
270
270
* @param[in] conn connection
271
271
* @return flags of an incoming connection, see @ref CSP_HEADER_FLAGS
272
272
*/
273
- int csp_conn_flags (csp_conn_t * conn );
273
+ int csp_conn_flags (const csp_conn_t * conn );
274
274
275
275
/**
276
276
* Return if the CSP connection is active
@@ -500,7 +500,7 @@ void csp_conn_print_table(void);
500
500
* @param[in] len number of bytes to dump, starting from \a addr.
501
501
*
502
502
*/
503
- void csp_hex_dump (const char * desc , void * addr , int len );
503
+ void csp_hex_dump (const char * desc , const void * addr , int len );
504
504
505
505
#else
506
506
0 commit comments