Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a16c20c7
Commit
a16c20c7
authored
Oct 11, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/home/acme/BK/ip-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents
2da2a587
cdaa9476
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
22 deletions
+78
-22
include/net/ip.h
include/net/ip.h
+5
-3
net/ipv4/Makefile
net/ipv4/Makefile
+1
-1
net/ipv4/af_inet.c
net/ipv4/af_inet.c
+2
-18
net/ipv4/ip_proc.c
net/ipv4/ip_proc.c
+70
-0
No files found.
include/net/ip.h
View file @
a16c20c7
...
...
@@ -174,7 +174,7 @@ static inline
int
ip_decrease_ttl
(
struct
iphdr
*
iph
)
{
u32
check
=
iph
->
check
;
check
+=
__constant_
htons
(
0x0100
);
check
+=
htons
(
0x0100
);
iph
->
check
=
check
+
(
check
>=
0xFFFF
);
return
--
iph
->
ttl
;
}
...
...
@@ -191,7 +191,7 @@ extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more
static
inline
void
ip_select_ident
(
struct
iphdr
*
iph
,
struct
dst_entry
*
dst
,
struct
sock
*
sk
)
{
if
(
iph
->
frag_off
&
__constant_
htons
(
IP_DF
))
{
if
(
iph
->
frag_off
&
htons
(
IP_DF
))
{
/* This is only to work around buggy Windows95/2000
* VJ compression implementations. If the ID field
* does not change, they drop every other packet in
...
...
@@ -205,7 +205,7 @@ static inline void ip_select_ident(struct iphdr *iph, struct dst_entry *dst, str
static
inline
void
ip_select_ident_more
(
struct
iphdr
*
iph
,
struct
dst_entry
*
dst
,
struct
sock
*
sk
,
int
more
)
{
if
(
iph
->
frag_off
&
__constant_
htons
(
IP_DF
))
{
if
(
iph
->
frag_off
&
htons
(
IP_DF
))
{
if
(
sk
&&
inet_sk
(
sk
)
->
daddr
)
{
iph
->
id
=
htons
(
inet_sk
(
sk
)
->
id
);
inet_sk
(
sk
)
->
id
+=
1
+
more
;
...
...
@@ -280,4 +280,6 @@ extern void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
extern
void
ip_local_error
(
struct
sock
*
sk
,
int
err
,
u32
daddr
,
u16
dport
,
u32
info
);
extern
int
ipv4_proc_init
(
void
);
#endif
/* _IP_H */
net/ipv4/Makefile
View file @
a16c20c7
...
...
@@ -4,7 +4,7 @@
obj-y
:=
utils.o route.o inetpeer.o proc.o protocol.o
\
ip_input.o ip_fragment.o ip_forward.o ip_options.o
\
ip_output.o ip_sockglue.o
\
ip_output.o ip_sockglue.o
ip_proc.o
\
tcp.o tcp_input.o tcp_output.o tcp_timer.o tcp_ipv4.o tcp_minisocks.o
\
tcp_diag.o raw.o udp.o arp.o icmp.o devinet.o af_inet.o igmp.o
\
sysctl_net_ipv4.o fib_frontend.o fib_semantics.o fib_hash.o
...
...
net/ipv4/af_inet.c
View file @
a16c20c7
...
...
@@ -82,7 +82,6 @@
#include <linux/fcntl.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/proc_fs.h>
#include <linux/stat.h>
#include <linux/init.h>
#include <linux/poll.h>
...
...
@@ -125,12 +124,6 @@ struct linux_mib net_statistics[NR_CPUS * 2];
atomic_t
inet_sock_nr
;
#endif
extern
int
raw_get_info
(
char
*
,
char
**
,
off_t
,
int
);
extern
int
snmp_get_info
(
char
*
,
char
**
,
off_t
,
int
);
extern
int
netstat_get_info
(
char
*
,
char
**
,
off_t
,
int
);
extern
int
afinet_get_info
(
char
*
,
char
**
,
off_t
,
int
);
extern
int
tcp_get_info
(
char
*
,
char
**
,
off_t
,
int
);
extern
int
udp_get_info
(
char
*
,
char
**
,
off_t
,
int
);
extern
void
ip_mc_drop_socket
(
struct
sock
*
sk
);
#ifdef CONFIG_DLCI
...
...
@@ -1213,17 +1206,8 @@ static int __init inet_init(void)
ip_mr_init
();
#endif
/*
* Create all the /proc entries.
*/
#ifdef CONFIG_PROC_FS
proc_net_create
(
"raw"
,
0
,
raw_get_info
);
proc_net_create
(
"netstat"
,
0
,
netstat_get_info
);
proc_net_create
(
"snmp"
,
0
,
snmp_get_info
);
proc_net_create
(
"sockstat"
,
0
,
afinet_get_info
);
proc_net_create
(
"tcp"
,
0
,
tcp_get_info
);
proc_net_create
(
"udp"
,
0
,
udp_get_info
);
#endif
/* CONFIG_PROC_FS */
ipv4_proc_init
();
return
0
;
}
module_init
(
inet_init
);
net/ipv4/ip_proc.c
0 → 100644
View file @
a16c20c7
/*
* INET An implementation of the TCP/IP protocol suite for the LINUX
* operating system. INET is implemented using the BSD Socket
* interface as the means of communication with the user level.
*
* ipv4 proc support
*
* Arnaldo Carvalho de Melo <acme@conectiva.com.br>, 2002/10/10
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of the
* License
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
extern
int
raw_get_info
(
char
*
,
char
**
,
off_t
,
int
);
extern
int
snmp_get_info
(
char
*
,
char
**
,
off_t
,
int
);
extern
int
netstat_get_info
(
char
*
,
char
**
,
off_t
,
int
);
extern
int
afinet_get_info
(
char
*
,
char
**
,
off_t
,
int
);
extern
int
tcp_get_info
(
char
*
,
char
**
,
off_t
,
int
);
extern
int
udp_get_info
(
char
*
,
char
**
,
off_t
,
int
);
#ifdef CONFIG_PROC_FS
int
__init
ipv4_proc_init
(
void
)
{
int
rc
=
0
;
if
(
!
proc_net_create
(
"raw"
,
0
,
raw_get_info
))
goto
out_raw
;
if
(
!
proc_net_create
(
"netstat"
,
0
,
netstat_get_info
))
goto
out_netstat
;
if
(
!
proc_net_create
(
"snmp"
,
0
,
snmp_get_info
))
goto
out_snmp
;
if
(
!
proc_net_create
(
"sockstat"
,
0
,
afinet_get_info
))
goto
out_sockstat
;
if
(
!
proc_net_create
(
"tcp"
,
0
,
tcp_get_info
))
goto
out_tcp
;
if
(
!
proc_net_create
(
"udp"
,
0
,
udp_get_info
))
goto
out_udp
;
out:
return
rc
;
out_udp:
proc_net_remove
(
"tcp"
);
out_tcp:
proc_net_remove
(
"sockstat"
);
out_sockstat:
proc_net_remove
(
"snmp"
);
out_snmp:
proc_net_remove
(
"netstat"
);
out_netstat:
proc_net_remove
(
"raw"
);
out_raw:
rc
=
-
ENOMEM
;
goto
out
;
}
#else
/* CONFIG_PROC_FS */
int
__init
ipv4_proc_init
(
void
)
{
return
0
;
}
#endif
/* CONFIG_PROC_FS */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment