This file is indexed.

/usr/include/ipmidetect.h is in libipmidetect-dev 1.4.5-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/*****************************************************************************\
 *  $Id: ipmidetect.h,v 1.11 2010-02-08 22:02:31 chu11 Exp $
 *****************************************************************************
 *  Copyright (C) 2007-2012 Lawrence Livermore National Security, LLC.
 *  Copyright (C) 2007 The Regents of the University of California.
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 *  Written by Albert Chu <chu11@llnl.gov>
 *  UCRL-CODE-228523
 *
 *  This file is part of Ipmidetect, tools and libraries for detecting
 *  IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/.
 *
 *  Ipmidetect 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.
 *
 *  Ipmidetect is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 *  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 *  for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with Ipmidetect.  If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/

#ifndef IPMIDETECT_H
#define IPMIDETECT_H

#include <stdio.h>

/*
 * Libipmidetect version
 *
 * MAJOR - Incremented when interfaces are changed or removed.
 *         Interfaces may be binary incompatible.  When incremented, MINOR
 *         and PATCH are zeroed.
 *
 * MINOR - Incremented when interfaces are added.  Interfaces are
 *         binary compatible with older minor versions.  When incremented,
 *         PATCH is zeroed.
 *
 * PATCH - Incremented when interfaces are not changed.  Typically
 *         incremented due to bug fixes or minor features.  Interfaces are
 *         forward and backward compatible to other PATCH versions.
 */

#define LIBIPMIDETECT_VERSION_MAJOR 1
#define LIBIPMIDETECT_VERSION_MINOR 0
#define LIBIPMIDETECT_VERSION_PATCH 0

/*
 * Ipmidetect Error Codes
 */

#define IPMIDETECT_ERR_SUCCESS               0
#define IPMIDETECT_ERR_HANDLE_NULL           1
#define IPMIDETECT_ERR_HANDLE_INVALID        2
#define IPMIDETECT_ERR_CONNECT               3
#define IPMIDETECT_ERR_CONNECT_TIMEOUT       4
#define IPMIDETECT_ERR_HOSTNAME_INVALID      5
#define IPMIDETECT_ERR_ISLOADED              6
#define IPMIDETECT_ERR_NOTLOADED             7
#define IPMIDETECT_ERR_OVERFLOW              8
#define IPMIDETECT_ERR_PARAMETERS            9
#define IPMIDETECT_ERR_NULLPTR              10
#define IPMIDETECT_ERR_OUT_OF_MEMORY        11
#define IPMIDETECT_ERR_NOTFOUND             12
#define IPMIDETECT_ERR_CONF_PARSE           13
#define IPMIDETECT_ERR_CONF_INPUT           14
#define IPMIDETECT_ERR_CONF_INTERNAL        15
#define IPMIDETECT_ERR_INTERNAL             16
#define IPMIDETECT_ERR_ERRNUMRANGE          17

typedef struct ipmidetect *ipmidetect_t;

/*
 * ipmidetect_handle_create
 *
 * Create an ipmidetect handle.
 *
 * Returns handle on success, NULL on error
 */
ipmidetect_t ipmidetect_handle_create (void);

/* ipmidetect_handle_destroy
 *
 * Destroy an ipmidetect handle.
 *
 * Returns 0 on success, -1 on error
 */
int ipmidetect_handle_destroy (ipmidetect_t handle);

/*
 * ipmidetect_load_data
 *
 * Loads data from the ipmidetectd daemon to determine which nodes
 * have been detected.
 *
 * If 'hostname' is NULL, 'port' is <= 0, or 'timeout_len' <=0, the
 * respective defaults will be used.
 *
 * Returns 0 on success, -1 on error
 */
int ipmidetect_load_data (ipmidetect_t handle,
                          const char *hostname,
                          int port,
                          int timeout_len);

/*
 * ipmidetect_errnum
 *
 * Return the most recent error number.
 *
 * Returns error number on success
 */
int ipmidetect_errnum (ipmidetect_t handle);

/*
 * ipmidetect_strerror
 *
 * Return a string message describing an error number.
 *
 * Returns pointer to message on success
 */
char *ipmidetect_strerror (int errnum);

/*
 * ipmidetect_errormsg
 *
 * Return a string message describing the most recent error.
 *
 * Returns pointer to message on success
 */
char *ipmidetect_errormsg (ipmidetect_t handle);

/*
 * ipmidetect_perror
 *
 * Output a message to standard error
 */
void ipmidetect_perror (ipmidetect_t handle, const char *msg);

/*
 * ipmidetect_get_detected_nodes_string
 *
 * Retrieve a ranged string of up nodes and store it in the buffer
 *
 * Returns 0 on success, -1 on error
 */
int ipmidetect_get_detected_nodes_string (ipmidetect_t handle,
                                          char *buf,
                                          int buflen);

/*
 * ipmidetect_get_undetected_nodes_string
 *
 * Retrieve a ranged string of undetected nodes and store it in the buffer
 *
 * Returns 0 on success, -1 on error
 */
int ipmidetect_get_undetected_nodes_string (ipmidetect_t handle,
                                            char *buf,
                                            int buflen);

/*
 * ipmidetect_is_node_detected
 *
 * Check if a node is detected
 *
 * Returns 1 if detected, 0 if undetected, -1 on error
 */
int ipmidetect_is_node_detected (ipmidetect_t handle, const char *node);

/*
 * ipmidetect_is_node_undetected
 *
 * Check if a node is undetected
 *
 * Returns 1 if undetected, 0 if detected, -1 on error
 */
int ipmidetect_is_node_undetected (ipmidetect_t handle, const char *node);

#endif /* IPMIDETECT_H */