Commit 6124ebc0 authored by Phil Blundell's avatar Phil Blundell

Fix problems with hwtype initialisation.

Reported by Anthony Towns <ajt@debian.org>
parent 6498edeb
......@@ -2,7 +2,7 @@
* lib/arcnet.c This file contains an implementation of the "ARCnet"
* support functions for the NET-2 base distribution.
*
* Version: $Id: arcnet.c,v 1.5 1998/11/19 13:01:53 philip Exp $
* Version: $Id: arcnet.c,v 1.6 2000/03/05 11:26:02 philip Exp $
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
......@@ -44,17 +44,6 @@ static char *pr_arcnet(unsigned char *ptr)
}
/* Display an ARCnet socket address. */
static char *pr_sarcnet(struct sockaddr *sap)
{
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf));
return (pr_arcnet(sap->sa_data));
}
/* Input an ARCnet address and convert to binary. */
static int in_arcnet(char *bufp, struct sockaddr *sap)
{
......@@ -133,7 +122,7 @@ static int in_arcnet(char *bufp, struct sockaddr *sap)
struct hwtype arcnet_hwtype =
{
"arcnet", NULL, /*"2.5Mbps ARCnet", */ ARPHRD_ARCNET, 1,
pr_arcnet, pr_sarcnet, in_arcnet, NULL
pr_arcnet, in_arcnet, NULL
};
......
......@@ -2,7 +2,7 @@
* lib/fddi.c This file contains an implementation of the "FDDI"
* support functions.
*
* Version: $Id: fddi.c,v 1.6 1998/11/26 10:16:39 philip Exp $
* Version: $Id: fddi.c,v 1.7 2000/03/05 11:26:02 philip Exp $
*
* Author: Lawrence V. Stefani, <stefani@lkg.dec.com>
*
......@@ -58,17 +58,6 @@ static char *pr_fddi(unsigned char *ptr)
}
/* Display an FDDI socket address. */
static char *pr_sfddi(struct sockaddr *sap)
{
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf));
return (pr_fddi(sap->sa_data));
}
/* Input an FDDI address and convert to binary. */
static int in_fddi(char *bufp, struct sockaddr *sap)
{
......@@ -147,7 +136,7 @@ static int in_fddi(char *bufp, struct sockaddr *sap)
struct hwtype fddi_hwtype =
{
"fddi", NULL, /*"Fiber Distributed Data Interface (FDDI)", */ ARPHRD_FDDI, FDDI_K_ALEN,
pr_fddi, pr_sfddi, in_fddi, NULL
pr_fddi, in_fddi, NULL
};
......
/*
* lib/frame.c This file contains the Frame Relay support.
*
* Version: $Id: frame.c,v 1.3 1998/11/15 20:09:39 freitag Exp $
* Version: $Id: frame.c,v 1.4 2000/03/05 11:26:02 philip Exp $
*
* Maintainer: Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
*
......@@ -48,12 +48,12 @@ char *pr_dlci(unsigned char *ptr)
struct hwtype dlci_hwtype =
{
"dlci", NULL, /*"Frame Relay DLCI", */ ARPHRD_DLCI, 3,
pr_dlci, NULL, NULL, NULL
pr_dlci, NULL, NULL, 0
};
struct hwtype frad_hwtype =
{
"frad", NULL, /*"Frame Relay Access Device", */ ARPHRD_FRAD, 0,
NULL, NULL, NULL, NULL
NULL, NULL, NULL, 0
};
#endif /* HAVE_HWFR */
......@@ -3,7 +3,7 @@
* This file contains the HDLC/LAPB support for the NET-2 base
* distribution.
*
* Version: $Id: hdlclapb.c,v 1.4 1999/01/05 20:53:26 philip Exp $
* Version: $Id: hdlclapb.c,v 1.5 2000/03/05 11:26:02 philip Exp $
*
* Original Author:
* Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
......@@ -49,12 +49,12 @@
struct hwtype hdlc_hwtype =
{
"hdlc", NULL, /*"(Cisco) HDLC", */ ARPHRD_HDLC, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, 0
};
struct hwtype lapb_hwtype =
{
"lapb", NULL, /*"LAPB", */ ARPHRD_LAPB, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, 0
};
#endif /* HAVE_HWHDLCLAPB */
......@@ -58,18 +58,6 @@ static char *pr_hippi(unsigned char *ptr)
}
/* Display an HIPPI socket address. */
static char *
pr_shippi(struct sockaddr *sap)
{
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return (safe_strncpy(buf, _("[NONE SET]"), 64));
return (pr_hippi(sap->sa_data));
}
/* Input an HIPPI address and convert to binary. */
static int in_hippi(char *bufp, struct sockaddr *sap)
{
......@@ -147,7 +135,7 @@ static int in_hippi(char *bufp, struct sockaddr *sap)
struct hwtype hippi_hwtype =
{
"hippi", NULL, /*"HIPPI", */ ARPHRD_HIPPI, HIPPI_ALEN,
pr_hippi, pr_shippi, in_hippi, NULL
pr_hippi, in_hippi, NULL, 0
};
......
......@@ -67,22 +67,10 @@ static char *irda_print(unsigned char *ptr)
return (buff);
}
/*
* Function irda_sprint (sap)
*
* Print IrDA socket address
*
*/
static char *irda_sprint(struct sockaddr *sap)
{
/* NOP */
return NULL;
}
struct hwtype irda_hwtype =
{
"irda", NULL, ARPHRD_IRDA, 2,
irda_print, irda_sprint, NULL, NULL
irda_print, NULL, NULL, 0
};
#endif /* HAVE_xxIRDA */
......@@ -2,7 +2,7 @@
* lib/netrom.c This file contains an implementation of the "NET/ROM"
* support functions for the NET-2 base distribution.
*
* Version: $Id: netrom.c,v 1.7 1998/11/19 13:02:03 philip Exp $
* Version: $Id: netrom.c,v 1.8 2000/03/05 11:26:03 philip Exp $
*
* NOTE: I will redo this module as soon as I got the libax25.a
* library sorted out. This library contains some useful
......@@ -152,14 +152,6 @@ static void NETROM_herror(char *text)
}
static char *NETROM_hprint(struct sockaddr *sap)
{
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return ("[NONE SET]");
return (NETROM_print(((struct sockaddr_ax25 *) sap)->sax25_call.ax25_call));
}
static int NETROM_hinput(char *bufp, struct sockaddr *sap)
{
if (NETROM_input(0, bufp, sap) < 0)
......@@ -194,7 +186,7 @@ static int KISS_init(int fd)
struct hwtype netrom_hwtype =
{
"netrom", NULL, /* "AMPR NET/ROM", */ ARPHRD_NETROM, 7,
NETROM_print, NETROM_hprint, NETROM_hinput, NULL
NETROM_print, NETROM_hinput, NULL, 0
};
struct aftype netrom_aftype =
......
......@@ -2,7 +2,7 @@
* lib/ppp.c This file contains the SLIP support for the NET-2 base
* distribution.
*
* Version: $Id: ppp.c,v 1.3 1998/11/15 20:11:45 freitag Exp $
* Version: $Id: ppp.c,v 1.4 2000/03/05 11:26:03 philip Exp $
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
......@@ -46,12 +46,10 @@ static int do_ppp(int fd)
}
struct hwtype ppp_hwtype =
{
"ppp", NULL, /*"Point-Point Protocol", */ ARPHRD_PPP, 0,
NULL, NULL, NULL, do_ppp
NULL, NULL, do_ppp, 0
};
......
......@@ -2,7 +2,7 @@
* lib/rose.c This file contains an implementation of the "ROSE"
* support functions for the NET-2 base distribution.
*
* Version: $Id: rose.c,v 1.6 1999/01/05 20:54:04 philip Exp $
* Version: $Id: rose.c,v 1.7 2000/03/05 11:26:03 philip Exp $
*
* Author: Terry Dawson, VK2KTJ, <terry@perf.no.itg.telstra.com.au>
* based on ax25.c by:
......@@ -119,16 +119,6 @@ static void ROSE_herror(char *text)
}
static char *
ROSE_hprint(struct sockaddr *sap)
{
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return _("[NONE SET]");
return (ROSE_print(((struct sockaddr_rose *) sap)->srose_addr.rose_addr));
}
static int ROSE_hinput(char *bufp, struct sockaddr *sap)
{
if (ROSE_input(0, bufp, sap) < 0)
......@@ -140,7 +130,7 @@ static int ROSE_hinput(char *bufp, struct sockaddr *sap)
struct hwtype rose_hwtype =
{
"rose", NULL, /*"AMPR ROSE", */ ARPHRD_ROSE, 10,
ROSE_print, ROSE_hprint, ROSE_hinput, NULL
ROSE_print, ROSE_hinput, NULL
};
struct aftype rose_aftype =
......
......@@ -27,12 +27,6 @@ static char *pr_tunnel(unsigned char *ptr)
}
static char *pr_stunnel(struct sockaddr *sap)
{
return ("");
}
static int in_tunnel(char *bufp, struct sockaddr *sap)
{
return (-1);
......@@ -42,7 +36,7 @@ static int in_tunnel(char *bufp, struct sockaddr *sap)
struct hwtype tunnel_hwtype =
{
"tunnel", NULL, /*"IPIP Tunnel", */ ARPHRD_TUNNEL, 0,
pr_tunnel, pr_stunnel, in_tunnel, NULL
pr_tunnel, in_tunnel, NULL, 0
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment