Changeset View
Changeset View
Standalone View
Standalone View
sys/net/vnet.h
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | |||||
#define _NET_VNET_H_ | #define _NET_VNET_H_ | ||||
/* | /* | ||||
* struct vnet describes a virtualized network stack, and is primarily a | * struct vnet describes a virtualized network stack, and is primarily a | ||||
* pointer to storage for virtualized global variables. Expose to userspace | * pointer to storage for virtualized global variables. Expose to userspace | ||||
* as required for libkvm. | * as required for libkvm. | ||||
*/ | */ | ||||
#if defined(_KERNEL) || defined(_WANT_VNET) | #if defined(_KERNEL) || defined(_WANT_VNET) | ||||
#include <machine/param.h> /* for CACHE_LINE_SIZE */ | |||||
glebius: Why is this change in here? | |||||
Done Inline ActionsIt was required to get in.c to compile with vnet.h. It could be in a separate commit, although it would not make vnet.h self-sufficient. karels: It was required to get in.c to compile with vnet.h. It could be in a separate commit, although… | |||||
Not Done Inline ActionsWhat was the error that cannot be fixed in the in.c code itself? It seems wrong here. bz: What was the error that cannot be fixed in the in.c code itself? It seems wrong here. | |||||
Done Inline ActionsCorrection: in.c compiles without this include, but other users of in.h fail if it includes vnet.h, such as nlm/sm_inter_xdr.c. karels: Correction: in.c compiles without this include, but other users of in.h fail if it includes… | |||||
Not Done Inline ActionsWell, that file clearly violates FreeBSD expectations (being generated or not). The problem needs to be fixed there. style.9: Kernel include files (sys/*.h) come first. If <sys/cdefs.h> is needed for __FBSDID(), include it first. If either <sys/types.h> or <sys/param.h> is needed, include it before other include files. (<sys/param.h> includes <sys/types.h>; do not include both.) Next, include <sys/systm.h>, if needed. The remaining kernel headers should be sorted alphabetically. and nlm/sm_inter_xdr.c. #include <nlm/sm_inter.h> #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); and them all the way down to sys/rpc/rpc.h and from there to netinet/in.h L423. Sad this is all so IPv4-only stuff still .. but that's a different problem. bz: Well, that file clearly violates FreeBSD expectations (being generated or not). The problem… | |||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
struct vnet { | struct vnet { | ||||
LIST_ENTRY(vnet) vnet_le; /* all vnets list */ | LIST_ENTRY(vnet) vnet_le; /* all vnets list */ | ||||
u_int vnet_magic_n; | u_int vnet_magic_n; | ||||
u_int vnet_ifcnt; | u_int vnet_ifcnt; | ||||
u_int vnet_sockcnt; | u_int vnet_sockcnt; | ||||
u_int vnet_state; /* SI_SUB_* */ | u_int vnet_state; /* SI_SUB_* */ | ||||
▲ Show 20 Lines • Show All 387 Lines • Show Last 20 Lines |
Why is this change in here?