csp.h File Reference
#include <stdint.h>
#include <csp/csp_autoconfig.h>
#include "csp_types.h"
#include "csp_platform.h"
#include "csp_error.h"
#include "csp_debug.h"
#include "csp_buffer.h"
#include "csp_rtable.h"
#include "csp_iflist.h"
#include <stdarg.h>

Go to the source code of this file.

Typedefs

typedef void * csp_memptr_t
 
typedef csp_memptr_t(* csp_memcpy_fnc_t) (csp_memptr_t, const csp_memptr_t, size_t)
 
typedef void(* csp_debug_hook_func_t) (csp_debug_level_t level, const char *format, va_list args)
 

Functions

int csp_init (uint8_t my_node_address)
 
void csp_set_address (uint8_t addr)
 
uint8_t csp_get_address (void)
 
void csp_set_hostname (char *hostname)
 
char * csp_get_hostname (void)
 
void csp_set_model (char *model)
 
char * csp_get_model (void)
 
void csp_set_revision (char *revision)
 
char * csp_get_revision (void)
 
csp_socket_tcsp_socket (uint32_t opts)
 
csp_conn_tcsp_accept (csp_socket_t *socket, uint32_t timeout)
 
csp_packet_tcsp_read (csp_conn_t *conn, uint32_t timeout)
 
int csp_send (csp_conn_t *conn, csp_packet_t *packet, uint32_t timeout)
 
int csp_send_prio (uint8_t prio, csp_conn_t *conn, csp_packet_t *packet, uint32_t timeout)
 
int csp_transaction (uint8_t prio, uint8_t dest, uint8_t port, uint32_t timeout, void *outbuf, int outlen, void *inbuf, int inlen)
 
int csp_transaction_persistent (csp_conn_t *conn, uint32_t timeout, void *outbuf, int outlen, void *inbuf, int inlen)
 
csp_packet_tcsp_recvfrom (csp_socket_t *socket, uint32_t timeout)
 
int csp_sendto (uint8_t prio, uint8_t dest, uint8_t dport, uint8_t src_port, uint32_t opts, csp_packet_t *packet, uint32_t timeout)
 
int csp_sendto_reply (csp_packet_t *request_packet, csp_packet_t *reply_packet, uint32_t opts, uint32_t timeout)
 
csp_conn_tcsp_connect (uint8_t prio, uint8_t dest, uint8_t dport, uint32_t timeout, uint32_t opts)
 
int csp_close (csp_conn_t *conn)
 
int csp_conn_dport (csp_conn_t *conn)
 
int csp_conn_sport (csp_conn_t *conn)
 
int csp_conn_dst (csp_conn_t *conn)
 
int csp_conn_src (csp_conn_t *conn)
 
int csp_conn_flags (csp_conn_t *conn)
 
int csp_listen (csp_socket_t *socket, size_t conn_queue_length)
 
int csp_bind (csp_socket_t *socket, uint8_t port)
 
int csp_route_start_task (unsigned int task_stack_size, unsigned int priority)
 
int csp_route_work (uint32_t timeout)
 
int csp_bridge_start (unsigned int task_stack_size, unsigned int task_priority, csp_iface_t *_if_a, csp_iface_t *_if_b)
 
int csp_promisc_enable (unsigned int buf_size)
 
void csp_promisc_disable (void)
 
csp_packet_tcsp_promisc_read (uint32_t timeout)
 
int csp_sfp_send (csp_conn_t *conn, void *data, int totalsize, int mtu, uint32_t timeout)
 
int csp_sfp_send_own_memcpy (csp_conn_t *conn, void *data, int totalsize, int mtu, uint32_t timeout, void *(*memcpyfcn)(void *, const void *, size_t))
 
int csp_sfp_recv (csp_conn_t *conn, void **dataout, int *datasize, uint32_t timeout)
 
int csp_sfp_recv_fp (csp_conn_t *conn, void **dataout, int *datasize, uint32_t timeout, csp_packet_t *first_packet)
 
void csp_service_handler (csp_conn_t *conn, csp_packet_t *packet)
 
int csp_ping (uint8_t node, uint32_t timeout, unsigned int size, uint8_t conn_options)
 
void csp_ping_noreply (uint8_t node)
 
void csp_ps (uint8_t node, uint32_t timeout)
 
void csp_memfree (uint8_t node, uint32_t timeout)
 
void csp_buf_free (uint8_t node, uint32_t timeout)
 
void csp_reboot (uint8_t node)
 
void csp_shutdown (uint8_t node)
 
void csp_uptime (uint8_t node, uint32_t timeout)
 
void csp_rdp_set_opt (unsigned int window_size, unsigned int conn_timeout_ms, unsigned int packet_timeout_ms, unsigned int delayed_acks, unsigned int ack_timeout, unsigned int ack_delay_count)
 
void csp_rdp_get_opt (unsigned int *window_size, unsigned int *conn_timeout_ms, unsigned int *packet_timeout_ms, unsigned int *delayed_acks, unsigned int *ack_timeout, unsigned int *ack_delay_count)
 
int csp_xtea_set_key (char *key, uint32_t keylen)
 
int csp_hmac_set_key (char *key, uint32_t keylen)
 
void csp_conn_print_table (void)
 
void csp_buffer_print_table (void)
 
void csp_cmp_set_memcpy (csp_memcpy_fnc_t fnc)
 
void csp_debug_hook_set (csp_debug_hook_func_t f)