|
Linux Kernel
3.7.1
|
#include <linux/module.h>#include <linux/etherdevice.h>#include <linux/netlink.h>#include <asm/byteorder.h>#include <net/sock.h>Go to the source code of this file.
Macros | |
| #define | NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) |
| #define | ND_MAX_GROUP 30 |
| #define | ND_IFINDEX_LEN sizeof(int) |
| #define | ND_NLMSG_SPACE(len) (NLMSG_SPACE(len) + ND_IFINDEX_LEN) |
| #define | ND_NLMSG_DATA(nlh) ((void *)((char *)NLMSG_DATA(nlh) + ND_IFINDEX_LEN)) |
| #define | ND_NLMSG_S_LEN(len) (len+ND_IFINDEX_LEN) |
| #define | ND_NLMSG_R_LEN(nlh) (nlh->nlmsg_len-ND_IFINDEX_LEN) |
| #define | ND_NLMSG_IFIDX(nlh) NLMSG_DATA(nlh) |
| #define | ND_MAX_MSG_LEN 8096 |
| #define | mutex_lock(x) down(x) |
| #define | mutex_unlock(x) up(x) |
Functions | |
| struct sock * | netlink_init (int unit, void(*cb)(struct net_device *dev, u16 type, void *msg, int len)) |
| void | netlink_exit (struct sock *sock) |
| int | netlink_send (struct sock *sock, int group, u16 type, void *msg, int len) |
Definition at line 38 of file netlink_k.c.
Definition at line 39 of file netlink_k.c.
Definition at line 25 of file netlink_k.c.
| #define ND_MAX_GROUP 30 |
Definition at line 24 of file netlink_k.c.
| #define ND_MAX_MSG_LEN 8096 |
Definition at line 32 of file netlink_k.c.
| #define ND_NLMSG_DATA | ( | nlh | ) | ((void *)((char *)NLMSG_DATA(nlh) + ND_IFINDEX_LEN)) |
Definition at line 27 of file netlink_k.c.
| #define ND_NLMSG_IFIDX | ( | nlh | ) | NLMSG_DATA(nlh) |
Definition at line 31 of file netlink_k.c.
| #define ND_NLMSG_R_LEN | ( | nlh | ) | (nlh->nlmsg_len-ND_IFINDEX_LEN) |
Definition at line 30 of file netlink_k.c.
| #define ND_NLMSG_S_LEN | ( | len | ) | (len+ND_IFINDEX_LEN) |
Definition at line 29 of file netlink_k.c.
| #define ND_NLMSG_SPACE | ( | len | ) | (NLMSG_SPACE(len) + ND_IFINDEX_LEN) |
Definition at line 26 of file netlink_k.c.
| #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) |
Definition at line 21 of file netlink_k.c.
Definition at line 106 of file netlink_k.c.
|
read |
Definition at line 86 of file netlink_k.c.
1.8.2