forked from Imagelibrary/rtems
2005-04-18 Ralf Corsepius <ralf.corsepius@rtems.org>
* libnetworking/net/ethernet.h: Add RTEMS outdated either_input. * libnetworking/net/if.c: Partial update from FreeBSD. * libnetworking/net/if_ethersubr.c: Partial update from FreeBSD.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2005-04-18 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* libnetworking/net/ethernet.h: Add RTEMS outdated either_input.
|
||||
* libnetworking/net/if.c: Partial update from FreeBSD.
|
||||
* libnetworking/net/if_ethersubr.c: Partial update from FreeBSD.
|
||||
* libnetworking/net/if_var.h: New (extracted from net/if.h).
|
||||
* libnetworking/Makefile.am: Add net/if_var.h.
|
||||
|
||||
|
||||
@@ -361,6 +361,7 @@ extern void ether_demux(struct ifnet *, struct mbuf *);
|
||||
extern void ether_ifattach(struct ifnet *);
|
||||
extern void ether_ifdetach(struct ifnet *);
|
||||
extern int ether_ioctl(struct ifnet *, int, caddr_t);
|
||||
extern void ether_input (struct ifnet *, struct ether_header *, struct mbuf *);
|
||||
extern int ether_output(struct ifnet *,
|
||||
struct mbuf *, struct sockaddr *, struct rtentry *);
|
||||
extern int ether_output_frame(struct ifnet *, struct mbuf *);
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/if_types.h>
|
||||
#include <net/if_var.h>
|
||||
#include <net/radix.h>
|
||||
|
||||
/*
|
||||
@@ -79,8 +80,7 @@ struct ifnet *ifnet;
|
||||
*/
|
||||
/* ARGSUSED*/
|
||||
void
|
||||
ifinit(dummy)
|
||||
void *dummy;
|
||||
ifinit(void *dummy)
|
||||
{
|
||||
struct ifnet *ifp;
|
||||
|
||||
@@ -475,7 +475,7 @@ ifunit(char *name)
|
||||
* Interface ioctls.
|
||||
*/
|
||||
int
|
||||
ifioctl(struct socket *so, int cmd, caddr_t data, struct proc *p)
|
||||
ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p)
|
||||
{
|
||||
struct ifnet *ifp;
|
||||
struct ifreq *ifr;
|
||||
@@ -582,7 +582,7 @@ ifioctl(struct socket *so, int cmd, caddr_t data, struct proc *p)
|
||||
error = suser(p->p_ucred, &p->p_acflag);
|
||||
if (error)
|
||||
return (error);
|
||||
if (ifp->if_ioctl == 0)
|
||||
if (ifp->if_ioctl == NULL)
|
||||
return (EOPNOTSUPP);
|
||||
error = (*ifp->if_ioctl)(ifp, cmd, data);
|
||||
if (error == 0)
|
||||
@@ -590,7 +590,7 @@ ifioctl(struct socket *so, int cmd, caddr_t data, struct proc *p)
|
||||
return error;
|
||||
|
||||
case SIOCGIFMEDIA:
|
||||
if (ifp->if_ioctl == 0)
|
||||
if (ifp->if_ioctl == NULL)
|
||||
return (EOPNOTSUPP);
|
||||
return ((*ifp->if_ioctl)(ifp, cmd, data));
|
||||
|
||||
|
||||
@@ -520,14 +520,14 @@ ether_input(ifp, eh, m)
|
||||
* is protected by the RTEMS network mutex.
|
||||
*/
|
||||
char *
|
||||
ether_sprintf(const u_int8_t *addr)
|
||||
ether_sprintf(const u_char *ap)
|
||||
{
|
||||
static char buf[32];
|
||||
char *b = buf;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ETHER_ADDR_LEN; i++, b+=3)
|
||||
sprintf(b, "%02x:", *addr++);
|
||||
sprintf(b, "%02x:", *ap++);
|
||||
*--b = '\0';
|
||||
return buf;
|
||||
}
|
||||
@@ -848,7 +848,7 @@ ether_ioctl(struct ifnet *ifp, int command, caddr_t data)
|
||||
*/
|
||||
case AF_IPX:
|
||||
{
|
||||
register struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr);
|
||||
struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr);
|
||||
struct arpcom *ac = (struct arpcom *) (ifp->if_softc);
|
||||
|
||||
if (ipx_nullhost(*ina))
|
||||
|
||||
Reference in New Issue
Block a user