util-device: Modify function name.

This patch modifies LiveBuildQueueList name to LiveBuildDeviceList
to have a consistent naming accross function. It also adds a
doxygen comment to add author and description of util-device.c
file.
remotes/origin/master-1.2.x
Eric Leblond 14 years ago committed by Victor Julien
parent 7096e11ab5
commit 5cfdd7594f

@ -1530,7 +1530,7 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
} else {
int ret = LiveBuildIfaceList("pcap");
int ret = LiveBuildDeviceList("pcap");
if (ret == 0) {
fprintf(stderr, "ERROR: No interface found in config for pcap\n");
exit(EXIT_FAILURE);
@ -1547,7 +1547,7 @@ int main(int argc, char **argv)
}
} else {
/* not an error condition if we have a 1.0 config */
LiveBuildIfaceList("pfring");
LiveBuildDeviceList("pfring");
}
#endif /* HAVE_PFRING */
} else if (run_mode == RUNMODE_AFP_DEV) {
@ -1558,7 +1558,7 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
} else {
int ret = LiveBuildIfaceList("af-packet");
int ret = LiveBuildDeviceList("af-packet");
if (ret == 0) {
fprintf(stderr, "ERROR: No interface found in config for af-packet\n");
exit(EXIT_FAILURE);

@ -19,6 +19,14 @@
#include "conf.h"
#include "util-device.h"
/**
* \file
*
* \author Eric Leblond <eric@regit.org>
*
* \brief Utility functions to handle device list
*/
/** private device list */
static TAILQ_HEAD(, LiveDevice_) live_devices =
TAILQ_HEAD_INITIALIZER(live_devices);
@ -87,7 +95,7 @@ char *LiveGetDevice(int number) {
int LiveBuildIfaceList(char * runmode)
int LiveBuildDeviceList(char * runmode)
{
ConfNode *base = ConfGetNode(runmode);
ConfNode *child;

@ -30,6 +30,6 @@ typedef struct LiveDevice_ {
int LiveRegisterDevice(char *dev);
int LiveGetDeviceCount(void);
char *LiveGetDevice(int number);
int LiveBuildIfaceList(char * base);
int LiveBuildDeviceList(char * base);
#endif /* __UTIL_DEVICE_H__ */

Loading…
Cancel
Save