1133565Sharti/* 2133565Sharti * Copyright (c) 2001-2002 3133565Sharti * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4133565Sharti * All rights reserved. 5133565Sharti * Copyright (c) 2003-2004 6133565Sharti * Hartmut Brandt. 7133565Sharti * All rights reserved. 8133565Sharti * 9133565Sharti * Author: Hartmut Brandt <harti@freebsd.org> 10133565Sharti * 11133565Sharti * Redistribution and use in source and binary forms, with or without 12133565Sharti * modification, are permitted provided that the following conditions 13133565Sharti * are met: 14133565Sharti * 1. Redistributions of source code must retain the above copyright 15133565Sharti * notice, this list of conditions and the following disclaimer. 16133565Sharti * 2. Redistributions in binary form must reproduce the above copyright 17133565Sharti * notice, this list of conditions and the following disclaimer in the 18133565Sharti * documentation and/or other materials provided with the distribution. 19133565Sharti * 20133565Sharti * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 21133565Sharti * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22133565Sharti * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23133565Sharti * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 24133565Sharti * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25133565Sharti * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26133565Sharti * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27133565Sharti * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28133565Sharti * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29133565Sharti * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30133565Sharti * SUCH DAMAGE. 31133565Sharti * 32133565Sharti * $FreeBSD$ 33133565Sharti */ 34133565Sharti#ifndef ATMCONFIG_DEVICE_H_ 35133565Sharti#define ATMCONFIG_DEVICE_H_ 36133565Sharti 37133565Sharti#include <sys/types.h> 38133565Sharti#include <sys/queue.h> 39133565Sharti#include <stdint.h> 40133565Sharti 41133565Sharti/* 42133565Sharti * ATM interface table 43133565Sharti */ 44133565Shartistruct atmif { 45133565Sharti TAILQ_ENTRY(atmif) link; 46133565Sharti uint64_t found; 47133565Sharti int32_t index; 48145799Sdelphij char *ifname; 49133565Sharti size_t ifnamelen; 50133565Sharti uint32_t pcr; 51133565Sharti int32_t media; 52133565Sharti uint32_t vpi_bits; 53133565Sharti uint32_t vci_bits; 54133565Sharti uint32_t max_vpcs; 55133565Sharti uint32_t max_vccs; 56133565Sharti u_char *esi; 57133565Sharti size_t esilen; 58133565Sharti int32_t carrier; 59133565Sharti int32_t mode; 60133565Sharti}; 61133565ShartiTAILQ_HEAD(atmif_list, atmif); 62133565Sharti 63133565Sharti/* list of all ATM interfaces */ 64133565Shartiextern struct atmif_list atmif_list; 65133565Sharti 66133565Sharti/* fetch this table */ 67133565Shartivoid atmif_fetchtable(void); 68133565Sharti 69133565Sharti/* find an ATM interface by name */ 70133565Shartistruct atmif *atmif_find_name(const char *); 71133565Sharti 72133565Sharti/* find an ATM interface by index */ 73133565Shartistruct atmif *atmif_find(u_int); 74133565Sharti 75133565Sharti#endif 76