aboutsummaryrefslogtreecommitdiffstats
path: root/crda.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez2008-10-27 19:41:54 -0500
committerLuis R. Rodriguez2008-10-27 19:41:54 -0500
commit08ee86e668a21096bc1aab2d7f2dfcefe9ebf697 (patch)
treeb67e22f3588620ebc7ab136fd2e9e86b6732034c /crda.c
parent5b7bba8e7a9970b084a01e5db3c454ddcb1fd54d (diff)
downloadcrda-08ee86e668a21096bc1aab2d7f2dfcefe9ebf697.tar.gz
crda-08ee86e668a21096bc1aab2d7f2dfcefe9ebf697.tar.xz
crda-08ee86e668a21096bc1aab2d7f2dfcefe9ebf697.zip
Move last helpers to crda.h, forgot to add crda.h to git too
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Diffstat (limited to 'crda.c')
-rw-r--r--crda.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/crda.c b/crda.c
index 97e1f53..0930c69 100644
--- a/crda.c
+++ b/crda.c
@@ -94,28 +94,6 @@ static int error_handler(struct sockaddr_nl __attribute__((unused)) *nla,
94 exit(err->error); 94 exit(err->error);
95} 95}
96 96
97/* Avoid stdlib */
98static int is_len_2(const char *alpha2)
99{
100 if (alpha2[0] == '\0' || (alpha2[1] == '\0'))
101 return 0;
102 if (alpha2[2] == '\0')
103 return 1;
104 return 0;
105}
106
107static int is_valid_regdom(const char *alpha2)
108{
109 if (!is_len_2(alpha2))
110 return 0;
111
112 if (!is_alpha2(alpha2) && !is_world_regdom(alpha2))
113 return 0;
114
115 return 1;
116}
117
118
119static int put_reg_rule(__u8 *db, int dblen, __be32 ruleptr, struct nl_msg *msg) 97static int put_reg_rule(__u8 *db, int dblen, __be32 ruleptr, struct nl_msg *msg)
120{ 98{
121 struct regdb_file_reg_rule *rule; 99 struct regdb_file_reg_rule *rule;