From f4246e78669053d3a1fc6baab3ae3855bd1de9a3 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 28 Jan 2009 14:02:24 -0800 Subject: [PATCH] secchan: Make hook_class structures const. --- secchan/executer.c | 2 +- secchan/fail-open.c | 2 +- secchan/flow-end.c | 2 +- secchan/in-band.c | 2 +- secchan/port-watcher.c | 2 +- secchan/ratelimit.c | 2 +- secchan/snat.c | 2 +- secchan/status.c | 2 +- secchan/stp-secchan.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/secchan/executer.c b/secchan/executer.c index fb26ecd3..bb6fea8d 100644 --- a/secchan/executer.c +++ b/secchan/executer.c @@ -472,7 +472,7 @@ sigchld_handler(int signr UNUSED) write(child_fd, "", 1); } -static struct hook_class executer_hook_class = { +static const struct hook_class executer_hook_class = { NULL, /* local_packet_cb */ executer_remote_packet_cb, /* remote_packet_cb */ executer_periodic_cb, /* periodic_cb */ diff --git a/secchan/fail-open.c b/secchan/fail-open.c index 27295277..a4d0d83d 100644 --- a/secchan/fail-open.c +++ b/secchan/fail-open.c @@ -131,7 +131,7 @@ fail_open_status_cb(struct status_reply *sr, void *fail_open_) status_reply_put(sr, "max-idle=%d", s->max_idle); } -static struct hook_class fail_open_hook_class = { +static const struct hook_class fail_open_hook_class = { fail_open_local_packet_cb, /* local_packet_cb */ NULL, /* remote_packet_cb */ fail_open_periodic_cb, /* periodic_cb */ diff --git a/secchan/flow-end.c b/secchan/flow-end.c index dd8a9c08..d77cbda7 100644 --- a/secchan/flow-end.c +++ b/secchan/flow-end.c @@ -348,7 +348,7 @@ flow_end_reconfigure_cb(void *flow_end_) } } -static struct hook_class flow_end_hook_class = { +static const struct hook_class flow_end_hook_class = { flow_end_local_packet_cb, /* local_packet_cb */ flow_end_remote_packet_cb, /* remote_packet_cb */ NULL, /* periodic_cb */ diff --git a/secchan/in-band.c b/secchan/in-band.c index 0ff29d1e..5ea06e07 100644 --- a/secchan/in-band.c +++ b/secchan/in-band.c @@ -304,7 +304,7 @@ in_band_wait_cb(void *in_band_) mac_learning_wait(in_band->ml); } -static struct hook_class in_band_hook_class = { +static const struct hook_class in_band_hook_class = { in_band_local_packet_cb, /* local_packet_cb */ NULL, /* remote_packet_cb */ in_band_periodic_cb, /* periodic_cb */ diff --git a/secchan/port-watcher.c b/secchan/port-watcher.c index feebd897..d5b19cce 100644 --- a/secchan/port-watcher.c +++ b/secchan/port-watcher.c @@ -588,7 +588,7 @@ port_watcher_is_ready(const struct port_watcher *pw) return pw->got_feature_reply; } -static struct hook_class port_watcher_hook_class = { +static const struct hook_class port_watcher_hook_class = { port_watcher_local_packet_cb, /* local_packet_cb */ port_watcher_remote_packet_cb, /* remote_packet_cb */ port_watcher_periodic_cb, /* periodic_cb */ diff --git a/secchan/ratelimit.c b/secchan/ratelimit.c index f03a2866..769889c0 100644 --- a/secchan/ratelimit.c +++ b/secchan/ratelimit.c @@ -234,7 +234,7 @@ rate_limit_wait_cb(void *rl_) } } -static struct hook_class rate_limit_hook_class = { +static const struct hook_class rate_limit_hook_class = { rate_limit_local_packet_cb, /* local_packet_cb */ NULL, /* remote_packet_cb */ rate_limit_periodic_cb, /* periodic_cb */ diff --git a/secchan/snat.c b/secchan/snat.c index 310a9069..31fbe26e 100644 --- a/secchan/snat.c +++ b/secchan/snat.c @@ -265,7 +265,7 @@ snat_port_changed_cb(uint16_t port_no UNUSED, } } -static struct hook_class snat_hook_class = { +static const struct hook_class snat_hook_class = { NULL, /* local_packet_cb */ snat_remote_packet_cb, /* remote_packet_cb */ NULL, /* periodic_cb */ diff --git a/secchan/status.c b/secchan/status.c index c3e95aff..ff0c6f4f 100644 --- a/secchan/status.c +++ b/secchan/status.c @@ -165,7 +165,7 @@ switch_status_cb(struct status_reply *sr, void *ss_) status_reply_put(sr, "pid=%ld", (long int) getpid()); } -static struct hook_class switch_status_hook_class = { +static const struct hook_class switch_status_hook_class = { NULL, /* local_packet_cb */ switch_status_remote_packet_cb, /* remote_packet_cb */ NULL, /* periodic_cb */ diff --git a/secchan/stp-secchan.c b/secchan/stp-secchan.c index 3e8a7d77..c8e4ca71 100644 --- a/secchan/stp-secchan.c +++ b/secchan/stp-secchan.c @@ -263,7 +263,7 @@ stp_local_port_changed_cb(const struct ofp_phy_port *port, void *stp_) } } -static struct hook_class stp_hook_class = { +static const struct hook_class stp_hook_class = { stp_local_packet_cb, /* local_packet_cb */ NULL, /* remote_packet_cb */ stp_periodic_cb, /* periodic_cb */ -- 2.30.2