33#define IP_MCAST_SUBNET_MASK ((in_addr_t)240<<24)
34#define IP_MCAST_NETWORK ((in_addr_t)224<<24)
38#define MROUTE_EXTRACT_SUCCEEDED (1<<0)
39#define MROUTE_EXTRACT_BCAST (1<<1)
40#define MROUTE_EXTRACT_MCAST (1<<2)
41#define MROUTE_EXTRACT_IGMP (1<<3)
43#define MROUTE_SEC_EXTRACT_SUCCEEDED (1<<(0+MROUTE_SEC_SHIFT))
44#define MROUTE_SEC_EXTRACT_BCAST (1<<(1+MROUTE_SEC_SHIFT))
45#define MROUTE_SEC_EXTRACT_MCAST (1<<(2+MROUTE_SEC_SHIFT))
46#define MROUTE_SEC_EXTRACT_IGMP (1<<(3+MROUTE_SEC_SHIFT))
48#define MROUTE_SEC_SHIFT 4
55#define MR_MAX_ADDR_LEN 20
61#define MR_ADDR_ETHER 1
70#define MR_WITH_NETBITS 8
76#define MR_WITH_PROTO 32
108 "Unexpected struct packing of v4");
111 "Unexpected struct packing of v6");
114 "Unexpected struct packing of v4mappedv6");
119#define MR_HELPER_NET_LEN 129
150#define MAPF_SUBNET (1<<0)
151#define MAPF_IA_EMPTY_IF_UNDEF (1<<1)
152#define MAPF_SHOW_ARP (1<<2)
154 const unsigned int flags,
169 const struct buffer *buf);
174 const struct buffer *buf);
180static inline unsigned int
187 unsigned int ret = 0;
231static inline const uint8_t *
235 return (uint8_t *) &a->
proto;
238static inline uint32_t
241 return (uint32_t) a->
len + 3;
250 dest->
v4.
addr = htonl(src);
253static inline in_addr_t
258 return ntohl(addr->
v4.
addr);
#define verify_align_4(ptr)
static const char *const key1
static uint32_t mroute_addr_hash_len(const struct mroute_addr *a)
void mroute_addr_mask_host_bits(struct mroute_addr *ma)
void mroute_helper_add_iroute46(struct mroute_helper *mh, int netbits)
unsigned int mroute_extract_addr_ip(struct mroute_addr *src, struct mroute_addr *dest, const struct buffer *buf)
static unsigned int mroute_extract_addr_from_packet(struct mroute_addr *src, struct mroute_addr *dest, uint16_t vid, const struct buffer *buf, int tunnel_type)
static in_addr_t in_addr_t_from_mroute_addr(const struct mroute_addr *addr)
const char * mroute_addr_print_ex(const struct mroute_addr *ma, const unsigned int flags, struct gc_arena *gc)
bool mroute_extract_openvpn_sockaddr(struct mroute_addr *addr, const struct openvpn_sockaddr *osaddr, bool use_port)
const char * mroute_addr_print(const struct mroute_addr *ma, struct gc_arena *gc)
static void mroute_extract_in_addr_t(struct mroute_addr *dest, const in_addr_t src)
uint32_t mroute_addr_hash_function(const void *key, uint32_t iv)
void mroute_helper_del_iroute46(struct mroute_helper *mh, int netbits)
bool mroute_learnable_address(const struct mroute_addr *addr, struct gc_arena *gc)
static const uint8_t * mroute_addr_hash_ptr(const struct mroute_addr *a)
bool mroute_addr_compare_function(const void *key1, const void *key2)
unsigned int mroute_extract_addr_ether(struct mroute_addr *src, struct mroute_addr *dest, uint16_t vid, const struct buffer *buf)
struct mroute_helper * mroute_helper_init(int ageable_ttl_secs)
#define MR_HELPER_NET_LEN
void mroute_addr_init(struct mroute_addr *addr)
static bool mroute_addr_equal(const struct mroute_addr *a1, const struct mroute_addr *a2)
static void mroute_addr_reset(struct mroute_addr *ma)
void mroute_helper_free(struct mroute_helper *mh)
Wrapper structure for dynamically allocated memory.
Garbage collection arena used to keep track of dynamically allocated memory.
Container for bidirectional cipher and HMAC key material.
Container for unidirectional cipher and HMAC key material.
uint8_t raw_addr[MR_MAX_ADDR_LEN]
struct mroute_addr::@2::@7 v4mappedv6
struct mroute_addr::@2::@4 ether
struct mroute_addr::@2::@6 v6
uint8_t addr[OPENVPN_ETH_ALEN]
struct mroute_addr::@2::@5 v4
int net_len_refcount[MR_HELPER_NET_LEN]
unsigned int cache_generation
uint8_t net_len[MR_HELPER_NET_LEN]
union openvpn_sockaddr::@20 addr