1 /* SPDX-License-Identifier: GPL-2.0-or-later */
6 * (C) 2020 Alexander Aring <alex.aring@gmail.com>
12 #include <linux/rpl.h>
14 #if IS_ENABLED(CONFIG_IPV6_RPL_LWTUNNEL)
15 extern int rpl_init(void);
16 extern void rpl_exit(void);
18 static inline int rpl_init(void)
23 static inline void rpl_exit(void) {}
26 /* Worst decompression memory usage ipv6 address (16) + pad 7 */
27 #define IPV6_RPL_SRH_WORST_SWAP_SIZE (sizeof(struct in6_addr) + 7)
29 static inline size_t ipv6_rpl_srh_alloc_size(unsigned char n
)
31 return sizeof(struct ipv6_rpl_sr_hdr
) +
32 ((n
+ 1) * sizeof(struct in6_addr
));
35 size_t ipv6_rpl_srh_size(unsigned char n
, unsigned char cmpri
,
38 void ipv6_rpl_srh_decompress(struct ipv6_rpl_sr_hdr
*outhdr
,
39 const struct ipv6_rpl_sr_hdr
*inhdr
,
40 const struct in6_addr
*daddr
, unsigned char n
);
42 void ipv6_rpl_srh_compress(struct ipv6_rpl_sr_hdr
*outhdr
,
43 const struct ipv6_rpl_sr_hdr
*inhdr
,
44 const struct in6_addr
*daddr
, unsigned char n
);
46 #endif /* _NET_RPL_H */