Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

munge_enum_is_valid(3) [debian man page]

MUNGE_ENUM(3)						    MUNGE Uid 'N' Gid Emporium						     MUNGE_ENUM(3)

NAME
munge_enum_is_valid, munge_enum_int_to_str, munge_enum_str_to_int - MUNGE enumeration functions SYNOPSIS
#include <munge.h> int munge_enum_is_valid (munge_enum_t type, int val); const char * munge_enum_int_to_str (munge_enum_t type, int val); int munge_enum_str_to_int (munge_enum_t type, const char *str); cc ... -lmunge DESCRIPTION
The munge_enum_is_valid() function checks if the given value val is a valid MUNGE enumeration of the specified type type in the software configuration as currently compiled. Some enumerations correspond to options that can only be enabled at compile-time. The munge_enum_int_to_str() function converts the MUNGE enumeration val of the specified type type into a text string. The munge_enum_str_to_int() function converts the NUL-terminated case-insensitive string str into the corresponding MUNGE enumeration of the specified type type. RETURN VALUE
The munge_enum_is_valid() function returns non-zero if the given value val is a valid enumeration. The munge_enum_int_to_str() function returns a NUL-terminated constant text string, or NULL on error; this string should not be freed or modified by the caller. The munge_enum_str_to_int() function returns a MUNGE enumeration on success (i.e., >= 0), or -1 on error. ENUM TYPES
The following enumeration types can be specified. MUNGE_ENUM_CIPHER Specify enumerations for the available cipher types. MUNGE_ENUM_MAC Specify enumerations for the available MAC types. MUNGE_ENUM_ZIP Specify enumerations for the available compression types. ERRORS
Refer to munge(3) for a complete list of errors. EXAMPLE
The following example program illustrates how a list of available cipher types can be queried. #include <stdio.h> /* for printf() */ #include <stdlib.h> /* for exit() */ #include <munge.h> int main (int argc, char *argv[]) { int i; const char *p; munge_enum_t t = MUNGE_ENUM_CIPHER; for (i = 0; (p = munge_enum_int_to_str (t, i)) != NULL; i++) { if (munge_enum_is_valid (t, i)) { printf ("%2d = %s ", i, p); } } exit (0); } AUTHOR
Chris Dunlap <cdunlap@llnl.gov> COPYRIGHT
Copyright (C) 2007-2011 Lawrence Livermore National Security, LLC. Copyright (C) 2002-2007 The Regents of the University of California. MUNGE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Additionally for the MUNGE library (libmunge), you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SEE ALSO
munge(1), remunge(1), unmunge(1), munge(3), munge_ctx(3), munge(7), munged(8). http://munge.googlecode.com/ munge-0.5.10 2011-02-25 MUNGE_ENUM(3)

Check Out this Related Man Page

REMUNGE(1)						    MUNGE Uid 'N' Gid Emporium							REMUNGE(1)

NAME
remunge - MUNGE credential benchmark SYNOPSIS
remunge [OPTION]... DESCRIPTION
The remunge program benchmarks the performance of MUNGE. A benchmark runs for the specified duration or until the specified number of cre- dentials are processed, whichever comes first. At its conclusion, the number of credentials processed per second is written to stdout. By default, credentials are encoded for one second using a single thread. OPTIONS
-h, --help Display a summary of the command-line options. -L, --license Display license information. -V, --version Display version information. -c, --cipher string Specify the cipher type, either by name or number. -C, --list-ciphers Display a list of supported cipher types. -m, --mac string Specify the MAC type, either by name or number. -M, --list-macs Display a list of supported MAC types. -z, --zip string Specify the compression type, either by name or number. -Z, --list-zips Display a list of supported compression types. -e, --encode Encode (but do not decode) each credential. By bypassing the decode operation, the credential is not stored in the replay cache. -d, --decode Encode and decode each credential. -l, --length integer Specify an arbitrary payload length (in bytes). The integer may be followed by a single-character modifier: k=kilobytes, m=megabytes, g=gigabytes; K=kibibytes, M=mebibytes, G=gibibytes. -u, --restrict-uid uid Specify the user name or UID allowed to decode the credential. This will be matched against the effective user ID of the process requesting the credential decode. -g, --restrict-gid gid Specify the group name or GID allowed to decode the credential. This will be matched against the effective group ID of the process requesting the credential decode, as well as each supplementary group of which the effective user ID of that process is a member. -t, --ttl integer Specify the time-to-live (in seconds). This controls how long the credential is valid once it has been encoded. A value of 0 selects the default TTL. A value of -1 selects the maximum allowed TTL. -S, --socket path Specify the local domain socket for connecting with munged. -D, --duration integer Specify the test duration (in seconds). The default duration is one second. A value of -1 selects the maximum duration. The inte- ger may be followed by a single-character modifier: s=seconds, m=minutes, h=hours, d=days. -N, --num-creds integer Specify the number of credentials to generate. The integer may be followed by a single-character modifier: k=kilobytes, m=megabytes, g=gigabytes; K=kibibytes, M=mebibytes, G=gibibytes. -T, --num-threads integer Specify the number of threads to spawn for processing credentials. -W, --warn-time integer Specify the maximum number of seconds to allow for a given munge_encode() or munge_decode() operation before issuing a warning. EXIT STATUS
The remunge program returns a zero exit code if the benchmark completes. On error, it prints an error message to stderr and returns a non- zero exit code. AUTHOR
Chris Dunlap <cdunlap@llnl.gov> COPYRIGHT
Copyright (C) 2007-2011 Lawrence Livermore National Security, LLC. Copyright (C) 2002-2007 The Regents of the University of California. MUNGE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Additionally for the MUNGE library (libmunge), you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SEE ALSO
munge(1), unmunge(1), munge(3), munge_ctx(3), munge_enum(3), munge(7), munged(8). http://munge.googlecode.com/ munge-0.5.10 2011-02-25 REMUNGE(1)
Man Page