diff options
author | Thomas Haller <thaller@redhat.com> | 2014-07-26 13:06:59 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-07-27 08:57:31 (GMT) |
commit | fc249f81c789c59ff7d82ca9c6ee2ef0ac05b6e4 (patch) | |
tree | 8c2d2350ce1c1b13dbf176c0149bd773b758a050 /lib/netfilter | |
parent | 9dc6e6da90016a33929f262bea0187396e1a061b (diff) | |
download | libnl-fc249f81c789c59ff7d82ca9c6ee2ef0ac05b6e4.zip libnl-fc249f81c789c59ff7d82ca9c6ee2ef0ac05b6e4.tar.gz libnl-fc249f81c789c59ff7d82ca9c6ee2ef0ac05b6e4.tar.bz2 |
style: require comma after __ADD() macro
$ sed -i 's/^\([\t ]\+\<__ADD\> \?([^)]\+)\) *$/\1,/' `git grep -w -l __ADD`
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/netfilter')
-rw-r--r-- | lib/netfilter/ct_obj.c | 94 | ||||
-rw-r--r-- | lib/netfilter/exp_obj.c | 64 | ||||
-rw-r--r-- | lib/netfilter/log_obj.c | 22 | ||||
-rw-r--r-- | lib/netfilter/netfilter.c | 22 | ||||
-rw-r--r-- | lib/netfilter/queue_msg_obj.c | 28 | ||||
-rw-r--r-- | lib/netfilter/queue_obj.c | 14 |
6 files changed, 122 insertions, 122 deletions
diff --git a/lib/netfilter/ct_obj.c b/lib/netfilter/ct_obj.c index 61b6a31..c8af870 100644 --- a/lib/netfilter/ct_obj.c +++ b/lib/netfilter/ct_obj.c @@ -351,32 +351,32 @@ static int ct_compare(struct nl_object *_a, struct nl_object *_b, } static const struct trans_tbl ct_attrs[] = { - __ADD(CT_ATTR_FAMILY, family) - __ADD(CT_ATTR_PROTO, proto) - __ADD(CT_ATTR_TCP_STATE, tcpstate) - __ADD(CT_ATTR_STATUS, status) - __ADD(CT_ATTR_TIMEOUT, timeout) - __ADD(CT_ATTR_MARK, mark) - __ADD(CT_ATTR_USE, use) - __ADD(CT_ATTR_ID, id) - __ADD(CT_ATTR_ORIG_SRC, origsrc) - __ADD(CT_ATTR_ORIG_DST, origdst) - __ADD(CT_ATTR_ORIG_SRC_PORT, origsrcport) - __ADD(CT_ATTR_ORIG_DST_PORT, origdstport) - __ADD(CT_ATTR_ORIG_ICMP_ID, origicmpid) - __ADD(CT_ATTR_ORIG_ICMP_TYPE, origicmptype) - __ADD(CT_ATTR_ORIG_ICMP_CODE, origicmpcode) - __ADD(CT_ATTR_ORIG_PACKETS, origpackets) - __ADD(CT_ATTR_ORIG_BYTES, origbytes) - __ADD(CT_ATTR_REPL_SRC, replysrc) - __ADD(CT_ATTR_REPL_DST, replydst) - __ADD(CT_ATTR_REPL_SRC_PORT, replysrcport) - __ADD(CT_ATTR_REPL_DST_PORT, replydstport) - __ADD(CT_ATTR_REPL_ICMP_ID, replyicmpid) - __ADD(CT_ATTR_REPL_ICMP_TYPE, replyicmptype) - __ADD(CT_ATTR_REPL_ICMP_CODE, replyicmpcode) - __ADD(CT_ATTR_REPL_PACKETS, replypackets) - __ADD(CT_ATTR_REPL_BYTES, replybytes) + __ADD(CT_ATTR_FAMILY, family), + __ADD(CT_ATTR_PROTO, proto), + __ADD(CT_ATTR_TCP_STATE, tcpstate), + __ADD(CT_ATTR_STATUS, status), + __ADD(CT_ATTR_TIMEOUT, timeout), + __ADD(CT_ATTR_MARK, mark), + __ADD(CT_ATTR_USE, use), + __ADD(CT_ATTR_ID, id), + __ADD(CT_ATTR_ORIG_SRC, origsrc), + __ADD(CT_ATTR_ORIG_DST, origdst), + __ADD(CT_ATTR_ORIG_SRC_PORT, origsrcport), + __ADD(CT_ATTR_ORIG_DST_PORT, origdstport), + __ADD(CT_ATTR_ORIG_ICMP_ID, origicmpid), + __ADD(CT_ATTR_ORIG_ICMP_TYPE, origicmptype), + __ADD(CT_ATTR_ORIG_ICMP_CODE, origicmpcode), + __ADD(CT_ATTR_ORIG_PACKETS, origpackets), + __ADD(CT_ATTR_ORIG_BYTES, origbytes), + __ADD(CT_ATTR_REPL_SRC, replysrc), + __ADD(CT_ATTR_REPL_DST, replydst), + __ADD(CT_ATTR_REPL_SRC_PORT, replysrcport), + __ADD(CT_ATTR_REPL_DST_PORT, replydstport), + __ADD(CT_ATTR_REPL_ICMP_ID, replyicmpid), + __ADD(CT_ATTR_REPL_ICMP_TYPE, replyicmptype), + __ADD(CT_ATTR_REPL_ICMP_CODE, replyicmpcode), + __ADD(CT_ATTR_REPL_PACKETS, replypackets), + __ADD(CT_ATTR_REPL_BYTES, replybytes), }; static char *ct_attrs2str(int attrs, char *buf, size_t len) @@ -458,16 +458,16 @@ uint8_t nfnl_ct_get_tcp_state(const struct nfnl_ct *ct) } 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) - __ADD(TCP_CONNTRACK_ESTABLISHED,ESTABLISHED) - __ADD(TCP_CONNTRACK_FIN_WAIT,FIN_WAIT) - __ADD(TCP_CONNTRACK_CLOSE_WAIT,CLOSE_WAIT) - __ADD(TCP_CONNTRACK_LAST_ACK,LAST_ACK) - __ADD(TCP_CONNTRACK_TIME_WAIT,TIME_WAIT) - __ADD(TCP_CONNTRACK_CLOSE,CLOSE) - __ADD(TCP_CONNTRACK_LISTEN,LISTEN) + __ADD(TCP_CONNTRACK_NONE,NONE), + __ADD(TCP_CONNTRACK_SYN_SENT,SYN_SENT), + __ADD(TCP_CONNTRACK_SYN_RECV,SYN_RECV), + __ADD(TCP_CONNTRACK_ESTABLISHED,ESTABLISHED), + __ADD(TCP_CONNTRACK_FIN_WAIT,FIN_WAIT), + __ADD(TCP_CONNTRACK_CLOSE_WAIT,CLOSE_WAIT), + __ADD(TCP_CONNTRACK_LAST_ACK,LAST_ACK), + __ADD(TCP_CONNTRACK_TIME_WAIT,TIME_WAIT), + __ADD(TCP_CONNTRACK_CLOSE,CLOSE), + __ADD(TCP_CONNTRACK_LISTEN,LISTEN), }; char *nfnl_ct_tcp_state2str(uint8_t state, char *buf, size_t len) @@ -505,17 +505,17 @@ uint32_t nfnl_ct_get_status(const struct nfnl_ct *ct) } static const struct trans_tbl status_flags[] = { - __ADD(IPS_EXPECTED, expected) - __ADD(IPS_SEEN_REPLY, seen_reply) - __ADD(IPS_ASSURED, assured) - __ADD(IPS_CONFIRMED, confirmed) - __ADD(IPS_SRC_NAT, snat) - __ADD(IPS_DST_NAT, dnat) - __ADD(IPS_SEQ_ADJUST, seqadjust) - __ADD(IPS_SRC_NAT_DONE, snat_done) - __ADD(IPS_DST_NAT_DONE, dnat_done) - __ADD(IPS_DYING, dying) - __ADD(IPS_FIXED_TIMEOUT, fixed_timeout) + __ADD(IPS_EXPECTED, expected), + __ADD(IPS_SEEN_REPLY, seen_reply), + __ADD(IPS_ASSURED, assured), + __ADD(IPS_CONFIRMED, confirmed), + __ADD(IPS_SRC_NAT, snat), + __ADD(IPS_DST_NAT, dnat), + __ADD(IPS_SEQ_ADJUST, seqadjust), + __ADD(IPS_SRC_NAT_DONE, snat_done), + __ADD(IPS_DST_NAT_DONE, dnat_done), + __ADD(IPS_DYING, dying), + __ADD(IPS_FIXED_TIMEOUT, fixed_timeout), }; char * nfnl_ct_status2str(int flags, char *buf, size_t len) diff --git a/lib/netfilter/exp_obj.c b/lib/netfilter/exp_obj.c index 69b4dd3..591cf45 100644 --- a/lib/netfilter/exp_obj.c +++ b/lib/netfilter/exp_obj.c @@ -367,35 +367,35 @@ static int exp_compare(struct nl_object *_a, struct nl_object *_b, // CLI arguments? static const struct trans_tbl exp_attrs[] = { - __ADD(EXP_ATTR_FAMILY, family) - __ADD(EXP_ATTR_TIMEOUT, timeout) - __ADD(EXP_ATTR_ID, id) - __ADD(EXP_ATTR_HELPER_NAME, helpername) - __ADD(EXP_ATTR_ZONE, zone) - __ADD(EXP_ATTR_CLASS, class) - __ADD(EXP_ATTR_FLAGS, flags) - __ADD(EXP_ATTR_FN, function) - __ADD(EXP_ATTR_EXPECT_IP_SRC, expectipsrc) - __ADD(EXP_ATTR_EXPECT_IP_DST, expectipdst) - __ADD(EXP_ATTR_EXPECT_L4PROTO_NUM, expectprotonum) - __ADD(EXP_ATTR_EXPECT_L4PROTO_PORTS, expectports) - __ADD(EXP_ATTR_EXPECT_L4PROTO_ICMP, expecticmp) - __ADD(EXP_ATTR_MASTER_IP_SRC, masteripsrc) - __ADD(EXP_ATTR_MASTER_IP_DST, masteripdst) - __ADD(EXP_ATTR_MASTER_L4PROTO_NUM, masterprotonum) - __ADD(EXP_ATTR_MASTER_L4PROTO_PORTS, masterports) - __ADD(EXP_ATTR_MASTER_L4PROTO_ICMP, mastericmp) - __ADD(EXP_ATTR_MASK_IP_SRC, maskipsrc) - __ADD(EXP_ATTR_MASK_IP_DST, maskipdst) - __ADD(EXP_ATTR_MASK_L4PROTO_NUM, maskprotonum) - __ADD(EXP_ATTR_MASK_L4PROTO_PORTS, maskports) - __ADD(EXP_ATTR_MASK_L4PROTO_ICMP, maskicmp) - __ADD(EXP_ATTR_NAT_IP_SRC, natipsrc) - __ADD(EXP_ATTR_NAT_IP_DST, natipdst) - __ADD(EXP_ATTR_NAT_L4PROTO_NUM, natprotonum) - __ADD(EXP_ATTR_NAT_L4PROTO_PORTS, natports) - __ADD(EXP_ATTR_NAT_L4PROTO_ICMP, naticmp) - __ADD(EXP_ATTR_NAT_DIR, natdir) + __ADD(EXP_ATTR_FAMILY, family), + __ADD(EXP_ATTR_TIMEOUT, timeout), + __ADD(EXP_ATTR_ID, id), + __ADD(EXP_ATTR_HELPER_NAME, helpername), + __ADD(EXP_ATTR_ZONE, zone), + __ADD(EXP_ATTR_CLASS, class), + __ADD(EXP_ATTR_FLAGS, flags), + __ADD(EXP_ATTR_FN, function), + __ADD(EXP_ATTR_EXPECT_IP_SRC, expectipsrc), + __ADD(EXP_ATTR_EXPECT_IP_DST, expectipdst), + __ADD(EXP_ATTR_EXPECT_L4PROTO_NUM, expectprotonum), + __ADD(EXP_ATTR_EXPECT_L4PROTO_PORTS, expectports), + __ADD(EXP_ATTR_EXPECT_L4PROTO_ICMP, expecticmp), + __ADD(EXP_ATTR_MASTER_IP_SRC, masteripsrc), + __ADD(EXP_ATTR_MASTER_IP_DST, masteripdst), + __ADD(EXP_ATTR_MASTER_L4PROTO_NUM, masterprotonum), + __ADD(EXP_ATTR_MASTER_L4PROTO_PORTS, masterports), + __ADD(EXP_ATTR_MASTER_L4PROTO_ICMP, mastericmp), + __ADD(EXP_ATTR_MASK_IP_SRC, maskipsrc), + __ADD(EXP_ATTR_MASK_IP_DST, maskipdst), + __ADD(EXP_ATTR_MASK_L4PROTO_NUM, maskprotonum), + __ADD(EXP_ATTR_MASK_L4PROTO_PORTS, maskports), + __ADD(EXP_ATTR_MASK_L4PROTO_ICMP, maskicmp), + __ADD(EXP_ATTR_NAT_IP_SRC, natipsrc), + __ADD(EXP_ATTR_NAT_IP_DST, natipdst), + __ADD(EXP_ATTR_NAT_L4PROTO_NUM, natprotonum), + __ADD(EXP_ATTR_NAT_L4PROTO_PORTS, natports), + __ADD(EXP_ATTR_NAT_L4PROTO_ICMP, naticmp), + __ADD(EXP_ATTR_NAT_DIR, natdir), }; static char *exp_attrs2str(int attrs, char *buf, size_t len) @@ -467,9 +467,9 @@ uint32_t nfnl_exp_get_flags(const struct nfnl_exp *exp) } static const struct trans_tbl flag_table[] = { - __ADD(IPS_EXPECTED, expected) - __ADD(IPS_SEEN_REPLY, seen_reply) - __ADD(IPS_ASSURED, assured) + __ADD(IPS_EXPECTED, expected), + __ADD(IPS_SEEN_REPLY, seen_reply), + __ADD(IPS_ASSURED, assured), }; char * nfnl_exp_flags2str(int flags, char *buf, size_t len) diff --git a/lib/netfilter/log_obj.c b/lib/netfilter/log_obj.c index 2b11414..5e1bf9e 100644 --- a/lib/netfilter/log_obj.c +++ b/lib/netfilter/log_obj.c @@ -57,9 +57,9 @@ static void nfnl_log_dump(struct nl_object *a, struct nl_dump_params *p) } 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) + __ADD(NFNL_LOG_COPY_NONE, none), + __ADD(NFNL_LOG_COPY_META, meta), + __ADD(NFNL_LOG_COPY_PACKET, packet), }; char *nfnl_log_copy_mode2str(enum nfnl_log_copy_mode copy_mode, char *buf, @@ -215,8 +215,8 @@ void nfnl_log_unset_flags(struct nfnl_log *log, unsigned int flags) } static const struct trans_tbl log_flags[] = { - __ADD(NFNL_LOG_FLAG_SEQ, seq) - __ADD(NFNL_LOG_FLAG_SEQ_GLOBAL, seq_global) + __ADD(NFNL_LOG_FLAG_SEQ, seq), + __ADD(NFNL_LOG_FLAG_SEQ_GLOBAL, seq_global), }; char *nfnl_log_flags2str(unsigned int flags, char *buf, size_t len) @@ -255,12 +255,12 @@ static int nfnl_log_compare(struct nl_object *_a, struct nl_object *_b, } 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) - __ADD(LOG_ATTR_FLUSH_TIMEOUT, flush_timeout) - __ADD(LOG_ATTR_ALLOC_SIZE, alloc_size) - __ADD(LOG_ATTR_QUEUE_THRESHOLD, queue_threshold) + __ADD(LOG_ATTR_GROUP, group), + __ADD(LOG_ATTR_COPY_MODE, copy_mode), + __ADD(LOG_ATTR_COPY_RANGE, copy_range), + __ADD(LOG_ATTR_FLUSH_TIMEOUT, flush_timeout), + __ADD(LOG_ATTR_ALLOC_SIZE, alloc_size), + __ADD(LOG_ATTR_QUEUE_THRESHOLD, queue_threshold), }; static char *nfnl_log_attrs2str(int attrs, char *buf, size_t len) diff --git a/lib/netfilter/netfilter.c b/lib/netfilter/netfilter.c index 0062994..7403b5b 100644 --- a/lib/netfilter/netfilter.c +++ b/lib/netfilter/netfilter.c @@ -14,12 +14,12 @@ #include <linux/netfilter.h> static const struct trans_tbl nfnl_verdicts[] = { - __ADD(NF_DROP, NF_DROP) - __ADD(NF_ACCEPT, NF_ACCEPT) - __ADD(NF_STOLEN, NF_STOLEN) - __ADD(NF_QUEUE, NF_QUEUE) - __ADD(NF_REPEAT, NF_REPEAT) - __ADD(NF_STOP, NF_STOP) + __ADD(NF_DROP, NF_DROP), + __ADD(NF_ACCEPT, NF_ACCEPT), + __ADD(NF_STOLEN, NF_STOLEN), + __ADD(NF_QUEUE, NF_QUEUE), + __ADD(NF_REPEAT, NF_REPEAT), + __ADD(NF_STOP, NF_STOP), }; char *nfnl_verdict2str(unsigned int verdict, char *buf, size_t len) @@ -34,11 +34,11 @@ unsigned int nfnl_str2verdict(const char *name) } 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) - __ADD(NF_INET_LOCAL_OUT, NF_INET_LOCAL_OUT) - __ADD(NF_INET_POST_ROUTING, NF_INET_POST_ROUTING) + __ADD(NF_INET_PRE_ROUTING, NF_INET_PREROUTING), + __ADD(NF_INET_LOCAL_IN, NF_INET_LOCAL_IN), + __ADD(NF_INET_FORWARD, NF_INET_FORWARD), + __ADD(NF_INET_LOCAL_OUT, NF_INET_LOCAL_OUT), + __ADD(NF_INET_POST_ROUTING, NF_INET_POST_ROUTING), }; char *nfnl_inet_hook2str(unsigned int hook, char *buf, size_t len) diff --git a/lib/netfilter/queue_msg_obj.c b/lib/netfilter/queue_msg_obj.c index 8085f1b..b3b49ef 100644 --- a/lib/netfilter/queue_msg_obj.c +++ b/lib/netfilter/queue_msg_obj.c @@ -455,20 +455,20 @@ unsigned int nfnl_queue_msg_get_verdict(const struct nfnl_queue_msg *msg) } 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) - __ADD(QUEUE_MSG_ATTR_HWPROTO, hwproto) - __ADD(QUEUE_MSG_ATTR_HOOK, hook) - __ADD(QUEUE_MSG_ATTR_MARK, mark) - __ADD(QUEUE_MSG_ATTR_TIMESTAMP, timestamp) - __ADD(QUEUE_MSG_ATTR_INDEV, indev) - __ADD(QUEUE_MSG_ATTR_OUTDEV, outdev) - __ADD(QUEUE_MSG_ATTR_PHYSINDEV, physindev) - __ADD(QUEUE_MSG_ATTR_PHYSOUTDEV, physoutdev) - __ADD(QUEUE_MSG_ATTR_HWADDR, hwaddr) - __ADD(QUEUE_MSG_ATTR_PAYLOAD, payload) - __ADD(QUEUE_MSG_ATTR_VERDICT, verdict) + __ADD(QUEUE_MSG_ATTR_GROUP, group), + __ADD(QUEUE_MSG_ATTR_FAMILY, family), + __ADD(QUEUE_MSG_ATTR_PACKETID, packetid), + __ADD(QUEUE_MSG_ATTR_HWPROTO, hwproto), + __ADD(QUEUE_MSG_ATTR_HOOK, hook), + __ADD(QUEUE_MSG_ATTR_MARK, mark), + __ADD(QUEUE_MSG_ATTR_TIMESTAMP, timestamp), + __ADD(QUEUE_MSG_ATTR_INDEV, indev), + __ADD(QUEUE_MSG_ATTR_OUTDEV, outdev), + __ADD(QUEUE_MSG_ATTR_PHYSINDEV, physindev), + __ADD(QUEUE_MSG_ATTR_PHYSOUTDEV, physoutdev), + __ADD(QUEUE_MSG_ATTR_HWADDR, hwaddr), + __ADD(QUEUE_MSG_ATTR_PAYLOAD, payload), + __ADD(QUEUE_MSG_ATTR_VERDICT, verdict), }; static char *nfnl_queue_msg_attrs2str(int attrs, char *buf, size_t len) diff --git a/lib/netfilter/queue_obj.c b/lib/netfilter/queue_obj.c index 5edcc68..b51f5ec 100644 --- a/lib/netfilter/queue_obj.c +++ b/lib/netfilter/queue_obj.c @@ -53,9 +53,9 @@ static void nfnl_queue_dump(struct nl_object *a, struct nl_dump_params *p) } 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) + __ADD(NFNL_QUEUE_COPY_NONE, none), + __ADD(NFNL_QUEUE_COPY_META, meta), + __ADD(NFNL_QUEUE_COPY_PACKET, packet), }; char *nfnl_queue_copy_mode2str(enum nfnl_queue_copy_mode copy_mode, char *buf, @@ -185,10 +185,10 @@ static int nfnl_queue_compare(struct nl_object *_a, struct nl_object *_b, } 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) - __ADD(QUEUE_ATTR_COPY_RANGE, copy_range) + __ADD(QUEUE_ATTR_GROUP, group), + __ADD(QUEUE_ATTR_MAXLEN, maxlen), + __ADD(QUEUE_ATTR_COPY_MODE, copy_mode), + __ADD(QUEUE_ATTR_COPY_RANGE, copy_range), }; static char *nfnl_queue_attrs2str(int attrs, char *buf, size_t len) |