1229970Sadrian/*- 2229970Sadrian * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB 3229970Sadrian * All rights reserved. 4229970Sadrian * 5229970Sadrian * Redistribution and use in source and binary forms, with or without 6229970Sadrian * modification, are permitted provided that the following conditions 7229970Sadrian * are met: 8229970Sadrian * 1. Redistributions of source code must retain the above copyright 9229970Sadrian * notice, this list of conditions and the following disclaimer, 10229970Sadrian * without modification. 11229970Sadrian * 2. Redistributions in binary form must reproduce at minimum a disclaimer 12229970Sadrian * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 13229970Sadrian * redistribution must be conditioned upon including a substantially 14229970Sadrian * similar Disclaimer requirement for further binary redistribution. 15229970Sadrian * 16229970Sadrian * NO WARRANTY 17229970Sadrian * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18229970Sadrian * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19229970Sadrian * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 20229970Sadrian * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 21229970Sadrian * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 22229970Sadrian * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23229970Sadrian * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24229970Sadrian * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25229970Sadrian * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26229970Sadrian * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27229970Sadrian * THE POSSIBILITY OF SUCH DAMAGES. 28229970Sadrian * 29229970Sadrian * $FreeBSD: releng/10.3/sys/dev/wtap/wtap_hal/hal.h 229970 2012-01-11 17:41:14Z adrian $ 30229970Sadrian */ 31229970Sadrian 32229970Sadrian#ifndef _WTAP_HAL_H_ 33229970Sadrian#define _WTAP_HAL_H_ 34229970Sadrian 35229970Sadrian#include "../if_wtapvar.h" 36229970Sadrian#include "../plugins/wtap_plugin.h" 37229970Sadrian#include "handler.h" 38229970Sadrian 39229970Sadrianstruct wtap_hal { 40229970Sadrian struct wtap_medium *hal_md; 41229970Sadrian struct mtx hal_mtx; 42229970Sadrian struct wtap_plugin *plugin; 43229970Sadrian struct wtap_softc *hal_devs[MAX_NBR_WTAP]; 44229970Sadrian}; 45229970Sadrian 46229970Sadrianvoid init_hal(struct wtap_hal *); 47229970Sadrianvoid deinit_hal(struct wtap_hal *); 48229970Sadrianvoid register_plugin(struct wtap_hal *, struct wtap_plugin *); 49229970Sadrianvoid deregister_plugin(struct wtap_hal *); 50229970Sadrianint32_t new_wtap(struct wtap_hal *, int32_t id); 51229970Sadrianint32_t free_wtap(struct wtap_hal *, int32_t id); 52229970Sadrian 53229970Sadrian 54229970Sadrian#endif 55229970Sadrian 56