Add definition for the NETDEV_CHANGE event and tidy up the LinuxKPI
notifier header file a bit while at it. MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
9f34efb9f4
commit
4a19cc98b3
@ -2,7 +2,7 @@
|
||||
* Copyright (c) 2010 Isilon Systems, Inc.
|
||||
* Copyright (c) 2010 iX Systems, Inc.
|
||||
* Copyright (c) 2010 Panasas, Inc.
|
||||
* Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
|
||||
* Copyright (c) 2013-2016 Mellanox Technologies, Ltd.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -34,26 +34,24 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/eventhandler.h>
|
||||
|
||||
/*
|
||||
* Max number of FreeBSD events to map to Linux events per notify type.
|
||||
*/
|
||||
#define NOTIFY_DONE 0
|
||||
#define _NOTIFY_COUNT 7
|
||||
|
||||
struct notifier_block {
|
||||
int (*notifier_call)(struct notifier_block *, unsigned long, void *);
|
||||
struct notifier_block *next;
|
||||
int priority;
|
||||
eventhandler_tag tags[_NOTIFY_COUNT];
|
||||
enum {
|
||||
NETDEV_CHANGE,
|
||||
NETDEV_UP,
|
||||
NETDEV_DOWN,
|
||||
NETDEV_REGISTER,
|
||||
NETDEV_UNREGISTER,
|
||||
NETDEV_CHANGEADDR,
|
||||
NETDEV_CHANGEIFADDR,
|
||||
LINUX_NOTIFY_TAGS /* must be last */
|
||||
};
|
||||
|
||||
/* Values must be less than NOTIFY_COUNT */
|
||||
#define NETDEV_UP 0x0001
|
||||
#define NETDEV_DOWN 0x0002
|
||||
#define NETDEV_REGISTER 0x0003
|
||||
#define NETDEV_UNREGISTER 0x0004
|
||||
#define NETDEV_CHANGEADDR 0x0005
|
||||
#define NETDEV_CHANGEIFADDR 0x0006
|
||||
struct notifier_block {
|
||||
int (*notifier_call) (struct notifier_block *, unsigned long, void *);
|
||||
struct notifier_block *next;
|
||||
int priority;
|
||||
eventhandler_tag tags[LINUX_NOTIFY_TAGS];
|
||||
};
|
||||
|
||||
|
||||
#endif /* _LINUX_NOTIFIER_H_ */
|
||||
#endif /* _LINUX_NOTIFIER_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user