3 * lib/rose_gr.c This file contains an implementation of the "ROSE"
4 * route print support functions.
6 * Version: $Id: rose_gr.c,v 1.4 1999/01/05 20:54:07 philip Exp $
8 * Author: Terry Dawson, VK2KTJ, <terry@perf.no.itg.telstra.com.au>
9 * based on ax25_gr.c by:
10 * Bernd Eckenfels, <ecki@lina.inka.de>
11 * Copyright 1999 Bernd Eckenfels, Germany
12 * base on Code from Jonathan Naylor <jsn@Cs.Nott.AC.UK>
14 * This program is free software; you can redistribute it
15 * and/or modify it under the terms of the GNU General
16 * Public License as published by the Free Software
17 * Foundation; either version 2 of the License, or (at
18 * your option) any later version.
24 #include <sys/types.h>
25 #include <sys/ioctl.h>
26 #include <linux/rose.h>
27 #include <sys/socket.h>
28 #include <net/if_arp.h> /* ARPHRD_ROSE */
38 #include "net-support.h"
39 #include "pathnames.h"
42 int ROSE_rprint(int options)
48 f=fopen(_PATH_PROCNET_ROSE_ROUTE, "r");
50 perror(_PATH_PROCNET_ROSE_ROUTE);
51 printf(_("ROSE not configured in this system.\n")); /* xxx */
54 printf(_("Kernel ROSE routing table\n"));
55 printf(_("Destination Iface Use\n"));
56 fgets(buffer, 256, f);
57 while (fgets(buffer, 256, f)) {
60 use = atoi(buffer + 15);
61 printf("%-9s %-5s %5d\n",
62 buffer, buffer + 10, use);
68 #endif /* HAVE_AFROSE */