return NULL;
}
+/**
+ * \brief Get a pointer to the device at idx
+ *
+ * \param number idx of the device in our list
+ *
+ * \retval ptr pointer to the string containing the device
+ * \retval NULL on error
+ */
+LiveDevice *LiveGetDevice(char *name) {
+ int i = 0;
+ LiveDevice *pd;
+
+ if (name == NULL) {
+ SCLogWarning(SC_ERR_INVALID_VALUE, "Name of device should not be null");
+ return NULL;
+ }
+
+ TAILQ_FOREACH(pd, &live_devices, next) {
+ if (!strcmp(name, pd->dev)) {
+ return pd;
+ }
+
+ i++;
+ }
+
+ return NULL;
+}
+
int LiveBuildDeviceList(char * runmode)
int LiveRegisterDevice(char *dev);
int LiveGetDeviceCount(void);
char *LiveGetDeviceName(int number);
+LiveDevice *LiveGetDevice(char *dev);
int LiveBuildDeviceList(char * base);
#endif /* __UTIL_DEVICE_H__ */