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

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

Version: ~ [ linux-5.8 ] ~ [ linux-5.7.14 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.57 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.138 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.193 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.232 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.232 ] ~ [ 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.85 ] ~ [ 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-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 #include <linux/miscdevice.h>
 19 
 20 /************************ CONSTANTS & MACROS ************************/
 21 
 22 /* IrNET control channel stuff */
 23 #define IRNET_MAX_COMMAND       256     /* Max length of a command line */
 24 
 25 /* PPP hardcore stuff */
 26 
 27 /* Bits in rbits (PPP flags in irnet struct) */
 28 #define SC_RCV_BITS     (SC_RCV_B7_1|SC_RCV_B7_0|SC_RCV_ODDP|SC_RCV_EVNP)
 29 
 30 /* Bit numbers in busy */
 31 #define XMIT_BUSY       0
 32 #define RECV_BUSY       1
 33 #define XMIT_WAKEUP     2
 34 #define XMIT_FULL       3
 35 
 36 /* Queue management */
 37 #define PPPSYNC_MAX_RQLEN       32      /* arbitrary */
 38 
 39 /****************************** TYPES ******************************/
 40 
 41 
 42 /**************************** PROTOTYPES ****************************/
 43 
 44 /* ----------------------- CONTROL CHANNEL ----------------------- */
 45 static inline ssize_t
 46         irnet_ctrl_write(irnet_socket *,
 47                          const char *,
 48                          size_t);
 49 static inline ssize_t
 50         irnet_ctrl_read(irnet_socket *,
 51                         struct file *,
 52                         char *,
 53                         size_t);
 54 static inline unsigned int
 55         irnet_ctrl_poll(irnet_socket *,
 56                         struct file *,
 57                         poll_table *);
 58 /* ----------------------- CHARACTER DEVICE ----------------------- */
 59 static int
 60         dev_irnet_open(struct inode *,  /* fs callback : open */
 61                        struct file *),
 62         dev_irnet_close(struct inode *,
 63                         struct file *);
 64 static ssize_t
 65         dev_irnet_write(struct file *,
 66                         const char __user *,
 67                         size_t,
 68                         loff_t *),
 69         dev_irnet_read(struct file *,
 70                        char __user *,
 71                        size_t,
 72                        loff_t *);
 73 static unsigned int
 74         dev_irnet_poll(struct file *,
 75                        poll_table *);
 76 static long
 77         dev_irnet_ioctl(struct file *,
 78                         unsigned int,
 79                         unsigned long);
 80 /* ------------------------ PPP INTERFACE ------------------------ */
 81 static inline struct sk_buff *
 82         irnet_prepare_skb(irnet_socket *,
 83                           struct sk_buff *);
 84 static int
 85         ppp_irnet_send(struct ppp_channel *,
 86                       struct sk_buff *);
 87 static int
 88         ppp_irnet_ioctl(struct ppp_channel *,
 89                         unsigned int,
 90                         unsigned long);
 91 
 92 /**************************** VARIABLES ****************************/
 93 
 94 /* Filesystem callbacks (to call us) */
 95 static const struct file_operations irnet_device_fops =
 96 {
 97         .owner          = THIS_MODULE,
 98         .read           = dev_irnet_read,
 99         .write          = dev_irnet_write,
100         .poll           = dev_irnet_poll,
101         .unlocked_ioctl = dev_irnet_ioctl,
102         .open           = dev_irnet_open,
103         .release        = dev_irnet_close,
104         .llseek         = noop_llseek,
105   /* Also : llseek, readdir, mmap, flush, fsync, fasync, lock, readv, writev */
106 };
107 
108 /* Structure so that the misc major (drivers/char/misc.c) take care of us... */
109 static struct miscdevice irnet_misc_device =
110 {
111         .minor = IRNET_MINOR,
112         .name = "irnet",
113         .fops = &irnet_device_fops
114 };
115 
116 #endif /* IRNET_PPP_H */
117 

~ [ 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