This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stellar-stellar/src/packet/packet_parse.h

27 lines
499 B
C
Raw Normal View History

#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdint.h>
#include <stdio.h>
const char *packet_parse(struct packet *pkt, const char *data, uint16_t len);
// bref : 1, output packet bref info
// bref : 0, output packet detail info
int packet_to_str(const struct packet *pkt, char *buff, int size);
static inline void packet_print(const struct packet *pkt)
{
char buff[4096];
packet_to_str(pkt, buff, sizeof(buff));
printf("%s\n", buff);
}
#ifdef __cplusplus
}
#endif