minor fix to return E_USAGE on -V instead of exit(0);
[oss-qm-packages.git] / lib / frame.c
blob58d1ad42ecb897784331f3a30772898391bde073
1 /*
2 * lib/frame.c This file contains the Frame Relay support.
4 * Version: $Id: frame.c,v 1.4 2000/03/05 11:26:02 philip Exp $
6 * Maintainer: Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
8 * Author: Mike McLagan <mike.mclagan@linux.org>
10 * Changes:
12 *962303 {0.01} Mike McLagan : creation
13 *960413 {0.02} Bernd Eckenfels : included in net-lib
15 * This program is free software; you can redistribute it
16 * and/or modify it under the terms of the GNU General
17 * Public License as published by the Free Software
18 * Foundation; either version 2 of the License, or (at
19 * your option) any later version.
21 #include "config.h"
23 #if HAVE_HWFR
25 #include <sys/types.h>
26 #include <sys/ioctl.h>
27 #include <sys/socket.h>
28 #include <net/if_arp.h>
29 #include <stdlib.h>
30 #include <stdio.h>
31 #include <ctype.h>
32 #include <errno.h>
33 #include <fcntl.h>
34 #include <string.h>
35 #include <termios.h>
36 #include <unistd.h>
37 #include "net-support.h"
38 #include "pathnames.h"
40 char *pr_dlci(unsigned char *ptr)
42 static char buf[12];
44 snprintf(buf, sizeof(buf), "%i", *(short *) ptr);
45 return (buf);
48 struct hwtype dlci_hwtype =
50 "dlci", NULL, /*"Frame Relay DLCI", */ ARPHRD_DLCI, 3,
51 pr_dlci, NULL, NULL, 0
54 struct hwtype frad_hwtype =
56 "frad", NULL, /*"Frame Relay Access Device", */ ARPHRD_FRAD, 0,
57 NULL, NULL, NULL, 0
59 #endif /* HAVE_HWFR */