1*2f74ae28SJasvinder Singh /* SPDX-License-Identifier: BSD-3-Clause 2*2f74ae28SJasvinder Singh * Copyright(c) 2010-2018 Intel Corporation 3*2f74ae28SJasvinder Singh */ 4*2f74ae28SJasvinder Singh 5*2f74ae28SJasvinder Singh #ifndef _INCLUDE_TAP_H_ 6*2f74ae28SJasvinder Singh #define _INCLUDE_TAP_H_ 7*2f74ae28SJasvinder Singh 8*2f74ae28SJasvinder Singh #include <sys/queue.h> 9*2f74ae28SJasvinder Singh 10*2f74ae28SJasvinder Singh #include "common.h" 11*2f74ae28SJasvinder Singh 12*2f74ae28SJasvinder Singh struct tap { 13*2f74ae28SJasvinder Singh TAILQ_ENTRY(tap) node; 14*2f74ae28SJasvinder Singh char name[NAME_SIZE]; 15*2f74ae28SJasvinder Singh int fd; 16*2f74ae28SJasvinder Singh }; 17*2f74ae28SJasvinder Singh 18*2f74ae28SJasvinder Singh TAILQ_HEAD(tap_list, tap); 19*2f74ae28SJasvinder Singh 20*2f74ae28SJasvinder Singh int 21*2f74ae28SJasvinder Singh tap_init(void); 22*2f74ae28SJasvinder Singh 23*2f74ae28SJasvinder Singh struct tap * 24*2f74ae28SJasvinder Singh tap_find(const char *name); 25*2f74ae28SJasvinder Singh 26*2f74ae28SJasvinder Singh struct tap * 27*2f74ae28SJasvinder Singh tap_create(const char *name); 28*2f74ae28SJasvinder Singh 29*2f74ae28SJasvinder Singh #endif /* _INCLUDE_TAP_H_ */ 30