Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  *  RPL implementation
0004  *
0005  *  Author:
0006  *  (C) 2020 Alexander Aring <alex.aring@gmail.com>
0007  */
0008 
0009 #ifndef _NET_RPL_H
0010 #define _NET_RPL_H
0011 
0012 #include <linux/rpl.h>
0013 
0014 #if IS_ENABLED(CONFIG_IPV6_RPL_LWTUNNEL)
0015 extern int rpl_init(void);
0016 extern void rpl_exit(void);
0017 #else
0018 static inline int rpl_init(void)
0019 {
0020     return 0;
0021 }
0022 
0023 static inline void rpl_exit(void) {}
0024 #endif
0025 
0026 /* Worst decompression memory usage ipv6 address (16) + pad 7 */
0027 #define IPV6_RPL_SRH_WORST_SWAP_SIZE (sizeof(struct in6_addr) + 7)
0028 
0029 size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri,
0030              unsigned char cmpre);
0031 
0032 void ipv6_rpl_srh_decompress(struct ipv6_rpl_sr_hdr *outhdr,
0033                  const struct ipv6_rpl_sr_hdr *inhdr,
0034                  const struct in6_addr *daddr, unsigned char n);
0035 
0036 void ipv6_rpl_srh_compress(struct ipv6_rpl_sr_hdr *outhdr,
0037                const struct ipv6_rpl_sr_hdr *inhdr,
0038                const struct in6_addr *daddr, unsigned char n);
0039 
0040 #endif /* _NET_RPL_H */