diff options
author | Luis R. Rodriguez | 2008-10-27 19:41:54 -0500 |
---|---|---|
committer | Luis R. Rodriguez | 2008-10-27 19:41:54 -0500 |
commit | 08ee86e668a21096bc1aab2d7f2dfcefe9ebf697 (patch) | |
tree | b67e22f3588620ebc7ab136fd2e9e86b6732034c /crda.c | |
parent | 5b7bba8e7a9970b084a01e5db3c454ddcb1fd54d (diff) | |
download | crda-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.c | 22 |
1 files changed, 0 insertions, 22 deletions
@@ -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 */ | ||
98 | static 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 | |||
107 | static 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 | |||
119 | static int put_reg_rule(__u8 *db, int dblen, __be32 ruleptr, struct nl_msg *msg) | 97 | static 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; |