Changeset 57907 in vbox for trunk/src/VBox/HostDrivers/VBoxNetAdp/darwin
- Timestamp:
- Sep 26, 2015 3:35:03 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 102879
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetAdp/darwin/VBoxNetAdp-darwin.cpp
r57904 r57907 51 51 #include <sys/conf.h> 52 52 #include <miscfs/devfs/devfs.h> 53 extern "C" { 53 RT_C_DECLS_BEGIN 54 54 #include <net/bpf.h> 55 } 55 RT_C_DECLS_END 56 56 57 57 #define VBOXNETADP_OS_SPECFIC 1 … … 210 210 } 211 211 212 static errno_t vboxNetAdpDarwinBpfTap(ifnet_t pIface, u_int32_t uLinkType, bpf_tap_mode nMode)213 {214 PVBOXNETADP pThis = VBOXNETADP_FROM_IFACE(pIface);215 Assert(pThis);216 Log2(("vboxNetAdpDarwinBpfTap: mode=%d\n", nMode));217 pThis->u.s.nTapMode = nMode;218 return 0;219 }220 221 static errno_t vboxNetAdpDarwinBpfSend(ifnet_t pIface, u_int32_t uLinkType, mbuf_t pMBuf)222 {223 LogRel(("vboxnetadp: BPF send function is not implemented (dlt=%d)\n", uLinkType));224 mbuf_freem_list(pMBuf);225 return 0;226 }227 228 229 212 int vboxNetAdpOsCreate(PVBOXNETADP pThis, PCRTMAC pMACAddress) 230 213 { … … 241 224 return rc; 242 225 } 243 244 pThis->u.s.nTapMode = BPF_MODE_DISABLED;245 226 246 227 mac.sdl_len = sizeof(mac); … … 279 260 if (!err) 280 261 { 281 err = bpf_attach(pThis->u.s.pIface, DLT_EN10MB, ETHER_HDR_LEN, 282 vboxNetAdpDarwinBpfSend, vboxNetAdpDarwinBpfTap); 283 if (err) 284 { 285 LogRel(("vboxnetadp: bpf_attach failed with %d\n", err)); 286 } 262 bpfattach(pThis->u.s.pIface, DLT_EN10MB, ETHER_HDR_LEN); 263 287 264 err = ifnet_set_flags(pThis->u.s.pIface, IFF_RUNNING | IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST, 0xFFFF); 288 265 if (!err)
Note:
See TracChangeset
for help on using the changeset viewer.