File: irvtd.h

package info (click to toggle)
kernel-source-2.2.1 2.2.1-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 61,788 kB
  • ctags: 188,316
  • sloc: ansic: 1,114,164; asm: 49,922; makefile: 8,185; sh: 1,745; perl: 856; tcl: 409; lisp: 218; cpp: 186; awk: 133; sed: 72
file content (104 lines) | stat: -rw-r--r-- 2,606 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*********************************************************************
 *                
 * Filename:      irvtd.h
 * Version:       0.1
 * Sources:       irlpt.h
 * 
 *     Copyright (c) 1998, Takahide Higuchi <thiguchi@pluto.dti.ne.jp>,
 *     All Rights Reserved.
 *     
 *     This program is free software; you can redistribute it and/or 
 *     modify it under the terms of the GNU General Public License as 
 *     published by the Free Software Foundation; either version 2 of 
 *     the License, or (at your option) any later version.
 *
 *     I, Takahide Higuchi, provide no warranty for any of this software.
 *     This material is provided "AS-IS" and at no charge.
 *
 ********************************************************************/

#ifndef IRCOMM_H
#define IRCOMM_H

#include <linux/types.h>
#include <linux/ioctl.h>
#include <linux/tqueue.h>

#include <net/irda/irmod.h>
#include <net/irda/qos.h>
#include <net/irda/ircomm_common.h>


#define IRVTD_MAGIC 0xff545943  /* random */
#define COMM_MAX_TTY 1
#define IRVTD_RX_QUEUE_HIGH 10
#define IRVTD_RX_QUEUE_LOW  2


/*
 * Serial input interrupt line counters -- external structure
 * Four lines can interrupt: CTS, DSR, RI, DCD
 *
 * this structure must be compatible with serial_icounter_struct defined in
 * <linux/serial.h>.
 */
struct icounter_struct {
        int cts, dsr, rng, dcd;
        int reserved[16];
};

struct irvtd_cb {

        int magic;          /* magic used to detect corruption of the struct */

	/* if daddr is NULL, remote device have not been discovered yet */

	int rx_disable;
	struct sk_buff *txbuff;     /* buffer queue */
	struct sk_buff_head rxbuff;     /* buffer queue */
	struct ircomm_cb *comm;     /* ircomm instance */

	/* 
	 * These members are used for compatibility with usual serial device.
	 * See linux/serial.h
	 */

	int baud_base;
	int flags;
	struct tty_struct *tty;

	int line;
	int count;                /* open count */
	int blocked_open;
	struct wait_queue       *open_wait;
	struct wait_queue       *close_wait;
	struct wait_queue       *delta_msr_wait;
	struct wait_queue       *tx_wait;

	struct tq_struct        rx_tqueue;

	long pgrp;
	long session;  
	struct termios normal_termios;
	struct termios callout_termios;
	unsigned short  closing_wait;     /* time to wait before closing */
	unsigned short  close_delay;
	
	int mcr;
	int msr;
	int cts_stoptx;
	int ttp_stoptx;
	int ttp_stoprx;
	struct icounter_struct icount;
	int read_status_mask;
	int ignore_status_mask;
};


/* Debug function */

/* #define CHECK_SKB(skb) check_skb((skb),  __LINE__,__FILE__) */



#endif