1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-11 20:58:27 +03:00

icmp6-packet: expose icmp6_packet_get_header()

This commit is contained in:
Yu Watanabe 2024-03-18 23:18:43 +09:00
parent d112b4454c
commit fcfb691fc1
2 changed files with 2 additions and 1 deletions

View File

@ -52,7 +52,7 @@ int icmp6_packet_get_timestamp(ICMP6Packet *p, clockid_t clock, usec_t *ret) {
return 0; return 0;
} }
static const struct icmp6_hdr* icmp6_packet_get_header(ICMP6Packet *p) { const struct icmp6_hdr* icmp6_packet_get_header(ICMP6Packet *p) {
assert(p); assert(p);
if (p->raw_size < sizeof(struct icmp6_hdr)) if (p->raw_size < sizeof(struct icmp6_hdr))

View File

@ -23,6 +23,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(ICMP6Packet*, icmp6_packet_unref);
int icmp6_packet_get_sender_address(ICMP6Packet *p, struct in6_addr *ret); int icmp6_packet_get_sender_address(ICMP6Packet *p, struct in6_addr *ret);
int icmp6_packet_get_timestamp(ICMP6Packet *p, clockid_t clock, usec_t *ret); int icmp6_packet_get_timestamp(ICMP6Packet *p, clockid_t clock, usec_t *ret);
const struct icmp6_hdr* icmp6_packet_get_header(ICMP6Packet *p);
int icmp6_packet_get_type(ICMP6Packet *p); int icmp6_packet_get_type(ICMP6Packet *p);
int icmp6_packet_receive(int fd, ICMP6Packet **ret); int icmp6_packet_receive(int fd, ICMP6Packet **ret);