diff options
author | glebius <glebius@FreeBSD.org> | 2015-04-06 22:12:18 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2015-04-06 22:12:18 +0000 |
commit | 8ea08edd44b2a5073cc4b52e69f2b75dcf9c665f (patch) | |
tree | 1c781eb21846c125dc7da4c159419dd667ff0e64 /sys/netinet6/ip6_mroute.h | |
parent | 9435c121fa6dba0bbeae6c40cf3df7623095bf5e (diff) | |
download | FreeBSD-src-8ea08edd44b2a5073cc4b52e69f2b75dcf9c665f.zip FreeBSD-src-8ea08edd44b2a5073cc4b52e69f2b75dcf9c665f.tar.gz |
o Make net.inet6.ip6.mif6table return special API structure, that doesn't
contain kernel pointers, and instead has interface index.
Bump __FreeBSD_version for that change.
o Now, netstat/mroute6.c no longer needs to kvm_read(3) struct ifnet, and
no longer needs to include if_var.h
Note that this change is far from being a complete move of IPv6 multicast
routing to a proper API. Other structures are still dumped into their
sysctls as is, requiring userland application to #define _KERNEL when
including ip6_mroute.h and then call kvm_read(3) to gather all bits and
pieces. But fixing this is out of scope of the opaque ifnet project.
Sponsored by: Nginx, Inc.
Sponsored by: Netflix
Diffstat (limited to 'sys/netinet6/ip6_mroute.h')
-rw-r--r-- | sys/netinet6/ip6_mroute.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/netinet6/ip6_mroute.h b/sys/netinet6/ip6_mroute.h index d7b0014..51e1d49 100644 --- a/sys/netinet6/ip6_mroute.h +++ b/sys/netinet6/ip6_mroute.h @@ -194,6 +194,20 @@ struct sioc_mif_req6 { u_quad_t obytes; /* Output byte count on mif */ }; +/* + * Structure to export 'struct mif6' to userland via sysctl. + */ +struct mif6_sctl { + u_char m6_flags; /* MIFF_ flags defined above */ + u_int m6_rate_limit; /* max rate */ + struct in6_addr m6_lcl_addr; /* local interface address */ + uint32_t m6_ifp; /* interface index */ + u_quad_t m6_pkt_in; /* # pkts in on interface */ + u_quad_t m6_pkt_out; /* # pkts out on interface */ + u_quad_t m6_bytes_in; /* # bytes in on interface */ + u_quad_t m6_bytes_out; /* # bytes out on interface */ +}; + #if defined(_KERNEL) || defined(KERNEL) /* * The kernel's multicast-interface structure. |