netevent.h 794 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef _NET_EVENT_H
  2. #define _NET_EVENT_H
  3. /*
  4. * Generic netevent notifiers
  5. *
  6. * Authors:
  7. * Tom Tucker <tom@opengridcomputing.com>
  8. * Steve Wise <swise@opengridcomputing.com>
  9. *
  10. * Changes:
  11. */
  12. struct dst_entry;
  13. struct neighbour;
  14. struct netevent_redirect {
  15. struct dst_entry *old;
  16. struct neighbour *old_neigh;
  17. struct dst_entry *new;
  18. struct neighbour *new_neigh;
  19. const void *daddr;
  20. };
  21. enum netevent_notif_type {
  22. NETEVENT_NEIGH_UPDATE = 1, /* arg is struct neighbour ptr */
  23. NETEVENT_REDIRECT, /* arg is struct netevent_redirect ptr */
  24. };
  25. extern int register_netevent_notifier(struct notifier_block *nb);
  26. extern int unregister_netevent_notifier(struct notifier_block *nb);
  27. extern int call_netevent_notifiers(unsigned long val, void *v);
  28. #endif