Go to the documentation of this file. 1#ifndef __VSF_LINUX_NETLINK_H__
2#define __VSF_LINUX_NETLINK_H__
4#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
5# include "../sys/socket.h"
11#define NLMSG_ERROR 0x2
13#define NLMSG_OVERRUN 0x4
15#define NETLINK_ROUTE 0
37#define NLMSG_ALIGNTO 4U
38#define NLMSG_ALIGN(len) (((len) + NLMSG_ALIGNTO - 1) & ~(NLMSG_ALIGNTO - 1))
39#define NLMSG_HDRLEN ((int)NLMSG_ALIGN(sizeof(struct nlmsghdr)))
40#define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN)
41#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
42#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
43#define NLMSG_NEXT(nlh, len)((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
44 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
45#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \
46 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
47 (nlh)->nlmsg_len <= (len))
48#define NLMSG_PAYLOAD(nlh, len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
unsigned short uint16_t
Definition lvgl.h:41
unsigned int uint32_t
Definition lvgl.h:43
uint16_t sa_family_t
Definition socket.h:73
struct nlmsghdr msg
Definition netlink.h:34
int error
Definition netlink.h:33
uint32_t nlmsg_len
Definition netlink.h:25
uint16_t nlmsg_pid
Definition netlink.h:29
uint16_t nlmsg_type
Definition netlink.h:26
uint16_t nlmsg_seq
Definition netlink.h:28
uint16_t nlmsg_flags
Definition netlink.h:27
uint32_t nl_groups
Definition netlink.h:21
sa_family_t nl_family
Definition netlink.h:18
uint32_t nl_pid
Definition netlink.h:20
uint16_t nl_pad
Definition netlink.h:19