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_layer.cpp

17 lines
321 B
C++
Raw Normal View History

#include "packet_priv.h"
2024-06-17 11:41:21 +08:00
#include "packet_utils.h"
int packet_get_layer(const struct packet *pkt, int idx, struct layer *out)
{
2024-06-17 11:41:21 +08:00
const struct raw_layer *raw = packet_get_raw_layer(pkt, idx);
if (raw == NULL)
{
return -1;
}
2024-06-17 11:41:21 +08:00
else
{
2024-06-17 11:41:21 +08:00
layer_convert(raw, out);
return 0;
}
}