summaryrefslogtreecommitdiffstats
path: root/sys/net/if_var.h
diff options
context:
space:
mode:
authorzec <zec@FreeBSD.org>2009-05-22 22:09:00 +0000
committerzec <zec@FreeBSD.org>2009-05-22 22:09:00 +0000
commit363a644ce641f813d42c7c9f07a00a8b85f64c6c (patch)
tree7689ae44438ff9f2954c122c26aeaa9e61c8ee06 /sys/net/if_var.h
parent6f527edd246ed65f0d5347c772a4be00cb3a5e08 (diff)
downloadFreeBSD-src-363a644ce641f813d42c7c9f07a00a8b85f64c6c.zip
FreeBSD-src-363a644ce641f813d42c7c9f07a00a8b85f64c6c.tar.gz
Introduce the if_vmove() function, which will be used in the future
for reassigning ifnets from one vnet to another. if_vmove() works by calling a restricted subset of actions normally executed by if_detach() on an ifnet in the current vnet, and then switches to the target vnet and executes an appropriate subset of if_attach() actions there. if_attach() and if_detach() have become wrapper functions around if_attach_internal() and if_detach_internal(), where the later variants have an additional argument, a flag indicating whether a full attach or detach sequence is to be executed, or only a restricted subset suitable for moving an ifnet from one vnet to another. Hence, if_vmove() will not call if_detach() and if_attach() directly, but will call the if_detach_internal() and if_attach_internal() variants instead, with the vmove flag set. While here, staticize ifnet_setbyindex() since it is not referenced from outside of sys/net/if.c. Also rename ifccnt field in struct vimage to ifcnt, and do some minor whitespace garbage collection where appropriate. This change should have no functional impact on nooptions VIMAGE kernel builds. Reviewed by: bz, rwatson, brooks? Approved by: julian (mentor)
Diffstat (limited to 'sys/net/if_var.h')
-rw-r--r--sys/net/if_var.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 18084aa..6124352 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -733,7 +733,6 @@ struct ifindex_entry {
struct ifnet *ifnet_byindex(u_short idx);
struct ifnet *ifnet_byindex_locked(u_short idx);
struct ifnet *ifnet_byindex_ref(u_short idx);
-void ifnet_setbyindex(u_short idx, struct ifnet *ifp);
/*
* Given the index, ifaddr_byindex() returns the one and only
@@ -761,6 +760,7 @@ void if_grow(void);
int if_delmulti(struct ifnet *, struct sockaddr *);
void if_delmulti_ifma(struct ifmultiaddr *);
void if_detach(struct ifnet *);
+void if_vmove(struct ifnet *, struct vnet *);
void if_purgeaddrs(struct ifnet *);
void if_purgemaddrs(struct ifnet *);
void if_down(struct ifnet *);
OpenPOWER on IntegriCloud