atmclip.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* net/atm/atmarp.h - RFC1577 ATM ARP */
  3. /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
  4. #ifndef _ATMCLIP_H
  5. #define _ATMCLIP_H
  6. #include <linux/netdevice.h>
  7. #include <linux/atm.h>
  8. #include <linux/atmdev.h>
  9. #include <linux/atmarp.h>
  10. #include <linux/spinlock.h>
  11. #include <net/neighbour.h>
  12. #define CLIP_VCC(vcc) ((struct clip_vcc *) ((vcc)->user_back))
  13. struct sk_buff;
  14. struct clip_vcc {
  15. struct atm_vcc *vcc; /* VCC descriptor */
  16. struct atmarp_entry *entry; /* ATMARP table entry, NULL if IP addr.
  17. isn't known yet */
  18. int xoff; /* 1 if send buffer is full */
  19. unsigned char encap; /* 0: NULL, 1: LLC/SNAP */
  20. unsigned long last_use; /* last send or receive operation */
  21. unsigned long idle_timeout; /* keep open idle for so many jiffies*/
  22. void (*old_push)(struct atm_vcc *vcc,struct sk_buff *skb);
  23. /* keep old push fn for chaining */
  24. void (*old_pop)(struct atm_vcc *vcc,struct sk_buff *skb);
  25. /* keep old pop fn for chaining */
  26. struct clip_vcc *next; /* next VCC */
  27. };
  28. struct atmarp_entry {
  29. struct clip_vcc *vccs; /* active VCCs; NULL if resolution is
  30. pending */
  31. unsigned long expires; /* entry expiration time */
  32. struct neighbour *neigh; /* neighbour back-pointer */
  33. };
  34. #define PRIV(dev) ((struct clip_priv *) netdev_priv(dev))
  35. struct clip_priv {
  36. int number; /* for convenience ... */
  37. spinlock_t xoff_lock; /* ensures that pop is atomic (SMP) */
  38. struct net_device *next; /* next CLIP interface */
  39. };
  40. #endif