1 /* 2 * Copyright © 2013-2014 Cisco Systems, Inc. All rights reserved. 3 * Copyright © 2013-2014 University of Wisconsin-La Crosse. 4 * All rights reserved. 5 * Copyright © 2015-2016 Inria. All rights reserved. 6 * 7 * $COPYRIGHT$ 8 * 9 * Additional copyrights may follow 10 * See COPYING in top-level directory. 11 * 12 * $HEADER$ 13 */ 14 15 #ifndef _NETLOC_H_ 16 #define _NETLOC_H_ 17 18 #ifndef _GNU_SOURCE 19 #define _GNU_SOURCE // for asprintf 20 #endif 21 22 #include <hwloc/autogen/config.h> 23 24 #include <hwloc.h> 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif 29 30 /** \defgroup netloc_api Netloc API 31 * @{ 32 */ 33 /** 34 * Return codes 35 */ 36 enum { 37 NETLOC_SUCCESS = 0, /**< Success */ 38 NETLOC_ERROR = -1, /**< Error: General condition */ 39 NETLOC_ERROR_NOTDIR = -2, /**< Error: URI is not a directory */ 40 NETLOC_ERROR_NOENT = -3, /**< Error: URI is invalid, no such entry */ 41 NETLOC_ERROR_EMPTY = -4, /**< Error: No networks found */ 42 NETLOC_ERROR_MULTIPLE = -5, /**< Error: Multiple matching networks found */ 43 NETLOC_ERROR_NOT_IMPL = -6, /**< Error: Interface not implemented */ 44 NETLOC_ERROR_EXISTS = -7, /**< Error: If the entry already exists when trying to add to a lookup table */ 45 NETLOC_ERROR_NOT_FOUND = -8, /**< Error: No path found */ 46 NETLOC_ERROR_MAX = -9 /**< Error: Enum upper bound marker. No errors less than this number Will not be returned externally. */ 47 }; 48 49 50 #ifdef __cplusplus 51 } /* extern "C" */ 52 #endif 53 54 /** @} */ 55 56 #endif // _NETLOC_H_