Commit ea074b34 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

ipv4: ping make local stuff static

Don't export ping_table or ping_v4_sendmsg. Both are only used
inside ping code.
Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 068a6e18
...@@ -42,11 +42,6 @@ struct pingv6_ops { ...@@ -42,11 +42,6 @@ struct pingv6_ops {
const struct net_device *dev, int strict); const struct net_device *dev, int strict);
}; };
struct ping_table {
struct hlist_nulls_head hash[PING_HTABLE_SIZE];
rwlock_t lock;
};
struct ping_iter_state { struct ping_iter_state {
struct seq_net_private p; struct seq_net_private p;
int bucket; int bucket;
...@@ -54,7 +49,6 @@ struct ping_iter_state { ...@@ -54,7 +49,6 @@ struct ping_iter_state {
}; };
extern struct proto ping_prot; extern struct proto ping_prot;
extern struct ping_table ping_table;
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
extern struct pingv6_ops pingv6_ops; extern struct pingv6_ops pingv6_ops;
#endif #endif
...@@ -81,8 +75,6 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -81,8 +75,6 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
size_t len, int noblock, int flags, int *addr_len); size_t len, int noblock, int flags, int *addr_len);
int ping_common_sendmsg(int family, struct msghdr *msg, size_t len, int ping_common_sendmsg(int family, struct msghdr *msg, size_t len,
void *user_icmph, size_t icmph_len); void *user_icmph, size_t icmph_len);
int ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
size_t len);
int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
size_t len); size_t len);
int ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); int ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
......
...@@ -53,8 +53,12 @@ ...@@ -53,8 +53,12 @@
#include <net/transp_v6.h> #include <net/transp_v6.h>
#endif #endif
struct ping_table {
struct hlist_nulls_head hash[PING_HTABLE_SIZE];
rwlock_t lock;
};
struct ping_table ping_table; static struct ping_table ping_table;
struct pingv6_ops pingv6_ops; struct pingv6_ops pingv6_ops;
EXPORT_SYMBOL_GPL(pingv6_ops); EXPORT_SYMBOL_GPL(pingv6_ops);
...@@ -668,7 +672,7 @@ int ping_common_sendmsg(int family, struct msghdr *msg, size_t len, ...@@ -668,7 +672,7 @@ int ping_common_sendmsg(int family, struct msghdr *msg, size_t len,
} }
EXPORT_SYMBOL_GPL(ping_common_sendmsg); EXPORT_SYMBOL_GPL(ping_common_sendmsg);
int ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, static int ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
size_t len) size_t len)
{ {
struct net *net = sock_net(sk); struct net *net = sock_net(sk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment