Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
digirp.h
Go to the documentation of this file.
1 /************************************************************************
2  * HP-UX Realport Daemon interface file.
3  *
4  * Copyright (C) 1998, by Digi International. All Rights Reserved.
5  ************************************************************************/
6 
7 #ifndef _DIGIDRP_H
8 #define _DIGIDRP_H
9 
10 /************************************************************************
11  * This file contains defines for the ioctl() interface to
12  * the realport driver. This ioctl() interface is used by the
13  * daemon to set speed setup parameters honored by the driver.
14  ************************************************************************/
15 
16 struct link_struct {
17  int lk_fast_rate; /* Fast line rate to be used
18  when the delay is less-equal
19  to lk_fast_delay */
20 
21  int lk_fast_delay; /* Fast line rate delay in
22  milliseconds */
23 
24  int lk_slow_rate; /* Slow line rate to be used when
25  the delay is greater-equal
26  to lk_slow_delay */
27 
28  int lk_slow_delay; /* Slow line rate delay in
29  milliseconds */
30 
31  int lk_header_size; /* Estimated packet header size
32  when sent across the slowest
33  link. */
34 };
35 
36 #define DIGI_GETLINK _IOW('e', 103, struct link_struct) /* Get link parameters */
37 #define DIGI_SETLINK _IOW('e', 104, struct link_struct) /* Set link parameters */
38 
39 
40 /************************************************************************
41  * This module provides application access to special Digi
42  * serial line enhancements which are not standard UNIX(tm) features.
43  ************************************************************************/
44 
46  unsigned char startc; /* flow cntl start char */
47  unsigned char stopc; /* flow cntl stop char */
48 };
49 
50 /************************************************************************
51  * Values for digi_flags
52  ************************************************************************/
53 #define DIGI_IXON 0x0001 /* Handle IXON in the FEP */
54 #define DIGI_FAST 0x0002 /* Fast baud rates */
55 #define RTSPACE 0x0004 /* RTS input flow control */
56 #define CTSPACE 0x0008 /* CTS output flow control */
57 #define DSRPACE 0x0010 /* DSR output flow control */
58 #define DCDPACE 0x0020 /* DCD output flow control */
59 #define DTRPACE 0x0040 /* DTR input flow control */
60 #define DIGI_COOK 0x0080 /* Cooked processing done in FEP */
61 #define DIGI_FORCEDCD 0x0100 /* Force carrier */
62 #define DIGI_ALTPIN 0x0200 /* Alternate RJ-45 pin config */
63 #define DIGI_AIXON 0x0400 /* Aux flow control in fep */
64 #define DIGI_PRINTER 0x0800 /* Hold port open for flow cntrl */
65 #define DIGI_PP_INPUT 0x1000 /* Change parallel port to input */
66 #define DIGI_422 0x4000 /* Change parallel port to input */
67 #define DIGI_RTS_TOGGLE 0x8000 /* Support RTS Toggle */
68 
69 
70 /************************************************************************
71  * Values associated with transparent print
72  ************************************************************************/
73 #define DIGI_PLEN 8 /* String length */
74 #define DIGI_TSIZ 10 /* Terminal string len */
75 
76 
77 /************************************************************************
78  * Structure used with ioctl commands for DIGI parameters.
79  ************************************************************************/
80 struct digi_struct {
81  unsigned short digi_flags; /* Flags (see above) */
82  unsigned short digi_maxcps; /* Max printer CPS */
83  unsigned short digi_maxchar; /* Max chars in print queue */
84  unsigned short digi_bufsize; /* Buffer size */
85  unsigned char digi_onlen; /* Length of ON string */
86  unsigned char digi_offlen; /* Length of OFF string */
87  char digi_onstr[DIGI_PLEN]; /* Printer on string */
88  char digi_offstr[DIGI_PLEN]; /* Printer off string */
89  char digi_term[DIGI_TSIZ]; /* terminal string */
90 };
91 
92 /************************************************************************
93  * Ioctl command arguments for DIGI parameters.
94  ************************************************************************/
95 /* Read params */
96 #define DIGI_GETA _IOR('e', 94, struct digi_struct)
97 
98 /* Set params */
99 #define DIGI_SETA _IOW('e', 95, struct digi_struct)
100 
101 /* Drain & set params */
102 #define DIGI_SETAW _IOW('e', 96, struct digi_struct)
103 
104 /* Drain, flush & set params */
105 #define DIGI_SETAF _IOW('e', 97, struct digi_struct)
106 
107 /* Get startc/stopc flow control characters */
108 #define DIGI_GETFLOW _IOR('e', 99, struct digiflow_struct)
109 
110 /* Set startc/stopc flow control characters */
111 #define DIGI_SETFLOW _IOW('e', 100, struct digiflow_struct)
112 
113 /* Get Aux. startc/stopc flow control chars */
114 #define DIGI_GETAFLOW _IOR('e', 101, struct digiflow_struct)
115 
116 /* Set Aux. startc/stopc flow control chars */
117 #define DIGI_SETAFLOW _IOW('e', 102, struct digiflow_struct)
118 
119 /* Set integer baud rate */
120 #define DIGI_SETCUSTOMBAUD _IOW('e', 106, int)
121 
122 /* Get integer baud rate */
123 #define DIGI_GETCUSTOMBAUD _IOR('e', 107, int)
124 
125 #define DIGI_GEDELAY _IOR('d', 246, int) /* Get edelay */
126 #define DIGI_SEDELAY _IOW('d', 247, int) /* Get edelay */
127 
128 
129 #endif /* _DIGIDRP_H */