1/*
2 * Copyright (c) 2001-2002
3 *	Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * 	All rights reserved.
5 * Copyright (c) 2003-2004
6 *	Hartmut Brandt.
7 * 	All rights reserved.
8 *
9 * Author: Hartmut Brandt <harti@freebsd.org>
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 *    notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 *    notice, this list of conditions and the following disclaimer in the
18 *    documentation and/or other materials provided with the distribution.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * $FreeBSD$
33 */
34#ifndef ATMCONFIG_DEVICE_H_
35#define ATMCONFIG_DEVICE_H_
36
37#include <sys/types.h>
38#include <sys/queue.h>
39#include <stdint.h>
40
41/*
42 * ATM interface table
43 */
44struct atmif {
45	TAILQ_ENTRY(atmif) link;
46	uint64_t	found;
47	int32_t		index;
48	char		*ifname;
49	size_t		ifnamelen;
50	uint32_t	pcr;
51	int32_t		media;
52	uint32_t	vpi_bits;
53	uint32_t	vci_bits;
54	uint32_t	max_vpcs;
55	uint32_t	max_vccs;
56	u_char		*esi;
57	size_t		esilen;
58	int32_t		carrier;
59	int32_t		mode;
60};
61TAILQ_HEAD(atmif_list, atmif);
62
63/* list of all ATM interfaces */
64extern struct atmif_list atmif_list;
65
66/* fetch this table */
67void atmif_fetchtable(void);
68
69/* find an ATM interface by name */
70struct atmif *atmif_find_name(const char *);
71
72/* find an ATM interface by index */
73struct atmif *atmif_find(u_int);
74
75#endif
76