Skip to content
Snippets Groups Projects
Commit 2df8a514 authored by Guy Zana's avatar Guy Zana
Browse files

Call ether_ifdetach() in the test

parent cf0ce6ec
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ extern "C" {
#include <bsd/sys/net/if.h>
#include <bsd/sys/netinet/if_ether.h>
#include <bsd/sys/net/ethernet.h>
#include <bsd/sys/net/route.h>
#include <bsd/machine/param.h>
}
......@@ -22,6 +23,7 @@ void net_init(void)
if_init(NULL);
vnet_if_init(NULL);
domaininit(NULL);
// if_attachdomain(NULL);
route_init();
vnet_route_init();
debug("Done!");
}
......@@ -181,6 +181,9 @@ void route_init(void)
if (dom->dom_maxrtkey > max_keylen)
max_keylen = dom->dom_maxrtkey;
/* FIXME: Hack this for now, we don't have domains yet... */
max_keylen = sizeof(struct sockaddr_in);
rn_init(max_keylen); /* init all zeroes, all ones, mask table */
}
......@@ -188,7 +191,7 @@ void route_init(void)
SYSINIT(route_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, route_init, 0);
#endif
void vnet_route_init(const void *__unused)
void vnet_route_init(void)
{
struct domain *dom;
struct radix_node_head **rnh;
......
......@@ -37,7 +37,7 @@
#include <osv/mutex.h>
void route_init(void);
void vnet_route_init(const void *__unused);
void vnet_route_init(void);
/*
* Kernel resident routing tables.
......
......@@ -65,9 +65,9 @@ int create_if(void)
return (0);
}
void destroy_id(void)
void destroy_if(void)
{
/* ether_ifdetach(pifp); */
ether_ifdetach(pifp);
if_free(pifp);
}
......@@ -104,7 +104,7 @@ int main(void)
if_attachdomain(NULL);
// set_address();
destroy_id();
destroy_if();
TLOG("BSD Net Driver Test\n");
return (0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment