summaryrefslogtreecommitdiffstats
path: root/include/net/sctp/constants.h
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-08-05 19:59:53 +0800
committerDavid S. Miller <davem@davemloft.net>2017-08-06 21:33:41 -0700
commit701ef3e6c74be771a76be39817941e68e7228644 (patch)
tree0cd5050b30210e018dfc3840a2dafaddc7f2fd3d /include/net/sctp/constants.h
parent125c29820252bfa5bf8081e75618e4ee7e9487da (diff)
downloadlinux-701ef3e6c74be771a76be39817941e68e7228644.tar.bz2
sctp: remove the typedef sctp_scope_policy_t
This patch is to remove the typedef sctp_scope_policy_t and keep it's members as an anonymous enum. It is also to define SCTP_SCOPE_POLICY_MAX to replace the num 3 in sysctl.c to make codes clear. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp/constants.h')
-rw-r--r--include/net/sctp/constants.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index 922fba5880d6..acb03eb64842 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -341,12 +341,14 @@ typedef enum {
SCTP_SCOPE_UNUSABLE, /* IPv4 unusable addresses */
} sctp_scope_t;
-typedef enum {
+enum {
SCTP_SCOPE_POLICY_DISABLE, /* Disable IPv4 address scoping */
SCTP_SCOPE_POLICY_ENABLE, /* Enable IPv4 address scoping */
SCTP_SCOPE_POLICY_PRIVATE, /* Follow draft but allow IPv4 private addresses */
SCTP_SCOPE_POLICY_LINK, /* Follow draft but allow IPv4 link local addresses */
-} sctp_scope_policy_t;
+};
+
+#define SCTP_SCOPE_POLICY_MAX SCTP_SCOPE_POLICY_LINK
/* Based on IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>,
* SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 198.18.0.0/24,