route.c (31070) | route.c (31121) |
---|---|
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.23 1997/11/09 06:22:47 brian Exp $ | 20 * $Id: route.c,v 1.24 1997/11/09 14:18:50 brian Exp $ |
21 * 22 */ 23 24#include <sys/param.h> 25#include <sys/time.h> 26#include <sys/socket.h> 27#include <net/route.h> 28#include <net/if.h> --- 234 unchanged lines hidden (view full) --- 263 for (nb = *(char *) lp; nb > 4; nb--) { 264 mask <<= 8; 265 mask |= *wp++; 266 } 267 for (nb = 8 - *(char *) lp; nb > 0; nb--) 268 mask <<= 8; 269 } 270 } | 21 * 22 */ 23 24#include <sys/param.h> 25#include <sys/time.h> 26#include <sys/socket.h> 27#include <net/route.h> 28#include <net/if.h> --- 234 unchanged lines hidden (view full) --- 263 for (nb = *(char *) lp; nb > 4; nb--) { 264 mask <<= 8; 265 mask |= *wp++; 266 } 267 for (nb = 8 - *(char *) lp; nb > 0; nb--) 268 mask <<= 8; 269 } 270 } |
271 fprintf(VarTerm, "%08lx ", mask); | 271 fprintf(VarTerm, "0x%08lx ", mask); |
272 p_flags(rtm->rtm_flags & (RTF_UP | RTF_GATEWAY | RTF_HOST), "%-6.6s "); 273 fprintf(VarTerm, "(%d)\n", rtm->rtm_index); 274 } 275 free(sp); 276 return 0; 277} 278 279/* --- 154 unchanged lines hidden --- | 272 p_flags(rtm->rtm_flags & (RTF_UP | RTF_GATEWAY | RTF_HOST), "%-6.6s "); 273 fprintf(VarTerm, "(%d)\n", rtm->rtm_index); 274 } 275 free(sp); 276 return 0; 277} 278 279/* --- 154 unchanged lines hidden --- |