diff options
author | Thomas Graf <tgraf@suug.ch> | 2010-11-17 15:09:08 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2010-11-17 15:09:08 (GMT) |
commit | cf5577d280b59411ff77da727812465a4a01f4d7 (patch) | |
tree | de94591e7ed2c73a306a33224c0da76125de9973 /lib/netfilter | |
parent | 98ffedec040226169d66af210f8b580a41e4d201 (diff) | |
download | libnl-cf5577d280b59411ff77da727812465a4a01f4d7.zip libnl-cf5577d280b59411ff77da727812465a4a01f4d7.tar.gz libnl-cf5577d280b59411ff77da727812465a4a01f4d7.tar.bz2 |
constify struct trans_tbl
Diffstat (limited to 'lib/netfilter')
-rw-r--r-- | lib/netfilter/ct_obj.c | 6 | ||||
-rw-r--r-- | lib/netfilter/log_obj.c | 6 | ||||
-rw-r--r-- | lib/netfilter/netfilter.c | 4 | ||||
-rw-r--r-- | lib/netfilter/queue_msg_obj.c | 2 | ||||
-rw-r--r-- | lib/netfilter/queue_obj.c | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/lib/netfilter/ct_obj.c b/lib/netfilter/ct_obj.c index ae14c0d..c205427 100644 --- a/lib/netfilter/ct_obj.c +++ b/lib/netfilter/ct_obj.c @@ -323,7 +323,7 @@ static int ct_compare(struct nl_object *_a, struct nl_object *_b, return diff; } -static struct trans_tbl ct_attrs[] = { +static const struct trans_tbl ct_attrs[] = { __ADD(CT_ATTR_FAMILY, family) __ADD(CT_ATTR_PROTO, proto) __ADD(CT_ATTR_TCP_STATE, tcpstate) @@ -430,7 +430,7 @@ uint8_t nfnl_ct_get_tcp_state(const struct nfnl_ct *ct) return ct->ct_protoinfo.tcp.state; } -static struct trans_tbl tcp_states[] = { +static const struct trans_tbl tcp_states[] = { __ADD(TCP_CONNTRACK_NONE,NONE) __ADD(TCP_CONNTRACK_SYN_SENT,SYN_SENT) __ADD(TCP_CONNTRACK_SYN_RECV,SYN_RECV) @@ -472,7 +472,7 @@ uint32_t nfnl_ct_get_status(const struct nfnl_ct *ct) return ct->ct_status; } -static struct trans_tbl status_flags[] = { +static const struct trans_tbl status_flags[] = { __ADD(IPS_EXPECTED, expected) __ADD(IPS_SEEN_REPLY, seen_reply) __ADD(IPS_ASSURED, assured) diff --git a/lib/netfilter/log_obj.c b/lib/netfilter/log_obj.c index ff2b63a..43c4a06 100644 --- a/lib/netfilter/log_obj.c +++ b/lib/netfilter/log_obj.c @@ -56,7 +56,7 @@ static void nfnl_log_dump(struct nl_object *a, struct nl_dump_params *p) nl_dump(p, "\n"); } -static struct trans_tbl copy_modes[] = { +static const struct trans_tbl copy_modes[] = { __ADD(NFNL_LOG_COPY_NONE, none) __ADD(NFNL_LOG_COPY_META, meta) __ADD(NFNL_LOG_COPY_PACKET, packet) @@ -214,7 +214,7 @@ void nfnl_log_unset_flags(struct nfnl_log *log, unsigned int flags) log->log_flag_mask |= flags; } -static struct trans_tbl log_flags[] = { +static const struct trans_tbl log_flags[] = { __ADD(NFNL_LOG_FLAG_SEQ, seq) __ADD(NFNL_LOG_FLAG_SEQ_GLOBAL, seq_global) }; @@ -254,7 +254,7 @@ static int nfnl_log_compare(struct nl_object *_a, struct nl_object *_b, return diff; } -static struct trans_tbl nfnl_log_attrs[] = { +static const struct trans_tbl nfnl_log_attrs[] = { __ADD(LOG_ATTR_GROUP, group) __ADD(LOG_ATTR_COPY_MODE, copy_mode) __ADD(LOG_ATTR_COPY_RANGE, copy_range) diff --git a/lib/netfilter/netfilter.c b/lib/netfilter/netfilter.c index f88b355..addecd7 100644 --- a/lib/netfilter/netfilter.c +++ b/lib/netfilter/netfilter.c @@ -13,7 +13,7 @@ #include <netlink/netfilter/netfilter.h> #include <linux/netfilter.h> -static struct trans_tbl nfnl_verdicts[] = { +static const struct trans_tbl nfnl_verdicts[] = { __ADD(NF_DROP, NF_DROP) __ADD(NF_ACCEPT, NF_ACCEPT) __ADD(NF_STOLEN, NF_STOLEN) @@ -33,7 +33,7 @@ unsigned int nfnl_str2verdict(const char *name) return __str2type(name, nfnl_verdicts, ARRAY_SIZE(nfnl_verdicts)); } -static struct trans_tbl nfnl_inet_hooks[] = { +static const struct trans_tbl nfnl_inet_hooks[] = { __ADD(NF_INET_PRE_ROUTING, NF_INET_PREROUTING) __ADD(NF_INET_LOCAL_IN, NF_INET_LOCAL_IN) __ADD(NF_INET_FORWARD, NF_INET_FORWARD) diff --git a/lib/netfilter/queue_msg_obj.c b/lib/netfilter/queue_msg_obj.c index 97813e8..33305ed 100644 --- a/lib/netfilter/queue_msg_obj.c +++ b/lib/netfilter/queue_msg_obj.c @@ -451,7 +451,7 @@ unsigned int nfnl_queue_msg_get_verdict(const struct nfnl_queue_msg *msg) return msg->queue_msg_verdict; } -static struct trans_tbl nfnl_queue_msg_attrs[] = { +static const struct trans_tbl nfnl_queue_msg_attrs[] = { __ADD(QUEUE_MSG_ATTR_GROUP, group) __ADD(QUEUE_MSG_ATTR_FAMILY, family) __ADD(QUEUE_MSG_ATTR_PACKETID, packetid) diff --git a/lib/netfilter/queue_obj.c b/lib/netfilter/queue_obj.c index ee03836..05a9cb8 100644 --- a/lib/netfilter/queue_obj.c +++ b/lib/netfilter/queue_obj.c @@ -52,7 +52,7 @@ static void nfnl_queue_dump(struct nl_object *a, struct nl_dump_params *p) nl_dump(p, "\n"); } -static struct trans_tbl copy_modes[] = { +static const struct trans_tbl copy_modes[] = { __ADD(NFNL_QUEUE_COPY_NONE, none) __ADD(NFNL_QUEUE_COPY_META, meta) __ADD(NFNL_QUEUE_COPY_PACKET, packet) @@ -184,7 +184,7 @@ static int nfnl_queue_compare(struct nl_object *_a, struct nl_object *_b, return diff; } -static struct trans_tbl nfnl_queue_attrs[] = { +static const struct trans_tbl nfnl_queue_attrs[] = { __ADD(QUEUE_ATTR_GROUP, group) __ADD(QUEUE_ATTR_MAXLEN, maxlen) __ADD(QUEUE_ATTR_COPY_MODE, copy_mode) |