git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
include
/
net
/
ip.h
diff --git
a/include/net/ip.h
b/include/net/ip.h
index
ed84d04
..
e79c3e3
100644
(file)
--- a/
include/net/ip.h
+++ b/
include/net/ip.h
@@
-22,7
+22,6
@@
#ifndef _IP_H
#define _IP_H
#ifndef _IP_H
#define _IP_H
-#include <linux/config.h>
#include <linux/types.h>
#include <linux/ip.h>
#include <linux/in.h>
#include <linux/types.h>
#include <linux/ip.h>
#include <linux/in.h>
@@
-46,7
+45,7
@@
struct inet_skb_parm
struct ipcm_cookie
{
struct ipcm_cookie
{
-
u32
addr;
+
__be32
addr;
int oif;
struct ip_options *opt;
};
int oif;
struct ip_options *opt;
};
@@
-87,7
+86,7
@@
extern int igmp_mc_proc_init(void);
*/
extern int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk,
*/
extern int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk,
-
u32 saddr, u
32 daddr,
+
__be32 saddr, __be
32 daddr,
struct ip_options *opt);
extern int ip_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt, struct net_device *orig_dev);
struct ip_options *opt);
extern int ip_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt, struct net_device *orig_dev);
@@
-124,7
+123,7
@@
extern int ip4_datagram_connect(struct sock *sk,
* multicast packets.
*/
* multicast packets.
*/
-static inline void ip_tr_mc_map(
u
32 addr, char *buf)
+static inline void ip_tr_mc_map(
__be
32 addr, char *buf)
{
buf[0]=0xC0;
buf[1]=0x00;
{
buf[0]=0xC0;
buf[1]=0x00;
@@
-136,7
+135,7
@@
static inline void ip_tr_mc_map(u32 addr, char *buf)
struct ip_reply_arg {
struct kvec iov[1];
struct ip_reply_arg {
struct kvec iov[1];
- u32 csum;
+ __wsum csum;
int csumoffset; /* u16 offset of csum in iov[0].iov_base */
/* -1 if not needed */
};
int csumoffset; /* u16 offset of csum in iov[0].iov_base */
/* -1 if not needed */
};
@@
-147,7
+146,6
@@
void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar
struct ipv4_config
{
int log_martians;
struct ipv4_config
{
int log_martians;
- int autoconfig;
int no_pmtu_disc;
};
int no_pmtu_disc;
};
@@
-194,9
+192,9
@@
extern void ipfrag_init(void);
static inline
int ip_decrease_ttl(struct iphdr *iph)
{
static inline
int ip_decrease_ttl(struct iphdr *iph)
{
- u32 check = iph->check;
- check += htons(0x0100);
- iph->check =
check + (check>=0xFFFF
);
+ u32 check =
(__force u32)
iph->check;
+ check +=
(__force u32)
htons(0x0100);
+ iph->check =
(__force __sum16)(check + (check>=0xFFFF)
);
return --iph->ttl;
}
return --iph->ttl;
}
@@
-240,9
+238,9
@@
static inline void ip_select_ident_more(struct iphdr *iph, struct dst_entry *dst
* Map a multicast IP onto multicast MAC for type ethernet.
*/
* Map a multicast IP onto multicast MAC for type ethernet.
*/
-static inline void ip_eth_mc_map(
u32
addr, char *buf)
+static inline void ip_eth_mc_map(
__be32 n
addr, char *buf)
{
{
-
addr=ntohl(
addr);
+
__u32 addr=ntohl(n
addr);
buf[0]=0x01;
buf[1]=0x00;
buf[2]=0x5e;
buf[0]=0x01;
buf[1]=0x00;
buf[2]=0x5e;
@@
-258,13
+256,14
@@
static inline void ip_eth_mc_map(u32 addr, char *buf)
* Leave P_Key as 0 to be filled in by driver.
*/
* Leave P_Key as 0 to be filled in by driver.
*/
-static inline void ip_ib_mc_map(
u32
addr, char *buf)
+static inline void ip_ib_mc_map(
__be32 n
addr, char *buf)
{
{
+ __u32 addr;
buf[0] = 0; /* Reserved */
buf[1] = 0xff; /* Multicast QPN */
buf[2] = 0xff;
buf[3] = 0xff;
buf[0] = 0; /* Reserved */
buf[1] = 0xff; /* Multicast QPN */
buf[2] = 0xff;
buf[3] = 0xff;
- addr = ntohl(addr);
+ addr = ntohl(
n
addr);
buf[4] = 0xff;
buf[5] = 0x12; /* link local scope */
buf[6] = 0x40; /* IPv4 signature */
buf[4] = 0xff;
buf[5] = 0x12; /* link local scope */
buf[6] = 0x40; /* IPv4 signature */
@@
-337,7
+336,7
@@
extern int ip_net_unreachable(struct sk_buff *skb);
* Functions provided by ip_options.c
*/
* Functions provided by ip_options.c
*/
-extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt,
u
32 daddr, struct rtable *rt, int is_frag);
+extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt,
__be
32 daddr, struct rtable *rt, int is_frag);
extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb);
extern void ip_options_fragment(struct sk_buff *skb);
extern int ip_options_compile(struct ip_options *opt, struct sk_buff *skb);
extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb);
extern void ip_options_fragment(struct sk_buff *skb);
extern int ip_options_compile(struct ip_options *opt, struct sk_buff *skb);
@@
-357,12
+356,16
@@
extern void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb);
extern int ip_cmsg_send(struct msghdr *msg, struct ipcm_cookie *ipc);
extern int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, int optlen);
extern int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen);
extern int ip_cmsg_send(struct msghdr *msg, struct ipcm_cookie *ipc);
extern int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, int optlen);
extern int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen);
+extern int compat_ip_setsockopt(struct sock *sk, int level,
+ int optname, char __user *optval, int optlen);
+extern int compat_ip_getsockopt(struct sock *sk, int level,
+ int optname, char __user *optval, int __user *optlen);
extern int ip_ra_control(struct sock *sk, unsigned char on, void (*destructor)(struct sock *));
extern int ip_recv_error(struct sock *sk, struct msghdr *msg, int len);
extern void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
extern int ip_ra_control(struct sock *sk, unsigned char on, void (*destructor)(struct sock *));
extern int ip_recv_error(struct sock *sk, struct msghdr *msg, int len);
extern void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
-
u
16 port, u32 info, u8 *payload);
-extern void ip_local_error(struct sock *sk, int err,
u32 daddr, u
16 dport,
+
__be
16 port, u32 info, u8 *payload);
+extern void ip_local_error(struct sock *sk, int err,
__be32 daddr, __be
16 dport,
u32 info);
/* sysctl helpers - any sysctl which holds a value that ends up being
u32 info);
/* sysctl helpers - any sysctl which holds a value that ends up being
@@
-373,8
+376,7
@@
int ipv4_doint_and_flush(ctl_table *ctl, int write,
size_t *lenp, loff_t *ppos);
int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp,
size_t *lenp, loff_t *ppos);
int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp,
- void __user *newval, size_t newlen,
- void **context);
+ void __user *newval, size_t newlen);
#ifdef CONFIG_PROC_FS
extern int ip_misc_proc_init(void);
#endif
#ifdef CONFIG_PROC_FS
extern int ip_misc_proc_init(void);
#endif