[netfilter-cvslog] r3367 - in trunk/nfsim: core core/ipv4 tools
rusty at netfilter.org
rusty at netfilter.org
Tue Dec 14 05:56:42 CET 2004
Author: rusty at netfilter.org
Date: 2004-12-14 05:56:42 +0100 (Tue, 14 Dec 2004)
New Revision: 3367
Modified:
trunk/nfsim/core/fakesockopt.c
trunk/nfsim/core/ipv4/ipv4.c
trunk/nfsim/core/log.c
trunk/nfsim/core/proc.c
trunk/nfsim/core/tui.c
trunk/nfsim/tools/gen_err.c
trunk/nfsim/tools/gen_ip.c
Log:
Make local functions static.
Pre-declare _init and _fini to avoid warning with -Wmissing-prototypes.
Modified: trunk/nfsim/core/fakesockopt.c
===================================================================
--- trunk/nfsim/core/fakesockopt.c 2004-12-14 04:55:21 UTC (rev 3366)
+++ trunk/nfsim/core/fakesockopt.c 2004-12-14 04:56:42 UTC (rev 3367)
@@ -84,7 +84,8 @@
} while (0)
-
+/* Called on load */
+void _init(void);
void _init(void)
{
struct sockaddr_un unix_addr;
@@ -131,12 +132,14 @@
}
+/* Called on unload */
+void _fini(void);
void _fini(void)
{
(*__close)(sd);
}
-void handle_kernelop(int fd, struct nf_userspace_message *msg)
+static void handle_kernelop(int fd, struct nf_userspace_message *msg)
{
struct nf_userspace_message *reply;
int m_offset = sizeof(struct nf_userspace_message);
@@ -177,7 +180,7 @@
/* send a syscall and wait for a response, processing any kernelops
* that arrive in the meantime */
-int fake_syscall(struct nf_userspace_message *msg)
+static int fake_syscall(struct nf_userspace_message *msg)
{
int ret, msize;
struct nf_userspace_message *reply;
Modified: trunk/nfsim/core/ipv4/ipv4.c
===================================================================
--- trunk/nfsim/core/ipv4/ipv4.c 2004-12-14 04:55:21 UTC (rev 3366)
+++ trunk/nfsim/core/ipv4/ipv4.c 2004-12-14 04:56:42 UTC (rev 3367)
@@ -72,7 +72,7 @@
- interfaces
- routes
*/
-void init(void)
+static void init(void)
{
/* name our hooks */
nf_hooknames[PF_INET][0] = "NF_IP_PRE_ROUTING";
@@ -101,7 +101,7 @@
return notifier_call_chain(&nb, val, ifa);
}
-int ip_rcv_finish(struct sk_buff *skb)
+static int ip_rcv_finish(struct sk_buff *skb)
{
if (!skb->dst &&
ip_route_input(skb, skb->nh.iph->daddr, skb->nh.iph->saddr,
@@ -162,7 +162,7 @@
return NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, skb->dev, NULL, dst_output);
}
-int ip_local_deliver(struct sk_buff *skb)
+static int ip_local_deliver(struct sk_buff *skb)
{
return NF_HOOK(PF_INET, NF_IP_LOCAL_IN, skb, skb->dev, NULL, nf_send_local);
}
@@ -182,7 +182,7 @@
nf_send);
}
-int ip_output(struct sk_buff *skb)
+static int ip_output(struct sk_buff *skb)
{
/* FIXME: fragment? */
return ip_finish_output(skb);
@@ -332,7 +332,7 @@
return __ip_route_output_key(rp, fl);
}
-int ip_forward(struct sk_buff *skb)
+static int ip_forward(struct sk_buff *skb)
{
u32 check;
Modified: trunk/nfsim/core/log.c
===================================================================
--- trunk/nfsim/core/log.c 2004-12-14 04:55:21 UTC (rev 3366)
+++ trunk/nfsim/core/log.c 2004-12-14 04:56:42 UTC (rev 3367)
@@ -72,7 +72,7 @@
return ret;
}
-void flush_printk_buf(void)
+static void flush_printk_buf(void)
{
if (*printk_buf)
nfsim_log(LOG_KERNEL, printk_buf);
@@ -277,7 +277,7 @@
*/
}
-void log_init(void)
+static void log_init(void)
{
logstream = stdout;
if (!tui_quiet)
Modified: trunk/nfsim/core/proc.c
===================================================================
--- trunk/nfsim/core/proc.c 2004-12-14 04:55:21 UTC (rev 3366)
+++ trunk/nfsim/core/proc.c 2004-12-14 04:56:42 UTC (rev 3367)
@@ -60,7 +60,7 @@
}
-struct proc_dir_entry *proc_create(struct proc_dir_entry **parent,
+static struct proc_dir_entry *proc_create(struct proc_dir_entry **parent,
const char *name,
mode_t mode,
nlink_t nlink)
Modified: trunk/nfsim/core/tui.c
===================================================================
--- trunk/nfsim/core/tui.c 2004-12-14 04:55:21 UTC (rev 3366)
+++ trunk/nfsim/core/tui.c 2004-12-14 04:56:42 UTC (rev 3367)
@@ -53,13 +53,13 @@
static LIST_HEAD(commands);
static LIST_HEAD(pre_post_hooks);
-bool tui_exit(int argc, char **argv)
+static bool tui_exit(int argc, char **argv)
{
stop();
return true;
}
-bool tui_argtest(int argc, char **argv)
+static bool tui_argtest(int argc, char **argv)
{
int i;
@@ -101,7 +101,7 @@
i->post(cmd);
}
-bool tui_help(int argc, char **argv)
+static bool tui_help(int argc, char **argv)
{
struct command *cmd;
Modified: trunk/nfsim/tools/gen_err.c
===================================================================
--- trunk/nfsim/tools/gen_err.c 2004-12-14 04:55:21 UTC (rev 3366)
+++ trunk/nfsim/tools/gen_err.c 2004-12-14 04:56:42 UTC (rev 3367)
@@ -109,7 +109,7 @@
return send_packet(&packet, interface, dump_data);
}
-void gen_err_help(int argc, char **argv)
+static void gen_err_help(int argc, char **argv)
{
#include "gen_err-help:gen_err"
/*** XML Help:
Modified: trunk/nfsim/tools/gen_ip.c
===================================================================
--- trunk/nfsim/tools/gen_ip.c 2004-12-14 04:55:21 UTC (rev 3366)
+++ trunk/nfsim/tools/gen_ip.c 2004-12-14 04:56:42 UTC (rev 3367)
@@ -516,7 +516,7 @@
return true;
}
-void gen_ip_help(int argc, char **argv)
+static void gen_ip_help(int argc, char **argv)
{
#include "gen_ip-help:gen_ip"
/*** XML Help:
More information about the netfilter-cvslog
mailing list