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
2024-06-19 14:43:32 +08:00

17 lines
328 B
C++

#include "packet_priv.h"
#include "packet_utils.h"
int packet_get_layer_by_idx(const struct packet *pkt, int idx, struct layer *out)
{
const struct raw_layer *raw = packet_get_raw_layer(pkt, idx);
if (raw == NULL)
{
return -1;
}
else
{
layer_convert(raw, out);
return 0;
}
}