aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ip.h')
-rw-r--r--include/net/ip.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index 0bb620702929..025c61c0dffb 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -39,11 +39,12 @@ struct inet_skb_parm {
39 struct ip_options opt; /* Compiled IP options */ 39 struct ip_options opt; /* Compiled IP options */
40 unsigned char flags; 40 unsigned char flags;
41 41
42#define IPSKB_FORWARDED 1 42#define IPSKB_FORWARDED BIT(0)
43#define IPSKB_XFRM_TUNNEL_SIZE 2 43#define IPSKB_XFRM_TUNNEL_SIZE BIT(1)
44#define IPSKB_XFRM_TRANSFORMED 4 44#define IPSKB_XFRM_TRANSFORMED BIT(2)
45#define IPSKB_FRAG_COMPLETE 8 45#define IPSKB_FRAG_COMPLETE BIT(3)
46#define IPSKB_REROUTED 16 46#define IPSKB_REROUTED BIT(4)
47#define IPSKB_DOREDIRECT BIT(5)
47 48
48 u16 frag_max_size; 49 u16 frag_max_size;
49}; 50};
@@ -180,7 +181,7 @@ static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg)
180 return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0; 181 return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0;
181} 182}
182 183
183void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, 184void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb,
184 const struct ip_options *sopt, 185 const struct ip_options *sopt,
185 __be32 daddr, __be32 saddr, 186 __be32 daddr, __be32 saddr,
186 const struct ip_reply_arg *arg, 187 const struct ip_reply_arg *arg,
@@ -537,7 +538,7 @@ int ip_options_rcv_srr(struct sk_buff *skb);
537 */ 538 */
538 539
539void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb); 540void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb);
540void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb); 541void ip_cmsg_recv_offset(struct msghdr *msg, struct sk_buff *skb, int offset);
541int ip_cmsg_send(struct net *net, struct msghdr *msg, 542int ip_cmsg_send(struct net *net, struct msghdr *msg,
542 struct ipcm_cookie *ipc, bool allow_ipv6); 543 struct ipcm_cookie *ipc, bool allow_ipv6);
543int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, 544int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval,
@@ -557,6 +558,11 @@ void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port,
557void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, 558void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport,
558 u32 info); 559 u32 info);
559 560
561static inline void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb)
562{
563 ip_cmsg_recv_offset(msg, skb, 0);
564}
565
560bool icmp_global_allow(void); 566bool icmp_global_allow(void);
561extern int sysctl_icmp_msgs_per_sec; 567extern int sysctl_icmp_msgs_per_sec;
562extern int sysctl_icmp_msgs_burst; 568extern int sysctl_icmp_msgs_burst;