- fixed some warnings in the lowlevel networking code
This commit is contained in:
parent
e26ceddd65
commit
163c6be18d
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_linux.cc,v 1.13 2002-11-20 19:06:23 bdenney Exp $
|
||||
// $Id: eth_linux.cc,v 1.14 2003-02-16 19:35:57 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -236,10 +236,11 @@ bx_linux_pktmover_c::sendpkt(void *buf, unsigned io_len)
|
||||
{
|
||||
int status;
|
||||
|
||||
if (this->fd != -1)
|
||||
if (this->fd != -1) {
|
||||
status = write(this->fd, buf, io_len);
|
||||
if (status == -1)
|
||||
BX_INFO(("eth_linux: write failed: %s", strerror(errno)));
|
||||
if (status == -1)
|
||||
BX_INFO(("eth_linux: write failed: %s", strerror(errno)));
|
||||
}
|
||||
}
|
||||
|
||||
// The receive poll process
|
||||
@ -258,7 +259,7 @@ bx_linux_pktmover_c::rx_timer(void)
|
||||
Bit8u rxbuf[BX_PACKET_BUFSIZ];
|
||||
struct sockaddr_ll sll;
|
||||
socklen_t fromlen;
|
||||
static unsigned char bcast_addr[6] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
//static unsigned char bcast_addr[6] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
|
||||
if (this->fd == -1)
|
||||
return;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_tap.cc,v 1.11 2002-11-20 19:06:23 bdenney Exp $
|
||||
// $Id: eth_tap.cc,v 1.12 2003-02-16 19:35:57 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -266,7 +266,7 @@ bx_tap_pktmover_c::sendpkt(void *buf, unsigned io_len)
|
||||
// dump packet in hex into an ascii log file
|
||||
fprintf (txlog_txt, "NE2K transmitting a packet, length %u\n", io_len);
|
||||
Bit8u *charbuf = (Bit8u *)buf;
|
||||
for (n=0; n<io_len; n++) {
|
||||
for (n=0; n<(int)io_len; n++) {
|
||||
if (((n % 16) == 0) && n>0)
|
||||
fprintf (txlog_txt, "\n");
|
||||
fprintf (txlog_txt, "%02x ", charbuf[n]);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_tuntap.cc,v 1.7 2002-11-20 19:06:23 bdenney Exp $
|
||||
// $Id: eth_tuntap.cc,v 1.8 2003-02-16 19:35:57 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -160,11 +160,11 @@ bx_tuntap_pktmover_c::bx_tuntap_pktmover_c(const char *netif,
|
||||
void *rxarg)
|
||||
{
|
||||
int flags;
|
||||
char filename[BX_PATHNAME_LEN];
|
||||
if (strncmp (netif, "tun", 3) != 0) {
|
||||
BX_PANIC (("eth_tuntap: interface name (%s) must be tun", netif));
|
||||
}
|
||||
#ifdef NEVERDEF
|
||||
char filename[BX_PATHNAME_LEN];
|
||||
sprintf (filename, "/dev/net/%s", netif);
|
||||
|
||||
// check if the TUN/TAP devices is running, and turn on ARP. This is based
|
||||
|
Loading…
Reference in New Issue
Block a user