Deleted Added
full compact
if_ex.c (46347) if_ex.c (48645)
1/*
2 * Copyright (c) 1996, Javier Mart�n Rueda (jmrueda@diatel.upm.es)
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
1/*
2 * Copyright (c) 1996, Javier Mart�n Rueda (jmrueda@diatel.upm.es)
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $Id: if_ex.c,v 1.14 1999/01/28 01:59:53 dillon Exp $
27 * $Id: if_ex.c,v 1.15 1999/05/02 22:01:24 peter Exp $
28 */
29
30/*
31 * Intel EtherExpress Pro/10, Pro/10+ Ethernet driver
32 *
33 * Revision history:
34 *
35 * 30-Oct-1996: first beta version. Inet and BPF supported, but no multicast.
36 */
37
38#include "ex.h"
39#if NEX > 0
28 */
29
30/*
31 * Intel EtherExpress Pro/10, Pro/10+ Ethernet driver
32 *
33 * Revision history:
34 *
35 * 30-Oct-1996: first beta version. Inet and BPF supported, but no multicast.
36 */
37
38#include "ex.h"
39#if NEX > 0
40#include "bpfilter.h"
40#include "bpf.h"
41#include "opt_inet.h"
42#include "opt_ipx.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/conf.h>
47#include <sys/sockio.h>
48#include <sys/mbuf.h>

--- 11 unchanged lines hidden (view full) ---

60#include <netipx/ipx_if.h>
61#endif
62
63#ifdef NS
64#include <netns/ns.h>
65#include <netns/ns_if.h>
66#endif
67
41#include "opt_inet.h"
42#include "opt_ipx.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/conf.h>
47#include <sys/sockio.h>
48#include <sys/mbuf.h>

--- 11 unchanged lines hidden (view full) ---

60#include <netipx/ipx_if.h>
61#endif
62
63#ifdef NS
64#include <netns/ns.h>
65#include <netns/ns_if.h>
66#endif
67
68#if NBPFILTER > 0
68#if NBPF > 0
69#include <net/bpf.h>
70#endif
71
72#include <machine/clock.h>
73
74#include <i386/isa/isa_device.h>
75#include <i386/isa/if_exreg.h>
76

--- 212 unchanged lines hidden (view full) ---

289 case Conn_BNC: printf("BNC\n"); break;
290 case Conn_AUI: printf("AUI\n"); break;
291 default: printf("???\n");
292 }
293
294 /*
295 * If BPF is in the kernel, call the attach for it
296 */
69#include <net/bpf.h>
70#endif
71
72#include <machine/clock.h>
73
74#include <i386/isa/isa_device.h>
75#include <i386/isa/if_exreg.h>
76

--- 212 unchanged lines hidden (view full) ---

289 case Conn_BNC: printf("BNC\n"); break;
290 case Conn_AUI: printf("AUI\n"); break;
291 default: printf("???\n");
292 }
293
294 /*
295 * If BPF is in the kernel, call the attach for it
296 */
297#if NBPFILTER > 0
297#if NBPF > 0
298 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
299#endif
300 DODEBUG(Start_End, printf("ex_attach%d: finish\n", unit););
301 sc->arpcom.ac_if.if_snd.ifq_maxlen = ifqmaxlen;
302 return(1);
303}
304
305

--- 209 unchanged lines hidden (view full) ---

515 }
516 else {
517 outb(iobase + CMD_REG, Resume_XMT_List_CMD);
518 DODEBUG(Sent_Pkts, printf("Resume\n"););
519 }
520 sc->tx_last = dest;
521 sc->tx_tail = next;
522
298 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
299#endif
300 DODEBUG(Start_End, printf("ex_attach%d: finish\n", unit););
301 sc->arpcom.ac_if.if_snd.ifq_maxlen = ifqmaxlen;
302 return(1);
303}
304
305

--- 209 unchanged lines hidden (view full) ---

515 }
516 else {
517 outb(iobase + CMD_REG, Resume_XMT_List_CMD);
518 DODEBUG(Sent_Pkts, printf("Resume\n"););
519 }
520 sc->tx_last = dest;
521 sc->tx_tail = next;
522
523#if NBPFILTER > 0
523#if NBPF > 0
524 if (ifp->if_bpf != NULL)
525 bpf_mtap(ifp, opkt);
526#endif
527 ifp->if_timer = 2;
528 ifp->if_opackets++;
529 m_freem(opkt);
530 }
531 else {

--- 190 unchanged lines hidden (view full) ---

722#ifdef EXDEBUG
723 if (debug_mask & Rcvd_Pkts) {
724 if ((eh->ether_dhost[5] != 0xff) || (eh->ether_dhost[0] != 0xff)) {
725 printf("Receive packet with %d data bytes: %6D -> ", QQQ, eh->ether_shost, ":");
726 printf("%6D\n", eh->ether_dhost, ":");
727 } /* QQQ */
728 }
729#endif
524 if (ifp->if_bpf != NULL)
525 bpf_mtap(ifp, opkt);
526#endif
527 ifp->if_timer = 2;
528 ifp->if_opackets++;
529 m_freem(opkt);
530 }
531 else {

--- 190 unchanged lines hidden (view full) ---

722#ifdef EXDEBUG
723 if (debug_mask & Rcvd_Pkts) {
724 if ((eh->ether_dhost[5] != 0xff) || (eh->ether_dhost[0] != 0xff)) {
725 printf("Receive packet with %d data bytes: %6D -> ", QQQ, eh->ether_shost, ":");
726 printf("%6D\n", eh->ether_dhost, ":");
727 } /* QQQ */
728 }
729#endif
730#if NBPFILTER > 0
730#if NBPF > 0
731 if (ifp->if_bpf != NULL) {
732 bpf_mtap(ifp, ipkt);
733
734 /*
735 * Note that the interface cannot be in promiscuous mode if there are
736 * no BPF listeners. And if we are in promiscuous mode, we have to
737 * check if this packet is really ours.
738 */

--- 208 unchanged lines hidden ---
731 if (ifp->if_bpf != NULL) {
732 bpf_mtap(ifp, ipkt);
733
734 /*
735 * Note that the interface cannot be in promiscuous mode if there are
736 * no BPF listeners. And if we are in promiscuous mode, we have to
737 * check if this packet is really ours.
738 */

--- 208 unchanged lines hidden ---