]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/net/route.h
net: Move prototype declaration to header file include/net/datalink.h from net/ipx...
[karo-tx-linux.git] / include / net / route.h
index f68c167280a7f6138036f626cb8f82e68faf4f36..9d1f423d5944bc3908bf68e64aae7f259ff7fdb0 100644 (file)
@@ -36,6 +36,9 @@
 #include <linux/cache.h>
 #include <linux/security.h>
 
+/* IPv4 datagram length is stored into 16bit field (tot_len) */
+#define IP_MAX_MTU     0xFFFFU
+
 #define RTO_ONLINK     0x01
 
 #define RT_CONN_FLAGS(sk)   (RT_TOS(inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
@@ -239,14 +242,12 @@ static inline char rt_tos2priority(u8 tos)
 static inline void ip_route_connect_init(struct flowi4 *fl4, __be32 dst, __be32 src,
                                         u32 tos, int oif, u8 protocol,
                                         __be16 sport, __be16 dport,
-                                        struct sock *sk, bool can_sleep)
+                                        struct sock *sk)
 {
        __u8 flow_flags = 0;
 
        if (inet_sk(sk)->transparent)
                flow_flags |= FLOWI_FLAG_ANYSRC;
-       if (can_sleep)
-               flow_flags |= FLOWI_FLAG_CAN_SLEEP;
 
        flowi4_init_output(fl4, oif, sk->sk_mark, tos, RT_SCOPE_UNIVERSE,
                           protocol, flow_flags, dst, src, dport, sport);
@@ -256,13 +257,13 @@ static inline struct rtable *ip_route_connect(struct flowi4 *fl4,
                                              __be32 dst, __be32 src, u32 tos,
                                              int oif, u8 protocol,
                                              __be16 sport, __be16 dport,
-                                             struct sock *sk, bool can_sleep)
+                                             struct sock *sk)
 {
        struct net *net = sock_net(sk);
        struct rtable *rt;
 
        ip_route_connect_init(fl4, dst, src, tos, oif, protocol,
-                             sport, dport, sk, can_sleep);
+                             sport, dport, sk);
 
        if (!dst || !src) {
                rt = __ip_route_output_key(net, fl4);
@@ -313,20 +314,4 @@ static inline int ip4_dst_hoplimit(const struct dst_entry *dst)
        return hoplimit;
 }
 
-static inline bool ip_sk_accept_pmtu(const struct sock *sk)
-{
-       return inet_sk(sk)->pmtudisc != IP_PMTUDISC_INTERFACE;
-}
-
-static inline bool ip_sk_use_pmtu(const struct sock *sk)
-{
-       return inet_sk(sk)->pmtudisc < IP_PMTUDISC_PROBE;
-}
-
-static inline int ip_skb_dst_mtu(const struct sk_buff *skb)
-{
-       return (!skb->sk || ip_sk_use_pmtu(skb->sk)) ?
-              dst_mtu(skb_dst(skb)) : skb_dst(skb)->dev->mtu;
-}
-
 #endif /* _ROUTE_H */