From 5cfdd7594f68037562dd616daf594a7f679f1099 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Fri, 28 Oct 2011 11:31:34 +0200 Subject: [PATCH] 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. --- src/suricata.c | 6 +++--- src/util-device.c | 10 +++++++++- src/util-device.h | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/suricata.c b/src/suricata.c index 40134752d1..ed37e182fa 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -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); diff --git a/src/util-device.c b/src/util-device.c index c0c9300fa9..54602fe398 100644 --- a/src/util-device.c +++ b/src/util-device.c @@ -19,6 +19,14 @@ #include "conf.h" #include "util-device.h" +/** + * \file + * + * \author Eric Leblond + * + * \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; diff --git a/src/util-device.h b/src/util-device.h index 4eaa40c266..ed142aa8b3 100644 --- a/src/util-device.h +++ b/src/util-device.h @@ -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__ */