Fix this so it compiles cleanly for alpha. Tried to do some minimal testing.

Reviewed by:	freebsd-net
This commit is contained in:
Matt Jacob 2001-10-19 18:29:57 +00:00
parent 32c798f806
commit e58c2b8381
2 changed files with 12 additions and 11 deletions

View File

@ -556,16 +556,16 @@ bridge_in(struct ifnet *ifp, struct ether_header *eh)
* for outgoing packets from ether_output().
*/
BDG_STAT(ifp, BDG_IN);
switch ((int)dst) {
case (int)BDG_BCAST:
case (int)BDG_MCAST:
case (int)BDG_LOCAL:
case (int)BDG_UNKNOWN:
case (int)BDG_DROP:
switch ((uintptr_t)dst) {
case (uintptr_t) BDG_BCAST:
case (uintptr_t) BDG_MCAST:
case (uintptr_t) BDG_LOCAL:
case (uintptr_t) BDG_UNKNOWN:
case (uintptr_t) BDG_DROP:
BDG_STAT(ifp, dst);
break ;
default :
if (dst == ifp || dropit )
if (dst == ifp || dropit)
BDG_STAT(ifp, BDG_DROP);
else
BDG_STAT(ifp, BDG_FORWARD);
@ -649,7 +649,7 @@ bdg_forward(struct mbuf *m0, struct ether_header *const eh, struct ifnet *dst)
ifp = dst ;
once = 1 ;
}
if ( (u_int)(ifp) <= (u_int)BDG_FORWARD )
if (ifp <= BDG_FORWARD)
panic("bdg_forward: bad dst");
/*

View File

@ -92,8 +92,9 @@ extern int bdg_ports ;
*((unsigned int *)(a)) == 0xffffffff && \
((unsigned short *)(a))[2] == 0xffff )
#else
#warning... must complete these for the alpha etc.
#define BDG_MATCH(a,b) (!bcmp(a, b, ETHER_ADDR_LEN) )
/* Unaligned access versions. */
#define BDG_MATCH(a,b) (!bcmp(a, b, ETHER_ADDR_LEN) )
#define IS_ETHER_BROADCAST(a) (!bcmp(a, "\377\377\377\377\377\377", 6))
#endif
/*
* The following constants are not legal ifnet pointers, and are used
@ -127,7 +128,7 @@ struct bdg_stats {
} ;
#define BDG_STAT(ifp, type) bdg_stats.s[ifp->if_index].p_in[(int)type]++
#define BDG_STAT(ifp, type) bdg_stats.s[ifp->if_index].p_in[(long)type]++
#ifdef _KERNEL
typedef struct ifnet *bridge_in_t(struct ifnet *, struct ether_header *);