enable -fno-strict-aliasing until the code base gets a hefty clean up to fix all...
[platform/upstream/net-tools.git] / lib / frame.c
1 /*
2  * lib/frame.c        This file contains the Frame Relay support.
3  *
4  * Version:     $Id: frame.c,v 1.4 2000/03/05 11:26:02 philip Exp $
5  *
6  * Maintainer:  Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
7  *
8  * Author:      Mike McLagan <mike.mclagan@linux.org>
9  *
10  * Changes:
11  *
12  *962303 {0.01} Mike McLagan :          creation
13  *960413 {0.02} Bernd Eckenfels :       included in net-lib
14  *
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.
20  */
21 #include "config.h"
22
23 #if HAVE_HWFR
24
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"
39
40 char *pr_dlci(unsigned char *ptr)
41 {
42     static char buf[12];
43
44     snprintf(buf, sizeof(buf), "%i", *(short *) ptr);
45     return (buf);
46 }
47
48 struct hwtype dlci_hwtype =
49 {
50     "dlci", NULL, /*"Frame Relay DLCI", */ ARPHRD_DLCI, 3,
51     pr_dlci, NULL, NULL, 0
52 };
53
54 struct hwtype frad_hwtype =
55 {
56     "frad", NULL, /*"Frame Relay Access Device", */ ARPHRD_FRAD, 0,
57     NULL, NULL, NULL, 0
58 };
59 #endif                          /* HAVE_HWFR */