atmclip.h 1.4 KB

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