diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-09-04 10:00:31 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-09-04 14:52:55 +0200 |
commit | 512116383215c2f61172dd20e45871ff5d16c030 (patch) | |
tree | 7b044cb92ac6a9dad639f2f3cdde049026e9bcc5 /src/libsystemd-network/icmp6-util.h | |
parent | sd-ndisc,sd-radv: fix use of uninitialized value (diff) | |
download | systemd-512116383215c2f61172dd20e45871ff5d16c030.tar.xz systemd-512116383215c2f61172dd20e45871ff5d16c030.zip |
icmp6-util: several cleanups for icmp6_receive()
- Rename the argument for storing the sender address,
- allow to call it with NULL for ret_xyz,
- reduce needless copy of timestamp when the message does not have
timestamp.
Diffstat (limited to 'src/libsystemd-network/icmp6-util.h')
-rw-r--r-- | src/libsystemd-network/icmp6-util.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libsystemd-network/icmp6-util.h b/src/libsystemd-network/icmp6-util.h index f7ad26b5e6..0a9ecb4c44 100644 --- a/src/libsystemd-network/icmp6-util.h +++ b/src/libsystemd-network/icmp6-util.h @@ -20,5 +20,9 @@ int icmp6_bind_router_solicitation(int ifindex); int icmp6_bind_router_advertisement(int ifindex); int icmp6_send_router_solicitation(int s, const struct ether_addr *ether_addr); -int icmp6_receive(int fd, void *buffer, size_t size, struct in6_addr *ret_dst, - triple_timestamp *ret_timestamp); +int icmp6_receive( + int fd, + void *buffer, + size_t size, + struct in6_addr *ret_sender, + triple_timestamp *ret_timestamp); |