2 * lib/ax25_gr.c This file contains an implementation of the "AX.25"
3 * route print support functions.
5 * Version: $Id: ax25_gr.c,v 1.4 1999/01/05 20:53:21 philip Exp $
7 * Author: Bernd Eckenfels, <ecki@lina.inka.de>
8 * Copyright 1999 Bernd Eckenfels, Germany
9 * base on Code from Jonathan Naylor <jsn@Cs.Nott.AC.UK>
11 * This program is free software; you can redistribute it
12 * and/or modify it under the terms of the GNU General
13 * Public License as published by the Free Software
14 * Foundation; either version 2 of the License, or (at
15 * your option) any later version.
21 #include <sys/types.h>
22 #include <sys/ioctl.h>
23 #include <sys/socket.h>
24 #include <linux/ax25.h>
25 #include <linux/if_arp.h> /* ARPHRD_AX25 */
35 #include "net-support.h"
36 #include "pathnames.h"
39 int AX25_rprint(int options
)
41 FILE *f
= fopen(_PATH_PROCNET_AX25_ROUTE
, "r");
46 perror(_PATH_PROCNET_AX25_ROUTE
);
47 printf(_("AX.25 not configured in this system.\n")); /* xxx */
50 printf(_("Kernel AX.25 routing table\n")); /* xxx */
51 printf(_("Destination Iface Use\n")); /* xxx */
52 fgets(buffer
, 256, f
);
53 while (fgets(buffer
, 256, f
)) {
56 use
= atoi(buffer
+ 15);
57 printf("%-9s %-5s %5d\n",
58 buffer
, buffer
+ 10, use
);
64 #endif /* HAVE_AFAX25 */