Deleted Added
full compact
ng_tty.c (52441) ng_tty.c (52442)
1
2/*
3 * ng_tty.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

--- 22 unchanged lines hidden (view full) ---

31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
35 * OF SUCH DAMAGE.
36 *
37 * Author: Archie Cobbs <archie@whistle.com>
38 *
1
2/*
3 * ng_tty.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

--- 22 unchanged lines hidden (view full) ---

31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
35 * OF SUCH DAMAGE.
36 *
37 * Author: Archie Cobbs <archie@whistle.com>
38 *
39 * $FreeBSD: head/sys/netgraph/ng_tty.c 52441 1999-10-23 04:28:11Z julian $
39 * $FreeBSD: head/sys/netgraph/ng_tty.c 52442 1999-10-23 04:52:54Z julian $
40 * $Whistle: ng_tty.c,v 1.18 1999/01/28 23:54:54 julian Exp $
41 */
42
43/*
44 * This file implements a terminal line discipline that is also a
45 * netgraph node. Installing this line discipline on a terminal device
46 * instantiates a new netgraph node of this type, which allows access
47 * to the device via the "hook" hook of the node.

--- 126 unchanged lines hidden (view full) ---

174 ngt_rcvdata,
175 ngt_rcvdata,
176 ngt_disconnect,
177};
178NETGRAPH_INIT(tty, &typestruct);
179
180static int ngt_unit;
181static int ngt_nodeop_ok; /* OK to create/remove node */
40 * $Whistle: ng_tty.c,v 1.18 1999/01/28 23:54:54 julian Exp $
41 */
42
43/*
44 * This file implements a terminal line discipline that is also a
45 * netgraph node. Installing this line discipline on a terminal device
46 * instantiates a new netgraph node of this type, which allows access
47 * to the device via the "hook" hook of the node.

--- 126 unchanged lines hidden (view full) ---

174 ngt_rcvdata,
175 ngt_rcvdata,
176 ngt_disconnect,
177};
178NETGRAPH_INIT(tty, &typestruct);
179
180static int ngt_unit;
181static int ngt_nodeop_ok; /* OK to create/remove node */
182static int ngt_ldisc;
182
183/******************************************************************
184 LINE DISCIPLINE METHODS
185******************************************************************/
186
187/*
188 * Set our line discipline on the tty.
189 * Called from device open routine or ttioctl() at >= splsofttty()

--- 460 unchanged lines hidden (view full) ---

650******************************************************************/
651
652/*
653 * Handle loading and unloading for this node type
654 */
655static int
656ngt_mod_event(module_t mod, int event, void *data)
657{
183
184/******************************************************************
185 LINE DISCIPLINE METHODS
186******************************************************************/
187
188/*
189 * Set our line discipline on the tty.
190 * Called from device open routine or ttioctl() at >= splsofttty()

--- 460 unchanged lines hidden (view full) ---

651******************************************************************/
652
653/*
654 * Handle loading and unloading for this node type
655 */
656static int
657ngt_mod_event(module_t mod, int event, void *data)
658{
658 struct ng_type *const type = data;
659 /* struct ng_type *const type = data;*/
659 int s, error = 0;
660
661 switch (event) {
662 case MOD_LOAD:
663#ifdef __i386__
664 /* Insure the soft net "engine" can't run during spltty code */
665 s = splhigh();
666 tty_imask |= softnet_imask; /* spltty() block spl[soft]net() */

--- 36 unchanged lines hidden ---
660 int s, error = 0;
661
662 switch (event) {
663 case MOD_LOAD:
664#ifdef __i386__
665 /* Insure the soft net "engine" can't run during spltty code */
666 s = splhigh();
667 tty_imask |= softnet_imask; /* spltty() block spl[soft]net() */

--- 36 unchanged lines hidden ---