3 * Deutsches Zentrum fuer Luft- und Raumfahrt.
6 * Author: Hartmut Brandt <harti@freebsd.org>
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * $Begemot: libunimsg/snmp_atm/atm.h,v 1.3 2005/05/23 11:46:46 brandt_h Exp $
32 #include <sys/types.h>
33 #include <sys/queue.h>
34 #include <sys/socket.h>
37 #include <net/if_mib.h>
39 #include <bsnmp/snmpmod.h>
40 #include <bsnmp/snmp_mibII.h>
41 #include <bsnmp/snmp_atm.h>
47 TAILQ_ENTRY(atmif_reg) link;
50 const struct lmodule *mod;
51 struct atmif_priv *aif; /* back pointer */
53 TAILQ_HEAD(atmif_reg_list, atmif_reg);
59 struct atmif pub; /* public part, must be first */
60 TAILQ_ENTRY(atmif_priv) link;
61 u_int index; /* if_index */
63 struct atmif_sys *sys;
64 struct atmif_reg_list notify;
66 TAILQ_HEAD(atmif_list, atmif_priv);
68 /* list of all (known) ATM interfaces */
69 extern struct atmif_list atmif_list;
71 extern struct lmodule *module;
73 /* Check the carrier state of the interface */
74 void atmif_check_carrier(struct atmif_priv *);
76 /* Send notification to all listeners. */
77 void atmif_send_notification(struct atmif_priv *, enum atmif_notify, uintptr_t);
79 /* Get the interface point for a table access */
80 int atmif_get_aif(struct snmp_value *, u_int, enum snmp_op,
81 struct atmif_priv **);
83 /* Destroy system dependend stuff. */
84 void atmif_sys_destroy(struct atmif_priv *);
86 /* Attach to an ATM interface */
87 int atmif_sys_attach_if(struct atmif_priv *);
89 /* Get vendor string */
90 int atm_sys_get_hw_vendor(struct atmif_priv *, struct snmp_value *);
92 /* Get device string */
93 int atm_sys_get_hw_device(struct atmif_priv *, struct snmp_value *);
95 /* Extract the ATM MIB from the interface's private MIB */
96 void atmif_sys_fill_mib(struct atmif_priv *);