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

TOMOYO Linux Cross Reference
Linux/include/linux/if_frad.h

Version: ~ [ linux-5.6 ] ~ [ linux-5.5.13 ] ~ [ linux-5.4.28 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.113 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.174 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.217 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.217 ] ~ [ 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.82 ] ~ [ 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.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  * DLCI/FRAD    Definitions for Frame Relay Access Devices.  DLCI devices are
  3  *              created for each DLCI associated with a FRAD.  The FRAD driver
  4  *              is not truly a network device, but the lower level device
  5  *              handler.  This allows other FRAD manufacturers to use the DLCI
  6  *              code, including its RFC1490 encapsulation alongside the current
  7  *              implementation for the Sangoma cards.
  8  *
  9  * Version:     @(#)if_ifrad.h  0.15    31 Mar 96
 10  *
 11  * Author:      Mike McLagan <mike.mclagan@linux.org>
 12  *
 13  * Changes:
 14  *              0.15    Mike McLagan    changed structure defs (packed)
 15  *                                      re-arranged flags
 16  *                                      added DLCI_RET vars
 17  *
 18  *              This program is free software; you can redistribute it and/or
 19  *              modify it under the terms of the GNU General Public License
 20  *              as published by the Free Software Foundation; either version
 21  *              2 of the License, or (at your option) any later version.
 22  */
 23 #ifndef _FRAD_H_
 24 #define _FRAD_H_
 25 
 26 #include <uapi/linux/if_frad.h>
 27 
 28 
 29 #if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
 30 
 31 /* these are the fields of an RFC 1490 header */
 32 struct frhdr
 33 {
 34    unsigned char  control;
 35 
 36    /* for IP packets, this can be the NLPID */
 37    unsigned char  pad;
 38 
 39    unsigned char  NLPID;
 40    unsigned char  OUI[3];
 41    __be16 PID;
 42 
 43 #define IP_NLPID pad 
 44 } __packed;
 45 
 46 /* see RFC 1490 for the definition of the following */
 47 #define FRAD_I_UI               0x03
 48 
 49 #define FRAD_P_PADDING          0x00
 50 #define FRAD_P_Q933             0x08
 51 #define FRAD_P_SNAP             0x80
 52 #define FRAD_P_CLNP             0x81
 53 #define FRAD_P_IP               0xCC
 54 
 55 struct dlci_local
 56 {
 57    struct net_device      *master;
 58    struct net_device      *slave;
 59    struct dlci_conf       config;
 60    int                    configured;
 61    struct list_head       list;
 62 
 63    /* callback function */
 64    void              (*receive)(struct sk_buff *skb, struct net_device *);
 65 };
 66 
 67 struct frad_local
 68 {
 69    struct net_device_stats stats;
 70 
 71    /* devices which this FRAD is slaved to */
 72    struct net_device     *master[CONFIG_DLCI_MAX];
 73    short             dlci[CONFIG_DLCI_MAX];
 74 
 75    struct frad_conf  config;
 76    int               configured;        /* has this device been configured */
 77    int               initialized;       /* mem_start, port, irq set ? */
 78 
 79    /* callback functions */
 80    int               (*activate)(struct net_device *, struct net_device *);
 81    int               (*deactivate)(struct net_device *, struct net_device *);
 82    int               (*assoc)(struct net_device *, struct net_device *);
 83    int               (*deassoc)(struct net_device *, struct net_device *);
 84    int               (*dlci_conf)(struct net_device *, struct net_device *, int get);
 85 
 86    /* fields that are used by the Sangoma SDLA cards */
 87    struct timer_list timer;
 88    int               type;              /* adapter type */
 89    int               state;             /* state of the S502/8 control latch */
 90    int               buffer;            /* current buffer for S508 firmware */
 91 };
 92 
 93 #endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */
 94 
 95 extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *));
 96 
 97 #endif
 98 

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