summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4b11abe)
SCCS-vsn: sys/deprecated/netimp/if_imp.h 4.6
SCCS-vsn: sys/vax/if/if_acc.c 4.11
SCCS-vsn: sys/deprecated/netimp/if_imp.c 4.19
-/* if_imp.c 4.18 82/03/19 */
+/* if_imp.c 4.19 82/03/19 */
#include "imp.h"
#if NIMP > 0
#include "imp.h"
#if NIMP > 0
/* UNIT COULD BE AMBIGUOUS */
ifp->if_unit = ui->ui_unit;
ifp->if_name = "imp";
/* UNIT COULD BE AMBIGUOUS */
ifp->if_unit = ui->ui_unit;
ifp->if_name = "imp";
- ifp->if_mtu = IMP_MTU - sizeof (struct imp_leader);
+ ifp->if_mtu = IMPMTU - sizeof(struct imp_leader);
ifp->if_net = ui->ui_flags;
/* the host and imp fields will be filled in by the imp */
ifp->if_addr = if_makeaddr(ifp->if_net, 0);
ifp->if_net = ui->ui_flags;
/* the host and imp fields will be filled in by the imp */
ifp->if_addr = if_makeaddr(ifp->if_net, 0);
sc->imp_dropcnt = IMP_DROPCNT;
}
if (sc->imp_state != IMPS_INIT || --sc->imp_dropcnt > 0)
sc->imp_dropcnt = IMP_DROPCNT;
}
if (sc->imp_state != IMPS_INIT || --sc->imp_dropcnt > 0)
sc->imp_state = IMPS_UP;
sin = &sc->imp_if.if_addr;
sc->imp_if.if_host[0] = sin->s_host = ip->il_host;
sc->imp_state = IMPS_UP;
sin = &sc->imp_if.if_addr;
sc->imp_if.if_host[0] = sin->s_host = ip->il_host;
ntohs(ip->il_imp));
/* restart output in case something was q'd */
(*sc->imp_cb.ic_start)(sc->imp_if.if_unit);
ntohs(ip->il_imp));
/* restart output in case something was q'd */
(*sc->imp_cb.ic_start)(sc->imp_if.if_unit);
if (hp && hp->h_rfnm)
if (next = hostdeque(hp))
(void) impsnd(&sc->imp_if, next);
if (hp && hp->h_rfnm)
if (next = hostdeque(hp))
(void) impsnd(&sc->imp_if, next);
/*
* Host or IMP can't be reached. Flush any packets
/*
* Host or IMP can't be reached. Flush any packets
-/* if_imp.h 4.5 82/03/16 */
+/* if_imp.h 4.6 82/03/19 */
/*
* Structure of IMP 1822 long leader.
/*
* Structure of IMP 1822 long leader.
};
#define IMP_DROPCNT 2 /* # of noops from imp to ignore */
};
#define IMP_DROPCNT 2 /* # of noops from imp to ignore */
-/* don't use 1019 here, 'cuz odd numbers and word counts are confusing */
-#define IMP_MTU (sizeof (struct imp_leader) + 1018)
+/* insure things are even... */
+#define IMPMTU ((8159 / NBBY) & ~01)
-/* if_acc.c 4.10 82/03/19 */
+/* if_acc.c 4.11 82/03/19 */
#include "acc.h"
#ifdef NACC > 0
#include "acc.h"
#ifdef NACC > 0
* would asssume we handle it on input and output.
*/
if (if_ubainit(&sc->acc_ifuba, ui->ui_ubanum, 0,
* would asssume we handle it on input and output.
*/
if (if_ubainit(&sc->acc_ifuba, ui->ui_ubanum, 0,
- (int)btoc(IMP_MTU)) == 0) {
+ (int)btoc(IMPMTU)) == 0) {
printf("acc%d: can't initialize\n", unit);
goto down;
}
printf("acc%d: can't initialize\n", unit);
goto down;
}
* Put up a read. We can't restart any outstanding writes
* until we're back in synch with the IMP (i.e. we've flushed
* the NOOPs it throws at us).
* Put up a read. We can't restart any outstanding writes
* until we're back in synch with the IMP (i.e. we've flushed
* the NOOPs it throws at us).
- * Note: IMP_MTU includes the leader.
+ * Note: IMPMTU includes the leader.
*/
x = spl5();
info = sc->acc_ifuba.ifu_r.ifrw_info;
addr->iba = (u_short)info;
*/
x = spl5();
info = sc->acc_ifuba.ifu_r.ifrw_info;
addr->iba = (u_short)info;
- addr->iwc = -(IMP_MTU >> 1);
+ addr->iwc = -(IMPMTU >> 1);
#ifdef LOOPBACK
addr->ocsr |= OUT_BBACK;
#endif
#ifdef LOOPBACK
addr->ocsr |= OUT_BBACK;
#endif
sc->acc_flush = 0;
goto setup;
}
sc->acc_flush = 0;
goto setup;
}
- len = IMP_MTU + (addr->iwc << 1);
- if (len < 0 || len > IMP_MTU) {
+ len = IMPMTU + (addr->iwc << 1);
+ if (len < 0 || len > IMPMTU) {
printf("acc%d: bad length=%d\n", len);
sc->acc_if->if_ierrors++;
goto setup;
printf("acc%d: bad length=%d\n", len);
sc->acc_if->if_ierrors++;
goto setup;
*/
info = sc->acc_ifuba.ifu_r.ifrw_info;
addr->iba = (u_short)info;
*/
info = sc->acc_ifuba.ifu_r.ifrw_info;
addr->iba = (u_short)info;
- addr->iwc = -(IMP_MTU >> 1);
+ addr->iwc = -(IMPMTU >> 1);
addr->icsr =
IN_MRDY | ACC_IE | IN_WEN | ((info & 0x30000) >> 12) | ACC_GO;
}
addr->icsr =
IN_MRDY | ACC_IE | IN_WEN | ((info & 0x30000) >> 12) | ACC_GO;
}