-/* if_imp.c 4.39 82/10/09 */
+/* if_imp.c 4.45 82/12/14 */
#include "imp.h"
#if NIMP > 0
#include "../h/buf.h"
#include "../h/protosw.h"
#include "../h/socket.h"
-#include "../h/ubareg.h"
-#include "../h/ubavar.h"
-#include "../h/cpu.h"
-#include "../h/mtpr.h"
#include "../h/vmmac.h"
-#include "../netinet/in.h"
-#include "../netinet/in_systm.h"
+
+#include "../vax/cpu.h"
+#include "../vax/mtpr.h"
+#include "../vaxuba/ubareg.h"
+#include "../vaxuba/ubavar.h"
+
#include "../net/if.h"
+#include "../net/route.h"
#include "../net/netisr.h"
+#include "../netinet/in.h"
+#include "../netinet/in_systm.h"
+#include "../netinet/ip.h"
+#include "../netinet/ip_var.h"
/* define IMPLEADERS here to get leader printing code */
#include "../netimp/if_imp.h"
#include "../netimp/if_imphost.h"
-#include "../netinet/ip.h"
-#include "../netinet/ip_var.h"
-#include "../net/route.h"
#include <errno.h>
/*
* structures. This is then used by the device's attach routine
* set up its back pointers.
*/
-impattach(ui)
+impattach(ui, reset)
struct uba_device *ui;
+ int (*reset)();
{
struct imp_softc *sc = &imp_softc[ui->ui_unit];
register struct ifnet *ifp = &sc->imp_if;
ifp->if_name = "imp";
ifp->if_mtu = IMPMTU - sizeof(struct imp_leader);
ifp->if_net = ui->ui_flags;
+ ifp->if_reset = reset;
/* the host and imp fields will be filled in by the imp */
sin = (struct sockaddr_in *)&ifp->if_addr;
sin->sin_family = AF_INET;
case IMPTYPE_HOSTDEAD:
case IMPTYPE_HOSTUNREACH: {
int s = splnet();
- impnotify(ip->il_mtype, ip, hostlookup(addr));
+ impnotify((int)ip->il_mtype, (struct control_leader *)ip,
+ hostlookup(addr));
splx(s);
goto rawlinkin;
}
{
register struct imp_leader *imp;
register struct mbuf *m = m0;
- int x, dhost, dimp, dlink, len, dnet;
+ int dhost, dimp, dlink, len, dnet;
int error = 0;
/*
*/
if (m->m_off > MMAXOFF ||
MMINOFF + sizeof(struct imp_leader) > m->m_off) {
- m = m_get(M_DONTWAIT);
+ m = m_get(M_DONTWAIT, MT_HEADER);
if (m == 0) {
error = ENOBUFS;
goto drop;
register i;
register struct mbuf *m;
register struct control_leader *cp;
- int x;
sc->imp_dropcnt = IMP_DROPCNT;
for (i = 0; i < IMP_DROPCNT + 1; i++ ) {
- if ((m = m_getclr(M_DONTWAIT)) == 0)
+ if ((m = m_getclr(M_DONTWAIT, MT_HEADER)) == 0)
return;
m->m_len = sizeof(struct control_leader);
cp = mtod(m, struct control_leader *);