From 7bbde3fb1fe2ff7b5efd1426bdbd435faa950f70 Mon Sep 17 00:00:00 2001 From: ru Date: Fri, 18 Jan 2002 14:33:04 +0000 Subject: Introduce an interface announcement message for the routing socket so that routing daemons and other interested parties know when an interface is attached/detached. PR: kern/33747 Obtained from: NetBSD MFC after: 2 weeks --- sys/net/if.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sys/net/if.h') diff --git a/sys/net/if.h b/sys/net/if.h index 6cc5522..7370e12 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -197,6 +197,21 @@ struct ifma_msghdr { }; /* + * Message format announcing the arrival or departure of a network interface. + */ +struct if_announcemsghdr { + u_short ifan_msglen; /* to skip over non-understood messages */ + u_char ifan_version; /* future binary compatibility */ + u_char ifan_type; /* message type */ + u_short ifan_index; /* index for associated ifp */ + char ifan_name[IFNAMSIZ]; /* if name, e.g. "en0" */ + u_short ifan_what; /* what type of announcement */ +}; + +#define IFAN_ARRIVAL 0 /* interface arrival */ +#define IFAN_DEPARTURE 1 /* interface departure */ + +/* * Interface request structure used for socket * ioctl's. All interface ioctl's must have parameter * definitions which begin with ifr_name. The -- cgit v1.1