Subject: if_detatch
To: None <tech-kern@NetBSD.ORG>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: tech-kern
Date: 06/30/1997 18:07:26
Hello,

I'm playing with some lkm net driver ideas (basically an ifnet which
is from an lkm), and I need to be able to delete the interface when
unloading the lkm. So I'm writing an if_detatch routine.

Removing it from the list of interfaces is no big deal. Nor is deleting
all the addresses on this interface. My question is about what to do
with ifnet_addrs. It keeps the address of an interface, so it can be
accessed by index. My thought is to just zero out that entry in
ifnet_addrs. If the lkm is reloaded, it will get a different index #
next load.

Does that sound right? Is there anything else I need to clean up?
Is there some hidden dependancy I'm missing?

Should I send-pr this when done?

Take care,

Bill