~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/irda/irnet/irnet_ppp.h

Version: ~ [ linux-5.2 ] ~ [ linux-5.1.16 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.57 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.132 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.184 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.184 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.69 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *      IrNET protocol module : Synchronous PPP over an IrDA socket.
  3  *
  4  *              Jean II - HPL `00 - <jt@hpl.hp.com>
  5  *
  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
  9  * what's in there...
 10  */
 11 
 12 #ifndef IRNET_PPP_H
 13 #define IRNET_PPP_H
 14 
 15 /***************************** INCLUDES *****************************/
 16 
 17 #include "irnet.h"              /* Module global include */
 18 
 19 /************************ CONSTANTS & MACROS ************************/
 20 
 21 /* /dev/irnet file constants */
 22 #define IRNET_MAJOR     10      /* Misc range */
 23 #define IRNET_MINOR     187     /* Official allocation */
 24 
 25 /* IrNET control channel stuff */
 26 #define IRNET_MAX_COMMAND       256     /* Max length of a command line */
 27 
 28 /* PPP hardcore stuff */
 29 
 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)
 32 
 33 /* Bit numbers in busy */
 34 #define XMIT_BUSY       0
 35 #define RECV_BUSY       1
 36 #define XMIT_WAKEUP     2
 37 #define XMIT_FULL       3
 38 
 39 /* Queue management */
 40 #define PPPSYNC_MAX_RQLEN       32      /* arbitrary */
 41 
 42 /****************************** TYPES ******************************/
 43 
 44 
 45 /**************************** PROTOTYPES ****************************/
 46 
 47 /* ----------------------- CONTROL CHANNEL ----------------------- */
 48 static inline ssize_t
 49         irnet_ctrl_write(irnet_socket *,
 50                          const char *,
 51                          size_t);
 52 static inline ssize_t
 53         irnet_ctrl_read(irnet_socket *,
 54                         struct file *,
 55                         char *,
 56                         size_t);
 57 static inline unsigned int
 58         irnet_ctrl_poll(irnet_socket *,
 59                         struct file *,
 60                         poll_table *);
 61 /* ----------------------- CHARACTER DEVICE ----------------------- */
 62 static int
 63         dev_irnet_open(struct inode *,  /* fs callback : open */
 64                        struct file *),
 65         dev_irnet_close(struct inode *,
 66                         struct file *);
 67 static ssize_t
 68         dev_irnet_write(struct file *,
 69                         const char __user *,
 70                         size_t,
 71                         loff_t *),
 72         dev_irnet_read(struct file *,
 73                        char __user *,
 74                        size_t,
 75                        loff_t *);
 76 static unsigned int
 77         dev_irnet_poll(struct file *,
 78                        poll_table *);
 79 static long
 80         dev_irnet_ioctl(struct file *,
 81                         unsigned int,
 82                         unsigned long);
 83 /* ------------------------ PPP INTERFACE ------------------------ */
 84 static inline struct sk_buff *
 85         irnet_prepare_skb(irnet_socket *,
 86                           struct sk_buff *);
 87 static int
 88         ppp_irnet_send(struct ppp_channel *,
 89                       struct sk_buff *);
 90 static int
 91         ppp_irnet_ioctl(struct ppp_channel *,
 92                         unsigned int,
 93                         unsigned long);
 94 
 95 /**************************** VARIABLES ****************************/
 96 
 97 /* Filesystem callbacks (to call us) */
 98 static const struct file_operations irnet_device_fops =
 99 {
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 */
109 };
110 
111 /* Structure so that the misc major (drivers/char/misc.c) take care of us... */
112 static struct miscdevice irnet_misc_device =
113 {
114         IRNET_MINOR,
115         "irnet",
116         &irnet_device_fops
117 };
118 
119 #endif /* IRNET_PPP_H */
120 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp