|
Lines 54-66
Link Here
|
| 54 |
#if defined(__FreeBSD__) |
54 |
#if defined(__FreeBSD__) |
| 55 |
#define NBPFILTER 1 |
55 |
#define NBPFILTER 1 |
| 56 |
|
56 |
|
|
|
57 |
#include "vlan.h" |
| 58 |
|
| 57 |
#include <net/if.h> |
59 |
#include <net/if.h> |
| 58 |
#include <net/if_arp.h> |
60 |
#include <net/if_arp.h> |
| 59 |
#include <net/ethernet.h> |
61 |
#include <net/ethernet.h> |
| 60 |
#include <net/if_media.h> |
62 |
#include <net/if_media.h> |
| 61 |
|
63 |
|
|
|
64 |
#if NBPF > 0 |
| 62 |
#include <net/bpf.h> |
65 |
#include <net/bpf.h> |
|
|
66 |
#endif |
| 63 |
|
67 |
|
|
|
68 |
#if NVLAN > 0 |
| 69 |
#include <net/if_vlan_var.h> |
| 70 |
#endif |
| 71 |
|
| 64 |
#include <vm/vm.h> /* for vtophys */ |
72 |
#include <vm/vm.h> /* for vtophys */ |
| 65 |
#include <vm/pmap.h> /* for vtophys */ |
73 |
#include <vm/pmap.h> /* for vtophys */ |
| 66 |
#include <machine/bus_memio.h> |
74 |
#include <machine/bus_memio.h> |
|
Lines 85-90
Link Here
|
| 85 |
#else /* __OpenBSD__ */ |
93 |
#else /* __OpenBSD__ */ |
| 86 |
#include "bpfilter.h" |
94 |
#include "bpfilter.h" |
| 87 |
|
95 |
|
|
|
96 |
#define NVLAN 0 /* not sure if/how OpenBSD supports VLANs */ |
| 97 |
|
| 88 |
#include <sys/device.h> |
98 |
#include <sys/device.h> |
| 89 |
|
99 |
|
| 90 |
#include <net/if.h> |
100 |
#include <net/if.h> |
|
Lines 555-560
Link Here
|
| 555 |
|
565 |
|
| 556 |
/* Attach to OS's managers */ |
566 |
/* Attach to OS's managers */ |
| 557 |
ether_ifattach(ifp, ETHER_BPF_SUPPORTED); |
567 |
ether_ifattach(ifp, ETHER_BPF_SUPPORTED); |
|
|
568 |
#if NVLAN > 0 |
| 569 |
ifp->if_hdrlen = sizeof(struct ether_vlan_header); |
| 570 |
#endif |
| 558 |
callout_handle_init(&sc->stat_ch); |
571 |
callout_handle_init(&sc->stat_ch); |
| 559 |
|
572 |
|
| 560 |
fail: |
573 |
fail: |
|
Lines 1745-1752
Link Here
|
| 1745 |
return -1; |
1758 |
return -1; |
| 1746 |
} |
1759 |
} |
| 1747 |
desc->bufaddr = vtophys( mtod(buf->mbuf,caddr_t) ); |
1760 |
desc->bufaddr = vtophys( mtod(buf->mbuf,caddr_t) ); |
| 1748 |
|
1761 |
#if NVLAN > 0 |
|
|
1762 |
desc->buflength = ETHER_MAX_FRAME_LEN + EVL_ENCAPLEN; |
| 1763 |
#else |
| 1749 |
desc->buflength = ETHER_MAX_FRAME_LEN; |
1764 |
desc->buflength = ETHER_MAX_FRAME_LEN; |
|
|
1765 |
#endif |
| 1750 |
desc->status = 0x8000; /* Give to EPIC */ |
1766 |
desc->status = 0x8000; /* Give to EPIC */ |
| 1751 |
|
1767 |
|
| 1752 |
} |
1768 |
} |