3 * ===================================
4 * HARP | Host ATM Research Platform
5 * ===================================
8 * This Host ATM Research Platform ("HARP") file (the "Software") is
9 * made available by Network Computing Services, Inc. ("NetworkCS")
10 * "AS IS". NetworkCS does not provide maintenance, improvements or
11 * support of any kind.
13 * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
14 * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
15 * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
16 * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
17 * In no event shall NetworkCS be responsible for any damages, including
18 * but not limited to consequential damages, arising from or relating to
19 * any use of the Software or related support.
21 * Copyright 1994-1998 Network Computing Services, Inc.
23 * Copies of this Software may be made, however, the above copyright
24 * notice must be reproduced on all copies.
26 * @(#) $FreeBSD: src/lib/libatm/libatm.h,v 1.3 1999/08/27 23:58:05 peter Exp $
27 * @(#) $DragonFly: src/lib/libatm/libatm.h,v 1.3 2003/11/12 20:21:22 eirikn Exp $
32 * User Space Library Functions
33 * ----------------------------
39 #ifndef _HARP_LIBHARP_H
40 #define _HARP_LIBHARP_H
43 * Start a HARP user-space timer
45 * tp pointer to timer control block
46 * time number of seconds for timer to run
47 * fp pointer to function to call at expiration
49 #define HARP_TIMER(tp, time, fp) \
51 (tp)->ht_ticks = (time); \
53 (tp)->ht_func = (fp); \
54 LINK2HEAD((tp), Harp_timer, harp_timer_head, ht_next); \
58 * Cancel a HARP user-space timer
60 * tp pointer to timer control block
62 #define HARP_CANCEL(tp) \
64 UNLINK((tp), Harp_timer, harp_timer_head, ht_next); \
69 * HARP user-space timer control block
72 struct harp_timer
*ht_next
; /* Timer chain */
73 int ht_ticks
; /* Seconds till exp */
74 int ht_mark
; /* Processing flag */
75 void (*ht_func
)(); /* Function to call */
77 typedef struct harp_timer Harp_timer
;
81 * Externally-visible variables and functions
85 extern int get_hex_atm_addr (char *, u_char
*, int);
86 extern char *format_atm_addr (Atm_addr
*);
89 extern void scsp_cache_key (Atm_addr
*,
90 struct in_addr
*, int, char *);
93 extern int do_info_ioctl (struct atminfreq
*, int);
94 extern int get_vcc_info (char *,
95 struct air_vcc_rsp
**);
96 extern int get_subnet_mask (char *,
97 struct sockaddr_in
*);
98 extern int get_mtu (char *);
99 extern int verify_nif_name (char *);
100 extern int get_cfg_info (char *, struct air_cfg_rsp
**);
101 extern int get_intf_info (char *, struct air_int_rsp
**);
102 extern int get_netif_info (char *, struct air_netif_rsp
**);
105 extern struct sockaddr_in
*get_ip_addr (char *);
106 extern char *format_ip_addr (struct in_addr
*);
109 extern short ip_checksum (char *, int);
112 extern Harp_timer
*harp_timer_head
;
113 extern int harp_timer_exec
;
114 extern void timer_proc ();
115 extern int init_timer ();
116 extern int block_timer ();
117 extern void enable_timer (int);
120 #endif /* _HARP_LIBHARP_H */