Go to the documentation of this file.
85 #ifdef HE_ENABLE_MULTITHREADED
86 extern HE_THREAD_LOCAL uint8_t *cur_packet;
87 extern HE_THREAD_LOCAL
size_t cur_packet_length;
88 extern HE_THREAD_LOCAL
bool packet_seen;
90 static inline void he_internal_set_packet(
he_conn_t *conn, uint8_t *packet,
size_t len) {
91 cur_packet_length = len;
95 static inline void he_internal_set_packet_seen(
he_conn_t *conn,
bool value) {
99 static inline bool he_internal_is_packet_seen(
he_conn_t *conn) {
103 static inline bool he_internal_is_pkt_available(
he_conn_t *conn) {
104 return !packet_seen && cur_packet;
107 static inline size_t he_internal_copy_packet(
he_conn_t *conn,
char *buf) {
108 memcpy(buf, cur_packet, cur_packet_length);
109 return cur_packet_length;
112 static inline size_t he_internal_get_packet_length(
he_conn_t *conn) {
113 return cur_packet_length;
116 #else // HE_ENABLE_MULTITHREADED
118 static inline void he_internal_set_packet(
he_conn_t *conn, uint8_t *packet,
size_t len) {
123 static inline void he_internal_set_packet_seen(
he_conn_t *conn,
bool value) {
127 static inline bool he_internal_is_packet_seen(
he_conn_t *conn) {
131 static inline bool he_internal_is_pkt_available(
he_conn_t *conn) {
135 static inline size_t he_internal_copy_packet(
he_conn_t *conn,
char *buf) {
140 static inline size_t he_internal_get_packet_length(
he_conn_t *conn) {
143 #endif // HE_ENABLE_MULTITHREADED
Definition: he_internal.h:75
Core internal header file for libhelium.
bool he_internal_flow_should_fragment(he_conn_t *conn, uint16_t effective_pmtu, uint16_t length)
Definition: flow.c:37
enum he_return_code he_return_code_t
All possible return codes for helium.
uint8_t * incoming_data
Pointer to incoming data buffer.
Definition: he_internal.h:254
he_return_code_t he_internal_update_session_incoming(he_conn_t *conn, he_wire_hdr_t *hdr)
Definition: flow.c:267
he_return_code_t he_conn_inside_packet_received(he_conn_t *conn, uint8_t *packet, size_t length)
Called when the host application needs to deliver an inside packet to Helium.
Definition: flow.c:41
he_return_code_t he_conn_outside_data_received(he_conn_t *conn, uint8_t *buffer, size_t length)
Called when the host application needs to deliver outside data to be processed by Helium.
Definition: flow.c:299
size_t incoming_data_length
Length of the data in the.
Definition: he_internal.h:256
Core public header file for libhelium.
The wire header format It is strongly discouraged to interact with this header structure,...
Definition: he.h:564
bool packet_seen
Packet seen.
Definition: he_internal.h:258
Definition: he_internal.h:170