Types API¶
-
group
Types
Defines
-
bool
int¶
-
false
0¶
-
CSP_PRIORITIES
(1 << CSP_ID_PRIO_SIZE)¶
-
CSP_RX_QUEUE_LENGTH
CSP_CONN_QUEUE_LENGTH¶
-
CSP_ROUTE_FIFOS
1¶
-
CSP_RX_QUEUES
1¶
-
CSP_ID_PRIO_SIZE
2¶ Size of bit-fields in CSP header.
-
CSP_ID_HOST_SIZE
5¶
-
CSP_ID_PORT_SIZE
6¶
-
CSP_ID_FLAGS_SIZE
8¶
-
CSP_HEADER_BITS
(CSP_ID_PRIO_SIZE + 2 * CSP_ID_HOST_SIZE + 2 * CSP_ID_PORT_SIZE + CSP_ID_FLAGS_SIZE)¶
-
CSP_HEADER_LENGTH
(CSP_HEADER_BITS/8)¶
-
CSP_ID_PRIO_MAX
((1 << (CSP_ID_PRIO_SIZE)) - 1)¶ Highest number to be entered in field.
-
CSP_ID_HOST_MAX
((1 << (CSP_ID_HOST_SIZE)) - 1)¶
-
CSP_ID_PORT_MAX
((1 << (CSP_ID_PORT_SIZE)) - 1)¶
-
CSP_ID_FLAGS_MAX
((1 << (CSP_ID_FLAGS_SIZE)) - 1)¶
-
CSP_ID_PRIO_MASK
((uint32_t) CSP_ID_PRIO_MAX << (CSP_ID_FLAGS_SIZE + 2 * CSP_ID_PORT_SIZE + 2 * CSP_ID_HOST_SIZE))¶ Identifier field masks.
-
CSP_ID_SRC_MASK
((uint32_t) CSP_ID_HOST_MAX << (CSP_ID_FLAGS_SIZE + 2 * CSP_ID_PORT_SIZE + 1 * CSP_ID_HOST_SIZE))¶
-
CSP_ID_DST_MASK
((uint32_t) CSP_ID_HOST_MAX << (CSP_ID_FLAGS_SIZE + 2 * CSP_ID_PORT_SIZE))¶
-
CSP_ID_DPORT_MASK
((uint32_t) CSP_ID_PORT_MAX << (CSP_ID_FLAGS_SIZE + 1 * CSP_ID_PORT_SIZE))¶
-
CSP_ID_SPORT_MASK
((uint32_t) CSP_ID_PORT_MAX << (CSP_ID_FLAGS_SIZE))¶
-
CSP_ID_FLAGS_MASK
((uint32_t) CSP_ID_FLAGS_MAX << (0))¶
-
CSP_ID_CONN_MASK
(CSP_ID_SRC_MASK | CSP_ID_DST_MASK | CSP_ID_DPORT_MASK | CSP_ID_SPORT_MASK)¶
-
CSP_BROADCAST_ADDR
CSP_ID_HOST_MAX¶ Broadcast address.
-
CSP_DEFAULT_ROUTE
(CSP_ID_HOST_MAX + 1)¶ Default routing address.
-
CSP_FRES1
0x80¶ CSP Flags.
-
CSP_FRES2
0x40¶
-
CSP_FRES3
0x20¶
-
CSP_FFRAG
0x10¶
-
CSP_FHMAC
0x08¶
-
CSP_FXTEA
0x04¶
-
CSP_FRDP
0x02¶
-
CSP_FCRC32
0x01¶
-
CSP_SO_NONE
0x0000¶ CSP Socket options.
-
CSP_SO_RDPREQ
0x0001¶
-
CSP_SO_RDPPROHIB
0x0002¶
-
CSP_SO_HMACREQ
0x0004¶
-
CSP_SO_HMACPROHIB
0x0008¶
-
CSP_SO_XTEAREQ
0x0010¶
-
CSP_SO_XTEAPROHIB
0x0020¶
-
CSP_SO_CRC32REQ
0x0040¶
-
CSP_SO_CRC32PROHIB
0x0080¶
-
CSP_SO_CONN_LESS
0x0100¶
-
CSP_O_NONE
CSP_SO_NONE¶ CSP Connect options.
-
CSP_O_RDP
CSP_SO_RDPREQ¶
-
CSP_O_NORDP
CSP_SO_RDPPROHIB¶
-
CSP_O_HMAC
CSP_SO_HMACREQ¶
-
CSP_O_NOHMAC
CSP_SO_HMACPROHIB¶
-
CSP_O_XTEA
CSP_SO_XTEAREQ¶
-
CSP_O_NOXTEA
CSP_SO_XTEAPROHIB¶
-
CSP_O_CRC32
CSP_SO_CRC32REQ¶
-
CSP_O_NOCRC32
CSP_SO_CRC32PROHIB¶
-
CSP_BUFFER_PACKET_OVERHEAD
(sizeof(csp_packet_t) - sizeof(((csp_packet_t *)0)->data))¶ This define must be equal to the size of the packet overhead in csp_packet_t.
It is used in csp_buffer_get() to check the allocated buffer size against the required buffer size.
-
CSP_HOSTNAME_LEN
20¶
-
CSP_MODEL_LEN
30¶
-
CSP_REBOOT_MAGIC
0x80078007¶
-
CSP_REBOOT_SHUTDOWN_MAGIC
0xD1E5529A¶
Typedefs
-
typedef int (*
nexthop_t
)(struct csp_iface_s *interface, csp_packet_t *packet, uint32_t timeout)¶
-
typedef struct csp_iface_s
csp_iface_t
¶ Interface struct.
-
typedef struct csp_conn_s
csp_socket_t
¶ Forward declaration of socket and connection structures.
-
typedef struct csp_conn_s
csp_conn_t
¶
Enums
-
union
csp_id_t
¶ - #include <csp_types.h>
This union defines a CSP identifier and allows access to the individual fields or the entire identifier.
-
struct
csp_packet_t
¶ - #include <csp_types.h>
CSP PACKET STRUCTURE Note: This structure is constructed to fit with all interface frame types in order to have buffer reuse.
-
struct
csp_iface_s
¶ - #include <csp_types.h>
Interface struct.
-