rtsock.c (95b6073cd51f5badded0d1862c7edbbed672084f) | rtsock.c (831a80b0d5d50e416fe5e4b237d3a9fd4eea00b8) |
---|---|
1/* 2 * Copyright (c) 1988, 1991, 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)rtsock.c 8.5 (Berkeley) 11/2/94 | 1/* 2 * Copyright (c) 1988, 1991, 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)rtsock.c 8.5 (Berkeley) 11/2/94 |
34 * $Id: rtsock.c,v 1.36 1997/10/28 15:58:37 bde Exp $ | 34 * $Id: rtsock.c,v 1.37 1997/10/31 08:53:13 davidg Exp $ |
35 */ 36 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/kernel.h> 41#include <sys/sysctl.h> 42#include <sys/proc.h> --- 308 unchanged lines hidden (view full) --- 351 } 352 break; 353 354 case RTM_GET: 355 case RTM_CHANGE: 356 case RTM_LOCK: 357 if ((rnh = rt_tables[dst->sa_family]) == 0) { 358 senderr(EAFNOSUPPORT); | 35 */ 36 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/kernel.h> 41#include <sys/sysctl.h> 42#include <sys/proc.h> --- 308 unchanged lines hidden (view full) --- 351 } 352 break; 353 354 case RTM_GET: 355 case RTM_CHANGE: 356 case RTM_LOCK: 357 if ((rnh = rt_tables[dst->sa_family]) == 0) { 358 senderr(EAFNOSUPPORT); |
359 } else if (rt = (struct rtentry *) 360 rnh->rnh_lookup(dst, netmask, rnh)) | 359 } else if ((rt = (struct rtentry *) 360 rnh->rnh_lookup(dst, netmask, rnh)) != NULL) |
361 rt->rt_refcnt++; 362 else 363 senderr(ESRCH); 364 switch(rtm->rtm_type) { 365 366 case RTM_GET: 367 report: 368 dst = rt_key(rt); --- 632 unchanged lines hidden --- | 361 rt->rt_refcnt++; 362 else 363 senderr(ESRCH); 364 switch(rtm->rtm_type) { 365 366 case RTM_GET: 367 report: 368 dst = rt_key(rt); --- 632 unchanged lines hidden --- |