diff options
author | José Bollo <jose.bollo@iot.bzh> | 2019-10-24 11:11:23 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2019-10-24 11:11:23 +0200 |
commit | df80ab073c4b6c668e5ebedac01a0cfda7ff7c69 (patch) | |
tree | ebd477166aa10d1c2e6ab867a93b30b6ab7c976e /src/names.h | |
parent | 6b5d5750a179def14ed48f1700aaefd5e5b0e059 (diff) |
Unic routine for checking agent names
Change-Id: Ibd3601ce97b4bc9e1035642584df0fe7788716db
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/names.h')
-rw-r--r-- | src/names.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/names.h b/src/names.h new file mode 100644 index 0000000..30f4a99 --- /dev/null +++ b/src/names.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2018 "IoT.bzh" + * Author José Bollo <jose.bollo@iot.bzh> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once +/******************************************************************************/ +/******************************************************************************/ +/* IMPLEMENTATION OF NAMES */ +/******************************************************************************/ +/******************************************************************************/ + +/** + * Check the name and compute its length. Returns 0 in case of invalid name + * @param name the name to check + * @return the length of the name or zero if invalid + */ +extern +size_t +agent_check_name( + const char *name +); |