2 * IrNET protocol module : Synchronous PPP over an IrDA socket.
4 * Jean II - HPL `00 - <jt@hpl.hp.com>
6 * This file contains all definitions and declarations necessary for the
7 * PPP part of the IrNET module.
8 * This file is a private header, so other modules don't want to know
15 /***************************** INCLUDES *****************************/
17 #include "irnet.h" /* Module global include */
19 /************************ CONSTANTS & MACROS ************************/
21 /* /dev/irnet file constants */
22 #define IRNET_MAJOR 10 /* Misc range */
23 #define IRNET_MINOR 187 /* Official allocation */
25 /* IrNET control channel stuff */
26 #define IRNET_MAX_COMMAND 256 /* Max length of a command line */
28 /* PPP hardcore stuff */
30 /* Bits in rbits (PPP flags in irnet struct) */
31 #define SC_RCV_BITS (SC_RCV_B7_1|SC_RCV_B7_0|SC_RCV_ODDP|SC_RCV_EVNP)
33 /* Bit numbers in busy */
39 /* Queue management */
40 #define PPPSYNC_MAX_RQLEN 32 /* arbitrary */
42 /****************************** TYPES ******************************/
45 /**************************** PROTOTYPES ****************************/
47 /* ----------------------- CONTROL CHANNEL ----------------------- */
49 irnet_ctrl_write(irnet_socket
*,
53 irnet_ctrl_read(irnet_socket
*,
57 static inline unsigned int
58 irnet_ctrl_poll(irnet_socket
*,
61 /* ----------------------- CHARACTER DEVICE ----------------------- */
63 dev_irnet_open(struct inode
*, /* fs callback : open */
65 dev_irnet_close(struct inode
*,
68 dev_irnet_write(struct file
*,
72 dev_irnet_read(struct file
*,
77 dev_irnet_poll(struct file
*,
80 dev_irnet_ioctl(struct file
*,
83 /* ------------------------ PPP INTERFACE ------------------------ */
84 static inline struct sk_buff
*
85 irnet_prepare_skb(irnet_socket
*,
88 ppp_irnet_send(struct ppp_channel
*,
91 ppp_irnet_ioctl(struct ppp_channel
*,
95 /**************************** VARIABLES ****************************/
97 /* Filesystem callbacks (to call us) */
98 static const struct file_operations irnet_device_fops
=
100 .owner
= THIS_MODULE
,
101 .read
= dev_irnet_read
,
102 .write
= dev_irnet_write
,
103 .poll
= dev_irnet_poll
,
104 .unlocked_ioctl
= dev_irnet_ioctl
,
105 .open
= dev_irnet_open
,
106 .release
= dev_irnet_close
,
107 .llseek
= noop_llseek
,
108 /* Also : llseek, readdir, mmap, flush, fsync, fasync, lock, readv, writev */
111 /* Structure so that the misc major (drivers/char/misc.c) take care of us... */
112 static struct miscdevice irnet_misc_device
=
119 #endif /* IRNET_PPP_H */