aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/ip_var.h
diff options
context:
space:
mode:
authorMarko Zec <zec@FreeBSD.org>2009-06-08 17:15:40 +0000
committerMarko Zec <zec@FreeBSD.org>2009-06-08 17:15:40 +0000
commitbc29160df3d0b3a65d9b85a63a4589f1f9652e6b (patch)
tree7c00057a3f90cc6cfd121e2a6594d254fc72cba3 /sys/netinet/ip_var.h
parent389cff511328e788e1a71dbb78154dd7d21b5fcc (diff)
downloadsrc-bc29160df3d0b3a65d9b85a63a4589f1f9652e6b.tar.gz
src-bc29160df3d0b3a65d9b85a63a4589f1f9652e6b.zip
Introduce an infrastructure for dismantling vnet instances.
Vnet modules and protocol domains may now register destructor functions to clean up and release per-module state. The destructor mechanisms can be triggered by invoking "vimage -d", or a future equivalent command which will be provided via the new jail framework. While this patch introduces numerous placeholder destructor functions, many of those are currently incomplete, thus leaking memory or (even worse) failing to stop all running timers. Many of such issues are already known and will be incrementaly fixed over the next weeks in smaller incremental commits. Apart from introducing new fields in structs ifnet, domain, protosw and vnet_net, which requires the kernel and modules to be rebuilt, this change should have no impact on nooptions VIMAGE builds, since vnet destructors can only be called in VIMAGE kernels. Moreover, destructor functions should be in general compiled in only in options VIMAGE builds, except for kernel modules which can be safely kldunloaded at run time. Bump __FreeBSD_version to 800097. Reviewed by: bz, julian Approved by: rwatson, kib (re), julian (mentor)
Notes
Notes: svn path=/head/; revision=193731
Diffstat (limited to 'sys/netinet/ip_var.h')
-rw-r--r--sys/netinet/ip_var.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h
index aa9beb148b8f..1e5e693012c2 100644
--- a/sys/netinet/ip_var.h
+++ b/sys/netinet/ip_var.h
@@ -210,6 +210,9 @@ u_int16_t ip_randomid(void);
int rip_ctloutput(struct socket *, struct sockopt *);
void rip_ctlinput(int, struct sockaddr *, void *);
void rip_init(void);
+#ifdef VIMAGE
+void rip_destroy(void);
+#endif
void rip_input(struct mbuf *, int);
int rip_output(struct mbuf *, struct socket *, u_long);
void ipip_input(struct mbuf *, int);