Deleted Added
full compact
route.c (37010) route.c (37019)
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: route.c,v 1.47 1998/06/15 19:06:23 brian Exp $
20 * $Id: route.c,v 1.48 1998/06/15 19:06:55 brian Exp $
21 *
22 */
23
24#include <sys/types.h>
25#include <sys/socket.h>
26#include <net/if_types.h>
27#include <net/route.h>
28#include <net/if.h>

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

213 mib[0] = CTL_NET;
214 mib[1] = PF_ROUTE;
215 mib[2] = 0;
216 mib[3] = 0;
217 mib[4] = NET_RT_IFLIST;
218 mib[5] = 0;
219
220 if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) {
21 *
22 */
23
24#include <sys/types.h>
25#include <sys/socket.h>
26#include <net/if_types.h>
27#include <net/route.h>
28#include <net/if.h>

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

213 mib[0] = CTL_NET;
214 mib[1] = PF_ROUTE;
215 mib[2] = 0;
216 mib[3] = 0;
217 mib[4] = NET_RT_IFLIST;
218 mib[5] = 0;
219
220 if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) {
221 log_Printf(LogERROR, "Index2Nam: sysctl: estimate: %s\n", strerror(errno));
221 log_Printf(LogERROR, "Index2Nam: sysctl: estimate: %s\n",
222 strerror(errno));
222 return "???";
223 }
224 if ((buf = malloc(needed)) == NULL)
225 return "???";
226 if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) {
227 free(buf);
228 return "???";
229 }

--- 334 unchanged lines hidden ---
223 return "???";
224 }
225 if ((buf = malloc(needed)) == NULL)
226 return "???";
227 if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) {
228 free(buf);
229 return "???";
230 }

--- 334 unchanged lines hidden ---