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
Kirill Smelkov
linux
Commits
576018a4
Commit
576018a4
authored
Oct 28, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge kernel.bkbits.net:/home/acme/net-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents
33bc7fff
31c37b27
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
25 deletions
+52
-25
include/net/ip_fib.h
include/net/ip_fib.h
+1
-0
net/ipv4/Makefile
net/ipv4/Makefile
+2
-1
net/ipv4/af_inet.c
net/ipv4/af_inet.c
+5
-24
net/ipv4/fib_hash.c
net/ipv4/fib_hash.c
+12
-0
net/ipv4/proc.c
net/ipv4/proc.c
+32
-0
No files found.
include/net/ip_fib.h
View file @
576018a4
...
...
@@ -277,5 +277,6 @@ static inline void fib_res_put(struct fib_result *res)
}
extern
int
fib_proc_init
(
void
);
extern
void
fib_proc_exit
(
void
);
#endif
/* _NET_FIB_H */
net/ipv4/Makefile
View file @
576018a4
...
...
@@ -2,13 +2,14 @@
# Makefile for the Linux TCP/IP (INET) layer.
#
obj-y
:=
utils.o route.o inetpeer.o pro
c.o pro
tocol.o
\
obj-y
:=
utils.o route.o inetpeer.o protocol.o
\
ip_input.o ip_fragment.o ip_forward.o ip_options.o
\
ip_output.o ip_sockglue.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
obj-$(CONFIG_PROC_FS)
+=
proc.o
obj-$(CONFIG_IP_MULTIPLE_TABLES)
+=
fib_rules.o
obj-$(CONFIG_IP_ROUTE_NAT)
+=
ip_nat_dumb.o
obj-$(CONFIG_IP_MROUTE)
+=
ipmr.o
...
...
net/ipv4/af_inet.c
View file @
576018a4
...
...
@@ -1155,12 +1155,9 @@ module_init(inet_init);
#ifdef CONFIG_PROC_FS
extern
int
ip_misc_proc_init
(
void
);
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
);
int
__init
ipv4_proc_init
(
void
)
{
...
...
@@ -1168,45 +1165,29 @@ int __init ipv4_proc_init(void)
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
(
udp_proc_init
())
goto
out_udp
;
if
(
fib_proc_init
())
goto
out_fib
;
if
(
ip_misc_proc_init
())
goto
out_misc
;
out:
return
rc
;
out_misc:
fib_proc_exit
();
out_fib:
udp_proc_exit
();
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
;
}
int
ip_seq_release
(
struct
inode
*
inode
,
struct
file
*
file
)
{
struct
seq_file
*
seq
=
(
struct
seq_file
*
)
file
->
private_data
;
kfree
(
seq
->
private
);
seq
->
private
=
NULL
;
return
seq_release
(
inode
,
file
);
}
#else
/* CONFIG_PROC_FS */
int
__init
ipv4_proc_init
(
void
)
{
...
...
net/ipv4/fib_hash.c
View file @
576018a4
...
...
@@ -1086,9 +1086,21 @@ int __init fib_proc_init(void)
rc
=
-
ENOMEM
;
return
rc
;
}
void
__init
fib_proc_exit
(
void
)
{
remove_proc_entry
(
"route"
,
proc_net
);
}
#else
/* CONFIG_PROC_FS */
int
__init
fib_proc_init
(
void
)
{
return
0
;
}
void
__init
fib_proc_exit
(
void
)
{
return
0
;
}
#endif
/* CONFIG_PROC_FS */
net/ipv4/proc.c
View file @
576018a4
...
...
@@ -47,6 +47,8 @@
#include <net/tcp.h>
#include <net/udp.h>
#include <linux/skbuff.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <net/sock.h>
#include <net/raw.h>
...
...
@@ -212,3 +214,33 @@ int netstat_get_info(char *buffer, char **start, off_t offset, int length)
len
=
0
;
return
len
;
}
int
__init
ip_misc_proc_init
(
void
)
{
int
rc
=
0
;
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
;
out:
return
rc
;
out_sockstat:
proc_net_remove
(
"snmp"
);
out_snmp:
proc_net_remove
(
"netstat"
);
out_netstat:
rc
=
-
ENOMEM
;
goto
out
;
}
int
ip_seq_release
(
struct
inode
*
inode
,
struct
file
*
file
)
{
struct
seq_file
*
seq
=
(
struct
seq_file
*
)
file
->
private_data
;
kfree
(
seq
->
private
);
seq
->
private
=
NULL
;
return
seq_release
(
inode
,
file
);
}
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