ip.h (4cdf507d54525842dfd9f6313fdafba039084046) ip.h (24a2d43d8886f5a29c3cf108927f630c545a9a38)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Definitions for the IP module.
7 *
8 * Version: @(#)ip.h 1.0.2 05/07/93

--- 166 unchanged lines hidden (view full) ---

175
176#define IP_REPLY_ARG_NOSRCCHECK 1
177
178static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg)
179{
180 return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0;
181}
182
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Definitions for the IP module.
7 *
8 * Version: @(#)ip.h 1.0.2 05/07/93

--- 166 unchanged lines hidden (view full) ---

175
176#define IP_REPLY_ARG_NOSRCCHECK 1
177
178static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg)
179{
180 return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0;
181}
182
183void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, __be32 daddr,
184 __be32 saddr, const struct ip_reply_arg *arg,
183void ip_send_unicast_reply(struct net *net, struct sk_buff *skb,
184 const struct ip_options *sopt,
185 __be32 daddr, __be32 saddr,
186 const struct ip_reply_arg *arg,
185 unsigned int len);
186
187#define IP_INC_STATS(net, field) SNMP_INC_STATS64((net)->mib.ip_statistics, field)
188#define IP_INC_STATS_BH(net, field) SNMP_INC_STATS64_BH((net)->mib.ip_statistics, field)
189#define IP_ADD_STATS(net, field, val) SNMP_ADD_STATS64((net)->mib.ip_statistics, field, val)
190#define IP_ADD_STATS_BH(net, field, val) SNMP_ADD_STATS64_BH((net)->mib.ip_statistics, field, val)
191#define IP_UPD_PO_STATS(net, field, val) SNMP_UPD_PO_STATS64((net)->mib.ip_statistics, field, val)
192#define IP_UPD_PO_STATS_BH(net, field, val) SNMP_UPD_PO_STATS64_BH((net)->mib.ip_statistics, field, val)

--- 313 unchanged lines hidden (view full) ---

506int ip_forward(struct sk_buff *skb);
507
508/*
509 * Functions provided by ip_options.c
510 */
511
512void ip_options_build(struct sk_buff *skb, struct ip_options *opt,
513 __be32 daddr, struct rtable *rt, int is_frag);
187 unsigned int len);
188
189#define IP_INC_STATS(net, field) SNMP_INC_STATS64((net)->mib.ip_statistics, field)
190#define IP_INC_STATS_BH(net, field) SNMP_INC_STATS64_BH((net)->mib.ip_statistics, field)
191#define IP_ADD_STATS(net, field, val) SNMP_ADD_STATS64((net)->mib.ip_statistics, field, val)
192#define IP_ADD_STATS_BH(net, field, val) SNMP_ADD_STATS64_BH((net)->mib.ip_statistics, field, val)
193#define IP_UPD_PO_STATS(net, field, val) SNMP_UPD_PO_STATS64((net)->mib.ip_statistics, field, val)
194#define IP_UPD_PO_STATS_BH(net, field, val) SNMP_UPD_PO_STATS64_BH((net)->mib.ip_statistics, field, val)

--- 313 unchanged lines hidden (view full) ---

508int ip_forward(struct sk_buff *skb);
509
510/*
511 * Functions provided by ip_options.c
512 */
513
514void ip_options_build(struct sk_buff *skb, struct ip_options *opt,
515 __be32 daddr, struct rtable *rt, int is_frag);
514int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb);
516
517int __ip_options_echo(struct ip_options *dopt, struct sk_buff *skb,
518 const struct ip_options *sopt);
519static inline int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb)
520{
521 return __ip_options_echo(dopt, skb, &IPCB(skb)->opt);
522}
523
515void ip_options_fragment(struct sk_buff *skb);
516int ip_options_compile(struct net *net, struct ip_options *opt,
517 struct sk_buff *skb);
518int ip_options_get(struct net *net, struct ip_options_rcu **optp,
519 unsigned char *data, int optlen);
520int ip_options_get_from_user(struct net *net, struct ip_options_rcu **optp,
521 unsigned char __user *data, int optlen);
522void ip_options_undo(struct ip_options *opt);

--- 37 unchanged lines hidden ---
524void ip_options_fragment(struct sk_buff *skb);
525int ip_options_compile(struct net *net, struct ip_options *opt,
526 struct sk_buff *skb);
527int ip_options_get(struct net *net, struct ip_options_rcu **optp,
528 unsigned char *data, int optlen);
529int ip_options_get_from_user(struct net *net, struct ip_options_rcu **optp,
530 unsigned char __user *data, int optlen);
531void ip_options_undo(struct ip_options *opt);

--- 37 unchanged lines hidden ---