diff options
Diffstat (limited to 'lib/snmptc.h.in')
-rw-r--r-- | lib/snmptc.h.in | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/lib/snmptc.h.in b/lib/snmptc.h.in deleted file mode 100644 index 377c5e9fef875..0000000000000 --- a/lib/snmptc.h.in +++ /dev/null @@ -1,65 +0,0 @@ -/*- - * Copyright (c) 2018 The FreeBSD Foundation - * All rights reserved. - * - * Author: Harti Brandt <harti@freebsd.org> - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef snmptc_h_1529923773 -#define snmptc_h_1529923773 - -@tc@ - -/** - * Check whether a row status is ok. - * - * \param s row status - * - * \return true if value is ok, false otherwise - */ -static inline int -isok_RowStatus(enum RowStatus s) -{ - return s >= RowStatus_active && s <= RowStatus_destroy; -} - -/** - * Make string out of a row status. - * - * \param s row status - * - * \return string version; if the value is not a legal status - * return "RowStatus???" - */ -static inline const char * -tostr_RowStatus(enum RowStatus s) -{ - static const char *vals[] = { STRING_RowStatus }; - - if (isok_RowStatus(s)) - return vals[(int)s - STROFF_RowStatus]; - return ("RowStatus???"); -} - -#endif |