Deleted Added
full compact
route.c (22997) route.c (25630)
1/*
2 * PPP Routing related Module
3 *
4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5 *
6 * Copyright (C) 1994, Internet Initiative Japan, Inc. All rights reserverd.
7 *
8 * Redistribution and use in source and binary forms are permitted
9 * provided that the above copyright notice and this paragraph are
10 * duplicated in all such forms and that any documentation,
11 * advertising materials, and other materials related to such
12 * distribution and use acknowledge that the software was developed
13 * by the Internet Initiative Japan, Inc. The name of the
14 * IIJ may not be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 *
1/*
2 * PPP Routing related Module
3 *
4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5 *
6 * Copyright (C) 1994, Internet Initiative Japan, Inc. All rights reserverd.
7 *
8 * Redistribution and use in source and binary forms are permitted
9 * provided that the above copyright notice and this paragraph are
10 * duplicated in all such forms and that any documentation,
11 * advertising materials, and other materials related to such
12 * distribution and use acknowledge that the software was developed
13 * by the Internet Initiative Japan, Inc. The name of the
14 * IIJ may not be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 *
20 * $Id$
20 * $Id: route.c,v 1.12 1997/02/22 16:10:49 peter Exp $
21 *
22 */
23#include <sys/types.h>
24#include <machine/endian.h>
25#include <sys/ioctl.h>
26#include <sys/param.h>
27#include <sys/socket.h>
28#if (BSD >= 199306)

--- 378 unchanged lines hidden (view full) ---

407 elen = ifrp->ifr_addr.sa_len - sizeof(struct sockaddr);
408 if (ifrp->ifr_addr.sa_family == AF_LINK) {
409#ifdef DEBUG
410 logprintf("%d: %-*.*s, %d, %d\n", index, IFNAMSIZ, IFNAMSIZ, ifrp->ifr_name,
411 ifrp->ifr_addr.sa_family, elen);
412#endif
413 if (strcmp(ifrp->ifr_name, name) == 0) {
414 IfIndex = index;
21 *
22 */
23#include <sys/types.h>
24#include <machine/endian.h>
25#include <sys/ioctl.h>
26#include <sys/param.h>
27#include <sys/socket.h>
28#if (BSD >= 199306)

--- 378 unchanged lines hidden (view full) ---

407 elen = ifrp->ifr_addr.sa_len - sizeof(struct sockaddr);
408 if (ifrp->ifr_addr.sa_family == AF_LINK) {
409#ifdef DEBUG
410 logprintf("%d: %-*.*s, %d, %d\n", index, IFNAMSIZ, IFNAMSIZ, ifrp->ifr_name,
411 ifrp->ifr_addr.sa_family, elen);
412#endif
413 if (strcmp(ifrp->ifr_name, name) == 0) {
414 IfIndex = index;
415 free(buffer);
415 free(buffer);
416 return(index);
417 }
418 index++;
419 }
420
421 len -= elen;
422 ifrp = (struct ifreq *)((char *)ifrp + elen);
423 ifrp++;
424 }
425
426 close(s);
427 free(buffer);
428 return(-1);
429}
416 return(index);
417 }
418 index++;
419 }
420
421 len -= elen;
422 ifrp = (struct ifreq *)((char *)ifrp + elen);
423 ifrp++;
424 }
425
426 close(s);
427 free(buffer);
428 return(-1);
429}