]>
git.proxmox.com Git - mirror_frr.git/blob - lib/checksum.h
2 #include <netinet/in.h>
9 /* IPv4 pseudoheader */
16 } __attribute__((packed
));
18 /* IPv6 pseudoheader */
25 } __attribute__((packed
));
27 extern int in_cksum(void *data
, int nbytes
);
28 extern int in_cksum_with_ph4(struct ipv4_ph
*ph
, void *data
, int nbytes
);
29 extern int in_cksum_with_ph6(struct ipv6_ph
*ph
, void *data
, int nbytes
);
31 #define FLETCHER_CHECKSUM_VALIDATE 0xffff
32 extern uint16_t fletcher_checksum(uint8_t *, const size_t len
,
33 const uint16_t offset
);