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

Enable an interface in the net driver test

parent 2df8a514
No related branches found
No related tags found
No related merge requests found
...@@ -872,6 +872,7 @@ arp_ifinit(struct ifnet *ifp, struct ifaddr *ifa) ...@@ -872,6 +872,7 @@ arp_ifinit(struct ifnet *ifp, struct ifaddr *ifa)
if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY) { if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY) {
arprequest(ifp, &IA_SIN(ifa)->sin_addr, arprequest(ifp, &IA_SIN(ifa)->sin_addr,
&IA_SIN(ifa)->sin_addr, (u_char *)IF_LLADDR(ifp)); &IA_SIN(ifa)->sin_addr, (u_char *)IF_LLADDR(ifp));
#if 0
/* /*
* interface address is considered static entry * interface address is considered static entry
* because the output of the arp utility shows * because the output of the arp utility shows
...@@ -886,6 +887,9 @@ arp_ifinit(struct ifnet *ifp, struct ifaddr *ifa) ...@@ -886,6 +887,9 @@ arp_ifinit(struct ifnet *ifp, struct ifaddr *ifa)
"entry for interface address\n"); "entry for interface address\n");
else else
LLE_RUNLOCK(lle); LLE_RUNLOCK(lle);
#else
lle = NULL;
#endif
} }
ifa->ifa_rtrequest = NULL; ifa->ifa_rtrequest = NULL;
} }
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
/* Global ifnet */ /* Global ifnet */
struct ifnet* pifp; struct ifnet* pifp;
/*
* This function should invoke ether_ioctl...
*/
static int static int
lge_ioctl(struct ifnet *ifp, lge_ioctl(struct ifnet *ifp,
u_long command, u_long command,
...@@ -26,10 +29,20 @@ lge_ioctl(struct ifnet *ifp, ...@@ -26,10 +29,20 @@ lge_ioctl(struct ifnet *ifp,
return (0); return (0);
} }
/*
* Main transmit routine.
*/
static void static void
lge_start(struct ifnet* ifp) lge_start(struct ifnet* ifp)
{ {
struct mbuf *m_head = NULL;
TLOG("lge_start\n"); TLOG("lge_start\n");
IF_DEQUEUE(&ifp->if_snd, m_head);
if (m_head != NULL) {
/* Send packet */
}
} }
static void static void
...@@ -103,7 +116,7 @@ int main(void) ...@@ -103,7 +116,7 @@ int main(void)
*/ */
if_attachdomain(NULL); if_attachdomain(NULL);
// set_address(); set_address();
destroy_if(); destroy_if();
TLOG("BSD Net Driver Test\n"); TLOG("BSD Net Driver Test\n");
......
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