Kill some more register declarations.
This commit is contained in:
parent
c87c1861bb
commit
c1ebd1929a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bpf.c,v 1.52 2000/03/13 23:52:39 soren Exp $ */
|
||||
/* $NetBSD: bpf.c,v 1.53 2000/03/30 09:45:33 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1991, 1993
|
||||
|
@ -126,11 +126,11 @@ static void reset_d __P((struct bpf_d *));
|
|||
|
||||
static int
|
||||
bpf_movein(uio, linktype, mtu, mp, sockp)
|
||||
register struct uio *uio;
|
||||
struct uio *uio;
|
||||
int linktype;
|
||||
int mtu;
|
||||
register struct mbuf **mp;
|
||||
register struct sockaddr *sockp;
|
||||
struct mbuf **mp;
|
||||
struct sockaddr *sockp;
|
||||
{
|
||||
struct mbuf *m;
|
||||
int error;
|
||||
|
@ -363,7 +363,7 @@ bpfopen(dev, flag, mode, p)
|
|||
int mode;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct bpf_d *d;
|
||||
struct bpf_d *d;
|
||||
|
||||
if (minor(dev) >= NBPFILTER)
|
||||
return (ENXIO);
|
||||
|
@ -394,8 +394,8 @@ bpfclose(dev, flag, mode, p)
|
|||
int mode;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct bpf_d *d = &bpf_dtab[minor(dev)];
|
||||
register int s;
|
||||
struct bpf_d *d = &bpf_dtab[minor(dev)];
|
||||
int s;
|
||||
|
||||
s = splimp();
|
||||
if (d->bd_bif)
|
||||
|
@ -423,10 +423,10 @@ bpf_timeout(arg)
|
|||
|
||||
int
|
||||
bpf_sleep(d)
|
||||
register struct bpf_d *d;
|
||||
struct bpf_d *d;
|
||||
{
|
||||
register int rto = d->bd_rtout;
|
||||
register int st;
|
||||
int rto = d->bd_rtout;
|
||||
int st;
|
||||
|
||||
if (rto != 0) {
|
||||
d->bd_timedout = 0;
|
||||
|
@ -462,10 +462,10 @@ bpf_sleep(d)
|
|||
int
|
||||
bpfread(dev, uio, ioflag)
|
||||
dev_t dev;
|
||||
register struct uio *uio;
|
||||
struct uio *uio;
|
||||
int ioflag;
|
||||
{
|
||||
register struct bpf_d *d = &bpf_dtab[minor(dev)];
|
||||
struct bpf_d *d = &bpf_dtab[minor(dev)];
|
||||
int error;
|
||||
int s;
|
||||
|
||||
|
@ -556,7 +556,7 @@ done:
|
|||
*/
|
||||
static __inline void
|
||||
bpf_wakeup(d)
|
||||
register struct bpf_d *d;
|
||||
struct bpf_d *d;
|
||||
{
|
||||
struct proc *p;
|
||||
|
||||
|
@ -587,7 +587,7 @@ bpfwrite(dev, uio, ioflag)
|
|||
struct uio *uio;
|
||||
int ioflag;
|
||||
{
|
||||
register struct bpf_d *d = &bpf_dtab[minor(dev)];
|
||||
struct bpf_d *d = &bpf_dtab[minor(dev)];
|
||||
struct ifnet *ifp;
|
||||
struct mbuf *m;
|
||||
int error, s;
|
||||
|
@ -674,10 +674,10 @@ bpfioctl(dev, cmd, addr, flag, p)
|
|||
int flag;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct bpf_d *d = &bpf_dtab[minor(dev)];
|
||||
struct bpf_d *d = &bpf_dtab[minor(dev)];
|
||||
int s, error = 0;
|
||||
#ifdef BPF_KERN_FILTER
|
||||
register struct bpf_insn **p;
|
||||
struct bpf_insn **p;
|
||||
#endif
|
||||
|
||||
switch (cmd) {
|
||||
|
@ -720,7 +720,7 @@ bpfioctl(dev, cmd, addr, flag, p)
|
|||
if (d->bd_bif != 0)
|
||||
error = EINVAL;
|
||||
else {
|
||||
register u_int size = *(u_int *)addr;
|
||||
u_int size = *(u_int *)addr;
|
||||
|
||||
if (size > BPF_MAXBUFSIZE)
|
||||
*(u_int *)addr = size = BPF_MAXBUFSIZE;
|
||||
|
@ -1061,13 +1061,13 @@ bpf_ifname(ifp, ifr)
|
|||
*/
|
||||
int
|
||||
bpfpoll(dev, events, p)
|
||||
register dev_t dev;
|
||||
dev_t dev;
|
||||
int events;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct bpf_d *d = &bpf_dtab[minor(dev)];
|
||||
struct bpf_d *d = &bpf_dtab[minor(dev)];
|
||||
int revents = 0;
|
||||
register int s = splimp();
|
||||
int s = splimp();
|
||||
|
||||
/*
|
||||
* An imitation of the FIONREAD ioctl code.
|
||||
|
@ -1092,12 +1092,12 @@ bpfpoll(dev, events, p)
|
|||
void
|
||||
bpf_tap(arg, pkt, pktlen)
|
||||
caddr_t arg;
|
||||
register u_char *pkt;
|
||||
register u_int pktlen;
|
||||
u_char *pkt;
|
||||
u_int pktlen;
|
||||
{
|
||||
struct bpf_if *bp;
|
||||
register struct bpf_d *d;
|
||||
register u_int slen;
|
||||
struct bpf_d *d;
|
||||
u_int slen;
|
||||
/*
|
||||
* Note that the ipl does not have to be raised at this point.
|
||||
* The only problem that could arise here is that if two different
|
||||
|
@ -1120,10 +1120,10 @@ static void *
|
|||
bpf_mcpy(dst_arg, src_arg, len)
|
||||
void *dst_arg;
|
||||
const void *src_arg;
|
||||
register size_t len;
|
||||
size_t len;
|
||||
{
|
||||
register const struct mbuf *m;
|
||||
register u_int count;
|
||||
const struct mbuf *m;
|
||||
u_int count;
|
||||
u_char *dst;
|
||||
|
||||
m = src_arg;
|
||||
|
@ -1175,14 +1175,14 @@ bpf_mtap(arg, m)
|
|||
*/
|
||||
static void
|
||||
catchpacket(d, pkt, pktlen, snaplen, cpfn)
|
||||
register struct bpf_d *d;
|
||||
register u_char *pkt;
|
||||
register u_int pktlen, snaplen;
|
||||
register void *(*cpfn) __P((void *, const void *, size_t));
|
||||
struct bpf_d *d;
|
||||
u_char *pkt;
|
||||
u_int pktlen, snaplen;
|
||||
void *(*cpfn) __P((void *, const void *, size_t));
|
||||
{
|
||||
register struct bpf_hdr *hp;
|
||||
register int totlen, curlen;
|
||||
register int hdrlen = d->bd_bif->bif_hdrlen;
|
||||
struct bpf_hdr *hp;
|
||||
int totlen, curlen;
|
||||
int hdrlen = d->bd_bif->bif_hdrlen;
|
||||
/*
|
||||
* Figure out how many bytes to move. If the packet is
|
||||
* greater or equal to the snapshot length, transfer that
|
||||
|
@ -1247,7 +1247,7 @@ catchpacket(d, pkt, pktlen, snaplen, cpfn)
|
|||
*/
|
||||
static int
|
||||
bpf_allocbufs(d)
|
||||
register struct bpf_d *d;
|
||||
struct bpf_d *d;
|
||||
{
|
||||
|
||||
d->bd_fbuf = (caddr_t)malloc(d->bd_bufsize, M_DEVBUF, M_WAITOK);
|
||||
|
@ -1263,7 +1263,7 @@ bpf_allocbufs(d)
|
|||
*/
|
||||
static void
|
||||
bpf_freed(d)
|
||||
register struct bpf_d *d;
|
||||
struct bpf_d *d;
|
||||
{
|
||||
/*
|
||||
* We don't need to lock out interrupts since this descriptor has
|
||||
|
@ -1410,11 +1410,11 @@ bpf_change_type(driverp, dlt, hdrlen)
|
|||
*/
|
||||
int
|
||||
ifpromisc(ifp, pswitch)
|
||||
register struct ifnet *ifp;
|
||||
register int pswitch;
|
||||
struct ifnet *ifp;
|
||||
int pswitch;
|
||||
{
|
||||
register int pcount, ret;
|
||||
register short flags;
|
||||
int pcount, ret;
|
||||
short flags;
|
||||
struct ifreq ifr;
|
||||
|
||||
pcount = ifp->if_pcount;
|
||||
|
@ -1462,10 +1462,10 @@ ifpromisc(ifp, pswitch)
|
|||
*/
|
||||
static caddr_t
|
||||
bpf_alloc(size, canwait)
|
||||
register int size;
|
||||
register int canwait;
|
||||
int size;
|
||||
int canwait;
|
||||
{
|
||||
register struct mbuf *m;
|
||||
struct mbuf *m;
|
||||
|
||||
if ((unsigned)size > (MCLBYTES-8))
|
||||
return 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bpf_filter.c,v 1.14 1997/10/09 18:20:04 christos Exp $ */
|
||||
/* $NetBSD: bpf_filter.c,v 1.15 2000/03/30 09:45:34 augustss Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
|
||||
|
@ -94,12 +94,12 @@ static int m_xhalf __P((struct mbuf *, int, int *));
|
|||
|
||||
static int
|
||||
m_xword(m, k, err)
|
||||
register struct mbuf *m;
|
||||
register int k, *err;
|
||||
struct mbuf *m;
|
||||
int k, *err;
|
||||
{
|
||||
register int len;
|
||||
register u_char *cp, *np;
|
||||
register struct mbuf *m0;
|
||||
int len;
|
||||
u_char *cp, *np;
|
||||
struct mbuf *m0;
|
||||
|
||||
MINDEX(len, m, k);
|
||||
cp = mtod(m, u_char *) + k;
|
||||
|
@ -130,12 +130,12 @@ m_xword(m, k, err)
|
|||
|
||||
static int
|
||||
m_xhalf(m, k, err)
|
||||
register struct mbuf *m;
|
||||
register int k, *err;
|
||||
struct mbuf *m;
|
||||
int k, *err;
|
||||
{
|
||||
register int len;
|
||||
register u_char *cp;
|
||||
register struct mbuf *m0;
|
||||
int len;
|
||||
u_char *cp;
|
||||
struct mbuf *m0;
|
||||
|
||||
MINDEX(len, m, k);
|
||||
cp = mtod(m, u_char *) + k;
|
||||
|
@ -163,13 +163,13 @@ m_xhalf(m, k, err)
|
|||
*/
|
||||
u_int
|
||||
bpf_filter(pc, p, wirelen, buflen)
|
||||
register struct bpf_insn *pc;
|
||||
register u_char *p;
|
||||
struct bpf_insn *pc;
|
||||
u_char *p;
|
||||
u_int wirelen;
|
||||
register u_int buflen;
|
||||
u_int buflen;
|
||||
{
|
||||
register u_int32_t A, X;
|
||||
register int k;
|
||||
u_int32_t A, X;
|
||||
int k;
|
||||
int32_t mem[BPF_MEMWORDS];
|
||||
|
||||
if (pc == 0)
|
||||
|
@ -236,8 +236,8 @@ bpf_filter(pc, p, wirelen, buflen)
|
|||
k = pc->k;
|
||||
if (k >= buflen) {
|
||||
#ifdef _KERNEL
|
||||
register struct mbuf *m;
|
||||
register int len;
|
||||
struct mbuf *m;
|
||||
int len;
|
||||
|
||||
if (buflen != 0)
|
||||
return 0;
|
||||
|
@ -302,8 +302,8 @@ bpf_filter(pc, p, wirelen, buflen)
|
|||
k = X + pc->k;
|
||||
if (k >= buflen) {
|
||||
#ifdef _KERNEL
|
||||
register struct mbuf *m;
|
||||
register int len;
|
||||
struct mbuf *m;
|
||||
int len;
|
||||
|
||||
if (buflen != 0)
|
||||
return 0;
|
||||
|
@ -322,8 +322,8 @@ bpf_filter(pc, p, wirelen, buflen)
|
|||
k = pc->k;
|
||||
if (k >= buflen) {
|
||||
#ifdef _KERNEL
|
||||
register struct mbuf *m;
|
||||
register int len;
|
||||
struct mbuf *m;
|
||||
int len;
|
||||
|
||||
if (buflen != 0)
|
||||
return 0;
|
||||
|
@ -495,8 +495,8 @@ bpf_validate(f, len)
|
|||
struct bpf_insn *f;
|
||||
int len;
|
||||
{
|
||||
register int i;
|
||||
register struct bpf_insn *p;
|
||||
int i;
|
||||
struct bpf_insn *p;
|
||||
|
||||
for (i = 0; i < len; ++i) {
|
||||
/*
|
||||
|
@ -505,7 +505,7 @@ bpf_validate(f, len)
|
|||
*/
|
||||
p = &f[i];
|
||||
if (BPF_CLASS(p->code) == BPF_JMP) {
|
||||
register int from = i + 1;
|
||||
int from = i + 1;
|
||||
|
||||
if (BPF_OP(p->code) == BPF_JA) {
|
||||
if ((p->k < 0) ||
|
||||
|
|
72
sys/net/if.c
72
sys/net/if.c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if.c,v 1.60 2000/03/30 02:31:59 simonb Exp $ */
|
||||
/* $NetBSD: if.c,v 1.61 2000/03/30 09:45:34 augustss Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -242,8 +242,8 @@ if_attach(ifp)
|
|||
{
|
||||
unsigned socksize, ifasize;
|
||||
int namelen, masklen;
|
||||
register struct sockaddr_dl *sdl;
|
||||
register struct ifaddr *ifa;
|
||||
struct sockaddr_dl *sdl;
|
||||
struct ifaddr *ifa;
|
||||
static size_t if_indexlim = 8;
|
||||
|
||||
if (if_index == 0)
|
||||
|
@ -485,10 +485,10 @@ if_rt_walktree(rn, v)
|
|||
/*ARGSUSED*/
|
||||
struct ifaddr *
|
||||
ifa_ifwithaddr(addr)
|
||||
register struct sockaddr *addr;
|
||||
struct sockaddr *addr;
|
||||
{
|
||||
register struct ifnet *ifp;
|
||||
register struct ifaddr *ifa;
|
||||
struct ifnet *ifp;
|
||||
struct ifaddr *ifa;
|
||||
|
||||
#define equal(a1, a2) \
|
||||
(bcmp((caddr_t)(a1), (caddr_t)(a2), ((struct sockaddr *)(a1))->sa_len) == 0)
|
||||
|
@ -520,10 +520,10 @@ ifa_ifwithaddr(addr)
|
|||
/*ARGSUSED*/
|
||||
struct ifaddr *
|
||||
ifa_ifwithdstaddr(addr)
|
||||
register struct sockaddr *addr;
|
||||
struct sockaddr *addr;
|
||||
{
|
||||
register struct ifnet *ifp;
|
||||
register struct ifaddr *ifa;
|
||||
struct ifnet *ifp;
|
||||
struct ifaddr *ifa;
|
||||
|
||||
for (ifp = TAILQ_FIRST(&ifnet); ifp != NULL;
|
||||
ifp = TAILQ_NEXT(ifp, if_list)) {
|
||||
|
@ -552,9 +552,9 @@ struct ifaddr *
|
|||
ifa_ifwithnet(addr)
|
||||
struct sockaddr *addr;
|
||||
{
|
||||
register struct ifnet *ifp;
|
||||
register struct ifaddr *ifa;
|
||||
register struct sockaddr_dl *sdl;
|
||||
struct ifnet *ifp;
|
||||
struct ifaddr *ifa;
|
||||
struct sockaddr_dl *sdl;
|
||||
struct ifaddr *ifa_maybe = 0;
|
||||
u_int af = addr->sa_family;
|
||||
char *addr_data = addr->sa_data, *cplim;
|
||||
|
@ -584,7 +584,7 @@ ifa_ifwithnet(addr)
|
|||
continue;
|
||||
for (ifa = TAILQ_FIRST(&ifp->if_addrlist); ifa != NULL;
|
||||
ifa = TAILQ_NEXT(ifa, ifa_list)) {
|
||||
register char *cp, *cp2, *cp3;
|
||||
char *cp, *cp2, *cp3;
|
||||
|
||||
if (ifa->ifa_addr->sa_family != af ||
|
||||
ifa->ifa_netmask == 0)
|
||||
|
@ -629,10 +629,10 @@ ifa_ifwithladdr(addr)
|
|||
*/
|
||||
struct ifaddr *
|
||||
ifa_ifwithaf(af)
|
||||
register int af;
|
||||
int af;
|
||||
{
|
||||
register struct ifnet *ifp;
|
||||
register struct ifaddr *ifa;
|
||||
struct ifnet *ifp;
|
||||
struct ifaddr *ifa;
|
||||
|
||||
for (ifp = TAILQ_FIRST(&ifnet); ifp != NULL;
|
||||
ifp = TAILQ_NEXT(ifp, if_list)) {
|
||||
|
@ -654,11 +654,11 @@ ifa_ifwithaf(af)
|
|||
struct ifaddr *
|
||||
ifaof_ifpforaddr(addr, ifp)
|
||||
struct sockaddr *addr;
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
{
|
||||
register struct ifaddr *ifa;
|
||||
register char *cp, *cp2, *cp3;
|
||||
register char *cplim;
|
||||
struct ifaddr *ifa;
|
||||
char *cp, *cp2, *cp3;
|
||||
char *cplim;
|
||||
struct ifaddr *ifa_maybe = 0;
|
||||
u_int af = addr->sa_family;
|
||||
|
||||
|
@ -702,10 +702,10 @@ ifaof_ifpforaddr(addr, ifp)
|
|||
void
|
||||
link_rtrequest(cmd, rt, sa)
|
||||
int cmd;
|
||||
register struct rtentry *rt;
|
||||
struct rtentry *rt;
|
||||
struct sockaddr *sa;
|
||||
{
|
||||
register struct ifaddr *ifa;
|
||||
struct ifaddr *ifa;
|
||||
struct sockaddr *dst;
|
||||
struct ifnet *ifp;
|
||||
|
||||
|
@ -728,9 +728,9 @@ link_rtrequest(cmd, rt, sa)
|
|||
*/
|
||||
void
|
||||
if_down(ifp)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
{
|
||||
register struct ifaddr *ifa;
|
||||
struct ifaddr *ifa;
|
||||
|
||||
ifp->if_flags &= ~IFF_UP;
|
||||
for (ifa = TAILQ_FIRST(&ifp->if_addrlist); ifa != NULL;
|
||||
|
@ -747,10 +747,10 @@ if_down(ifp)
|
|||
*/
|
||||
void
|
||||
if_up(ifp)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
{
|
||||
#ifdef notyet
|
||||
register struct ifaddr *ifa;
|
||||
struct ifaddr *ifa;
|
||||
#endif
|
||||
|
||||
ifp->if_flags |= IFF_UP;
|
||||
|
@ -771,9 +771,9 @@ if_up(ifp)
|
|||
*/
|
||||
void
|
||||
if_qflush(ifq)
|
||||
register struct ifqueue *ifq;
|
||||
struct ifqueue *ifq;
|
||||
{
|
||||
register struct mbuf *m, *n;
|
||||
struct mbuf *m, *n;
|
||||
|
||||
n = ifq->ifq_head;
|
||||
while ((m = n) != NULL) {
|
||||
|
@ -794,7 +794,7 @@ void
|
|||
if_slowtimo(arg)
|
||||
void *arg;
|
||||
{
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
int s = splimp();
|
||||
|
||||
for (ifp = TAILQ_FIRST(&ifnet); ifp != NULL;
|
||||
|
@ -817,7 +817,7 @@ struct ifnet *
|
|||
ifunit(name)
|
||||
const char *name;
|
||||
{
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
|
||||
for (ifp = TAILQ_FIRST(&ifnet); ifp != NULL;
|
||||
ifp = TAILQ_NEXT(ifp, if_list)) {
|
||||
|
@ -839,8 +839,8 @@ ifioctl(so, cmd, data, p)
|
|||
caddr_t data;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct ifnet *ifp;
|
||||
register struct ifreq *ifr;
|
||||
struct ifnet *ifp;
|
||||
struct ifreq *ifr;
|
||||
int error = 0;
|
||||
short oif_flags;
|
||||
|
||||
|
@ -1018,9 +1018,9 @@ ifconf(cmd, data)
|
|||
u_long cmd;
|
||||
caddr_t data;
|
||||
{
|
||||
register struct ifconf *ifc = (struct ifconf *)data;
|
||||
register struct ifnet *ifp;
|
||||
register struct ifaddr *ifa;
|
||||
struct ifconf *ifc = (struct ifconf *)data;
|
||||
struct ifnet *ifp;
|
||||
struct ifaddr *ifa;
|
||||
struct ifreq ifr, *ifrp;
|
||||
int space = ifc->ifc_len, error = 0;
|
||||
|
||||
|
@ -1037,7 +1037,7 @@ ifconf(cmd, data)
|
|||
space -= sizeof (ifr), ifrp++;
|
||||
} else
|
||||
for (; space >= sizeof (ifr) && ifa != 0; ifa = ifa->ifa_list.tqe_next) {
|
||||
register struct sockaddr *sa = ifa->ifa_addr;
|
||||
struct sockaddr *sa = ifa->ifa_addr;
|
||||
#if defined(COMPAT_43) || defined(COMPAT_LINUX) || defined(COMPAT_SVR4)
|
||||
if (cmd == OSIOCGIFCONF) {
|
||||
struct osockaddr *osa =
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_arcsubr.c,v 1.29 1999/12/20 20:27:14 frueauf Exp $ */
|
||||
/* $NetBSD: if_arcsubr.c,v 1.30 2000/03/30 09:45:34 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Ignatios Souvatzis
|
||||
|
@ -110,7 +110,7 @@ static void arc_input __P((struct ifnet *, struct mbuf *));
|
|||
*/
|
||||
static int
|
||||
arc_output(ifp, m0, dst, rt0)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
struct mbuf *m0;
|
||||
struct sockaddr *dst;
|
||||
struct rtentry *rt0;
|
||||
|
@ -553,8 +553,8 @@ arc_input(ifp, m)
|
|||
struct ifnet *ifp;
|
||||
struct mbuf *m;
|
||||
{
|
||||
register struct arc_header *ah;
|
||||
register struct ifqueue *inq;
|
||||
struct arc_header *ah;
|
||||
struct ifqueue *inq;
|
||||
u_int8_t atype;
|
||||
int s;
|
||||
struct arphdr *arph;
|
||||
|
@ -640,10 +640,10 @@ arc_input(ifp, m)
|
|||
static char digits[] = "0123456789abcdef";
|
||||
char *
|
||||
arc_sprintf(ap)
|
||||
register u_int8_t *ap;
|
||||
u_int8_t *ap;
|
||||
{
|
||||
static char arcbuf[3];
|
||||
register char *cp = arcbuf;
|
||||
char *cp = arcbuf;
|
||||
|
||||
*cp++ = digits[*ap >> 4];
|
||||
*cp++ = digits[*ap++ & 0xf];
|
||||
|
@ -659,7 +659,7 @@ arc_storelladdr(ifp, lla)
|
|||
struct ifnet *ifp;
|
||||
u_int8_t lla;
|
||||
{
|
||||
register struct sockaddr_dl *sdl;
|
||||
struct sockaddr_dl *sdl;
|
||||
if ((sdl = ifp->if_sadl) &&
|
||||
sdl->sdl_family == AF_LINK) {
|
||||
sdl->sdl_type = IFT_ARCNET;
|
||||
|
@ -674,10 +674,10 @@ arc_storelladdr(ifp, lla)
|
|||
*/
|
||||
void
|
||||
arc_ifattach(ifp, lla)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
u_int8_t lla;
|
||||
{
|
||||
register struct arccom *ac;
|
||||
struct arccom *ac;
|
||||
|
||||
ifp->if_type = IFT_ARCNET;
|
||||
ifp->if_addrlen = 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_atmsubr.c,v 1.21 2000/01/28 13:27:29 enami Exp $ */
|
||||
/* $NetBSD: if_atmsubr.c,v 1.22 2000/03/30 09:45:35 augustss Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -90,7 +90,7 @@
|
|||
|
||||
int
|
||||
atm_output(ifp, m0, dst, rt0)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
struct mbuf *m0;
|
||||
struct sockaddr *dst;
|
||||
struct rtentry *rt0;
|
||||
|
@ -98,8 +98,8 @@ atm_output(ifp, m0, dst, rt0)
|
|||
u_int16_t etype = 0; /* if using LLC/SNAP */
|
||||
int s, error = 0, sz;
|
||||
struct atm_pseudohdr atmdst, *ad;
|
||||
register struct mbuf *m = m0;
|
||||
register struct rtentry *rt;
|
||||
struct mbuf *m = m0;
|
||||
struct rtentry *rt;
|
||||
struct atmllc *atmllc;
|
||||
struct atmllc *llc_hdr = NULL;
|
||||
u_int32_t atm_flags;
|
||||
|
@ -240,11 +240,11 @@ bad:
|
|||
void
|
||||
atm_input(ifp, ah, m, rxhand)
|
||||
struct ifnet *ifp;
|
||||
register struct atm_pseudohdr *ah;
|
||||
struct atm_pseudohdr *ah;
|
||||
struct mbuf *m;
|
||||
void *rxhand;
|
||||
{
|
||||
register struct ifqueue *inq;
|
||||
struct ifqueue *inq;
|
||||
u_int16_t etype = ETHERTYPE_IP; /* default */
|
||||
int s;
|
||||
|
||||
|
@ -330,10 +330,10 @@ atm_input(ifp, ah, m, rxhand)
|
|||
*/
|
||||
void
|
||||
atm_ifattach(ifp)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
{
|
||||
register struct ifaddr *ifa;
|
||||
register struct sockaddr_dl *sdl;
|
||||
struct ifaddr *ifa;
|
||||
struct sockaddr_dl *sdl;
|
||||
|
||||
ifp->if_type = IFT_ATM;
|
||||
ifp->if_addrlen = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_faith.c,v 1.10 2000/02/06 12:49:37 itojun Exp $ */
|
||||
/* $NetBSD: if_faith.c,v 1.11 2000/03/30 09:45:35 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
|
@ -82,8 +82,8 @@
|
|||
#include <net/net_osdep.h>
|
||||
|
||||
static int faithioctl __P((struct ifnet *, u_long, caddr_t));
|
||||
int faithoutput __P((struct ifnet *, register struct mbuf *, struct sockaddr *,
|
||||
register struct rtentry *));
|
||||
int faithoutput __P((struct ifnet *, struct mbuf *, struct sockaddr *,
|
||||
struct rtentry *));
|
||||
static void faithrtrequest __P((int, struct rtentry *, struct sockaddr *));
|
||||
|
||||
void faithattach __P((int));
|
||||
|
@ -97,8 +97,8 @@ void
|
|||
faithattach(faith)
|
||||
int faith;
|
||||
{
|
||||
register struct ifnet *ifp;
|
||||
register int i;
|
||||
struct ifnet *ifp;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NFAITH; i++) {
|
||||
ifp = &faithif[i];
|
||||
|
@ -126,12 +126,12 @@ faithattach(faith)
|
|||
int
|
||||
faithoutput(ifp, m, dst, rt)
|
||||
struct ifnet *ifp;
|
||||
register struct mbuf *m;
|
||||
struct mbuf *m;
|
||||
struct sockaddr *dst;
|
||||
register struct rtentry *rt;
|
||||
struct rtentry *rt;
|
||||
{
|
||||
int s, isr;
|
||||
register struct ifqueue *ifq = 0;
|
||||
struct ifqueue *ifq = 0;
|
||||
|
||||
if ((m->m_flags & M_PKTHDR) == 0)
|
||||
panic("faithoutput no HDR");
|
||||
|
@ -235,13 +235,13 @@ faithrtrequest(cmd, rt, sa)
|
|||
/* ARGSUSED */
|
||||
static int
|
||||
faithioctl(ifp, cmd, data)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
{
|
||||
register struct ifaddr *ifa;
|
||||
register struct ifreq *ifr = (struct ifreq *)data;
|
||||
register int error = 0;
|
||||
struct ifaddr *ifa;
|
||||
struct ifreq *ifr = (struct ifreq *)data;
|
||||
int error = 0;
|
||||
|
||||
switch (cmd) {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_fddisubr.c,v 1.30 2000/03/06 20:52:12 thorpej Exp $ */
|
||||
/* $NetBSD: if_fddisubr.c,v 1.31 2000/03/30 09:45:35 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -199,7 +199,7 @@ static void fddi_input __P((struct ifnet *, struct mbuf *));
|
|||
*/
|
||||
static int
|
||||
fddi_output(ifp, m0, dst, rt0)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
struct mbuf *m0;
|
||||
struct sockaddr *dst;
|
||||
struct rtentry *rt0;
|
||||
|
@ -207,9 +207,9 @@ fddi_output(ifp, m0, dst, rt0)
|
|||
u_int16_t etype;
|
||||
int s, error = 0, hdrcmplt = 0;
|
||||
u_char esrc[6], edst[6];
|
||||
register struct mbuf *m = m0;
|
||||
register struct rtentry *rt;
|
||||
register struct fddi_header *fh;
|
||||
struct mbuf *m = m0;
|
||||
struct rtentry *rt;
|
||||
struct fddi_header *fh;
|
||||
struct mbuf *mcopy = (struct mbuf *)0;
|
||||
|
||||
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
|
||||
|
@ -379,7 +379,7 @@ fddi_output(ifp, m0, dst, rt0)
|
|||
case AF_ISO: {
|
||||
int snpalen;
|
||||
struct llc *l;
|
||||
register struct sockaddr_dl *sdl;
|
||||
struct sockaddr_dl *sdl;
|
||||
|
||||
if (rt && (sdl = (struct sockaddr_dl *)rt->rt_gateway) &&
|
||||
sdl->sdl_family == AF_LINK && sdl->sdl_alen > 0) {
|
||||
|
@ -423,7 +423,7 @@ fddi_output(ifp, m0, dst, rt0)
|
|||
#ifdef LLC
|
||||
/* case AF_NSAP: */
|
||||
case AF_CCITT: {
|
||||
register struct sockaddr_dl *sdl =
|
||||
struct sockaddr_dl *sdl =
|
||||
(struct sockaddr_dl *) rt->rt_gateway;
|
||||
|
||||
if (sdl && sdl->sdl_family == AF_LINK
|
||||
|
@ -447,7 +447,7 @@ fddi_output(ifp, m0, dst, rt0)
|
|||
#ifdef LLC_DEBUG
|
||||
{
|
||||
int i;
|
||||
register struct llc *l = mtod(m, struct llc *);
|
||||
struct llc *l = mtod(m, struct llc *);
|
||||
|
||||
printf("fddi_output: sending LLC2 pkt to: ");
|
||||
for (i=0; i<6; i++)
|
||||
|
@ -531,7 +531,7 @@ fddi_output(ifp, m0, dst, rt0)
|
|||
if (mcopy)
|
||||
(void) looutput(ifp, mcopy, dst, rt);
|
||||
if (etype != 0) {
|
||||
register struct llc *l;
|
||||
struct llc *l;
|
||||
M_PREPEND(m, sizeof (struct llc), M_DONTWAIT);
|
||||
if (m == 0)
|
||||
senderr(ENOBUFS);
|
||||
|
@ -596,8 +596,8 @@ fddi_input(ifp, m)
|
|||
struct ifnet *ifp;
|
||||
struct mbuf *m;
|
||||
{
|
||||
register struct ifqueue *inq;
|
||||
register struct llc *l;
|
||||
struct ifqueue *inq;
|
||||
struct llc *l;
|
||||
struct fddi_header *fh;
|
||||
int s;
|
||||
|
||||
|
@ -769,7 +769,7 @@ fddi_input(ifp, m)
|
|||
case LLC_TEST_P:
|
||||
{
|
||||
struct sockaddr sa;
|
||||
register struct ether_header *eh;
|
||||
struct ether_header *eh;
|
||||
int i;
|
||||
u_char c = l->llc_dsap;
|
||||
|
||||
|
@ -836,18 +836,18 @@ fddi_input(ifp, m)
|
|||
#if defined(__NetBSD__)
|
||||
void
|
||||
fddi_ifattach(ifp, lla)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
caddr_t lla;
|
||||
#else
|
||||
void
|
||||
fddi_ifattach(ifp)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
#endif
|
||||
{
|
||||
#if !defined(__NetBSD__)
|
||||
register struct ifaddr *ifa;
|
||||
struct ifaddr *ifa;
|
||||
#endif
|
||||
register struct sockaddr_dl *sdl;
|
||||
struct sockaddr_dl *sdl;
|
||||
|
||||
ifp->if_type = IFT_FDDI;
|
||||
ifp->if_addrlen = 6;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_gif.c,v 1.7 2000/01/17 06:29:07 itojun Exp $ */
|
||||
/* $NetBSD: if_gif.c,v 1.8 2000/03/30 09:45:35 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -92,8 +92,8 @@ void
|
|||
gifattach(dummy)
|
||||
int dummy;
|
||||
{
|
||||
register struct gif_softc *sc;
|
||||
register int i;
|
||||
struct gif_softc *sc;
|
||||
int i;
|
||||
|
||||
gif = sc = malloc (ngif * sizeof(struct gif_softc), M_DEVBUF, M_WAIT);
|
||||
bzero(sc, ngif * sizeof(struct gif_softc));
|
||||
|
@ -118,7 +118,7 @@ gif_output(ifp, m, dst, rt)
|
|||
struct sockaddr *dst;
|
||||
struct rtentry *rt; /* added in net2 */
|
||||
{
|
||||
register struct gif_softc *sc = (struct gif_softc*)ifp;
|
||||
struct gif_softc *sc = (struct gif_softc*)ifp;
|
||||
int error = 0;
|
||||
static int called = 0; /* XXX: MUTEX */
|
||||
int calllimit = 10; /* XXX: adhoc */
|
||||
|
@ -210,7 +210,7 @@ gif_input(m, af, gifp)
|
|||
struct ifnet *gifp;
|
||||
{
|
||||
int s, isr;
|
||||
register struct ifqueue *ifq = 0;
|
||||
struct ifqueue *ifq = 0;
|
||||
|
||||
if (gifp == NULL) {
|
||||
/* just in case */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_hippisubr.c,v 1.4 2000/03/06 20:51:27 thorpej Exp $ */
|
||||
/* $NetBSD: if_hippisubr.c,v 1.5 2000/03/30 09:45:35 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1989, 1993
|
||||
|
@ -164,7 +164,7 @@ hippi_output(ifp, m0, dst, rt0)
|
|||
}
|
||||
|
||||
if (htype != 0) {
|
||||
register struct llc *l;
|
||||
struct llc *l;
|
||||
M_PREPEND(m, sizeof (struct llc), M_DONTWAIT);
|
||||
if (m == 0)
|
||||
senderr(ENOBUFS);
|
||||
|
@ -238,8 +238,8 @@ hippi_input(ifp, m)
|
|||
struct ifnet *ifp;
|
||||
struct mbuf *m;
|
||||
{
|
||||
register struct ifqueue *inq;
|
||||
register struct llc *l;
|
||||
struct ifqueue *inq;
|
||||
struct llc *l;
|
||||
u_int16_t htype;
|
||||
struct hippi_header *hh;
|
||||
int s;
|
||||
|
@ -309,7 +309,7 @@ hippi_ip_input(ifp, m)
|
|||
struct ifnet *ifp;
|
||||
struct mbuf *m;
|
||||
{
|
||||
register struct ifqueue *inq;
|
||||
struct ifqueue *inq;
|
||||
int s;
|
||||
u_int32_t *ip;
|
||||
|
||||
|
@ -333,10 +333,10 @@ hippi_ip_input(ifp, m)
|
|||
*/
|
||||
void
|
||||
hippi_ifattach(ifp, lla)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
caddr_t lla;
|
||||
{
|
||||
register struct sockaddr_dl *sdl;
|
||||
struct sockaddr_dl *sdl;
|
||||
|
||||
ifp->if_type = IFT_HIPPI;
|
||||
ifp->if_addrlen = 6; /* regular 802.3 MAC address */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_loop.c,v 1.29 2000/02/06 12:49:37 itojun Exp $ */
|
||||
/* $NetBSD: if_loop.c,v 1.30 2000/03/30 09:45:36 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -143,8 +143,8 @@ void
|
|||
loopattach(n)
|
||||
int n;
|
||||
{
|
||||
register int i;
|
||||
register struct ifnet *ifp;
|
||||
int i;
|
||||
struct ifnet *ifp;
|
||||
|
||||
for (i = 0; i < NLOOP; i++) {
|
||||
ifp = &loif[i];
|
||||
|
@ -167,12 +167,12 @@ loopattach(n)
|
|||
int
|
||||
looutput(ifp, m, dst, rt)
|
||||
struct ifnet *ifp;
|
||||
register struct mbuf *m;
|
||||
struct mbuf *m;
|
||||
struct sockaddr *dst;
|
||||
register struct rtentry *rt;
|
||||
struct rtentry *rt;
|
||||
{
|
||||
int s, isr;
|
||||
register struct ifqueue *ifq = 0;
|
||||
struct ifqueue *ifq = 0;
|
||||
|
||||
if ((m->m_flags & M_PKTHDR) == 0)
|
||||
panic("looutput: no header mbuf");
|
||||
|
@ -336,13 +336,13 @@ lortrequest(cmd, rt, sa)
|
|||
/* ARGSUSED */
|
||||
int
|
||||
loioctl(ifp, cmd, data)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
{
|
||||
register struct ifaddr *ifa;
|
||||
register struct ifreq *ifr;
|
||||
register int error = 0;
|
||||
struct ifaddr *ifa;
|
||||
struct ifreq *ifr;
|
||||
int error = 0;
|
||||
|
||||
switch (cmd) {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_media.c,v 1.10 2000/03/13 23:52:39 soren Exp $ */
|
||||
/* $NetBSD: if_media.c,v 1.11 2000/03/30 09:45:36 augustss Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -135,7 +135,7 @@ ifmedia_add(ifm, mword, data, aux)
|
|||
int data;
|
||||
void *aux;
|
||||
{
|
||||
register struct ifmedia_entry *entry;
|
||||
struct ifmedia_entry *entry;
|
||||
|
||||
#ifdef IFMEDIA_DEBUG
|
||||
if (ifmedia_debug) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_ppp.c,v 1.57 2000/03/23 07:03:25 thorpej Exp $ */
|
||||
/* $NetBSD: if_ppp.c,v 1.58 2000/03/30 09:45:36 augustss Exp $ */
|
||||
/* Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp */
|
||||
|
||||
/*
|
||||
|
@ -196,8 +196,8 @@ struct compressor *ppp_compressors[8] = {
|
|||
void
|
||||
pppattach()
|
||||
{
|
||||
register struct ppp_softc *sc;
|
||||
register int i = 0;
|
||||
struct ppp_softc *sc;
|
||||
int i = 0;
|
||||
|
||||
for (sc = ppp_softc; i < NPPP; sc++) {
|
||||
sc->sc_unit = i; /* XXX */
|
||||
|
@ -584,14 +584,14 @@ pppioctl(sc, cmd, data, flag, p)
|
|||
*/
|
||||
static int
|
||||
pppsioctl(ifp, cmd, data)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
{
|
||||
register struct proc *p = curproc; /* XXX */
|
||||
register struct ppp_softc *sc = ifp->if_softc;
|
||||
register struct ifaddr *ifa = (struct ifaddr *)data;
|
||||
register struct ifreq *ifr = (struct ifreq *)data;
|
||||
struct proc *p = curproc; /* XXX */
|
||||
struct ppp_softc *sc = ifp->if_softc;
|
||||
struct ifaddr *ifa = (struct ifaddr *)data;
|
||||
struct ifreq *ifr = (struct ifreq *)data;
|
||||
struct ppp_stats *psp;
|
||||
#ifdef PPP_COMPRESS
|
||||
struct ppp_comp_stats *pcp;
|
||||
|
@ -714,7 +714,7 @@ pppoutput(ifp, m0, dst, rtp)
|
|||
struct sockaddr *dst;
|
||||
struct rtentry *rtp;
|
||||
{
|
||||
register struct ppp_softc *sc = ifp->if_softc;
|
||||
struct ppp_softc *sc = ifp->if_softc;
|
||||
int protocol, address, control;
|
||||
u_char *cp;
|
||||
int s, error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_sl.c,v 1.56 2000/03/29 03:43:33 simonb Exp $ */
|
||||
/* $NetBSD: if_sl.c,v 1.57 2000/03/30 09:45:36 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987, 1989, 1992, 1993
|
||||
|
@ -198,8 +198,8 @@ static struct mbuf *sl_btom __P((struct sl_softc *, int));
|
|||
void
|
||||
slattach()
|
||||
{
|
||||
register struct sl_softc *sc;
|
||||
register int i = 0;
|
||||
struct sl_softc *sc;
|
||||
int i = 0;
|
||||
|
||||
for (sc = sl_softc; i < NSL; sc++) {
|
||||
sc->sc_unit = i; /* XXX */
|
||||
|
@ -222,7 +222,7 @@ slattach()
|
|||
|
||||
static int
|
||||
slinit(sc)
|
||||
register struct sl_softc *sc;
|
||||
struct sl_softc *sc;
|
||||
{
|
||||
|
||||
if (sc->sc_ep == NULL) {
|
||||
|
@ -252,11 +252,11 @@ slinit(sc)
|
|||
int
|
||||
slopen(dev, tp)
|
||||
dev_t dev;
|
||||
register struct tty *tp;
|
||||
struct tty *tp;
|
||||
{
|
||||
struct proc *p = curproc; /* XXX */
|
||||
register struct sl_softc *sc;
|
||||
register int nsl;
|
||||
struct sl_softc *sc;
|
||||
int nsl;
|
||||
int error;
|
||||
int s;
|
||||
|
||||
|
@ -314,7 +314,7 @@ void
|
|||
slclose(tp)
|
||||
struct tty *tp;
|
||||
{
|
||||
register struct sl_softc *sc;
|
||||
struct sl_softc *sc;
|
||||
int s;
|
||||
|
||||
ttywflush(tp);
|
||||
|
@ -375,13 +375,13 @@ sltioctl(tp, cmd, data, flag)
|
|||
int
|
||||
sloutput(ifp, m, dst, rtp)
|
||||
struct ifnet *ifp;
|
||||
register struct mbuf *m;
|
||||
struct mbuf *m;
|
||||
struct sockaddr *dst;
|
||||
struct rtentry *rtp;
|
||||
{
|
||||
register struct sl_softc *sc = ifp->if_softc;
|
||||
register struct ip *ip;
|
||||
register struct ifqueue *ifq;
|
||||
struct sl_softc *sc = ifp->if_softc;
|
||||
struct ip *ip;
|
||||
struct ifqueue *ifq;
|
||||
int s;
|
||||
|
||||
/*
|
||||
|
@ -447,17 +447,17 @@ sloutput(ifp, m, dst, rtp)
|
|||
*/
|
||||
void
|
||||
slstart(tp)
|
||||
register struct tty *tp;
|
||||
struct tty *tp;
|
||||
{
|
||||
register struct sl_softc *sc = (struct sl_softc *)tp->t_sc;
|
||||
register struct mbuf *m;
|
||||
register u_char *cp;
|
||||
register struct ip *ip;
|
||||
struct sl_softc *sc = (struct sl_softc *)tp->t_sc;
|
||||
struct mbuf *m;
|
||||
u_char *cp;
|
||||
struct ip *ip;
|
||||
int s;
|
||||
struct mbuf *m2;
|
||||
#if NBPFILTER > 0
|
||||
u_char *bpfbuf;
|
||||
register int len = 0;
|
||||
int len = 0;
|
||||
#endif
|
||||
#ifndef __NetBSD__ /* XXX - cgd */
|
||||
extern int cfreecount;
|
||||
|
@ -539,12 +539,12 @@ slstart(tp)
|
|||
* and/or the copy should be negligible cost compared
|
||||
* to the packet transmission time).
|
||||
*/
|
||||
register struct mbuf *m1 = m;
|
||||
register u_char *cp = bpfbuf + SLIP_HDRLEN;
|
||||
struct mbuf *m1 = m;
|
||||
u_char *cp = bpfbuf + SLIP_HDRLEN;
|
||||
|
||||
len = 0;
|
||||
do {
|
||||
register int mlen = m1->m_len;
|
||||
int mlen = m1->m_len;
|
||||
|
||||
bcopy(mtod(m1, caddr_t), cp, mlen);
|
||||
cp += mlen;
|
||||
|
@ -594,7 +594,7 @@ slstart(tp)
|
|||
}
|
||||
|
||||
while (m) {
|
||||
register u_char *ep;
|
||||
u_char *ep;
|
||||
|
||||
cp = mtod(m, u_char *); ep = cp + m->m_len;
|
||||
while (cp < ep) {
|
||||
|
@ -602,7 +602,7 @@ slstart(tp)
|
|||
* Find out how many bytes in the string we can
|
||||
* handle without doing something special.
|
||||
*/
|
||||
register u_char *bp = cp;
|
||||
u_char *bp = cp;
|
||||
|
||||
while (cp < ep) {
|
||||
switch (*cp++) {
|
||||
|
@ -671,11 +671,11 @@ slstart(tp)
|
|||
*/
|
||||
static struct mbuf *
|
||||
sl_btom(sc, len)
|
||||
register struct sl_softc *sc;
|
||||
register int len;
|
||||
struct sl_softc *sc;
|
||||
int len;
|
||||
{
|
||||
register struct mbuf *m;
|
||||
register u_char *p;
|
||||
struct mbuf *m;
|
||||
u_char *p;
|
||||
|
||||
MGETHDR(m, M_DONTWAIT, MT_DATA);
|
||||
if (m == NULL)
|
||||
|
@ -720,12 +720,12 @@ sl_btom(sc, len)
|
|||
*/
|
||||
void
|
||||
slinput(c, tp)
|
||||
register int c;
|
||||
register struct tty *tp;
|
||||
int c;
|
||||
struct tty *tp;
|
||||
{
|
||||
register struct sl_softc *sc;
|
||||
register struct mbuf *m;
|
||||
register int len;
|
||||
struct sl_softc *sc;
|
||||
struct mbuf *m;
|
||||
int len;
|
||||
int s;
|
||||
#if NBPFILTER > 0
|
||||
u_char chdr[CHDR_LEN];
|
||||
|
@ -845,7 +845,7 @@ slinput(c, tp)
|
|||
* decompression probably moved the buffer
|
||||
* pointer. Then, invoke BPF.
|
||||
*/
|
||||
register u_char *hp = sc->sc_buf - SLIP_HDRLEN;
|
||||
u_char *hp = sc->sc_buf - SLIP_HDRLEN;
|
||||
|
||||
hp[SLX_DIR] = SLIPDIR_IN;
|
||||
bcopy(chdr, &hp[SLX_CHDR], CHDR_LEN);
|
||||
|
@ -892,14 +892,14 @@ newpack:
|
|||
*/
|
||||
int
|
||||
slioctl(ifp, cmd, data)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
{
|
||||
register struct ifaddr *ifa = (struct ifaddr *)data;
|
||||
register struct ifreq *ifr = (struct ifreq *)data;
|
||||
register int s = splimp(), error = 0;
|
||||
register struct sl_softc *sc = ifp->if_softc;
|
||||
struct ifaddr *ifa = (struct ifaddr *)data;
|
||||
struct ifreq *ifr = (struct ifreq *)data;
|
||||
int s = splimp(), error = 0;
|
||||
struct sl_softc *sc = ifp->if_softc;
|
||||
|
||||
switch (cmd) {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_strip.c,v 1.18 2000/03/29 03:43:33 simonb Exp $ */
|
||||
/* $NetBSD: if_strip.c,v 1.19 2000/03/30 09:45:37 augustss Exp $ */
|
||||
/* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -342,8 +342,8 @@ void
|
|||
stripattach(n)
|
||||
int n;
|
||||
{
|
||||
register struct strip_softc *sc;
|
||||
register int i = 0;
|
||||
struct strip_softc *sc;
|
||||
int i = 0;
|
||||
|
||||
for (sc = strip_softc; i < NSTRIP; sc++) {
|
||||
sc->sc_unit = i; /* XXX */
|
||||
|
@ -372,9 +372,9 @@ stripattach(n)
|
|||
|
||||
static int
|
||||
stripinit(sc)
|
||||
register struct strip_softc *sc;
|
||||
struct strip_softc *sc;
|
||||
{
|
||||
register u_char *p;
|
||||
u_char *p;
|
||||
|
||||
if (sc->sc_ep == NULL) {
|
||||
/*
|
||||
|
@ -437,11 +437,11 @@ stripinit(sc)
|
|||
int
|
||||
stripopen(dev, tp)
|
||||
dev_t dev;
|
||||
register struct tty *tp;
|
||||
struct tty *tp;
|
||||
{
|
||||
struct proc *p = curproc; /* XXX */
|
||||
register struct strip_softc *sc;
|
||||
register int nstrip;
|
||||
struct strip_softc *sc;
|
||||
int nstrip;
|
||||
int error;
|
||||
#ifdef __NetBSD__
|
||||
int s;
|
||||
|
@ -509,7 +509,7 @@ void
|
|||
stripclose(tp)
|
||||
struct tty *tp;
|
||||
{
|
||||
register struct strip_softc *sc;
|
||||
struct strip_softc *sc;
|
||||
int s;
|
||||
|
||||
ttywflush(tp);
|
||||
|
@ -587,10 +587,10 @@ strip_sendbody(sc, m)
|
|||
struct strip_softc *sc;
|
||||
struct mbuf *m;
|
||||
{
|
||||
register struct tty *tp = sc->sc_ttyp;
|
||||
register u_char *dp = sc->sc_txbuf;
|
||||
struct tty *tp = sc->sc_ttyp;
|
||||
u_char *dp = sc->sc_txbuf;
|
||||
struct mbuf *m2;
|
||||
register int len;
|
||||
int len;
|
||||
u_char *rllstate_ptr = NULL;
|
||||
|
||||
while (m) {
|
||||
|
@ -641,7 +641,7 @@ strip_send(sc, m0)
|
|||
struct strip_softc *sc;
|
||||
struct mbuf *m0;
|
||||
{
|
||||
register struct tty *tp = sc->sc_ttyp;
|
||||
struct tty *tp = sc->sc_ttyp;
|
||||
struct st_header *hdr;
|
||||
|
||||
/*
|
||||
|
@ -673,7 +673,7 @@ strip_send(sc, m0)
|
|||
* Discard it.
|
||||
*/
|
||||
if (m0->m_len == 0) {
|
||||
register struct mbuf *m;
|
||||
struct mbuf *m;
|
||||
MFREE(m0, m);
|
||||
m0 = m;
|
||||
}
|
||||
|
@ -718,15 +718,15 @@ strip_send(sc, m0)
|
|||
int
|
||||
stripoutput(ifp, m, dst, rt)
|
||||
struct ifnet *ifp;
|
||||
register struct mbuf *m;
|
||||
struct mbuf *m;
|
||||
struct sockaddr *dst;
|
||||
struct rtentry *rt;
|
||||
{
|
||||
register struct strip_softc *sc = ifp->if_softc;
|
||||
register struct ip *ip;
|
||||
register struct ifqueue *ifq;
|
||||
register struct st_header *shp;
|
||||
register const u_char *dldst; /* link-level next-hop */
|
||||
struct strip_softc *sc = ifp->if_softc;
|
||||
struct ip *ip;
|
||||
struct ifqueue *ifq;
|
||||
struct st_header *shp;
|
||||
const u_char *dldst; /* link-level next-hop */
|
||||
int s;
|
||||
u_char dl_addrbuf[STARMODE_ADDR_LEN+1];
|
||||
|
||||
|
@ -888,15 +888,15 @@ stripoutput(ifp, m, dst, rt)
|
|||
*/
|
||||
void
|
||||
stripstart(tp)
|
||||
register struct tty *tp;
|
||||
struct tty *tp;
|
||||
{
|
||||
register struct strip_softc *sc = (struct strip_softc *)tp->t_sc;
|
||||
register struct mbuf *m;
|
||||
register struct ip *ip;
|
||||
struct strip_softc *sc = (struct strip_softc *)tp->t_sc;
|
||||
struct mbuf *m;
|
||||
struct ip *ip;
|
||||
int s;
|
||||
#if NBPFILTER > 0
|
||||
u_char bpfbuf[SLMTU + SLIP_HDRLEN];
|
||||
register int len = 0;
|
||||
int len = 0;
|
||||
#endif
|
||||
#ifndef __NetBSD__ /* XXX - cgd */
|
||||
extern int cfreecount;
|
||||
|
@ -974,12 +974,12 @@ stripstart(tp)
|
|||
* and/or the copy should be negligible cost compared
|
||||
* to the packet transmission time).
|
||||
*/
|
||||
register struct mbuf *m1 = m;
|
||||
register u_char *cp = bpfbuf + SLIP_HDRLEN;
|
||||
struct mbuf *m1 = m;
|
||||
u_char *cp = bpfbuf + SLIP_HDRLEN;
|
||||
|
||||
len = 0;
|
||||
do {
|
||||
register int mlen = m1->m_len;
|
||||
int mlen = m1->m_len;
|
||||
|
||||
bcopy(mtod(m1, caddr_t), cp, mlen);
|
||||
cp += mlen;
|
||||
|
@ -994,7 +994,7 @@ stripstart(tp)
|
|||
}
|
||||
#if NBPFILTER > 0
|
||||
if (sc->sc_bpf) {
|
||||
register u_char *cp = bpfbuf + STRIP_HDRLEN;
|
||||
u_char *cp = bpfbuf + STRIP_HDRLEN;
|
||||
/*
|
||||
* Put the SLIP pseudo-"link header" in place. The
|
||||
* compressed header is now at the beginning of the
|
||||
|
@ -1067,11 +1067,11 @@ stripstart(tp)
|
|||
*/
|
||||
static struct mbuf *
|
||||
strip_btom(sc, len)
|
||||
register struct strip_softc *sc;
|
||||
register int len;
|
||||
struct strip_softc *sc;
|
||||
int len;
|
||||
{
|
||||
register struct mbuf *m;
|
||||
register u_char *p;
|
||||
struct mbuf *m;
|
||||
u_char *p;
|
||||
|
||||
MGETHDR(m, M_DONTWAIT, MT_DATA);
|
||||
if (m == NULL)
|
||||
|
@ -1121,12 +1121,12 @@ strip_btom(sc, len)
|
|||
*/
|
||||
void
|
||||
stripinput(c, tp)
|
||||
register int c;
|
||||
register struct tty *tp;
|
||||
int c;
|
||||
struct tty *tp;
|
||||
{
|
||||
register struct strip_softc *sc;
|
||||
register struct mbuf *m;
|
||||
register int len;
|
||||
struct strip_softc *sc;
|
||||
struct mbuf *m;
|
||||
int len;
|
||||
int s;
|
||||
#if NBPFILTER > 0
|
||||
u_char chdr[CHDR_LEN];
|
||||
|
@ -1257,7 +1257,7 @@ stripinput(c, tp)
|
|||
* decompression probably moved the buffer
|
||||
* pointer. Then, invoke BPF.
|
||||
*/
|
||||
register u_char *hp = sc->sc_buf - SLIP_HDRLEN;
|
||||
u_char *hp = sc->sc_buf - SLIP_HDRLEN;
|
||||
|
||||
hp[SLX_DIR] = SLIPDIR_IN;
|
||||
bcopy(chdr, &hp[SLX_CHDR], CHDR_LEN);
|
||||
|
@ -1297,13 +1297,13 @@ newpack:
|
|||
*/
|
||||
int
|
||||
stripioctl(ifp, cmd, data)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
{
|
||||
register struct ifaddr *ifa = (struct ifaddr *)data;
|
||||
register struct ifreq *ifr;
|
||||
register int s, error = 0;
|
||||
struct ifaddr *ifa = (struct ifaddr *)data;
|
||||
struct ifreq *ifr;
|
||||
int s, error = 0;
|
||||
|
||||
s = splimp();
|
||||
|
||||
|
@ -1369,7 +1369,7 @@ strip_resetradio(sc, tp)
|
|||
static ttychar_t InitString[] =
|
||||
"\r\rat\r\r\rate0q1dt**starmode\r**\r";
|
||||
#endif
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* XXX Perhaps flush tty output queue?
|
||||
|
@ -1409,8 +1409,8 @@ strip_resetradio(sc, tp)
|
|||
*/
|
||||
void
|
||||
strip_proberadio(sc, tp)
|
||||
register struct strip_softc *sc;
|
||||
register struct tty *tp;
|
||||
struct strip_softc *sc;
|
||||
struct tty *tp;
|
||||
{
|
||||
|
||||
int overflow;
|
||||
|
@ -1487,7 +1487,7 @@ void
|
|||
strip_watchdog(ifp)
|
||||
struct ifnet *ifp;
|
||||
{
|
||||
register struct strip_softc *sc = ifp->if_softc;
|
||||
struct strip_softc *sc = ifp->if_softc;
|
||||
struct tty *tp = sc->sc_ttyp;
|
||||
|
||||
/*
|
||||
|
@ -1580,10 +1580,10 @@ strip_watchdog(ifp)
|
|||
int
|
||||
strip_newpacket(sc, ptr, end)
|
||||
struct strip_softc *sc;
|
||||
register u_char *ptr, *end;
|
||||
u_char *ptr, *end;
|
||||
{
|
||||
register int len = ptr - end;
|
||||
register u_char *name, *name_end;
|
||||
int len = ptr - end;
|
||||
u_char *name, *name_end;
|
||||
u_int packetlen;
|
||||
|
||||
/* Ignore empty lines */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_tokensubr.c,v 1.8 2000/02/27 03:04:09 soren Exp $ */
|
||||
/* $NetBSD: if_tokensubr.c,v 1.9 2000/03/30 09:45:37 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-1999
|
||||
|
@ -138,7 +138,7 @@ static void token_input __P((struct ifnet *, struct mbuf *));
|
|||
*/
|
||||
static int
|
||||
token_output(ifp, m0, dst, rt0)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
struct mbuf *m0;
|
||||
struct sockaddr *dst;
|
||||
struct rtentry *rt0;
|
||||
|
@ -146,8 +146,8 @@ token_output(ifp, m0, dst, rt0)
|
|||
u_int16_t etype;
|
||||
int s, error = 0;
|
||||
u_char edst[ISO88025_ADDR_LEN];
|
||||
register struct mbuf *m = m0;
|
||||
register struct rtentry *rt;
|
||||
struct mbuf *m = m0;
|
||||
struct rtentry *rt;
|
||||
struct mbuf *mcopy = (struct mbuf *)0;
|
||||
struct token_header *trh;
|
||||
#ifdef INET
|
||||
|
@ -286,7 +286,7 @@ token_output(ifp, m0, dst, rt0)
|
|||
case AF_ISO: {
|
||||
int snpalen;
|
||||
struct llc *l;
|
||||
register struct sockaddr_dl *sdl;
|
||||
struct sockaddr_dl *sdl;
|
||||
|
||||
if (rt && (sdl = (struct sockaddr_dl *)rt->rt_gateway) &&
|
||||
sdl->sdl_family == AF_LINK && sdl->sdl_alen > 0) {
|
||||
|
@ -331,7 +331,7 @@ token_output(ifp, m0, dst, rt0)
|
|||
#ifdef LLC
|
||||
/* case AF_NSAP: */
|
||||
case AF_CCITT: {
|
||||
register struct sockaddr_dl *sdl =
|
||||
struct sockaddr_dl *sdl =
|
||||
(struct sockaddr_dl *) rt -> rt_gateway;
|
||||
|
||||
if (sdl && sdl->sdl_family == AF_LINK
|
||||
|
@ -357,7 +357,7 @@ token_output(ifp, m0, dst, rt0)
|
|||
#ifdef LLC_DEBUG
|
||||
{
|
||||
int i;
|
||||
register struct llc *l = mtod(m, struct llc *);
|
||||
struct llc *l = mtod(m, struct llc *);
|
||||
|
||||
printf("token_output: sending LLC2 pkt to: ");
|
||||
for (i=0; i < ISO88025_ADDR_LEN; i++)
|
||||
|
@ -403,7 +403,7 @@ token_output(ifp, m0, dst, rt0)
|
|||
if (mcopy)
|
||||
(void) looutput(ifp, mcopy, dst, rt);
|
||||
if (etype != 0) {
|
||||
register struct llc *l;
|
||||
struct llc *l;
|
||||
M_PREPEND(m, LLC_SNAPFRAMELEN, M_DONTWAIT);
|
||||
if (m == 0)
|
||||
senderr(ENOBUFS);
|
||||
|
@ -475,8 +475,8 @@ token_input(ifp, m)
|
|||
struct ifnet *ifp;
|
||||
struct mbuf *m;
|
||||
{
|
||||
register struct ifqueue *inq;
|
||||
register struct llc *l;
|
||||
struct ifqueue *inq;
|
||||
struct llc *l;
|
||||
struct token_header *trh;
|
||||
int s, lan_hdr_len;
|
||||
|
||||
|
@ -594,7 +594,7 @@ token_input(ifp, m)
|
|||
case LLC_TEST_P:
|
||||
{
|
||||
struct sockaddr sa;
|
||||
register struct ether_header *eh;
|
||||
struct ether_header *eh;
|
||||
int i;
|
||||
u_char c = l->llc_dsap;
|
||||
|
||||
|
@ -672,10 +672,10 @@ token_input(ifp, m)
|
|||
*/
|
||||
void
|
||||
token_ifattach(ifp, lla)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
caddr_t lla;
|
||||
{
|
||||
register struct sockaddr_dl *sdl;
|
||||
struct sockaddr_dl *sdl;
|
||||
|
||||
ifp->if_type = IFT_ISO88025;
|
||||
ifp->if_addrlen = ISO88025_ADDR_LEN;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_tun.c,v 1.38 1999/07/01 08:12:48 itojun Exp $ */
|
||||
/* $NetBSD: if_tun.c,v 1.39 2000/03/30 09:45:37 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
|
||||
|
@ -82,7 +82,7 @@ void
|
|||
tunattach(unused)
|
||||
int unused;
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
struct ifnet *ifp;
|
||||
|
||||
for (i = 0; i < NTUN; i++) {
|
||||
|
@ -120,7 +120,7 @@ tunopen(dev, flag, mode, p)
|
|||
{
|
||||
struct ifnet *ifp;
|
||||
struct tun_softc *tp;
|
||||
register int unit, error;
|
||||
int unit, error;
|
||||
|
||||
if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
|
||||
return (error);
|
||||
|
@ -147,7 +147,7 @@ tunclose(dev, flag, mode, p)
|
|||
int mode;
|
||||
struct proc *p;
|
||||
{
|
||||
register int unit = minor(dev), s;
|
||||
int unit = minor(dev), s;
|
||||
struct tun_softc *tp = &tunctl[unit];
|
||||
struct ifnet *ifp = &tp->tun_if;
|
||||
struct mbuf *m;
|
||||
|
@ -170,7 +170,7 @@ tunclose(dev, flag, mode, p)
|
|||
if_down(ifp);
|
||||
if (ifp->if_flags & IFF_RUNNING) {
|
||||
/* find internet addresses and delete routes */
|
||||
register struct ifaddr *ifa;
|
||||
struct ifaddr *ifa;
|
||||
for (ifa = ifp->if_addrlist.tqh_first; ifa != 0;
|
||||
ifa = ifa->ifa_list.tqe_next) {
|
||||
#ifdef INET
|
||||
|
@ -197,7 +197,7 @@ tuninit(tp)
|
|||
struct tun_softc *tp;
|
||||
{
|
||||
struct ifnet *ifp = &tp->tun_if;
|
||||
register struct ifaddr *ifa;
|
||||
struct ifaddr *ifa;
|
||||
|
||||
TUNDEBUG("%s: tuninit\n", ifp->if_xname);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ppp_tty.c,v 1.19 2000/03/23 07:03:26 thorpej Exp $ */
|
||||
/* $NetBSD: ppp_tty.c,v 1.20 2000/03/30 09:45:37 augustss Exp $ */
|
||||
/* Id: ppp_tty.c,v 1.3 1996/07/01 01:04:11 paulus Exp */
|
||||
|
||||
/*
|
||||
|
@ -173,10 +173,10 @@ static void pppdumpframe __P((struct ppp_softc *sc, struct mbuf* m,
|
|||
int
|
||||
pppopen(dev, tp)
|
||||
dev_t dev;
|
||||
register struct tty *tp;
|
||||
struct tty *tp;
|
||||
{
|
||||
struct proc *p = curproc; /* XXX */
|
||||
register struct ppp_softc *sc;
|
||||
struct ppp_softc *sc;
|
||||
int error, s;
|
||||
|
||||
if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
|
||||
|
@ -238,7 +238,7 @@ pppclose(tp, flag)
|
|||
struct tty *tp;
|
||||
int flag;
|
||||
{
|
||||
register struct ppp_softc *sc;
|
||||
struct ppp_softc *sc;
|
||||
int s;
|
||||
|
||||
s = spltty();
|
||||
|
@ -291,13 +291,13 @@ pppasyncrelinq(sc)
|
|||
*/
|
||||
int
|
||||
pppread(tp, uio, flag)
|
||||
register struct tty *tp;
|
||||
struct tty *tp;
|
||||
struct uio *uio;
|
||||
int flag;
|
||||
{
|
||||
register struct ppp_softc *sc = (struct ppp_softc *)tp->t_sc;
|
||||
struct ppp_softc *sc = (struct ppp_softc *)tp->t_sc;
|
||||
struct mbuf *m, *m0;
|
||||
register int s;
|
||||
int s;
|
||||
int error = 0;
|
||||
|
||||
if (sc == NULL)
|
||||
|
@ -349,11 +349,11 @@ pppread(tp, uio, flag)
|
|||
*/
|
||||
int
|
||||
pppwrite(tp, uio, flag)
|
||||
register struct tty *tp;
|
||||
struct tty *tp;
|
||||
struct uio *uio;
|
||||
int flag;
|
||||
{
|
||||
register struct ppp_softc *sc = (struct ppp_softc *)tp->t_sc;
|
||||
struct ppp_softc *sc = (struct ppp_softc *)tp->t_sc;
|
||||
struct mbuf *m, *m0, **mp;
|
||||
struct sockaddr dst;
|
||||
int len, error;
|
||||
|
@ -614,9 +614,9 @@ static u_int16_t fcstab[256] = {
|
|||
*/
|
||||
static u_int16_t
|
||||
pppfcs(fcs, cp, len)
|
||||
register u_int16_t fcs;
|
||||
register u_char *cp;
|
||||
register int len;
|
||||
u_int16_t fcs;
|
||||
u_char *cp;
|
||||
int len;
|
||||
{
|
||||
while (len--)
|
||||
fcs = PPP_FCS(fcs, *cp++);
|
||||
|
@ -664,12 +664,12 @@ pppsyncstart(sc)
|
|||
*/
|
||||
static void
|
||||
pppasyncstart(sc)
|
||||
register struct ppp_softc *sc;
|
||||
struct ppp_softc *sc;
|
||||
{
|
||||
register struct tty *tp = (struct tty *) sc->sc_devp;
|
||||
register struct mbuf *m;
|
||||
register int len;
|
||||
register u_char *start, *stop, *cp;
|
||||
struct tty *tp = (struct tty *) sc->sc_devp;
|
||||
struct mbuf *m;
|
||||
int len;
|
||||
u_char *start, *stop, *cp;
|
||||
int n, ndone, done, idle;
|
||||
struct mbuf *m2;
|
||||
int s;
|
||||
|
@ -875,9 +875,9 @@ pppasyncctlp(sc)
|
|||
*/
|
||||
int
|
||||
pppstart(tp)
|
||||
register struct tty *tp;
|
||||
struct tty *tp;
|
||||
{
|
||||
register struct ppp_softc *sc = (struct ppp_softc *) tp->t_sc;
|
||||
struct ppp_softc *sc = (struct ppp_softc *) tp->t_sc;
|
||||
|
||||
/*
|
||||
* If there is stuff in the output queue, send it now.
|
||||
|
@ -924,7 +924,7 @@ ppp_timeout(x)
|
|||
*/
|
||||
static void
|
||||
pppgetm(sc)
|
||||
register struct ppp_softc *sc;
|
||||
struct ppp_softc *sc;
|
||||
{
|
||||
struct mbuf *m, **mp;
|
||||
int len;
|
||||
|
@ -954,9 +954,9 @@ static unsigned paritytab[8] = {
|
|||
int
|
||||
pppinput(c, tp)
|
||||
int c;
|
||||
register struct tty *tp;
|
||||
struct tty *tp;
|
||||
{
|
||||
register struct ppp_softc *sc;
|
||||
struct ppp_softc *sc;
|
||||
struct mbuf *m;
|
||||
int ilen, s;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: radix.c,v 1.13 1998/03/01 02:25:05 fvdl Exp $ */
|
||||
/* $NetBSD: radix.c,v 1.14 2000/03/30 09:45:38 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1993
|
||||
|
@ -107,8 +107,8 @@ rn_search(v_arg, head)
|
|||
void *v_arg;
|
||||
struct radix_node *head;
|
||||
{
|
||||
register struct radix_node *x;
|
||||
register caddr_t v;
|
||||
struct radix_node *x;
|
||||
caddr_t v;
|
||||
|
||||
for (x = head, v = v_arg; x->rn_b >= 0;) {
|
||||
if (x->rn_bmask & v[x->rn_off])
|
||||
|
@ -124,8 +124,8 @@ rn_search_m(v_arg, head, m_arg)
|
|||
struct radix_node *head;
|
||||
void *v_arg, *m_arg;
|
||||
{
|
||||
register struct radix_node *x;
|
||||
register caddr_t v = v_arg, m = m_arg;
|
||||
struct radix_node *x;
|
||||
caddr_t v = v_arg, m = m_arg;
|
||||
|
||||
for (x = head; x->rn_b >= 0;) {
|
||||
if ((x->rn_bmask & m[x->rn_off]) &&
|
||||
|
@ -141,8 +141,8 @@ int
|
|||
rn_refines(m_arg, n_arg)
|
||||
void *m_arg, *n_arg;
|
||||
{
|
||||
register caddr_t m = m_arg, n = n_arg;
|
||||
register caddr_t lim, lim2 = lim = n + *(u_char *)n;
|
||||
caddr_t m = m_arg, n = n_arg;
|
||||
caddr_t lim, lim2 = lim = n + *(u_char *)n;
|
||||
int longer = (*(u_char *)n++) - (int)(*(u_char *)m++);
|
||||
int masks_are_equal = 1;
|
||||
|
||||
|
@ -169,7 +169,7 @@ rn_lookup(v_arg, m_arg, head)
|
|||
void *v_arg, *m_arg;
|
||||
struct radix_node_head *head;
|
||||
{
|
||||
register struct radix_node *x;
|
||||
struct radix_node *x;
|
||||
caddr_t netmask = 0;
|
||||
|
||||
if (m_arg) {
|
||||
|
@ -188,10 +188,10 @@ rn_lookup(v_arg, m_arg, head)
|
|||
static int
|
||||
rn_satsifies_leaf(trial, leaf, skip)
|
||||
char *trial;
|
||||
register struct radix_node *leaf;
|
||||
struct radix_node *leaf;
|
||||
int skip;
|
||||
{
|
||||
register char *cp = trial, *cp2 = leaf->rn_key, *cp3 = leaf->rn_mask;
|
||||
char *cp = trial, *cp2 = leaf->rn_key, *cp3 = leaf->rn_mask;
|
||||
char *cplim;
|
||||
int length = min(*(u_char *)cp, *(u_char *)cp2);
|
||||
|
||||
|
@ -212,12 +212,12 @@ rn_match(v_arg, head)
|
|||
struct radix_node_head *head;
|
||||
{
|
||||
caddr_t v = v_arg;
|
||||
register struct radix_node *t = head->rnh_treetop, *x;
|
||||
register caddr_t cp = v, cp2;
|
||||
struct radix_node *t = head->rnh_treetop, *x;
|
||||
caddr_t cp = v, cp2;
|
||||
caddr_t cplim;
|
||||
struct radix_node *saved_t, *top = t;
|
||||
int off = t->rn_off, vlen = *(u_char *)cp, matched_off;
|
||||
register int test, b, rn_b;
|
||||
int test, b, rn_b;
|
||||
|
||||
/*
|
||||
* Open code rn_search(v, top) to avoid overhead of extra
|
||||
|
@ -279,7 +279,7 @@ on1:
|
|||
t = saved_t;
|
||||
/* start searching up the tree */
|
||||
do {
|
||||
register struct radix_mask *m;
|
||||
struct radix_mask *m;
|
||||
t = t->rn_p;
|
||||
m = t->rn_mklist;
|
||||
if (m) {
|
||||
|
@ -321,7 +321,7 @@ rn_newpair(v, b, nodes)
|
|||
int b;
|
||||
struct radix_node nodes[2];
|
||||
{
|
||||
register struct radix_node *tt = nodes, *t = tt + 1;
|
||||
struct radix_node *tt = nodes, *t = tt + 1;
|
||||
t->rn_b = b; t->rn_bmask = 0x80 >> (b & 7);
|
||||
t->rn_l = tt; t->rn_off = b >> 3;
|
||||
tt->rn_b = -1; tt->rn_key = (caddr_t)v; tt->rn_p = t;
|
||||
|
@ -343,16 +343,16 @@ rn_insert(v_arg, head, dupentry, nodes)
|
|||
caddr_t v = v_arg;
|
||||
struct radix_node *top = head->rnh_treetop;
|
||||
int head_off = top->rn_off, vlen = (int)*((u_char *)v);
|
||||
register struct radix_node *t = rn_search(v_arg, top);
|
||||
register caddr_t cp = v + head_off;
|
||||
register int b;
|
||||
struct radix_node *t = rn_search(v_arg, top);
|
||||
caddr_t cp = v + head_off;
|
||||
int b;
|
||||
struct radix_node *tt;
|
||||
/*
|
||||
* Find first bit at which v and t->rn_key differ
|
||||
*/
|
||||
{
|
||||
register caddr_t cp2 = t->rn_key + head_off;
|
||||
register int cmp_res;
|
||||
caddr_t cp2 = t->rn_key + head_off;
|
||||
int cmp_res;
|
||||
caddr_t cplim = v + vlen;
|
||||
|
||||
while (cp < cplim)
|
||||
|
@ -367,7 +367,7 @@ on1:
|
|||
cmp_res >>= 1;
|
||||
}
|
||||
{
|
||||
register struct radix_node *p, *x = top;
|
||||
struct radix_node *p, *x = top;
|
||||
cp = v;
|
||||
do {
|
||||
p = x;
|
||||
|
@ -404,9 +404,9 @@ rn_addmask(n_arg, search, skip)
|
|||
void *n_arg;
|
||||
{
|
||||
caddr_t netmask = (caddr_t)n_arg;
|
||||
register struct radix_node *x;
|
||||
register caddr_t cp, cplim;
|
||||
register int b = 0, mlen, j;
|
||||
struct radix_node *x;
|
||||
caddr_t cp, cplim;
|
||||
int b = 0, mlen, j;
|
||||
int maskduplicated, m0, isnormal;
|
||||
struct radix_node *saved_x;
|
||||
static int last_zeroed = 0;
|
||||
|
@ -475,7 +475,7 @@ static int /* XXX: arbitrary ordering for non-contiguous masks */
|
|||
rn_lexobetter(m_arg, n_arg)
|
||||
void *m_arg, *n_arg;
|
||||
{
|
||||
register u_char *mp = m_arg, *np = n_arg, *lim;
|
||||
u_char *mp = m_arg, *np = n_arg, *lim;
|
||||
|
||||
if (*mp > *np)
|
||||
return 1; /* not really, but need to check longer one first */
|
||||
|
@ -488,10 +488,10 @@ rn_lexobetter(m_arg, n_arg)
|
|||
|
||||
static struct radix_mask *
|
||||
rn_new_radix_mask(tt, next)
|
||||
register struct radix_node *tt;
|
||||
register struct radix_mask *next;
|
||||
struct radix_node *tt;
|
||||
struct radix_mask *next;
|
||||
{
|
||||
register struct radix_mask *m;
|
||||
struct radix_mask *m;
|
||||
|
||||
MKGet(m);
|
||||
if (m == 0) {
|
||||
|
@ -517,7 +517,7 @@ rn_addroute(v_arg, n_arg, head, treenodes)
|
|||
struct radix_node treenodes[2];
|
||||
{
|
||||
caddr_t v = (caddr_t)v_arg, netmask = (caddr_t)n_arg;
|
||||
register struct radix_node *t, *x = 0, *tt;
|
||||
struct radix_node *t, *x = 0, *tt;
|
||||
struct radix_node *saved_tt, *top = head->rnh_treetop;
|
||||
short b = 0, b_leaf = 0;
|
||||
int keyduplicated;
|
||||
|
@ -666,7 +666,7 @@ rn_delete(v_arg, netmask_arg, head)
|
|||
void *v_arg, *netmask_arg;
|
||||
struct radix_node_head *head;
|
||||
{
|
||||
register struct radix_node *t, *p, *x, *tt;
|
||||
struct radix_node *t, *p, *x, *tt;
|
||||
struct radix_mask *m, *saved_m, **mp;
|
||||
struct radix_node *dupedkey, *saved_tt, *top;
|
||||
caddr_t v, netmask;
|
||||
|
@ -823,12 +823,12 @@ out:
|
|||
int
|
||||
rn_walktree(h, f, w)
|
||||
struct radix_node_head *h;
|
||||
register int (*f) __P((struct radix_node *, void *));
|
||||
int (*f) __P((struct radix_node *, void *));
|
||||
void *w;
|
||||
{
|
||||
int error;
|
||||
struct radix_node *base, *next;
|
||||
register struct radix_node *rn = h->rnh_treetop;
|
||||
struct radix_node *rn = h->rnh_treetop;
|
||||
/*
|
||||
* This gets complicated because we may delete the node
|
||||
* while applying the function f to it, so we need to calculate
|
||||
|
@ -864,8 +864,8 @@ rn_inithead(head, off)
|
|||
void **head;
|
||||
int off;
|
||||
{
|
||||
register struct radix_node_head *rnh;
|
||||
register struct radix_node *t, *tt, *ttt;
|
||||
struct radix_node_head *rnh;
|
||||
struct radix_node *t, *tt, *ttt;
|
||||
if (*head)
|
||||
return (1);
|
||||
R_Malloc(rnh, struct radix_node_head *, sizeof (*rnh));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: raw_cb.c,v 1.10 1996/05/23 18:35:02 mycroft Exp $ */
|
||||
/* $NetBSD: raw_cb.c,v 1.11 2000/03/30 09:45:40 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -67,10 +67,10 @@ u_long raw_recvspace = RAWRCVQ;
|
|||
*/
|
||||
int
|
||||
raw_attach(so, proto)
|
||||
register struct socket *so;
|
||||
struct socket *so;
|
||||
int proto;
|
||||
{
|
||||
register struct rawcb *rp = sotorawcb(so);
|
||||
struct rawcb *rp = sotorawcb(so);
|
||||
int error;
|
||||
|
||||
/*
|
||||
|
@ -95,7 +95,7 @@ raw_attach(so, proto)
|
|||
*/
|
||||
void
|
||||
raw_detach(rp)
|
||||
register struct rawcb *rp;
|
||||
struct rawcb *rp;
|
||||
{
|
||||
struct socket *so = rp->rcb_socket;
|
||||
|
||||
|
@ -115,7 +115,7 @@ raw_detach(rp)
|
|||
*/
|
||||
void
|
||||
raw_disconnect(rp)
|
||||
register struct rawcb *rp;
|
||||
struct rawcb *rp;
|
||||
{
|
||||
|
||||
#ifdef notdef
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: raw_usrreq.c,v 1.14 1996/05/28 23:24:23 pk Exp $ */
|
||||
/* $NetBSD: raw_usrreq.c,v 1.15 2000/03/30 09:45:40 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -79,12 +79,12 @@ raw_input(m0, va_alist)
|
|||
va_dcl
|
||||
#endif
|
||||
{
|
||||
register struct rawcb *rp;
|
||||
register struct mbuf *m = m0;
|
||||
register int sockets = 0;
|
||||
struct rawcb *rp;
|
||||
struct mbuf *m = m0;
|
||||
int sockets = 0;
|
||||
struct socket *last;
|
||||
va_list ap;
|
||||
register struct sockproto *proto;
|
||||
struct sockproto *proto;
|
||||
struct sockaddr *src, *dst;
|
||||
|
||||
va_start(ap, m0);
|
||||
|
@ -157,7 +157,7 @@ raw_ctlinput(cmd, arg, d)
|
|||
|
||||
void
|
||||
raw_setsockaddr(rp, nam)
|
||||
register struct rawcb *rp;
|
||||
struct rawcb *rp;
|
||||
struct mbuf *nam;
|
||||
{
|
||||
|
||||
|
@ -167,7 +167,7 @@ raw_setsockaddr(rp, nam)
|
|||
|
||||
void
|
||||
raw_setpeeraddr(rp, nam)
|
||||
register struct rawcb *rp;
|
||||
struct rawcb *rp;
|
||||
struct mbuf *nam;
|
||||
{
|
||||
|
||||
|
@ -183,9 +183,9 @@ raw_usrreq(so, req, m, nam, control, p)
|
|||
struct mbuf *m, *nam, *control;
|
||||
struct proc *p;
|
||||
{
|
||||
register struct rawcb *rp;
|
||||
struct rawcb *rp;
|
||||
int s;
|
||||
register int error = 0;
|
||||
int error = 0;
|
||||
|
||||
if (req == PRU_CONTROL)
|
||||
return (EOPNOTSUPP);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: route.c,v 1.35 2000/03/23 07:03:26 thorpej Exp $ */
|
||||
/* $NetBSD: route.c,v 1.36 2000/03/30 09:45:40 augustss Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -164,7 +164,7 @@ route_init()
|
|||
*/
|
||||
void
|
||||
rtalloc(ro)
|
||||
register struct route *ro;
|
||||
struct route *ro;
|
||||
{
|
||||
if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP))
|
||||
return; /* XXX */
|
||||
|
@ -173,12 +173,12 @@ rtalloc(ro)
|
|||
|
||||
struct rtentry *
|
||||
rtalloc1(dst, report)
|
||||
register struct sockaddr *dst;
|
||||
struct sockaddr *dst;
|
||||
int report;
|
||||
{
|
||||
register struct radix_node_head *rnh = rt_tables[dst->sa_family];
|
||||
register struct rtentry *rt;
|
||||
register struct radix_node *rn;
|
||||
struct radix_node_head *rnh = rt_tables[dst->sa_family];
|
||||
struct rtentry *rt;
|
||||
struct radix_node *rn;
|
||||
struct rtentry *newrt = 0;
|
||||
struct rt_addrinfo info;
|
||||
int s = splsoftnet(), err = 0, msgtype = RTM_MISS;
|
||||
|
@ -214,9 +214,9 @@ rtalloc1(dst, report)
|
|||
|
||||
void
|
||||
rtfree(rt)
|
||||
register struct rtentry *rt;
|
||||
struct rtentry *rt;
|
||||
{
|
||||
register struct ifaddr *ifa;
|
||||
struct ifaddr *ifa;
|
||||
|
||||
if (rt == 0)
|
||||
panic("rtfree");
|
||||
|
@ -239,7 +239,7 @@ rtfree(rt)
|
|||
|
||||
void
|
||||
ifafree(ifa)
|
||||
register struct ifaddr *ifa;
|
||||
struct ifaddr *ifa;
|
||||
{
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
|
@ -268,7 +268,7 @@ rtredirect(dst, gateway, netmask, flags, src, rtp)
|
|||
int flags;
|
||||
struct rtentry **rtp;
|
||||
{
|
||||
register struct rtentry *rt;
|
||||
struct rtentry *rt;
|
||||
int error = 0;
|
||||
short *stat = 0;
|
||||
struct rt_addrinfo info;
|
||||
|
@ -367,7 +367,7 @@ ifa_ifwithroute(flags, dst, gateway)
|
|||
int flags;
|
||||
struct sockaddr *dst, *gateway;
|
||||
{
|
||||
register struct ifaddr *ifa;
|
||||
struct ifaddr *ifa;
|
||||
if ((flags & RTF_GATEWAY) == 0) {
|
||||
/*
|
||||
* If we are adding a route to an interface,
|
||||
|
@ -417,9 +417,9 @@ rtrequest(req, dst, gateway, netmask, flags, ret_nrt)
|
|||
struct rtentry **ret_nrt;
|
||||
{
|
||||
int s = splsoftnet(); int error = 0;
|
||||
register struct rtentry *rt;
|
||||
register struct radix_node *rn;
|
||||
register struct radix_node_head *rnh;
|
||||
struct rtentry *rt;
|
||||
struct radix_node *rn;
|
||||
struct radix_node_head *rnh;
|
||||
struct ifaddr *ifa;
|
||||
struct sockaddr *ndst;
|
||||
#define senderr(x) { error = x ; goto bad; }
|
||||
|
@ -522,7 +522,7 @@ rt_setgate(rt0, dst, gate)
|
|||
{
|
||||
caddr_t new, old;
|
||||
int dlen = ROUNDUP(dst->sa_len), glen = ROUNDUP(gate->sa_len);
|
||||
register struct rtentry *rt = rt0;
|
||||
struct rtentry *rt = rt0;
|
||||
|
||||
if (rt->rt_gateway == 0 || glen > ROUNDUP(rt->rt_gateway->sa_len)) {
|
||||
old = (caddr_t)rt_key(rt);
|
||||
|
@ -565,9 +565,9 @@ void
|
|||
rt_maskedcopy(src, dst, netmask)
|
||||
struct sockaddr *src, *dst, *netmask;
|
||||
{
|
||||
register u_char *cp1 = (u_char *)src;
|
||||
register u_char *cp2 = (u_char *)dst;
|
||||
register u_char *cp3 = (u_char *)netmask;
|
||||
u_char *cp1 = (u_char *)src;
|
||||
u_char *cp2 = (u_char *)dst;
|
||||
u_char *cp3 = (u_char *)netmask;
|
||||
u_char *cplim = cp2 + *cp3;
|
||||
u_char *cplim2 = cp2 + *cp1;
|
||||
|
||||
|
@ -587,11 +587,11 @@ rt_maskedcopy(src, dst, netmask)
|
|||
*/
|
||||
int
|
||||
rtinit(ifa, cmd, flags)
|
||||
register struct ifaddr *ifa;
|
||||
struct ifaddr *ifa;
|
||||
int cmd, flags;
|
||||
{
|
||||
register struct rtentry *rt;
|
||||
register struct sockaddr *dst, *odst;
|
||||
struct rtentry *rt;
|
||||
struct sockaddr *dst, *odst;
|
||||
struct sockaddr_storage deldst;
|
||||
struct rtentry *nrt = 0;
|
||||
int error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rtsock.c,v 1.38 2000/03/12 11:58:15 itojun Exp $ */
|
||||
/* $NetBSD: rtsock.c,v 1.39 2000/03/30 09:45:40 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -143,13 +143,13 @@ rt_adjustcount(af, cnt)
|
|||
/*ARGSUSED*/
|
||||
int
|
||||
route_usrreq(so, req, m, nam, control, p)
|
||||
register struct socket *so;
|
||||
struct socket *so;
|
||||
int req;
|
||||
struct mbuf *m, *nam, *control;
|
||||
struct proc *p;
|
||||
{
|
||||
register int error = 0;
|
||||
register struct rawcb *rp = sotorawcb(so);
|
||||
int error = 0;
|
||||
struct rawcb *rp = sotorawcb(so);
|
||||
int s;
|
||||
|
||||
if (req == PRU_ATTACH) {
|
||||
|
@ -202,9 +202,9 @@ route_output(m, va_alist)
|
|||
va_dcl
|
||||
#endif
|
||||
{
|
||||
register struct rt_msghdr *rtm = 0;
|
||||
register struct radix_node *rn = 0;
|
||||
register struct rtentry *rt = 0;
|
||||
struct rt_msghdr *rtm = 0;
|
||||
struct radix_node *rn = 0;
|
||||
struct rtentry *rt = 0;
|
||||
struct rtentry *saved_nrt = 0;
|
||||
struct radix_node_head *rnh;
|
||||
struct rt_addrinfo info;
|
||||
|
@ -356,7 +356,7 @@ route_output(m, va_alist)
|
|||
rt_key(rt), gate))))
|
||||
ifp = ifa->ifa_ifp;
|
||||
if (ifa) {
|
||||
register struct ifaddr *oifa = rt->rt_ifa;
|
||||
struct ifaddr *oifa = rt->rt_ifa;
|
||||
if (oifa != ifa) {
|
||||
if (oifa && oifa->ifa_rtrequest)
|
||||
oifa->ifa_rtrequest(RTM_DELETE,
|
||||
|
@ -398,7 +398,7 @@ flush:
|
|||
if (rt)
|
||||
rtfree(rt);
|
||||
{
|
||||
register struct rawcb *rp = 0;
|
||||
struct rawcb *rp = 0;
|
||||
/*
|
||||
* Check to see if we don't want our own messages.
|
||||
*/
|
||||
|
@ -430,7 +430,7 @@ flush:
|
|||
void
|
||||
rt_setmetrics(which, in, out)
|
||||
u_long which;
|
||||
register struct rt_metrics *in, *out;
|
||||
struct rt_metrics *in, *out;
|
||||
{
|
||||
#define metric(f, e) if (which & (f)) out->e = in->e;
|
||||
metric(RTV_RPIPE, rmx_recvpipe);
|
||||
|
@ -450,11 +450,11 @@ rt_setmetrics(which, in, out)
|
|||
|
||||
static void
|
||||
rt_xaddrs(cp, cplim, rtinfo)
|
||||
register caddr_t cp, cplim;
|
||||
register struct rt_addrinfo *rtinfo;
|
||||
caddr_t cp, cplim;
|
||||
struct rt_addrinfo *rtinfo;
|
||||
{
|
||||
register struct sockaddr *sa;
|
||||
register int i;
|
||||
struct sockaddr *sa;
|
||||
int i;
|
||||
|
||||
bzero(rtinfo->rti_info, sizeof(rtinfo->rti_info));
|
||||
for (i = 0; (i < RTAX_MAX) && (cp < cplim); i++) {
|
||||
|
@ -468,14 +468,14 @@ rt_xaddrs(cp, cplim, rtinfo)
|
|||
static struct mbuf *
|
||||
rt_msg1(type, rtinfo, data, datalen)
|
||||
int type;
|
||||
register struct rt_addrinfo *rtinfo;
|
||||
struct rt_addrinfo *rtinfo;
|
||||
caddr_t data;
|
||||
int datalen;
|
||||
{
|
||||
register struct rt_msghdr *rtm;
|
||||
register struct mbuf *m;
|
||||
register int i;
|
||||
register struct sockaddr *sa;
|
||||
struct rt_msghdr *rtm;
|
||||
struct mbuf *m;
|
||||
int i;
|
||||
struct sockaddr *sa;
|
||||
int len, dlen;
|
||||
|
||||
m = m_gethdr(M_DONTWAIT, MT_DATA);
|
||||
|
@ -552,12 +552,12 @@ rt_msg1(type, rtinfo, data, datalen)
|
|||
static int
|
||||
rt_msg2(type, rtinfo, cp, w, lenp)
|
||||
int type;
|
||||
register struct rt_addrinfo *rtinfo;
|
||||
struct rt_addrinfo *rtinfo;
|
||||
caddr_t cp;
|
||||
struct walkarg *w;
|
||||
int *lenp;
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int len, dlen, second_time = 0;
|
||||
caddr_t cp0;
|
||||
|
||||
|
@ -585,7 +585,7 @@ again:
|
|||
if ((cp0 = cp) != NULL)
|
||||
cp += len;
|
||||
for (i = 0; i < RTAX_MAX; i++) {
|
||||
register struct sockaddr *sa;
|
||||
struct sockaddr *sa;
|
||||
|
||||
if ((sa = rtinfo->rti_info[i]) == 0)
|
||||
continue;
|
||||
|
@ -598,7 +598,7 @@ again:
|
|||
len += dlen;
|
||||
}
|
||||
if (cp == 0 && w != NULL && !second_time) {
|
||||
register struct walkarg *rw = w;
|
||||
struct walkarg *rw = w;
|
||||
|
||||
rw->w_needed += len;
|
||||
if (rw->w_needed <= 0 && rw->w_where) {
|
||||
|
@ -621,7 +621,7 @@ again:
|
|||
}
|
||||
}
|
||||
if (cp) {
|
||||
register struct rt_msghdr *rtm = (struct rt_msghdr *)cp0;
|
||||
struct rt_msghdr *rtm = (struct rt_msghdr *)cp0;
|
||||
|
||||
rtm->rtm_version = RTM_VERSION;
|
||||
rtm->rtm_type = type;
|
||||
|
@ -641,10 +641,10 @@ again:
|
|||
void
|
||||
rt_missmsg(type, rtinfo, flags, error)
|
||||
int type, flags, error;
|
||||
register struct rt_addrinfo *rtinfo;
|
||||
struct rt_addrinfo *rtinfo;
|
||||
{
|
||||
struct rt_msghdr rtm;
|
||||
register struct mbuf *m;
|
||||
struct mbuf *m;
|
||||
struct sockaddr *sa = rtinfo->rti_info[RTAX_DST];
|
||||
|
||||
if (route_cb.any_count == 0)
|
||||
|
@ -666,7 +666,7 @@ rt_missmsg(type, rtinfo, flags, error)
|
|||
*/
|
||||
void
|
||||
rt_ifmsg(ifp)
|
||||
register struct ifnet *ifp;
|
||||
struct ifnet *ifp;
|
||||
{
|
||||
struct if_msghdr ifm;
|
||||
#ifdef COMPAT_14
|
||||
|
@ -731,8 +731,8 @@ rt_ifmsg(ifp)
|
|||
void
|
||||
rt_newaddrmsg(cmd, ifa, error, rt)
|
||||
int cmd, error;
|
||||
register struct ifaddr *ifa;
|
||||
register struct rtentry *rt;
|
||||
struct ifaddr *ifa;
|
||||
struct rtentry *rt;
|
||||
{
|
||||
struct rt_addrinfo info;
|
||||
struct sockaddr *sa = NULL;
|
||||
|
@ -819,10 +819,10 @@ rt_ifannouncemsg(ifp, what)
|
|||
int
|
||||
sysctl_dumpentry(rn, v)
|
||||
struct radix_node *rn;
|
||||
register void *v;
|
||||
void *v;
|
||||
{
|
||||
register struct walkarg *w = v;
|
||||
register struct rtentry *rt = (struct rtentry *)rn;
|
||||
struct walkarg *w = v;
|
||||
struct rtentry *rt = (struct rtentry *)rn;
|
||||
int error = 0, size;
|
||||
struct rt_addrinfo info;
|
||||
|
||||
|
@ -842,7 +842,7 @@ sysctl_dumpentry(rn, v)
|
|||
if ((error = rt_msg2(RTM_GET, &info, 0, w, &size)))
|
||||
return (error);
|
||||
if (w->w_where && w->w_tmem && w->w_needed <= 0) {
|
||||
register struct rt_msghdr *rtm = (struct rt_msghdr *)w->w_tmem;
|
||||
struct rt_msghdr *rtm = (struct rt_msghdr *)w->w_tmem;
|
||||
|
||||
rtm->rtm_flags = rt->rt_flags;
|
||||
rtm->rtm_use = rt->rt_use;
|
||||
|
@ -861,11 +861,11 @@ sysctl_dumpentry(rn, v)
|
|||
int
|
||||
sysctl_iflist(af, w, type)
|
||||
int af;
|
||||
register struct walkarg *w;
|
||||
struct walkarg *w;
|
||||
int type;
|
||||
{
|
||||
register struct ifnet *ifp;
|
||||
register struct ifaddr *ifa;
|
||||
struct ifnet *ifp;
|
||||
struct ifaddr *ifa;
|
||||
struct rt_addrinfo info;
|
||||
int len, error = 0;
|
||||
|
||||
|
@ -895,7 +895,7 @@ sysctl_iflist(af, w, type)
|
|||
if (w->w_where && w->w_tmem && w->w_needed <= 0) {
|
||||
switch(type) {
|
||||
case NET_RT_IFLIST: {
|
||||
register struct if_msghdr *ifm;
|
||||
struct if_msghdr *ifm;
|
||||
|
||||
ifm = (struct if_msghdr *)w->w_tmem;
|
||||
ifm->ifm_index = ifp->if_index;
|
||||
|
@ -911,7 +911,7 @@ sysctl_iflist(af, w, type)
|
|||
|
||||
#ifdef COMPAT_14
|
||||
case NET_RT_OIFLIST: {
|
||||
register struct if_msghdr14 *ifm;
|
||||
struct if_msghdr14 *ifm;
|
||||
|
||||
ifm = (struct if_msghdr14 *)w->w_tmem;
|
||||
ifm->ifm_index = ifp->if_index;
|
||||
|
@ -971,7 +971,7 @@ sysctl_iflist(af, w, type)
|
|||
if ((error = rt_msg2(RTM_NEWADDR, &info, 0, w, &len)))
|
||||
return (error);
|
||||
if (w->w_where && w->w_tmem && w->w_needed <= 0) {
|
||||
register struct ifa_msghdr *ifam;
|
||||
struct ifa_msghdr *ifam;
|
||||
|
||||
ifam = (struct ifa_msghdr *)w->w_tmem;
|
||||
ifam->ifam_index = ifa->ifa_ifp->if_index;
|
||||
|
@ -998,7 +998,7 @@ sysctl_rtable(name, namelen, where, given, new, newlen)
|
|||
void *new;
|
||||
size_t newlen;
|
||||
{
|
||||
register struct radix_node_head *rnh;
|
||||
struct radix_node_head *rnh;
|
||||
int i, s, error = EINVAL;
|
||||
u_char af;
|
||||
struct walkarg w;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: slcompress.c,v 1.20 1999/03/13 14:09:46 drochner Exp $ */
|
||||
/* $NetBSD: slcompress.c,v 1.21 2000/03/30 09:45:41 augustss Exp $ */
|
||||
/* Id: slcompress.c,v 1.3 1996/05/24 07:04:47 paulus Exp */
|
||||
|
||||
/*
|
||||
|
@ -69,8 +69,8 @@ void
|
|||
sl_compress_init(comp)
|
||||
struct slcompress *comp;
|
||||
{
|
||||
register u_int i;
|
||||
register struct cstate *tstate = comp->tstate;
|
||||
u_int i;
|
||||
struct cstate *tstate = comp->tstate;
|
||||
|
||||
bzero((char *)comp, sizeof(*comp));
|
||||
for (i = MAX_STATES - 1; i > 0; --i) {
|
||||
|
@ -95,8 +95,8 @@ sl_compress_setup(comp, max_state)
|
|||
struct slcompress *comp;
|
||||
int max_state;
|
||||
{
|
||||
register u_int i;
|
||||
register struct cstate *tstate = comp->tstate;
|
||||
u_int i;
|
||||
struct cstate *tstate = comp->tstate;
|
||||
|
||||
if (max_state == -1) {
|
||||
max_state = MAX_STATES - 1;
|
||||
|
@ -174,18 +174,18 @@ sl_compress_setup(comp, max_state)
|
|||
u_int
|
||||
sl_compress_tcp(m, ip, comp, compress_cid)
|
||||
struct mbuf *m;
|
||||
register struct ip *ip;
|
||||
struct ip *ip;
|
||||
struct slcompress *comp;
|
||||
int compress_cid;
|
||||
{
|
||||
register struct cstate *cs = comp->last_cs->cs_next;
|
||||
register u_int hlen = ip->ip_hl;
|
||||
register struct tcphdr *oth;
|
||||
register struct tcphdr *th;
|
||||
register u_int deltaS, deltaA;
|
||||
register u_int changes = 0;
|
||||
struct cstate *cs = comp->last_cs->cs_next;
|
||||
u_int hlen = ip->ip_hl;
|
||||
struct tcphdr *oth;
|
||||
struct tcphdr *th;
|
||||
u_int deltaS, deltaA;
|
||||
u_int changes = 0;
|
||||
u_char new_seq[16];
|
||||
register u_char *cp = new_seq;
|
||||
u_char *cp = new_seq;
|
||||
|
||||
/*
|
||||
* Bail if this is an IP fragment or if the TCP packet isn't
|
||||
|
@ -222,8 +222,8 @@ sl_compress_tcp(m, ip, comp, compress_cid)
|
|||
* states via linear search. If we don't find a state
|
||||
* for the datagram, the oldest state is (re-)used.
|
||||
*/
|
||||
register struct cstate *lcs;
|
||||
register struct cstate *lastcs = comp->last_cs;
|
||||
struct cstate *lcs;
|
||||
struct cstate *lastcs = comp->last_cs;
|
||||
|
||||
do {
|
||||
lcs = cs; cs = cs->cs_next;
|
||||
|
@ -489,13 +489,13 @@ sl_uncompress_tcp_core(buf, buflen, total_len, type, comp, hdrp, hlenp)
|
|||
u_char **hdrp;
|
||||
u_int *hlenp;
|
||||
{
|
||||
register u_char *cp;
|
||||
register u_int hlen, changes;
|
||||
register struct tcphdr *th;
|
||||
register struct cstate *cs;
|
||||
register struct ip *ip;
|
||||
register u_int16_t *bp;
|
||||
register u_int vjlen;
|
||||
u_char *cp;
|
||||
u_int hlen, changes;
|
||||
struct tcphdr *th;
|
||||
struct cstate *cs;
|
||||
struct ip *ip;
|
||||
u_int16_t *bp;
|
||||
u_int vjlen;
|
||||
|
||||
switch (type) {
|
||||
|
||||
|
@ -563,7 +563,7 @@ sl_uncompress_tcp_core(buf, buflen, total_len, type, comp, hdrp, hlenp)
|
|||
switch (changes & SPECIALS_MASK) {
|
||||
case SPECIAL_I:
|
||||
{
|
||||
register u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen;
|
||||
u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen;
|
||||
th->th_ack = htonl(ntohl(th->th_ack) + i);
|
||||
th->th_seq = htonl(ntohl(th->th_seq) + i);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zlib.c,v 1.9 1999/11/19 22:07:12 ragge Exp $ */
|
||||
/* $NetBSD: zlib.c,v 1.10 2000/03/30 09:45:41 augustss Exp $ */
|
||||
/*
|
||||
* This file is derived from various .h and .c files from the zlib-1.0.4
|
||||
* distribution by Jean-loup Gailly and Mark Adler, with some additions
|
||||
|
@ -11,7 +11,7 @@
|
|||
* - added inflateIncomp and deflateOutputPending
|
||||
* - allow strm->next_out to be NULL, meaning discard the output
|
||||
*
|
||||
* $Id: zlib.c,v 1.9 1999/11/19 22:07:12 ragge Exp $
|
||||
* $Id: zlib.c,v 1.10 2000/03/30 09:45:41 augustss Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1271,9 +1271,9 @@ local uInt longest_match(s, cur_match)
|
|||
IPos cur_match; /* current match */
|
||||
{
|
||||
unsigned chain_length = s->max_chain_length;/* max hash chain length */
|
||||
register Bytef *scan = s->window + s->strstart; /* current string */
|
||||
register Bytef *match; /* matched string */
|
||||
register int len; /* length of current match */
|
||||
Bytef *scan = s->window + s->strstart; /* current string */
|
||||
Bytef *match; /* matched string */
|
||||
int len; /* length of current match */
|
||||
int best_len = s->prev_length; /* best match length so far */
|
||||
int nice_match = s->nice_match; /* stop if match long enough */
|
||||
IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
|
||||
|
@ -1288,13 +1288,13 @@ local uInt longest_match(s, cur_match)
|
|||
/* Compare two bytes at a time. Note: this is not always beneficial.
|
||||
* Try with and without -DUNALIGNED_OK to check.
|
||||
*/
|
||||
register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
|
||||
register ush scan_start = *(ushf*)scan;
|
||||
register ush scan_end = *(ushf*)(scan+best_len-1);
|
||||
Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
|
||||
ush scan_start = *(ushf*)scan;
|
||||
ush scan_end = *(ushf*)(scan+best_len-1);
|
||||
#else
|
||||
register Bytef *strend = s->window + s->strstart + MAX_MATCH;
|
||||
register Byte scan_end1 = scan[best_len-1];
|
||||
register Byte scan_end = scan[best_len];
|
||||
Bytef *strend = s->window + s->strstart + MAX_MATCH;
|
||||
Byte scan_end1 = scan[best_len-1];
|
||||
Byte scan_end = scan[best_len];
|
||||
#endif
|
||||
|
||||
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
|
||||
|
@ -1446,8 +1446,8 @@ local void check_match(s, start, match, length)
|
|||
local void fill_window(s)
|
||||
deflate_state *s;
|
||||
{
|
||||
register unsigned n, m;
|
||||
register Posf *p;
|
||||
unsigned n, m;
|
||||
Posf *p;
|
||||
unsigned more; /* Amount of free space at the end of the window. */
|
||||
uInt wsize = s->w_size;
|
||||
|
||||
|
@ -2914,7 +2914,7 @@ local unsigned bi_reverse(code, len)
|
|||
unsigned code; /* the value to invert */
|
||||
int len; /* its bit length */
|
||||
{
|
||||
register unsigned res = 0;
|
||||
unsigned res = 0;
|
||||
do {
|
||||
res |= code & 1;
|
||||
code >>= 1, res <<= 1;
|
||||
|
@ -4206,16 +4206,16 @@ z_streamp zs; /* for zalloc function */
|
|||
uInt f; /* i repeats in table every f entries */
|
||||
int g; /* maximum code length */
|
||||
int h; /* table level */
|
||||
register uInt i; /* counter, current code */
|
||||
register uInt j; /* counter */
|
||||
register int k; /* number of bits in current code */
|
||||
uInt i; /* counter, current code */
|
||||
uInt j; /* counter */
|
||||
int k; /* number of bits in current code */
|
||||
int l; /* bits per table (returned in m) */
|
||||
register uIntf *p; /* pointer into c[], b[], or v[] */
|
||||
uIntf *p; /* pointer into c[], b[], or v[] */
|
||||
inflate_huft *q; /* points to current table */
|
||||
struct inflate_huft_s r; /* table entry for structure assignment */
|
||||
inflate_huft *u[BMAX]; /* table stack */
|
||||
uInt v[N_MAX]; /* values in order of bit length */
|
||||
register int w; /* bits before this table == (l * h) */
|
||||
int w; /* bits before this table == (l * h) */
|
||||
uInt x[BMAX+1]; /* bit offsets, then code stack */
|
||||
uIntf *xp; /* pointer into x */
|
||||
int y; /* number of dummy codes added */
|
||||
|
@ -4545,7 +4545,7 @@ z_streamp z; /* for zfree function */
|
|||
list of the tables it made, with the links in a dummy first entry of
|
||||
each table. */
|
||||
{
|
||||
register inflate_huft *p, *q, *r;
|
||||
inflate_huft *p, *q, *r;
|
||||
|
||||
/* Reverse linked list */
|
||||
p = Z_NULL;
|
||||
|
|
Loading…
Reference in New Issue