Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/netdump/netdump.h
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | struct netdump_msg_hdr { | ||||
| uint32_t mh_len; /* Attached data (bytes). */ | uint32_t mh_len; /* Attached data (bytes). */ | ||||
| uint32_t mh__pad; | uint32_t mh__pad; | ||||
| } __packed; | } __packed; | ||||
| struct netdump_ack { | struct netdump_ack { | ||||
| uint32_t na_seqno; /* Match acks with msgs. */ | uint32_t na_seqno; /* Match acks with msgs. */ | ||||
| } __packed; | } __packed; | ||||
| struct netdump_conf { | struct netdump_conf_freebsd12 { | ||||
| struct diocskerneldump_arg ndc_kda; | struct diocskerneldump_arg_freebsd12 ndc12_kda; | ||||
| char ndc_iface[IFNAMSIZ]; | char ndc12_iface[IFNAMSIZ]; | ||||
| struct in_addr ndc_server; | struct in_addr ndc12_server; | ||||
| struct in_addr ndc_client; | struct in_addr ndc12_client; | ||||
| struct in_addr ndc_gateway; | struct in_addr ndc12_gateway; | ||||
| }; | }; | ||||
| #define _PATH_NETDUMP "/dev/netdump" | #define NETDUMPGCONF_FREEBSD12 _IOR('n', 1, struct netdump_conf_freebsd12) | ||||
| #define NETDUMPSCONF_FREEBSD12 _IOW('n', 2, struct netdump_conf_freebsd12) | |||||
| #define NETDUMPGCONF _IOR('n', 1, struct netdump_conf) | _Static_assert(sizeof(struct diocskerneldump_arg) == | ||||
| #define NETDUMPSCONF _IOW('n', 2, struct netdump_conf) | sizeof(struct netdump_conf_freebsd12), "simplifying ABI assumption"); | ||||
cem: This is a shortcut for more verbose size/offset checks of all members. Offset of `ndc12_iface`… | |||||
| #define _PATH_NETDUMP "/dev/netdump" | |||||
| #ifdef _KERNEL | #ifdef _KERNEL | ||||
| #ifdef NETDUMP | #ifdef NETDUMP | ||||
| #define NETDUMP_MAX_IN_FLIGHT 64 | #define NETDUMP_MAX_IN_FLIGHT 64 | ||||
| enum netdump_ev { | enum netdump_ev { | ||||
| NETDUMP_START, | NETDUMP_START, | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||
This is a shortcut for more verbose size/offset checks of all members. Offset of ndc12_iface vs kda_iface is verified in another file.
I figured as long as I was rototilling the ABI, I might as well unify the configuration structure for netdump and disk dump.