2 * Copyright (c) 1990,1993 Regents of The University of Michigan.
3 * All Rights Reserved. See COPYRIGHT.
7 * We have an rtmptab circular linked list for each gateway. Entries
8 * are inserted in the order we get them. The expectation is that
9 * we will get a complexity of N for the stable case. If we have N
10 * existing entries, and M new entries, we'll have on the order of
11 * N + ( M * N ) complexity (really it will be something more than
12 * that, maybe N + ( M * ( N + 1/2 M )). Note that having a list to
13 * search is superior to a hash table if you are expecting bad data:
14 * you have the opportunity to range-check the incoming data.
16 * We keep several ZIP related flags and counters here. For ZIP Extended
17 * Replies, we must keep a flag indicating that the zone is up or down.
18 * This flag is necessary for ZIP Extended Replies which cross packet
19 * boundaries: even tho the rtmptab entry has data, it is not yet
20 * complete. For ZIP in general, we keep a flag indicating that we've
21 * asked for a ZIP (E)Reply. If this flag is not set, we won't process
22 * ZIP Reply data for given rtmptab entries. Lastly, we keep a count of
23 * the number of times we've asked for ZIP Reply data. When this value
24 * reaches some value (3?), we can optionally stop asking.
28 #define ATALKD_RTMP_H 1
30 #include <sys/cdefs.h>
33 struct rtmptab *rt_next,
35 struct rtmptab *rt_inext,
37 u_short rt_firstnet, rt_lastnet;
41 u_char rt_nzq; /* number of zip queries issued */
42 struct gate *rt_gate; /* gate is NULL for interfaces */
44 const struct interface *rt_iface;
57 #define SZ_RTMPTUPLE 3
59 #define RTMPTAB_PERM 0
60 #define RTMPTAB_GOOD 1
61 #define RTMPTAB_SUSP1 2
62 #define RTMPTAB_SUSP2 3
65 #define RTMPTAB_ZIPQUERY 0x01
66 #define RTMPTAB_HASZONES 0x02
67 #define RTMPTAB_EXTENDED 0x04
68 #define RTMPTAB_ROUTE 0x08
71 #define RTMP_ADD SIOCADDRT
72 #define RTMP_DEL SIOCDELRT
74 #define RTMP_ADD RTM_ADD
75 #define RTMP_DEL RTM_DELETE
78 #define STARTUP_FIRSTNET 0xff00
79 #define STARTUP_LASTNET 0xfffe
82 struct rtmptab *newrt __P((const struct interface *));
83 void rtmp_delzonemap __P((struct rtmptab *));
85 #endif /* atalkd/rtmp.h */