#ifndef DSR_ROUTE_H
#define DSR_ROUTE_H

#include <linux/netfilter_ipv4.h>
#include <linux/netdevice.h>
#include <linux/proc_fs.h>
#include <linux/ip.h>
#include <linux/inet.h>
#include <net/checksum.h>
#include <net/icmp.h>

#include "dsr_header.h"
#include "graph.h"

int reroute_output(struct sk_buff *skb, __u32 src, __u32 dst);
void add_reverse_route(__u32 daddr, __u32 * addr, int n_addr);
void add_forward_route(__u32 daddr, __u32 * addr, int n_addr);
#ifdef DSR_CRYPT
void route_set_qos_trust(__u32 addr, unsigned int qos, unsigned int trust, unsigned int sig_type);
void  route_refresh_timeout(unsigned long data);
#endif
/*
 * look up a route and clean out any expired routes
 * if a route is found it is set as new if no route is found NULL
 * is returned
 */
#ifdef DSR_USE_LINK_CACHE
struct rt_entry *lookup_route(struct graph *lc_graph, __u32 dst);
void remove_route(struct graph *lc_graph, __u32 srchop, __u32 dsthop);
#else
struct rt_entry * lookup_route(struct rt_entry * rt_cache, __u32 dst);
void remove_route(struct rt_entry * rt_cache, __u32 srchop, __u32 dsthop);
#endif

#endif /* DSR_ROUTE_H */
