notifier.h revision 271127
1228753Smm/*- 2228753Smm * Copyright (c) 2010 Isilon Systems, Inc. 3228753Smm * Copyright (c) 2010 iX Systems, Inc. 4228753Smm * Copyright (c) 2010 Panasas, Inc. 5228753Smm * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. 6228753Smm * All rights reserved. 7228753Smm * 8228753Smm * Redistribution and use in source and binary forms, with or without 9228753Smm * modification, are permitted provided that the following conditions 10228753Smm * are met: 11228753Smm * 1. Redistributions of source code must retain the above copyright 12228753Smm * notice unmodified, this list of conditions, and the following 13228753Smm * disclaimer. 14228753Smm * 2. Redistributions in binary form must reproduce the above copyright 15228753Smm * notice, this list of conditions and the following disclaimer in the 16228753Smm * documentation and/or other materials provided with the distribution. 17228753Smm * 18228753Smm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19228753Smm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20228753Smm * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21228753Smm * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22228753Smm * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23228753Smm * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24228753Smm * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25228763Smm * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26228753Smm * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27238856Smm * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28228773Smm */ 29228753Smm 30228753Smm#ifndef _LINUX_NOTIFIER_H_ 31228753Smm#define _LINUX_NOTIFIER_H_ 32228753Smm 33228753Smm#include <sys/eventhandler.h> 34228753Smm 35228753Smm/* 36228753Smm * Max number of FreeBSD events to map to Linux events per notify type. 37228753Smm */ 38228753Smm#define NOTIFY_DONE 0 39228753Smm#define _NOTIFY_COUNT 7 40228753Smm 41228753Smmstruct notifier_block { 42228753Smm int (*notifier_call)(struct notifier_block *, unsigned long, void *); 43228753Smm struct notifier_block *next; 44228753Smm int priority; 45228753Smm eventhandler_tag tags[_NOTIFY_COUNT]; 46228753Smm}; 47228753Smm 48228753Smm/* Values must be less than NOTIFY_COUNT */ 49228753Smm#define NETDEV_UP 0x0001 50228753Smm#define NETDEV_DOWN 0x0002 51228753Smm#define NETDEV_REGISTER 0x0003 52228753Smm#define NETDEV_UNREGISTER 0x0004 53228753Smm#define NETDEV_CHANGEADDR 0x0005 54238856Smm#define NETDEV_CHANGEIFADDR 0x0006 55228753Smm 56228753Smm 57228753Smm#endif /* _LINUX_NOTIFIER_H_ */ 58238856Smm