[PACKET_IO]format api style

This commit is contained in:
liuwentan
2022-08-18 16:26:00 +08:00
parent 90542cec2d
commit 90b359ed40
25 changed files with 1171 additions and 692 deletions

View File

@@ -19,6 +19,8 @@ extern "C"
#include <stdint.h>
#include <pthread.h>
#define STR_MAX_LEN 1024
#ifndef DLT_EN10MB
#define DLT_EN10MB 1
#endif
@@ -82,9 +84,9 @@ struct pio_packet_queue {
*
* @retval -1(failed), 0(success)
*/
int strncpy_safe(char *dst, const char *src, size_t dst_size);
ssize_t strncpy_safe(char *dst, const char *src, size_t dst_size);
int packet_copy_data(uint8_t *ptr, const uint8_t *pkt_data, uint32_t pkt_len);
ssize_t packet_copy_data(uint8_t *ptr, const uint8_t *pkt_data, uint32_t pkt_len);
/**
* @brief ip hash function for struct pio_packet, 2 tuple(sip/dip) hash