netevent.h 910 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _NET_EVENT_H
  3. #define _NET_EVENT_H
  4. /*
  5. * Generic netevent notifiers
  6. *
  7. * Authors:
  8. * Tom Tucker <tom@opengridcomputing.com>
  9. * Steve Wise <swise@opengridcomputing.com>
  10. *
  11. * Changes:
  12. */
  13. struct dst_entry;
  14. struct neighbour;
  15. struct netevent_redirect {
  16. struct dst_entry *old;
  17. struct dst_entry *new;
  18. struct neighbour *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. NETEVENT_DELAY_PROBE_TIME_UPDATE, /* arg is struct neigh_parms ptr */
  25. NETEVENT_MULTIPATH_HASH_UPDATE, /* arg is struct net ptr */
  26. };
  27. int register_netevent_notifier(struct notifier_block *nb);
  28. int unregister_netevent_notifier(struct notifier_block *nb);
  29. int call_netevent_notifiers(unsigned long val, void *v);
  30. #endif