neighbour.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef __LINUX_NEIGHBOUR_H
  2. #define __LINUX_NEIGHBOUR_H
  3. #include <linux/netlink.h>
  4. struct ndmsg
  5. {
  6. __u8 ndm_family;
  7. __u8 ndm_pad1;
  8. __u16 ndm_pad2;
  9. __s32 ndm_ifindex;
  10. __u16 ndm_state;
  11. __u8 ndm_flags;
  12. __u8 ndm_type;
  13. };
  14. enum
  15. {
  16. NDA_UNSPEC,
  17. NDA_DST,
  18. NDA_LLADDR,
  19. NDA_CACHEINFO,
  20. NDA_PROBES,
  21. __NDA_MAX
  22. };
  23. #define NDA_MAX (__NDA_MAX - 1)
  24. /*
  25. * Neighbor Cache Entry Flags
  26. */
  27. #define NTF_PROXY 0x08 /* == ATF_PUBL */
  28. #define NTF_ROUTER 0x80
  29. /*
  30. * Neighbor Cache Entry States.
  31. */
  32. #define NUD_INCOMPLETE 0x01
  33. #define NUD_REACHABLE 0x02
  34. #define NUD_STALE 0x04
  35. #define NUD_DELAY 0x08
  36. #define NUD_PROBE 0x10
  37. #define NUD_FAILED 0x20
  38. /* Dummy states */
  39. #define NUD_NOARP 0x40
  40. #define NUD_PERMANENT 0x80
  41. #define NUD_NONE 0x00
  42. /* NUD_NOARP & NUD_PERMANENT are pseudostates, they never change
  43. and make no address resolution or NUD.
  44. NUD_PERMANENT is also cannot be deleted by garbage collectors.
  45. */
  46. struct nda_cacheinfo
  47. {
  48. __u32 ndm_confirmed;
  49. __u32 ndm_used;
  50. __u32 ndm_updated;
  51. __u32 ndm_refcnt;
  52. };
  53. #endif