2 * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 *---------------------------------------------------------------------------
27 * i4b_global.h - i4b global include file
28 * --------------------------------------
30 * $FreeBSD: src/sys/i4b/include/i4b_global.h,v 1.6.2.2 2002/07/07 10:17:10 hm Exp $
31 * $DragonFly: src/sys/net/i4b/include/i4b_global.h,v 1.6 2005/06/14 21:19:18 joerg Exp $
33 * last edit-date: [Sun Jul 7 12:11:35 2002]
35 *---------------------------------------------------------------------------*/
37 #ifndef _I4B_GLOBAL_H_
38 #define _I4B_GLOBAL_H_
44 #include <sys/param.h>
46 #define TIMEOUT_FUNC_T timeout_t *
47 #define SECOND time_second
48 #define MICROTIME(x) getmicrotime(&(x))
50 /*---------------------------------------------------------------------------*
51 * misc globally used things in the kernel
52 *---------------------------------------------------------------------------*/
56 #define TIMER_IDLE 1 /* a timer is running */
57 #define TIMER_ACTIVE 2 /* a timer is idle */
59 /* critial code region handling macros */
61 #define CRIT_VAR int _svd_spl_ __unused; /* dummy */
62 #define CRIT_BEG crit_enter()
63 #define CRIT_END crit_exit()
65 /* definitions for the STATUS indications L1 -> L2 -> L3 */
67 #define STI_ATTACH 0 /* attach at boot time */
68 #define STI_L1STAT 1 /* layer 1 status */
69 #define STI_L2STAT 2 /* layer 2 status */
70 #define STI_TEIASG 3 /* TEI assignments */
71 #define STI_PDEACT 4 /* Layer 1 T4 expired = persistent deactivation */
72 #define STI_NOL1ACC 5 /* no outgoing L1 access possible */
74 /* definitions for the COMMAND requests L3 -> L2 -> L1 */
76 #define CMR_DOPEN 0 /* daemon opened /dev/i4b */
77 #define CMR_DCLOSE 1 /* daemon closed /dev/i4b */
78 #define CMR_SETTRACE 2 /* set D-channel and B-channel trace */
79 #define CMR_GCST 3 /* get chipset statistics */
80 #define CMR_CCST 4 /* clear chipset statistics */
82 #endif /* _I4B_GLOBAL_H_ */