netlink: make test-includes happy by hiding most of the header

contents under _KERNEL.
This commit is contained in:
Alexander V. Chernikov 2022-10-01 17:01:53 +00:00
parent 11ca01e9aa
commit dddafa8d25
6 changed files with 14 additions and 0 deletions

View File

@ -28,6 +28,7 @@
#ifndef _NETLINK_NETLINK_CTL_H_
#define _NETLINK_NETLINK_CTL_H_
#ifdef _KERNEL
/*
* This file provides headers for the public KPI of the netlink
* subsystem
@ -100,3 +101,4 @@ uint32_t genl_register_group(const char *family_name, const char *group_name);
uint32_t nlp_get_pid(const struct nlpcb *nlp);
#endif
#endif

View File

@ -31,6 +31,8 @@
#ifndef _NETLINK_NETLINK_DEBUG_H_
#define _NETLINK_NETLINK_DEBUG_H_
#ifdef _KERNEL
#define _DEBUG_SYSCTL_OID _net_netlink_debug
#include <net/route/route_debug.h>
@ -79,4 +81,5 @@ SYSCTL_DECL(_net_netlink_debug);
#endif
#endif

View File

@ -31,6 +31,8 @@
#ifndef _NETLINK_NETLINK_GENERIC_H_
#define _NETLINK_NETLINK_GENERIC_H_
#include <netlink/netlink.h>
/* Base header for all of the relevant messages */
struct genlmsghdr {
uint8_t cmd; /* CTRL_CMD_ */

View File

@ -28,6 +28,7 @@
#ifndef _NETLINK_NETLINK_MESSAGE_PARSER_H_
#define _NETLINK_NETLINK_MESSAGE_PARSER_H_
#ifdef _KERNEL
/*
* It is not meant to be included directly
*/
@ -268,3 +269,4 @@ nl_parse_nlmsg(struct nlmsghdr *hdr, const struct nlhdr_parser *parser,
}
#endif
#endif

View File

@ -29,6 +29,7 @@
#ifndef _NETLINK_NETLINK_MESSAGE_WRITER_H_
#define _NETLINK_NETLINK_MESSAGE_WRITER_H_
#ifdef _KERNEL
/*
* It is not meant to be included directly
*/
@ -248,3 +249,4 @@ nlattr_add_string(struct nl_writer *nw, int attrtype, const char *str)
#endif
#endif

View File

@ -28,6 +28,8 @@
#ifndef _NETLINK_NETLINK_VAR_H_
#define _NETLINK_NETLINK_VAR_H_
#ifdef _KERNEL
#include <sys/ck.h>
#include <sys/epoch.h>
#include <sys/sysctl.h>
@ -140,3 +142,4 @@ int nl_receive_async(struct mbuf *m, struct socket *so);
void nl_process_receive_locked(struct nlpcb *nlp);
#endif
#endif