~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/net/ip6_route.h

Version: ~ [ 2.2.5 ] ~ [ 2.4.1 ] ~ [ 2.4.9 ] ~ [ 2.6.17.10 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _NET_IP6_ROUTE_H
  2 #define _NET_IP6_ROUTE_H
  3 
  4 #define IP6_RT_PRIO_FW          16
  5 #define IP6_RT_PRIO_USER        1024
  6 #define IP6_RT_PRIO_ADDRCONF    256
  7 #define IP6_RT_PRIO_KERN        512
  8 #define IP6_RT_FLOW_MASK        0x00ff
  9 
 10 #ifdef __KERNEL__
 11 
 12 #include <net/flow.h>
 13 #include <net/ip6_fib.h>
 14 
 15 struct pol_chain {
 16         int                     type;
 17         int                     priority;
 18         struct fib6_node        *rules;
 19         struct pol_chain        *next;
 20 };
 21 
 22 extern struct rt6_info  ip6_null_entry;
 23 
 24 extern int ip6_rt_max_size;
 25 extern int ip6_rt_gc_min;
 26 extern int ip6_rt_gc_timeout;
 27 extern int ip6_rt_gc_interval;
 28 
 29 extern void                     ip6_route_input(struct sk_buff *skb);
 30 
 31 extern struct dst_entry *       ip6_route_output(struct sock *sk,
 32                                                  struct flowi *fl);
 33 
 34 extern void                     ip6_route_init(void);
 35 extern void                     ip6_route_cleanup(void);
 36 
 37 extern int                      ipv6_route_ioctl(unsigned int cmd, void *arg);
 38 
 39 extern int                      ip6_route_add(struct in6_rtmsg *rtmsg);
 40 extern int                      ip6_del_rt(struct rt6_info *);
 41 
 42 extern int                      ip6_rt_addr_add(struct in6_addr *addr,
 43                                                 struct net_device *dev);
 44 
 45 extern int                      ip6_rt_addr_del(struct in6_addr *addr,
 46                                                 struct net_device *dev);
 47 
 48 extern void                     rt6_sndmsg(int type, struct in6_addr *dst,
 49                                            struct in6_addr *src,
 50                                            struct in6_addr *gw,
 51                                            struct net_device *dev, 
 52                                            int dstlen, int srclen,
 53                                            int metric, __u32 flags);
 54 
 55 extern struct rt6_info          *rt6_lookup(struct in6_addr *daddr,
 56                                             struct in6_addr *saddr,
 57                                             int oif, int flags);
 58 
 59 /*
 60  *      support functions for ND
 61  *
 62  */
 63 extern struct rt6_info *        rt6_get_dflt_router(struct in6_addr *addr,
 64                                                     struct net_device *dev);
 65 extern struct rt6_info *        rt6_add_dflt_router(struct in6_addr *gwaddr,
 66                                                     struct net_device *dev);
 67 
 68 extern void                     rt6_purge_dflt_routers(int lst_resort);
 69 
 70 extern void                     rt6_redirect(struct in6_addr *dest,
 71                                              struct in6_addr *saddr,
 72                                              struct neighbour *neigh,
 73                                              int on_link);
 74 
 75 extern void                     rt6_pmtu_discovery(struct in6_addr *daddr,
 76                                                    struct in6_addr *saddr,
 77                                                    struct net_device *dev,
 78                                                    u32 pmtu);
 79 
 80 struct nlmsghdr;
 81 struct netlink_callback;
 82 extern int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb);
 83 extern int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
 84 extern int inet6_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
 85 extern int inet6_rtm_getroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
 86 
 87 extern void rt6_ifdown(struct net_device *dev);
 88 extern void rt6_mtu_change(struct net_device *dev, unsigned mtu);
 89 
 90 extern rwlock_t rt6_lock;
 91 
 92 /*
 93  *      Store a destination cache entry in a socket
 94  *      For UDP/RAW sockets this is done on udp_connect.
 95  */
 96 
 97 static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst,
 98                                      struct in6_addr *daddr)
 99 {
100         struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
101         struct rt6_info *rt = (struct rt6_info *) dst;
102 
103         write_lock(&sk->dst_lock);
104         __sk_dst_set(sk, dst);
105         np->daddr_cache = daddr;
106         np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0;
107         write_unlock(&sk->dst_lock);
108 }
109 
110 #endif
111 #endif
112 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.