rdisc.c (19880) | rdisc.c (20339) |
---|---|
1/* 2 * Copyright (c) 1995 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 --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#if !defined(lint) && !defined(sgi) && !defined(__NetBSD__) 35static char sccsid[] = "@(#)rdisc.c 8.1 (Berkeley) x/y/95"; 36#elif defined(__NetBSD__) 37static char rcsid[] = "$NetBSD$"; 38#endif | 1/* 2 * Copyright (c) 1995 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 --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#if !defined(lint) && !defined(sgi) && !defined(__NetBSD__) 35static char sccsid[] = "@(#)rdisc.c 8.1 (Berkeley) x/y/95"; 36#elif defined(__NetBSD__) 37static char rcsid[] = "$NetBSD$"; 38#endif |
39#ident "$Revision: 1.17 $" | 39#ident "$Revision: 1.19 $" |
40 41#include "defs.h" 42#include <netinet/in_systm.h> 43#include <netinet/ip.h> 44#include <netinet/ip_icmp.h> 45 46/* router advertisement ICMP packet */ 47struct icmp_ad { --- 74 unchanged lines hidden (view full) --- 122 ifp ? ifp->int_name : "?", 123 ntohs(p->ad.icmp_ad_life)); 124 if (!TRACECONTENTS) 125 return; 126 127 wp = &p->ad.icmp_ad_info[0].icmp_ad_addr; 128 lim = &wp[(len - sizeof(p->ad)) / sizeof(*wp)]; 129 for (i = 0; i < p->ad.icmp_ad_num && wp <= lim; i++) { | 40 41#include "defs.h" 42#include <netinet/in_systm.h> 43#include <netinet/ip.h> 44#include <netinet/ip_icmp.h> 45 46/* router advertisement ICMP packet */ 47struct icmp_ad { --- 74 unchanged lines hidden (view full) --- 122 ifp ? ifp->int_name : "?", 123 ntohs(p->ad.icmp_ad_life)); 124 if (!TRACECONTENTS) 125 return; 126 127 wp = &p->ad.icmp_ad_info[0].icmp_ad_addr; 128 lim = &wp[(len - sizeof(p->ad)) / sizeof(*wp)]; 129 for (i = 0; i < p->ad.icmp_ad_num && wp <= lim; i++) { |
130 (void)fprintf(ftrace, "\t%s preference=%#x", | 130 (void)fprintf(ftrace, "\t%s preference=%d", |
131 naddr_ntoa(wp[0]), (int)ntohl(wp[1])); 132 wp += p->ad.icmp_ad_asize; 133 } 134 (void)fputc('\n',ftrace); 135 136 } else { 137 trace_act("%s Router Solic. from %s to %s via %s value=%#x", 138 act, naddr_ntoa(from), naddr_ntoa(to), --- 545 unchanged lines hidden (view full) --- 684 sin.sin_family = AF_INET; 685#ifdef _HAVE_SIN_LEN 686 sin.sin_len = sizeof(sin); 687#endif 688 flags = MSG_DONTROUTE; 689 690 switch (type) { 691 case 0: /* unicast */ | 131 naddr_ntoa(wp[0]), (int)ntohl(wp[1])); 132 wp += p->ad.icmp_ad_asize; 133 } 134 (void)fputc('\n',ftrace); 135 136 } else { 137 trace_act("%s Router Solic. from %s to %s via %s value=%#x", 138 act, naddr_ntoa(from), naddr_ntoa(to), --- 545 unchanged lines hidden (view full) --- 684 sin.sin_family = AF_INET; 685#ifdef _HAVE_SIN_LEN 686 sin.sin_len = sizeof(sin); 687#endif 688 flags = MSG_DONTROUTE; 689 690 switch (type) { 691 case 0: /* unicast */ |
692 default: |
|
692 msg = "Send"; 693 break; 694 695 case 1: /* broadcast */ 696 if (ifp->int_if_flags & IFF_POINTOPOINT) { 697 msg = "Send pt-to-pt"; 698 sin.sin_addr.s_addr = ifp->int_dstaddr; 699 } else { --- 347 unchanged lines hidden --- | 693 msg = "Send"; 694 break; 695 696 case 1: /* broadcast */ 697 if (ifp->int_if_flags & IFF_POINTOPOINT) { 698 msg = "Send pt-to-pt"; 699 sin.sin_addr.s_addr = ifp->int_dstaddr; 700 } else { --- 347 unchanged lines hidden --- |