source: trunk/minix/include/net/gen/rip.h@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 1.4 KB
Line 
1/*
2net/gen/rip.h
3
4Definitions for the Routing Information Protocol (RFC-1058).
5
6Created: Aug 16, 1993 by Philip Homburg <philip@cs.vu.nl>
7*/
8
9#ifndef NET__GEN__RIP_H
10#define NET__GEN__RIP_H
11
12typedef struct rip_hdr
13{
14 u8_t rh_command;
15 u8_t rh_version;
16 u16_t rh_zero;
17} rip_hdr_t;
18
19#define RHC_REQUEST 1
20#define RHC_RESPONSE 2
21
22#define RIP_ENTRY_MAX 25
23
24typedef struct rip_entry
25{
26 union
27 {
28 struct rip_entry_v1
29 {
30 u16_t re_family;
31 u16_t re_zero0;
32 u32_t re_address;
33 u32_t re_zero1;
34 u32_t re_zero2;
35 u32_t re_metric;
36 } v1;
37 struct rip_entry_v2
38 {
39 u16_t re_family;
40 u16_t re_tag;
41 u32_t re_address;
42 u32_t re_mask;
43 u32_t re_nexthop;
44 u32_t re_metric;
45 } v2;
46 } u;
47} rip_entry_t;
48
49#define RIP_FAMILY_IP 2
50#define RIP_INFINITY 16
51
52#define RIP_UDP_PORT 520
53#define RIP_PERIOD 30 /* A responce is sent once every
54 * RIP_PERIOD seconds
55 */
56#define RIP_FUZZ 10 /* The actual value used is RIP_FREQUENCE -
57 * a random number of at most RIP_FUZZ.
58 */
59#define RIP_TIMEOUT 180 /* A route is dead after RIP_TIMEOUT seconds */
60#define RIP_DELETE_TO 120 /* A dead route is removed after RIP_DELETE_TO
61 * seconds
62 */
63
64#ifdef __RIP_DEBUG
65#undef RIP_PERIOD
66#define RIP_PERIOD 15
67#undef RIP_TIMEOUT
68#define RIP_TIMEOUT 10
69#undef RIP_DELETE_TO
70#define RIP_DELETE_TO 10
71#endif /* __RIP_DEBUG */
72
73#endif /* NET__GEN__RIP_H */
74
75/*
76 * $PchId: rip.h,v 1.3 1995/11/17 22:21:16 philip Exp $
77 */
Note: See TracBrowser for help on using the repository browser.