table.c (146838) | table.c (186119) |
---|---|
1/* 2 * Copyright (c) 1983, 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/* 2 * Copyright (c) 1983, 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sbin/routed/table.c 146838 2005-05-31 20:28:49Z stefanf $ | 29 * $FreeBSD: head/sbin/routed/table.c 186119 2008-12-15 06:10:57Z qingli $ |
30 */ 31 32#include "defs.h" 33 34#ifdef __NetBSD__ 35__RCSID("$NetBSD$"); 36#elif defined(__FreeBSD__) | 30 */ 31 32#include "defs.h" 33 34#ifdef __NetBSD__ 35__RCSID("$NetBSD$"); 36#elif defined(__FreeBSD__) |
37__RCSID("$FreeBSD: head/sbin/routed/table.c 146838 2005-05-31 20:28:49Z stefanf $"); | 37__RCSID("$FreeBSD: head/sbin/routed/table.c 186119 2008-12-15 06:10:57Z qingli $"); |
38#else 39__RCSID("$Revision: 2.27 $"); 40#ident "$Revision: 2.27 $" 41#endif 42 43static struct rt_spare *rts_better(struct rt_entry *); 44static struct rt_spare rts_empty = {0,0,0,HOPCNT_INFINITY,0,0,0}; 45static void set_need_flash(void); --- 1052 unchanged lines hidden (view full) --- 1098 (struct sockaddr *)(rtm+1), 1099 (struct sockaddr *)(next + rtm->rtm_msglen), 1100 rtm->rtm_addrs); 1101 1102 if (INFO_DST(&info) == 0 1103 || INFO_DST(&info)->sa_family != AF_INET) 1104 continue; 1105 | 38#else 39__RCSID("$Revision: 2.27 $"); 40#ident "$Revision: 2.27 $" 41#endif 42 43static struct rt_spare *rts_better(struct rt_entry *); 44static struct rt_spare rts_empty = {0,0,0,HOPCNT_INFINITY,0,0,0}; 45static void set_need_flash(void); --- 1052 unchanged lines hidden (view full) --- 1098 (struct sockaddr *)(rtm+1), 1099 (struct sockaddr *)(next + rtm->rtm_msglen), 1100 rtm->rtm_addrs); 1101 1102 if (INFO_DST(&info) == 0 1103 || INFO_DST(&info)->sa_family != AF_INET) 1104 continue; 1105 |
1106#if defined (RTF_LLINFO) |
|
1106 /* ignore ARP table entries on systems with a merged route 1107 * and ARP table. 1108 */ 1109 if (rtm->rtm_flags & RTF_LLINFO) 1110 continue; | 1107 /* ignore ARP table entries on systems with a merged route 1108 * and ARP table. 1109 */ 1110 if (rtm->rtm_flags & RTF_LLINFO) 1111 continue; |
1111 | 1112#endif |
1112#if defined(RTF_WASCLONED) && defined(__FreeBSD__) 1113 /* ignore cloned routes 1114 */ 1115 if (rtm->rtm_flags & RTF_WASCLONED) 1116 continue; 1117#endif 1118 1119 /* ignore multicast addresses --- 136 unchanged lines hidden (view full) --- 1256 strp += sprintf(strp, ": %s", 1257 addrname(S_ADDR(INFO_DST(&info)), mask, 0)); 1258 1259 if (IN_MULTICAST(ntohl(S_ADDR(INFO_DST(&info))))) { 1260 trace_act("ignore multicast %s", str); 1261 continue; 1262 } 1263 | 1113#if defined(RTF_WASCLONED) && defined(__FreeBSD__) 1114 /* ignore cloned routes 1115 */ 1116 if (rtm->rtm_flags & RTF_WASCLONED) 1117 continue; 1118#endif 1119 1120 /* ignore multicast addresses --- 136 unchanged lines hidden (view full) --- 1257 strp += sprintf(strp, ": %s", 1258 addrname(S_ADDR(INFO_DST(&info)), mask, 0)); 1259 1260 if (IN_MULTICAST(ntohl(S_ADDR(INFO_DST(&info))))) { 1261 trace_act("ignore multicast %s", str); 1262 continue; 1263 } 1264 |
1265#if defined(RTF_LLINFO) |
|
1264 if (m.r.rtm.rtm_flags & RTF_LLINFO) { 1265 trace_act("ignore ARP %s", str); 1266 continue; 1267 } | 1266 if (m.r.rtm.rtm_flags & RTF_LLINFO) { 1267 trace_act("ignore ARP %s", str); 1268 continue; 1269 } |
1268 | 1270#endif 1271 |
1269#if defined(RTF_WASCLONED) && defined(__FreeBSD__) 1270 if (m.r.rtm.rtm_flags & RTF_WASCLONED) { 1271 trace_act("ignore cloned %s", str); 1272 continue; 1273 } 1274#endif 1275 1276 if (get_info_gate(&INFO_GATE(&info), &gate_sin)) { --- 877 unchanged lines hidden --- | 1272#if defined(RTF_WASCLONED) && defined(__FreeBSD__) 1273 if (m.r.rtm.rtm_flags & RTF_WASCLONED) { 1274 trace_act("ignore cloned %s", str); 1275 continue; 1276 } 1277#endif 1278 1279 if (get_info_gate(&INFO_GATE(&info), &gate_sin)) { --- 877 unchanged lines hidden --- |