atmclip.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #define NEIGH2ENTRY(neigh) ((struct atmarp_entry *) (neigh)->primary_key)
  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. __be32 ip; /* IP address */
  30. struct clip_vcc *vccs; /* active VCCs; NULL if resolution is
  31. pending */
  32. unsigned long expires; /* entry expiration time */
  33. struct neighbour *neigh; /* neighbour back-pointer */
  34. };
  35. #define PRIV(dev) ((struct clip_priv *) netdev_priv(dev))
  36. struct clip_priv {
  37. int number; /* for convenience ... */
  38. spinlock_t xoff_lock; /* ensures that pop is atomic (SMP) */
  39. struct net_device_stats stats;
  40. struct net_device *next; /* next CLIP interface */
  41. };
  42. #ifdef __KERNEL__
  43. extern struct neigh_table *clip_tbl_hook;
  44. #endif
  45. #endif