18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _NET_EVENT_H
38c2ecf20Sopenharmony_ci#define _NET_EVENT_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci/*
68c2ecf20Sopenharmony_ci *	Generic netevent notifiers
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci *	Authors:
98c2ecf20Sopenharmony_ci *      Tom Tucker              <tom@opengridcomputing.com>
108c2ecf20Sopenharmony_ci *      Steve Wise              <swise@opengridcomputing.com>
118c2ecf20Sopenharmony_ci *
128c2ecf20Sopenharmony_ci * 	Changes:
138c2ecf20Sopenharmony_ci */
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_cistruct dst_entry;
168c2ecf20Sopenharmony_cistruct neighbour;
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_cistruct netevent_redirect {
198c2ecf20Sopenharmony_ci	struct dst_entry *old;
208c2ecf20Sopenharmony_ci	struct dst_entry *new;
218c2ecf20Sopenharmony_ci	struct neighbour *neigh;
228c2ecf20Sopenharmony_ci	const void *daddr;
238c2ecf20Sopenharmony_ci};
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_cienum netevent_notif_type {
268c2ecf20Sopenharmony_ci	NETEVENT_NEIGH_UPDATE = 1, /* arg is struct neighbour ptr */
278c2ecf20Sopenharmony_ci	NETEVENT_REDIRECT,	   /* arg is struct netevent_redirect ptr */
288c2ecf20Sopenharmony_ci	NETEVENT_DELAY_PROBE_TIME_UPDATE, /* arg is struct neigh_parms ptr */
298c2ecf20Sopenharmony_ci	NETEVENT_IPV4_MPATH_HASH_UPDATE, /* arg is struct net ptr */
308c2ecf20Sopenharmony_ci	NETEVENT_IPV6_MPATH_HASH_UPDATE, /* arg is struct net ptr */
318c2ecf20Sopenharmony_ci	NETEVENT_IPV4_FWD_UPDATE_PRIORITY_UPDATE, /* arg is struct net ptr */
328c2ecf20Sopenharmony_ci};
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciint register_netevent_notifier(struct notifier_block *nb);
358c2ecf20Sopenharmony_ciint unregister_netevent_notifier(struct notifier_block *nb);
368c2ecf20Sopenharmony_ciint call_netevent_notifiers(unsigned long val, void *v);
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#endif
39