Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/wtap/wtap_hal/hal.h
/*- | /*- | ||||
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD | * SPDX-License-Identifier: BSD-2-Clause-FreeBSD | ||||
* | * | ||||
* Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB | * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB | ||||
* All rights reserved. | * All rights reserved. | ||||
* | * | ||||
* Copyright (c) 2023 The FreeBSD Foundation | |||||
* | |||||
* Portions of this software were developed by En-Wei Wu | |||||
* under sponsorship from the FreeBSD Foundation. | |||||
* | |||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions | * modification, are permitted provided that the following conditions | ||||
* are met: | * are met: | ||||
* 1. Redistributions of source code must retain the above copyright | * 1. Redistributions of source code must retain the above copyright | ||||
* notice, this list of conditions and the following disclaimer, | * notice, this list of conditions and the following disclaimer, | ||||
* without modification. | * without modification. | ||||
* 2. Redistributions in binary form must reproduce at minimum a disclaimer | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||||
* similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any | * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any | ||||
Show All 25 Lines | |||||
#define HAL_TIMER_INTVAL 50 /* in msecs */ | #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]; | ||||
uint32_t hal_devs_set[ARRAY_SIZE]; // We support a maximum of 64 nodes for now | |||||
/* hardware information */ | /* hardware information */ | ||||
struct hw { | struct hw { | ||||
struct callout timer_intr; | struct callout timer_intr; | ||||
uint32_t timer_intr_intval; | uint32_t timer_intr_intval; | ||||
uint64_t tsf; | uint64_t tsf; | ||||
} hw; | } hw; | ||||
}; | }; | ||||
Show All 11 Lines |