Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/wtap/wtap_hal/hal.h
Show All 32 Lines | |||||
#ifndef _WTAP_HAL_H_ | #ifndef _WTAP_HAL_H_ | ||||
#define _WTAP_HAL_H_ | #define _WTAP_HAL_H_ | ||||
#include "../if_wtapvar.h" | #include "../if_wtapvar.h" | ||||
#include "../plugins/wtap_plugin.h" | #include "../plugins/wtap_plugin.h" | ||||
#include "handler.h" | #include "handler.h" | ||||
#define HAL_TIMER_INTVAL 50 /* in msecs */ | |||||
struct wtap_hal { | struct wtap_hal { | ||||
struct wtap_medium *hal_md; | struct wtap_medium *hal_md; | ||||
struct mtx hal_mtx; | struct mtx hal_mtx; | ||||
struct wtap_plugin *plugin; | struct wtap_plugin *plugin; | ||||
struct wtap_softc *hal_devs[MAX_NBR_WTAP]; | struct wtap_softc *hal_devs[MAX_NBR_WTAP]; | ||||
/* hardware information */ | |||||
adrian: indenting too! | |||||
Done Inline Actionssure. enweiwu: sure. | |||||
struct hw { | |||||
struct callout timer_intr; | |||||
uint32_t timer_intr_intval; | |||||
uint64_t tsf; | |||||
} hw; | |||||
}; | }; | ||||
void init_hal(struct wtap_hal *); | void init_hal(struct wtap_hal *); | ||||
void deinit_hal(struct wtap_hal *); | void deinit_hal(struct wtap_hal *); | ||||
void register_plugin(struct wtap_hal *, struct wtap_plugin *); | void register_plugin(struct wtap_hal *, struct wtap_plugin *); | ||||
void deregister_plugin(struct wtap_hal *); | void deregister_plugin(struct wtap_hal *); | ||||
int32_t new_wtap(struct wtap_hal *, int32_t id); | int32_t new_wtap(struct wtap_hal *, int32_t id); | ||||
int32_t free_wtap(struct wtap_hal *, int32_t id); | int32_t free_wtap(struct wtap_hal *, int32_t id); | ||||
void wtap_hal_timer_intr(void *); | |||||
void wtap_hal_reset_tsf(struct wtap_hal *); | |||||
uint64_t wtap_hal_get_tsf(struct wtap_hal *); | |||||
#endif | #endif |
indenting too!