mirror of
https://code.semirocket.science/wrapsix
synced 2024-09-20 07:11:06 +03:00
b6a9de321b
Fixed mistake in field type in pseudo-IPv6 header Bundled a library for red-black trees (storage mechanism is based on it)
21 lines
540 B
C
21 lines
540 B
C
#ifndef TRANSLATE_IP_H
|
|
#define TRANSLATE_IP_H
|
|
|
|
#include <netinet/in.h> /* in6_addr, in_addr */
|
|
#include <netinet/ip6.h> /* ip6_hdr */
|
|
|
|
struct ip6addr_ip4part {
|
|
long double prefix;
|
|
unsigned char a;
|
|
unsigned char b;
|
|
unsigned char c;
|
|
unsigned char d;
|
|
};
|
|
|
|
struct in_addr ipaddr_6to4(const struct in6_addr ip6_addr);
|
|
struct in6_addr ipaddr_4to6(const struct in_addr ip_addr);
|
|
|
|
void build_ip6_hdr(struct ip6_hdr *ip, struct in6_addr ip_src, struct in6_addr ip_dest, unsigned short paylen, unsigned char proto, unsigned char ttl);
|
|
|
|
#endif
|