#include <linux/errno.h>
#include <linux/etherdevice.h>
#include <linux/hdlc.h>
#include <linux/if_arp.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pkt_sched.h>
#include <linux/poll.h>
#include <linux/rtnetlink.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#undef DEBUG_PKT
#undef DEBUG_ECN
#undef DEBUG_LINK
#undef DEBUG_PROTO
#undef DEBUG_PVC
#define FR_UI …
#define FR_PAD …
#define NLPID_IP …
#define NLPID_IPV6 …
#define NLPID_SNAP …
#define NLPID_PAD …
#define NLPID_CCITT_ANSI_LMI …
#define NLPID_CISCO_LMI …
#define LMI_CCITT_ANSI_DLCI …
#define LMI_CISCO_DLCI …
#define LMI_CALLREF …
#define LMI_ANSI_LOCKSHIFT …
#define LMI_ANSI_CISCO_REPTYPE …
#define LMI_CCITT_REPTYPE …
#define LMI_ANSI_CISCO_ALIVE …
#define LMI_CCITT_ALIVE …
#define LMI_ANSI_CISCO_PVCSTAT …
#define LMI_CCITT_PVCSTAT …
#define LMI_FULLREP …
#define LMI_INTEGRITY …
#define LMI_SINGLE …
#define LMI_STATUS_ENQUIRY …
#define LMI_STATUS …
#define LMI_REPT_LEN …
#define LMI_INTEG_LEN …
#define LMI_CCITT_CISCO_LENGTH …
#define LMI_ANSI_LENGTH …
struct fr_hdr { … } __packed;
struct pvc_device { … };
struct frad_state { … };
static int fr_ioctl(struct net_device *dev, struct if_settings *ifs);
static inline u16 q922_to_dlci(u8 *hdr)
{ … }
static inline void dlci_to_q922(u8 *hdr, u16 dlci)
{ … }
static inline struct frad_state *state(hdlc_device *hdlc)
{ … }
static inline struct pvc_device *find_pvc(hdlc_device *hdlc, u16 dlci)
{ … }
static struct pvc_device *add_pvc(struct net_device *dev, u16 dlci)
{ … }
static inline int pvc_is_used(struct pvc_device *pvc)
{ … }
static inline void pvc_carrier(int on, struct pvc_device *pvc)
{ … }
static inline void delete_unused_pvcs(hdlc_device *hdlc)
{ … }
static inline struct net_device **get_dev_p(struct pvc_device *pvc,
int type)
{ … }
static int fr_hard_header(struct sk_buff *skb, u16 dlci)
{ … }
static int pvc_open(struct net_device *dev)
{ … }
static int pvc_close(struct net_device *dev)
{ … }
static int pvc_ioctl(struct net_device *dev, struct if_settings *ifs)
{ … }
static netdev_tx_t pvc_xmit(struct sk_buff *skb, struct net_device *dev)
{ … }
static inline void fr_log_dlci_active(struct pvc_device *pvc)
{ … }
static inline u8 fr_lmi_nextseq(u8 x)
{ … }
static void fr_lmi_send(struct net_device *dev, int fullrep)
{ … }
static void fr_set_link_state(int reliable, struct net_device *dev)
{ … }
static void fr_timer(struct timer_list *t)
{ … }
static int fr_lmi_recv(struct net_device *dev, struct sk_buff *skb)
{ … }
static int fr_snap_parse(struct sk_buff *skb, struct pvc_device *pvc)
{ … }
static int fr_rx(struct sk_buff *skb)
{ … }
static void fr_start(struct net_device *dev)
{ … }
static void fr_stop(struct net_device *dev)
{ … }
static void fr_close(struct net_device *dev)
{ … }
static void pvc_setup(struct net_device *dev)
{ … }
static const struct net_device_ops pvc_ops = …;
static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)
{ … }
static int fr_del_pvc(hdlc_device *hdlc, unsigned int dlci, int type)
{ … }
static void fr_destroy(struct net_device *frad)
{ … }
static struct hdlc_proto proto = …;
static int fr_ioctl(struct net_device *dev, struct if_settings *ifs)
{ … }
static int __init hdlc_fr_init(void)
{ … }
static void __exit hdlc_fr_exit(void)
{ … }
module_init(…) …;
module_exit(hdlc_fr_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;