paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 1999 Yasuhiro Ohara |
| 3 | * |
| 4 | * This file is part of GNU Zebra. |
| 5 | * |
| 6 | * GNU Zebra is free software; you can redistribute it and/or modify it |
| 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * Free Software Foundation; either version 2, or (at your option) any |
| 9 | * later version. |
| 10 | * |
| 11 | * GNU Zebra is distributed in the hope that it will be useful, but |
| 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with GNU Zebra; see the file COPYING. If not, write to the |
| 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 19 | * Boston, MA 02111-1307, USA. |
| 20 | */ |
| 21 | |
| 22 | #ifndef OSPF6_PROTO_H |
| 23 | #define OSPF6_PROTO_H |
| 24 | |
| 25 | /* OSPF protocol version */ |
| 26 | #define OSPF6_VERSION 3 |
| 27 | |
| 28 | /* OSPF protocol number. */ |
| 29 | #ifndef IPPROTO_OSPFIGP |
| 30 | #define IPPROTO_OSPFIGP 89 |
| 31 | #endif |
| 32 | |
| 33 | /* TOS field normaly null */ |
| 34 | #define OSPF6_TOS_VALUE 0x0 |
| 35 | |
| 36 | /* Architectural Constants */ |
| 37 | #define OSPF6_LS_REFRESH_TIME 1800 /* 30 min */ |
| 38 | #define OSPF6_MIN_LS_INTERVAL 5 |
| 39 | #define OSPF6_MIN_LS_ARRIVAL 1 |
| 40 | #define MAXAGE 3600 /* 1 hour */ |
| 41 | #define CHECK_AGE 300 /* 5 min */ |
| 42 | #define MAX_AGE_DIFF 900 /* 15 min */ |
| 43 | #define LS_INFINITY 0xffffff /* 24-bit binary value */ |
| 44 | #define INITIAL_SEQUENCE_NUMBER 0x80000001 /* signed 32-bit integer */ |
| 45 | #define MAX_SEQUENCE_NUMBER 0x7fffffff /* signed 32-bit integer */ |
| 46 | |
| 47 | #define MAXOSPFMESSAGELEN 4096 |
| 48 | |
| 49 | #define ALLSPFROUTERS6 "ff02::5" |
| 50 | #define ALLDROUTERS6 "ff02::6" |
| 51 | |
| 52 | /* Configurable Constants */ |
| 53 | |
| 54 | #define DEFAULT_HELLO_INTERVAL 10 |
| 55 | #define DEFAULT_ROUTER_DEAD_TIMER 40 |
| 56 | |
| 57 | /* OSPF options */ |
| 58 | /* present in HELLO, DD, LSA */ |
| 59 | #define OSPF6_OPT_SET(x,opt) ((x)[2] |= (opt)) |
| 60 | #define OSPF6_OPT_ISSET(x,opt) ((x)[2] & (opt)) |
| 61 | #define OSPF6_OPT_CLEAR(x,opt) ((x)[2] &= ~(opt)) |
| 62 | #define OSPF6_OPT_CLEAR_ALL(x) ((x)[0] = (x)[1] = (x)[2] = 0) |
| 63 | |
| 64 | #define OSPF6_OPT_V6 (1 << 0) /* IPv6 forwarding Capability */ |
| 65 | #define OSPF6_OPT_E (1 << 1) /* AS External Capability */ |
| 66 | #define OSPF6_OPT_MC (1 << 2) /* Multicasting Capability */ |
| 67 | #define OSPF6_OPT_N (1 << 3) /* Handling Type-7 LSA Capability */ |
| 68 | #define OSPF6_OPT_R (1 << 4) /* Forwarding Capability (Any Protocol) */ |
| 69 | #define OSPF6_OPT_DC (1 << 5) /* Demand Circuit handling Capability */ |
| 70 | |
| 71 | char * |
| 72 | ospf6_options_string (u_char opt_capability[3], char *buffer, int size); |
| 73 | |
| 74 | #endif /* OSPF6_PROTO_H */ |
| 75 | |