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.
31 * User Space Library Functions
32 * ----------------------------
38 #ifndef _HARP_LIBHARP_H
39 #define _HARP_LIBHARP_H
42 * Start a HARP user-space timer
44 * tp pointer to timer control block
45 * time number of seconds for timer to run
46 * fp pointer to function to call at expiration
48 #define HARP_TIMER(tp, time, fp) \
50 (tp)->ht_ticks = (time); \
52 (tp)->ht_func = (fp); \
53 LINK2HEAD((tp), Harp_timer, harp_timer_head, ht_next); \
57 * Cancel a HARP user-space timer
59 * tp pointer to timer control block
61 #define HARP_CANCEL(tp) \
63 UNLINK((tp), Harp_timer, harp_timer_head, ht_next); \
68 * HARP user-space timer control block
71 struct harp_timer *ht_next; /* Timer chain */
72 int ht_ticks; /* Seconds till exp */
73 int ht_mark; /* Processing flag */
74 void (*ht_func)(struct harp_timer *); /* Function to call */
76 typedef struct harp_timer Harp_timer;
80 * Externally-visible variables and functions
84 extern int get_hex_atm_addr(const char *, u_char *, int);
85 extern char *format_atm_addr(const Atm_addr *);
88 extern void scsp_cache_key(const Atm_addr *,
89 const struct in_addr *, int, char *);
92 extern ssize_t do_info_ioctl(struct atminfreq *, size_t);
93 extern ssize_t get_vcc_info(const char *, struct air_vcc_rsp **);
94 extern int get_subnet_mask(const char *, struct sockaddr_in *);
95 extern int get_mtu(const char *);
96 extern int verify_nif_name(const char *);
97 extern ssize_t get_cfg_info(const char *, struct air_cfg_rsp **);
98 extern ssize_t get_intf_info(const char *, struct air_int_rsp **);
99 extern ssize_t get_netif_info(const char *, struct air_netif_rsp **);
102 extern struct sockaddr_in *get_ip_addr(const char *);
103 extern const char *format_ip_addr(const struct in_addr *);
106 extern short ip_checksum(const char *, int);
109 extern Harp_timer *harp_timer_head;
110 extern int harp_timer_exec;
111 extern void timer_proc(void);
112 extern int init_timer(void);
113 extern int block_timer(void);
114 extern void enable_timer(int);
117 #endif /* _HARP_LIBHARP_H */