Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* net/atm/atmarp.h - RFC1577 ATM ARP */
0003  
0004 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
0005  
0006  
0007 #ifndef _ATMCLIP_H
0008 #define _ATMCLIP_H
0009 
0010 #include <linux/netdevice.h>
0011 #include <linux/atm.h>
0012 #include <linux/atmdev.h>
0013 #include <linux/atmarp.h>
0014 #include <linux/spinlock.h>
0015 #include <net/neighbour.h>
0016 
0017 
0018 #define CLIP_VCC(vcc) ((struct clip_vcc *) ((vcc)->user_back))
0019 
0020 struct sk_buff;
0021 
0022 struct clip_vcc {
0023     struct atm_vcc  *vcc;       /* VCC descriptor */
0024     struct atmarp_entry *entry; /* ATMARP table entry, NULL if IP addr.
0025                        isn't known yet */
0026     int     xoff;       /* 1 if send buffer is full */
0027     unsigned char   encap;      /* 0: NULL, 1: LLC/SNAP */
0028     unsigned long   last_use;   /* last send or receive operation */
0029     unsigned long   idle_timeout;   /* keep open idle for so many jiffies*/
0030     void (*old_push)(struct atm_vcc *vcc,struct sk_buff *skb);
0031                     /* keep old push fn for chaining */
0032     void (*old_pop)(struct atm_vcc *vcc,struct sk_buff *skb);
0033                     /* keep old pop fn for chaining */
0034     struct clip_vcc *next;      /* next VCC */
0035 };
0036 
0037 
0038 struct atmarp_entry {
0039     struct clip_vcc *vccs;      /* active VCCs; NULL if resolution is
0040                        pending */
0041     unsigned long   expires;    /* entry expiration time */
0042     struct neighbour *neigh;    /* neighbour back-pointer */
0043 };
0044 
0045 #define PRIV(dev) ((struct clip_priv *) netdev_priv(dev))
0046 
0047 struct clip_priv {
0048     int number;         /* for convenience ... */
0049     spinlock_t xoff_lock;       /* ensures that pop is atomic (SMP) */
0050     struct net_device *next;    /* next CLIP interface */
0051 };
0052 
0053 #endif