if_plip.c (43109) | if_plip.c (43433) |
---|---|
1/*- 2 * Copyright (c) 1997 Poul-Henning Kamp 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp | 1/*- 2 * Copyright (c) 1997 Poul-Henning Kamp 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp |
27 * $Id: if_plip.c,v 1.7 1999/01/09 18:10:37 nsouch Exp $ | 27 * $Id: if_plip.c,v 1.8 1999/01/23 17:07:49 nsouch Exp $ |
28 */ 29 30/* 31 * Parallel port TCP/IP interfaces added. I looked at the driver from 32 * MACH but this is a complete rewrite, and btw. incompatible, and it 33 * should perform better too. I have never run the MACH driver though. 34 * 35 * This driver sends two bytes (0x08, 0x00) in front of each packet, --- 90 unchanged lines hidden (view full) --- 126#define LPIPHDRLEN 2 /* We send 0x08, 0x00 in front of packet */ 127#define LPIP_SHAKE 0x40 /* This bit toggles between nibble reception */ 128#if !defined(MLPIPHDRLEN) || LPIPHDRLEN > MLPIPHDRLEN 129#define MLPIPHDRLEN LPIPHDRLEN 130#endif 131 132#define LPIPTBLSIZE 256 /* Size of octet translation table */ 133 | 28 */ 29 30/* 31 * Parallel port TCP/IP interfaces added. I looked at the driver from 32 * MACH but this is a complete rewrite, and btw. incompatible, and it 33 * should perform better too. I have never run the MACH driver though. 34 * 35 * This driver sends two bytes (0x08, 0x00) in front of each packet, --- 90 unchanged lines hidden (view full) --- 126#define LPIPHDRLEN 2 /* We send 0x08, 0x00 in front of packet */ 127#define LPIP_SHAKE 0x40 /* This bit toggles between nibble reception */ 128#if !defined(MLPIPHDRLEN) || LPIPHDRLEN > MLPIPHDRLEN 129#define MLPIPHDRLEN LPIPHDRLEN 130#endif 131 132#define LPIPTBLSIZE 256 /* Size of octet translation table */ 133 |
134#ifndef PLIP_DEBUG 135#define lprintf (void) 136#else | |
137#define lprintf if (lptflag) printf | 134#define lprintf if (lptflag) printf |
135 136#ifdef PLIP_DEBUG |
|
138static int volatile lptflag = 1; | 137static int volatile lptflag = 1; |
138#else 139static int volatile lptflag = 0; |
|
139#endif 140 141struct lpt_softc { 142 unsigned short lp_unit; 143 144 struct ppb_device lp_dev; 145 146 struct ifnet sc_if; --- 619 unchanged lines hidden --- | 140#endif 141 142struct lpt_softc { 143 unsigned short lp_unit; 144 145 struct ppb_device lp_dev; 146 147 struct ifnet sc_if; --- 619 unchanged lines hidden --- |