libicmp/includes/internal/icmp_utils.h

16 lines
373 B
C

#ifndef ICMP_UTILS_H
#define ICMP_UTILS_H
#include <stdint.h>
#include <stddef.h>
#include <time.h>
/* Checksum calculation (RFC 1071) */
uint16_t icmp_checksum(const void *data, size_t len);
/* Time helpers */
int icmp_get_time(struct timespec *ts);
int64_t icmp_time_diff_ns(const struct timespec *start,
const struct timespec *end);
#endif