icmp and ctlinput working -- missing protocol specific ctlinput's
[unix-history] / usr / src / sys / net / if.c
index e2a4896..ee6ef4f 100644 (file)
@@ -1,8 +1,9 @@
-/*     if.c    4.13    82/03/30        */
+/*     if.c    4.14    82/04/24        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 #include "../h/socket.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
 #include "../h/socket.h"
+#include "../h/protosw.h"
 #include "../net/in.h"
 #include "../net/in_systm.h"
 #include "../net/if.h"
 #include "../net/in.h"
 #include "../net/in_systm.h"
 #include "../net/if.h"
@@ -134,6 +135,17 @@ if_ifwithaf(af)
        return (ifp);
 }
 
        return (ifp);
 }
 
+/*
+ * Mark an interface down and notify protocols of
+ * the transition.
+ */
+if_down(ifp)
+       register struct ifnet *ifp;
+{
+       ifp->if_flags &= ~IFF_UP;
+       pfctlinput(PRC_IFDOWN, (caddr_t)&ifp->if_addr);
+}
+
 /*
  * Formulate an Internet address from network + host.  Used in
  * building addresses stored in the ifnet structure.
 /*
  * Formulate an Internet address from network + host.  Used in
  * building addresses stored in the ifnet structure.